Annotation of html5/spec/diff/Overview.html, revision 1.2

1.1       mike        1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
                      2: <!-- when publishing, change bits marked ZZZ -->
1.2     ! mike        3: <html lang="en-US">
1.1       mike        4: <head>
                      5: <meta name="generator" content=
                      6: "HTML Tidy for Linux (vers 1 September 2005), see www.w3.org">
                      7: <title>HTML 5</title>
                      8: 
                      9: <style type="text/css">
                     10:    dt, dfn { font-weight: bold; font-style: normal; }
                     11:    img.extra { float: right; }
                     12:    body ins, body del { display: block; }
                     13:    body * ins, body * del { display: inline; }
                     14:    pre, code { color: black; background: transparent; font-size: inherit; font-family: monospace; }
                     15:    pre strong { color: black; font: inherit; font-weight: bold; background: yellow; }
                     16:    pre em { font-weight: bolder; font-style: normal; }
                     17:    pre.idl :link, pre.idl :visited { color: inherit; background: transparent; }
                     18:    pre.idl { border: solid thin; background: #EEEEEE; color: black; padding: 0.5em; }
                     19:    table { border-collapse: collapse; border-style: hidden hidden none hidden; }
                     20:    table thead { border-bottom: solid; }
                     21:    table tbody th:first-child { border-left: solid; }
                     22:    table td, table th { border-left: solid; border-right: solid; border-bottom: solid thin; vertical-align: top; padding: 0.2em; }
                     23:    ul.toc dfn, h1 dfn, h2 dfn, h3 dfn, h4 dfn, h5 dfn, h6 dfn { font: inherit; }
                     24:    ul.toc li ul { margin-bottom: 0.75em; }
                     25:    ul.toc li ul li ul { margin-bottom: 0.25em; }
                     26:    var sub { vertical-align: bottom; font-size: smaller; position: relative; top: 0.1em; }
                     27:    @media screen { code { color: rgb(255, 69, 0); background: transparent; } }
                     28:    code :link, code :visited { color: inherit; background: transparent; }
                     29:    .example { display: block; color: #222222; background: #FCFCFC; border-left: double; margin-left: 1em; padding-left: 1em; }
                     30:    .issue, .big-issue { color: #E50000; background: white; border: solid red; padding: 0.5em; margin: 1em 0; }
                     31:    .issue > :first-child, .big-issue > :first-child { margin-top: 0; }
                     32:    p .big-issue { line-height: 3em; }
                     33:    .note { color: green; background: transparent; }
                     34:    .note { font-family: sans-serif; }
                     35:    p.note:before { content: 'Note: '; }
                     36:    .warning { color: red; background: transparent; }
                     37:    .warning:before { font-style: normal; }
                     38:    p.warning:before { content: '\26A0 Warning! '; }
                     39:    .note, .warning { font-weight: bolder; font-style: italic; padding: 0.5em 2em; }
                     40:    .copyright { margin: 0.25em 0; }
                     41:    img { max-width: 100%; }
                     42:    h4 + .element { margin-top: -2.5em; padding-top: 2em; }
                     43:    h4 + p + .element { margin-top: -5em; padding-top: 4em; }
                     44:    .element { background: #EEEEFF; color: black; margin: 0 0 1em -1em; padding: 0 1em 0.25em 0.75em; border-left: solid #9999FF 0.25em; }
                     45:    table.matrix, table.matrix td { border: none; text-align: right; }
                     46:    table.matrix { margin-left: 2em; }
                     47: </style>
                     48: <link href="http://www.w3.org/StyleSheets/TR/%57%33%43-WD" rel=
                     49: "stylesheet" type="text/css"><!-- ZZZ -->
                     50: </head>
                     51: <body>
                     52: <div class="head">
                     53: <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src=
                     54: "http://www.w3.org/Icons/w3c_home" width="72"></a></p>
                     55: <h1 id="html-5">HTML 5</h1>
                     56: <h2 class="no-num no-toc" id="a-vocabulary">A vocabulary and
                     57: associated APIs for HTML and XHTML</h2>
                     58: <h2 class="no-num no-toc" id="w3c-working">W3C Working Draft
1.2     ! mike       59: <del class="diff-old">22 January</del> <ins class="diff-chg">10
1.1       mike       60: June</ins> 2008</h2>
                     61: <dl>
                     62: <dt>This Version:</dt>
                     63: <dd><del class=
                     64: "diff-old">http://www.w3.org/TR/2008/WD-html5-20080122/</del>
1.2     ! mike       65: <a href="http://www.w3.org/TR/2008/WD-html5-20080610"><ins class=
        !            66: "diff-chg">http://www.w3.org/TR/2008/WD-html5-20080610/</ins></a></dd>
1.1       mike       67: <dt>Latest Published Version:</dt>
                     68: <dd><a href=
                     69: "http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a></dd>
                     70: <dt>Latest Editor's Draft:</dt>
                     71: <dd><a href=
                     72: "http://www.w3.org/html/wg/html5/">http://www.w3.org/html/wg/html5/</a></dd>
                     73: <dt><ins class="diff-new">Previous Versions:</ins></dt>
                     74: <dd><a href=
                     75: "http://www.w3.org/TR/2008/WD-html5-20080122/"><ins class=
                     76: "diff-new">http://www.w3.org/TR/2008/WD-html5-20080122/</ins></a></dd>
                     77: <dt>Editors:</dt>
                     78: <dd><a href="mailto:ian@hixie.ch">Ian Hickson</a> , Google,
                     79: Inc.</dd>
                     80: <dd>David Hyatt, Apple, Inc.</dd>
                     81: </dl>
1.2     ! mike       82: <p><ins class="diff-new">The content of this document is also
        !            83: available in the following normative format:</ins></p>
        !            84: <ul>
        !            85: <li><ins class="diff-new">As a</ins> <a href=
        !            86: "http://www.w3.org/TR/2008/WD-html5-20080610/"><ins class=
        !            87: "diff-new">multipage HTML file</ins></a></li>
        !            88: </ul>
        !            89: <p><ins class="diff-new">The content is also available in the
        !            90: following non-normative format:</ins></p>
        !            91: <ul>
        !            92: <li><ins class="diff-new">As a</ins> <a href=
        !            93: "http://www.w3.org/TR/2008/WD-html5-20080610/diff/"><ins class=
        !            94: "diff-new">diff-marked version</ins></a> <ins class=
        !            95: "diff-new">showing changes made between 22 January 2008 and 10 June
        !            96: 2008</ins></li>
        !            97: </ul>
1.1       mike       98: <p class="copyright"><a href=
                     99: "http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>
                    100: © 2008 <a href="http://www.w3.org/"><abbr title=
                    101: "World Wide Web Consortium">W3C</abbr></a> <sup>®</sup> ( <a href=
                    102: "http://www.csail.mit.edu/"><abbr title=
                    103: "Massachusetts Institute of Technology">MIT</abbr></a> , <a href=
                    104: "http://www.ercim.org/"><abbr title=
                    105: "European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>
                    106: , <a href="http://www.keio.ac.jp/">Keio</a> ), All Rights Reserved.
                    107: W3C <a href=
                    108: "http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>
                    109: , <a href=
                    110: "http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
                    111: and <a href=
                    112: "http://www.w3.org/Consortium/Legal/copyright-documents">document
                    113: use</a> rules apply.</p>
                    114: </div>
                    115: <hr>
                    116: <h2 class="no-num no-toc" id="abstract">Abstract</h2>
                    117: <p>This specification defines the 5th major revision of the core
                    118: language of the World Wide <del class="diff-old">Web, HTML.</del>
                    119: <ins class="diff-chg">Web: the Hypertext Markup Language
                    120: (HTML).</ins> In this version, new features are introduced to help
                    121: Web application authors, new elements are introduced based on
                    122: research into prevailing authoring practices, and special attention
                    123: has been given to defining clear conformance criteria for user
                    124: agents in an effort to improve interoperability.</p>
                    125: <h2 class="no-num no-toc" id="status">Status of this document</h2>
                    126: <p><em>This section describes the status of this document at the
                    127: time of its publication. Other documents may supersede this
                    128: document. A list of current W3C publications and the <del class=
                    129: "diff-old">latest</del> <ins class="diff-chg">most recently
                    130: formally published</ins> revision of this technical report can be
                    131: found in the <a href="http://www.w3.org/TR/">W3C technical reports
                    132: index</a> at http://www.w3.org/TR/.</em></p>
                    133: <p>If you wish to make comments regarding this document, please
                    134: send them to <a href=
                    135: "mailto:public-html-comments@w3.org">public-html-comments@w3.org</a>
                    136: ( <a href=
                    137: "mailto:public-html-comments-request@w3.org?subject=subscribe">subscribe</a>
                    138: , <a href=
                    139: "http://lists.w3.org/Archives/Public/public-html-comments/">archives</a>
1.2     ! mike      140: ). All feedback is welcome.</p>
1.1       mike      141: <p>Implementors should be aware that this specification is not
                    142: stable. <strong>Implementors who are not taking part in the
                    143: discussions are likely to find the specification changing out from
                    144: under them in incompatible ways.</strong> Vendors interested in
                    145: implementing this specification before it eventually reaches the
                    146: Candidate Recommendation stage should join the aforementioned
                    147: mailing lists and take part in the discussions.</p>
                    148: <p>The publication of this document by the W3C as a W3C Working
                    149: Draft does not imply that all of the participants in the W3C HTML
                    150: working group endorse the contents of the specification. Indeed,
                    151: for any section of the specification, one can usually find many
                    152: members of the working group or of the W3C as a whole who object
                    153: strongly to the current text, the existence of the section at all,
                    154: or the idea that the working group should even spend time
                    155: discussing the concept of that section.</p>
1.2     ! mike      156: <p>The <ins class="diff-new">changes made to this draft
        !           157: specification after the 22 January 2008 First Public Working Draft
        !           158: and this 10 June 2008 Working Draft are recorded in the following
        !           159: documents:</ins></p>
        !           160: <ul>
        !           161: <li><ins class="diff-new">A non-normative</ins> <a href=
        !           162: "http://www.w3.org/TR/2008/WD-html5-20080610/diff/"><ins class=
        !           163: "diff-new">diff-marked version</ins></a> <ins class="diff-new">of
        !           164: the specification</ins></li>
        !           165: <li><ins class="diff-new">A non-normative</ins> <a href=
        !           166: "http://www.w3.org/TR/2008/NOTE-html5-pubnotes-20080610/"><ins class="diff-new">
        !           167: HTML 5 Publication Notes</ins></a> <ins class="diff-new">document
        !           168: that provides prose descriptions of the changes.</ins></li>
        !           169: </ul>
        !           170: <p><ins class="diff-new">The following document is also available;
        !           171: it describes the differences between HTML 5 and the previous major
        !           172: version of the language, HTML 4:</ins></p>
1.1       mike      173: <ul>
1.2     ! mike      174: <li><a href=
        !           175: "http://www.w3.org/TR/2008/WD-html5-diff-20080610/"><ins class=
        !           176: "diff-new">HTML 5 differences from HTML 4</ins></a></li>
1.1       mike      177: </ul>
                    178: <p><ins class="diff-new">The</ins> W3C <a href=
                    179: "http://www.w3.org/html/wg/">HTML Working Group</a> is the W3C
                    180: working group responsible for this specification's progress along
                    181: the W3C Recommendation track. This specification is the <del class=
1.2     ! mike      182: "diff-old">22 January</del> <ins class="diff-chg">10 June</ins>
        !           183: 2008 <del class="diff-old">First Public</del> Working Draft.</p>
        !           184: <p>This document was produced by a group operating under the
        !           185: <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
        !           186: February 2004 W3C Patent Policy</a> . W3C maintains a <a href=
1.1       mike      187: "http://www.w3.org/2004/01/pp-impl/40318/status" rel=
                    188: "disclosure">public list of any patent disclosures</a> made in
                    189: connection with the deliverables of the group; that page also
                    190: includes instructions for disclosing a patent. An individual who
                    191: has actual knowledge of a patent which the individual believes
                    192: contains <a href=
                    193: "http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">
                    194: Essential Claim(s)</a> must disclose the information in accordance
                    195: with <a href=
                    196: "http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">
                    197: section 6 of the W3C Patent Policy</a> .</p>
                    198: <h3 class="no-num no-toc" id="stability0">Stability</h3>
                    199: <p>Different parts of this specification are at different levels of
                    200: maturity.</p>
                    201: <div id="stability"></div>
                    202: <p class="big-issue">Some of the more major known issues are marked
                    203: like this. There are many other issues that have been raised as
                    204: well; the issues given in this document are not the only known
                    205: issues! There are also some spec-wide issues that have not yet been
                    206: addressed: case-sensitivity is a very poorly handled topic right
                    207: now, and the firing of events needs to be unified (right now some
                    208: bubble, some don't, they all use different text to fire events,
                    209: etc). It would also be nice to unify the rules on downloading
                    210: content when attributes change (e.g. <code title="">src</code>
                    211: attributes) - should they initiate downloads when the element
                    212: immediately, is inserted in the document, when active scripts end,
                    213: etc. This matters e.g. if an attribute is set twice in a row (does
                    214: it hit the network twice).</p>
                    215: <h2 class="no-num no-toc" id="contents">Table of contents</h2>
                    216: <ul class="toc">
                    217: <li><a href="#introduction"><span class="secno">1.</span>
                    218: Introduction</a>
                    219: <ul class="toc">
                    220: <li><a href="#scope"><span class="secno"><del class=
                    221: "diff-old">1.1.</del> <ins class="diff-chg">1.1</ins></span>
                    222: Scope</a>
                    223: <ul class="toc">
                    224: <li><a href="#relationship"><span class="secno"><del class=
                    225: "diff-old">1.1.1.</del> <ins class="diff-chg">1.1.1</ins></span>
                    226: Relationship to HTML 4.01, XHTML 1.1, DOM2 HTML</a></li>
                    227: <li><a href="#relationship0"><span class="secno"><del class=
                    228: "diff-old">1.1.2.</del> <ins class="diff-chg">1.1.2</ins></span>
                    229: Relationship to XHTML2</a></li>
                    230: <li><a href="#relationship1"><span class="secno"><del class=
                    231: "diff-old">1.1.3.</del> <ins class="diff-chg">1.1.3</ins></span>
                    232: Relationship to XUL, Flash, Silverlight, and other proprietary UI
                    233: languages</a></li>
                    234: </ul>
                    235: </li>
                    236: <li><a href="#structure"><span class="secno"><del class=
                    237: "diff-old">1.2.</del> <ins class="diff-chg">1.2</ins></span>
                    238: Structure of this specification</a>
                    239: <ul class="toc">
                    240: <li><a href="#how-to"><span class="secno"><del class=
                    241: "diff-old">1.2.1.</del> <ins class="diff-chg">1.2.1</ins></span>
                    242: How to read this specification</a></li>
                    243: </ul>
                    244: </li>
                    245: <li><a href="#conformance"><span class="secno"><del class=
                    246: "diff-old">1.3.</del> <ins class="diff-chg">1.3</ins></span>
                    247: Conformance requirements</a>
                    248: <ul class="toc">
                    249: <li><a href="#common"><span class="secno"><del class=
                    250: "diff-old">1.3.1.</del> <ins class="diff-chg">1.3.1</ins></span>
                    251: Common conformance requirements for APIs exposed to
                    252: JavaScript</a></li>
                    253: <li><a href="#dependencies"><span class="secno"><del class=
                    254: "diff-old">1.3.2.</del> <ins class="diff-chg">1.3.2</ins></span>
                    255: Dependencies</a></li>
                    256: <li><a href="#features"><span class="secno"><del class=
                    257: "diff-old">1.3.3.</del> <ins class="diff-chg">1.3.3</ins></span>
                    258: Features defined in other specifications</a></li>
                    259: </ul>
                    260: </li>
                    261: <li><a href="#terminology"><span class="secno"><del class=
                    262: "diff-old">1.4.</del> <ins class="diff-chg">1.4</ins></span>
                    263: Terminology</a>
                    264: <ul class="toc">
                    265: <li><a href="#html-vs"><span class="secno"><del class=
                    266: "diff-old">1.4.1.</del> <ins class="diff-chg">1.4.1</ins></span>
                    267: HTML vs XHTML</a></li>
                    268: </ul>
                    269: </li>
                    270: </ul>
                    271: </li>
                    272: <li><a href="#dom"><span class="secno">2.</span> The Document
                    273: Object Model</a>
                    274: <ul class="toc">
                    275: <li><a href="#documents"><span class="secno"><del class=
                    276: "diff-old">2.1.</del> <ins class="diff-chg">2.1</ins></span>
                    277: Documents</a>
                    278: <ul class="toc">
                    279: <li><a href="#security"><span class="secno"><del class=
                    280: "diff-old">2.1.1.</del> <ins class="diff-chg">2.1.1</ins></span>
                    281: Security</a></li>
                    282: <li><a href="#resource"><span class="secno"><del class=
                    283: "diff-old">2.1.2.</del> <ins class="diff-chg">2.1.2</ins></span>
                    284: Resource metadata management</a></li>
                    285: </ul>
                    286: </li>
                    287: <li><a href="#elements"><span class="secno"><del class=
                    288: "diff-old">2.2.</del> <ins class="diff-chg">2.2</ins></span>
                    289: Elements</a>
                    290: <ul class="toc">
                    291: <li><a href="#reflecting"><span class="secno"><del class=
                    292: "diff-old">2.2.1.</del> <ins class="diff-chg">2.2.1</ins></span>
                    293: Reflecting content attributes in DOM attributes</a></li>
                    294: </ul>
                    295: </li>
                    296: <li><a href="#common0"><span class="secno"><del class=
                    297: "diff-old">2.3.</del> <ins class="diff-chg">2.3</ins></span> Common
                    298: DOM interfaces</a>
                    299: <ul class="toc">
                    300: <li><a href="#collections"><span class="secno"><del class=
                    301: "diff-old">2.3.1.</del> <ins class="diff-chg">2.3.1</ins></span>
                    302: Collections</a>
                    303: <ul class="toc">
                    304: <li><a href="#htmlcollection"><span class="secno">2.3.1.1.</span>
                    305: HTMLCollection</a></li>
                    306: <li><a href="#htmlformcontrolscollection"><span class=
                    307: "secno">2.3.1.2.</span> HTMLFormControlsCollection</a></li>
                    308: <li><a href="#htmloptionscollection"><span class=
                    309: "secno">2.3.1.3.</span> HTMLOptionsCollection</a></li>
                    310: </ul>
                    311: </li>
                    312: <li><a href="#domtokenlist"><span class="secno"><del class=
                    313: "diff-old">2.3.2.</del> <ins class="diff-chg">2.3.2</ins></span>
                    314: DOMTokenList</a></li>
                    315: <li><a href="#domstringmap"><span class="secno"><ins class=
                    316: "diff-new">2.3.3</ins></span> <ins class=
                    317: "diff-new">DOMStringMap</ins></a></li>
                    318: <li><a href="#dom-feature"><span class="secno"><del class=
                    319: "diff-old">2.3.3.</del> <ins class="diff-chg">2.3.4</ins></span>
                    320: DOM feature strings</a></li>
                    321: </ul>
                    322: </li>
                    323: <li><a href="#dom-tree"><span class="secno"><del class=
                    324: "diff-old">2.4.</del> <ins class="diff-chg">2.4</ins></span> DOM
                    325: tree accessors</a></li>
                    326: <li><a href="#dynamic"><span class="secno"><del class=
                    327: "diff-old">2.5.</del> <ins class="diff-chg">2.5</ins></span>
                    328: Dynamic markup insertion</a>
                    329: <ul class="toc">
                    330: <li><a href="#controlling"><span class="secno"><del class=
                    331: "diff-old">2.5.1.</del> <ins class="diff-chg">2.5.1</ins></span>
                    332: Controlling the input stream</a></li>
                    333: <li><a href="#dynamic0"><span class="secno"><del class=
                    334: "diff-old">2.5.2.</del> <ins class="diff-chg">2.5.2</ins></span>
                    335: Dynamic markup insertion in HTML</a></li>
                    336: <li><a href="#dynamic1"><span class="secno"><del class=
                    337: "diff-old">2.5.3.</del> <ins class="diff-chg">2.5.3</ins></span>
                    338: Dynamic markup insertion in XML</a></li>
                    339: </ul>
                    340: </li>
                    341: <li><a href="#apis-in"><span class="secno"><del class=
                    342: "diff-old">2.6.</del> <ins class="diff-chg">2.6</ins></span> APIs
                    343: in HTML documents</a></li>
                    344: </ul>
                    345: </li>
                    346: <li><a href="#semantics"><span class="secno">3.</span> Semantics
                    347: and structure of HTML elements</a>
                    348: <ul class="toc">
                    349: <li><a href="#semantics-intro"><span class="secno"><del class=
                    350: "diff-old">3.1.</del> <ins class="diff-chg">3.1</ins></span>
                    351: Introduction</a></li>
                    352: <li><a href="#common1"><span class="secno"><del class=
                    353: "diff-old">3.2.</del> <ins class="diff-chg">3.2</ins></span> Common
                    354: microsyntaxes</a>
                    355: <ul class="toc">
                    356: <li><a href="#common2"><span class="secno"><del class=
                    357: "diff-old">3.2.1.</del> <ins class="diff-chg">3.2.1</ins></span>
                    358: Common parser idioms</a></li>
                    359: <li><a href="#boolean"><span class="secno"><del class=
                    360: "diff-old">3.2.2.</del> <ins class="diff-chg">3.2.2</ins></span>
                    361: Boolean attributes</a></li>
                    362: <li><a href="#numbers"><span class="secno"><del class=
                    363: "diff-old">3.2.3.</del> <ins class="diff-chg">3.2.3</ins></span>
                    364: Numbers</a>
                    365: <ul class="toc">
                    366: <li><a href="#unsigned"><span class="secno">3.2.3.1.</span>
                    367: Unsigned integers</a></li>
                    368: <li><a href="#signed"><span class="secno">3.2.3.2.</span> Signed
                    369: integers</a></li>
                    370: <li><a href="#real-numbers"><span class="secno">3.2.3.3.</span>
                    371: Real numbers</a></li>
                    372: <li><a href="#ratios"><span class="secno">3.2.3.4.</span>
                    373: Ratios</a></li>
                    374: <li><a href="#percentages-and-dimensions"><span class=
                    375: "secno">3.2.3.5.</span> Percentages and dimensions</a></li>
                    376: <li><a href="#lists"><span class="secno">3.2.3.6.</span> Lists of
                    377: integers</a></li>
                    378: </ul>
                    379: </li>
                    380: <li><a href="#dates"><span class="secno"><del class=
                    381: "diff-old">3.2.4.</del> <ins class="diff-chg">3.2.4</ins></span>
                    382: Dates and times</a>
                    383: <ul class="toc">
                    384: <li><a href="#specific"><span class="secno">3.2.4.1.</span>
                    385: Specific moments in time</a></li>
                    386: <li><a href="#vaguer"><span class="secno">3.2.4.2.</span> Vaguer
                    387: moments in time</a></li>
                    388: </ul>
                    389: </li>
                    390: <li><a href="#time-offsets"><span class="secno"><del class=
                    391: "diff-old">3.2.5.</del> <ins class="diff-chg">3.2.5</ins></span>
                    392: Time offsets</a></li>
                    393: <li><a href="#tokens"><span class="secno"><del class=
                    394: "diff-old">3.2.6.</del> <ins class="diff-chg">3.2.6</ins></span>
                    395: Tokens</a></li>
                    396: <li><a href="#keywords"><span class="secno"><del class=
                    397: "diff-old">3.2.7.</del> <ins class="diff-chg">3.2.7</ins></span>
                    398: Keywords and enumerated attributes</a></li>
                    399: <li><a href="#syntax-references"><span class="secno"><del class=
                    400: "diff-old">3.2.8.</del> <ins class="diff-chg">3.2.8</ins></span>
                    401: References</a></li>
                    402: <li><a href="#urls"><span class="secno"><ins class=
                    403: "diff-new">3.2.9</ins></span> <ins class=
                    404: "diff-new">URLs</ins></a></li>
                    405: </ul>
                    406: </li>
                    407: <li><a href="#documents0"><span class="secno"><del class=
                    408: "diff-old">3.3.</del> <ins class="diff-chg">3.3</ins></span>
                    409: Documents and document fragments</a>
                    410: <ul class="toc">
                    411: <li><a href="#semantics0"><span class="secno"><del class=
                    412: "diff-old">3.3.1.</del> <ins class="diff-chg">3.3.1</ins></span>
                    413: Semantics</a></li>
                    414: <li><a href="#structure0"><span class="secno"><del class=
                    415: "diff-old">3.3.2.</del> <ins class="diff-chg">3.3.2</ins></span>
                    416: Structure</a></li>
                    417: <li><a href="#kinds"><span class="secno"><del class=
                    418: "diff-old">3.3.3.</del> <ins class="diff-chg">3.3.3</ins></span>
                    419: Kinds of content</a>
                    420: <ul class="toc">
                    421: <li><a href="#metadata"><span class="secno">3.3.3.1.</span>
                    422: Metadata content</a></li>
                    423: <li><a href="#flow-content"><span class="secno">3.3.3.2.</span>
                    424: <del class="diff-old">Prose</del> <ins class="diff-chg">Flow</ins>
                    425: content</a></li>
                    426: <li><a href="#sectioning"><span class="secno">3.3.3.3.</span>
                    427: Sectioning content</a></li>
                    428: <li><a href="#heading"><span class="secno">3.3.3.4.</span> Heading
                    429: content</a></li>
                    430: <li><a href="#phrasing"><span class="secno">3.3.3.5.</span>
                    431: Phrasing content</a></li>
                    432: <li><a href="#embedded"><span class="secno">3.3.3.6.</span>
                    433: Embedded content</a></li>
                    434: <li><a href="#interactive0"><span class="secno">3.3.3.7.</span>
                    435: Interactive content</a></li>
                    436: </ul>
                    437: </li>
                    438: <li><a href="#transparent"><span class="secno"><del class=
                    439: "diff-old">3.3.4.</del> <ins class="diff-chg">3.3.4</ins></span>
                    440: Transparent content models</a></li>
                    441: <li><a href="#paragraphs"><span class="secno"><del class=
                    442: "diff-old">3.3.5.</del> <ins class="diff-chg">3.3.5</ins></span>
                    443: Paragraphs</a></li>
                    444: </ul>
                    445: </li>
                    446: <li><a href="#global"><span class="secno"><del class=
                    447: "diff-old">3.4.</del> <ins class="diff-chg">3.4</ins></span> Global
                    448: attributes</a>
                    449: <ul class="toc">
                    450: <li><a href="#the-id"><span class="secno"><del class=
                    451: "diff-old">3.4.1.</del> <ins class="diff-chg">3.4.1</ins></span>
                    452: The <code>id</code> attribute</a></li>
                    453: <li><a href="#the-title"><span class="secno"><del class=
                    454: "diff-old">3.4.2.</del> <ins class="diff-chg">3.4.2</ins></span>
                    455: The <code>title</code> attribute</a></li>
                    456: <li><a href="#the-lang"><span class="secno"><del class=
                    457: "diff-old">3.4.3.</del> <ins class="diff-chg">3.4.3</ins></span>
                    458: The <code>lang</code> (HTML only) and <code>xml:lang</code> (XML
                    459: only) attributes</a></li>
1.2     ! mike      460: <li><a href="#the-xmlbase"><span class="secno"><ins class=
        !           461: "diff-new">3.4.4</ins></span> <ins class="diff-new">The</ins>
        !           462: <code><ins class="diff-new">xml:base</ins></code> <ins class=
        !           463: "diff-new">attribute (XML only)</ins></a></li>
1.1       mike      464: <li><a href="#the-dir"><span class="secno"><del class=
1.2     ! mike      465: "diff-old">3.4.4.</del> <ins class="diff-chg">3.4.5</ins></span>
1.1       mike      466: The <code>dir</code> attribute</a></li>
                    467: <li><a href="#classes"><span class="secno"><del class=
1.2     ! mike      468: "diff-old">3.4.5.</del> <ins class="diff-chg">3.4.6</ins></span>
1.1       mike      469: The <code>class</code> attribute</a></li>
                    470: <li><a href="#the-irrelevant"><span class="secno"><del class=
1.2     ! mike      471: "diff-old">3.4.6.</del> <ins class="diff-chg">3.4.7</ins></span>
1.1       mike      472: The <code>irrelevant</code> attribute</a></li>
                    473: <li><a href="#the-style"><span class="secno"><ins class=
1.2     ! mike      474: "diff-new">3.4.8</ins></span> <ins class="diff-new">The</ins>
1.1       mike      475: <code><ins class="diff-new">style</ins></code> <ins class=
                    476: "diff-new">attribute</ins></a></li>
                    477: <li><a href="#embedding"><span class="secno"><ins class=
1.2     ! mike      478: "diff-new">3.4.9</ins></span> <ins class="diff-new">Embedding
1.1       mike      479: custom non-visible data</ins></a></li>
                    480: </ul>
                    481: </li>
                    482: <li><a href="#interaction"><span class="secno"><del class=
                    483: "diff-old">3.5.</del> <ins class="diff-chg">3.5</ins></span>
                    484: Interaction</a>
                    485: <ul class="toc">
                    486: <li><a href="#activation"><span class="secno"><del class=
                    487: "diff-old">3.5.1.</del> <ins class="diff-chg">3.5.1</ins></span>
                    488: Activation</a></li>
                    489: <li><a href="#focus"><span class="secno"><del class=
                    490: "diff-old">3.5.2.</del> <ins class="diff-chg">3.5.2</ins></span>
                    491: Focus</a>
                    492: <ul class="toc">
                    493: <li><a href="#focus-management"><span class="secno">3.5.2.1.</span>
                    494: Focus management</a></li>
                    495: <li><a href="#sequential"><span class="secno">3.5.2.2.</span>
                    496: Sequential focus navigation</a></li>
                    497: </ul>
                    498: </li>
                    499: <li><a href="#scrolling"><span class="secno"><del class=
                    500: "diff-old">3.5.3.</del> <ins class="diff-chg">3.5.3</ins></span>
                    501: Scrolling elements into view</a></li>
                    502: </ul>
                    503: </li>
                    504: <li><a href="#the-root"><span class="secno"><del class=
                    505: "diff-old">3.6.</del> <ins class="diff-chg">3.6</ins></span> The
                    506: root element</a>
                    507: <ul class="toc">
                    508: <li><a href="#the-html"><span class="secno"><del class=
                    509: "diff-old">3.6.1.</del> <ins class="diff-chg">3.6.1</ins></span>
                    510: The <code>html</code> element</a></li>
                    511: </ul>
                    512: </li>
                    513: <li><a href="#document"><span class="secno"><del class=
                    514: "diff-old">3.7.</del> <ins class="diff-chg">3.7</ins></span>
                    515: Document metadata</a>
                    516: <ul class="toc">
                    517: <li><a href="#the-head"><span class="secno"><del class=
                    518: "diff-old">3.7.1.</del> <ins class="diff-chg">3.7.1</ins></span>
                    519: The <code>head</code> element</a></li>
                    520: <li><a href="#the-title0"><span class="secno"><del class=
                    521: "diff-old">3.7.2.</del> <ins class="diff-chg">3.7.2</ins></span>
                    522: The <code>title</code> element</a></li>
                    523: <li><a href="#the-base"><span class="secno"><del class=
                    524: "diff-old">3.7.3.</del> <ins class="diff-chg">3.7.3</ins></span>
                    525: The <code>base</code> element</a></li>
                    526: <li><a href="#the-link"><span class="secno"><del class=
                    527: "diff-old">3.7.4.</del> <ins class="diff-chg">3.7.4</ins></span>
                    528: The <code>link</code> element</a></li>
                    529: <li><a href="#meta"><span class="secno"><del class=
                    530: "diff-old">3.7.5.</del> <ins class="diff-chg">3.7.5</ins></span>
                    531: The <code>meta</code> element</a>
                    532: <ul class="toc">
                    533: <li><a href="#standard"><span class="secno">3.7.5.1.</span>
                    534: Standard metadata names</a></li>
                    535: <li><a href="#other"><span class="secno">3.7.5.2.</span> Other
                    536: metadata names</a></li>
                    537: <li><a href="#pragma"><span class="secno">3.7.5.3.</span> Pragma
                    538: directives</a></li>
                    539: <li><a href="#charset"><span class="secno">3.7.5.4.</span>
                    540: Specifying the document's character encoding</a></li>
                    541: </ul>
                    542: </li>
                    543: <li><a href="#the-style0"><span class="secno"><del class=
                    544: "diff-old">3.7.6.</del> <ins class="diff-chg">3.7.6</ins></span>
                    545: The <code>style</code> element</a></li>
                    546: <li><a href="#styling"><span class="secno"><del class=
                    547: "diff-old">3.7.7.</del> <ins class="diff-chg">3.7.7</ins></span>
                    548: Styling</a></li>
                    549: </ul>
                    550: </li>
                    551: <li><a href="#sections"><span class="secno"><del class=
                    552: "diff-old">3.8.</del> <ins class="diff-chg">3.8</ins></span>
                    553: Sections</a>
                    554: <ul class="toc">
                    555: <li><a href="#the-body"><span class="secno"><del class=
                    556: "diff-old">3.8.1.</del> <ins class="diff-chg">3.8.1</ins></span>
                    557: The <code>body</code> element</a></li>
                    558: <li><a href="#the-section"><span class="secno"><del class=
                    559: "diff-old">3.8.2.</del> <ins class="diff-chg">3.8.2</ins></span>
                    560: The <code>section</code> element</a></li>
                    561: <li><a href="#the-nav"><span class="secno"><del class=
                    562: "diff-old">3.8.3.</del> <ins class="diff-chg">3.8.3</ins></span>
                    563: The <code>nav</code> element</a></li>
                    564: <li><a href="#the-article"><span class="secno"><del class=
                    565: "diff-old">3.8.4.</del> <ins class="diff-chg">3.8.4</ins></span>
                    566: The <code>article</code> element</a></li>
                    567: <li><del class="diff-old">3.8.5. The blockquote element</del>
                    568: <a href="#the-aside"><span class="secno"><del class=
                    569: "diff-old">3.8.6.</del> <ins class="diff-chg">3.8.5</ins></span>
                    570: The <code>aside</code> element</a></li>
                    571: <li><a href="#the-h1"><span class="secno"><del class=
                    572: "diff-old">3.8.7.</del> <ins class="diff-chg">3.8.6</ins></span>
                    573: The <code>h1</code> , <code>h2</code> , <code>h3</code> ,
                    574: <code>h4</code> , <code>h5</code> , and <code>h6</code>
                    575: elements</a></li>
                    576: <li><a href="#the-header"><span class="secno"><del class=
                    577: "diff-old">3.8.8.</del> <ins class="diff-chg">3.8.7</ins></span>
                    578: The <code>header</code> element</a></li>
                    579: <li><a href="#the-footer"><span class="secno"><del class=
                    580: "diff-old">3.8.9.</del> <ins class="diff-chg">3.8.8</ins></span>
                    581: The <code>footer</code> element</a></li>
                    582: <li><a href="#the-address"><span class="secno"><del class=
                    583: "diff-old">3.8.10.</del> <ins class="diff-chg">3.8.9</ins></span>
                    584: The <code>address</code> element</a></li>
                    585: <li><a href="#headings"><span class="secno"><del class=
                    586: "diff-old">3.8.11.</del> <ins class="diff-chg">3.8.10</ins></span>
                    587: Headings and sections</a>
                    588: <ul class="toc">
                    589: <li><a href="#outlines"><span class="secno"><del class=
                    590: "diff-old">3.8.11.1.</del> <ins class=
                    591: "diff-chg">3.8.10.1.</ins></span> Creating an outline</a></li>
                    592: <li><del class="diff-old">3.8.11.2. Determining which heading and
                    593: section applies to a particular node</del> <a href=
                    594: "#distinguishing"><span class="secno"><del class=
                    595: "diff-old">3.8.11.3.</del> <ins class=
                    596: "diff-chg">3.8.10.2.</ins></span> Distinguishing site-wide
                    597: <del class="diff-old">headers</del> <ins class=
                    598: "diff-chg">headings</ins> from page <del class=
                    599: "diff-old">headers</del> <ins class=
                    600: "diff-chg">headings</ins></a></li>
                    601: </ul>
                    602: </li>
                    603: </ul>
                    604: </li>
                    605: <li><a href="#grouping"><span class="secno"><del class=
                    606: "diff-old">3.9.</del> <ins class="diff-chg">3.9</ins></span>
                    607: <del class="diff-old">Prose</del> <ins class="diff-chg">Grouping
                    608: content</ins></a>
                    609: <ul class="toc">
                    610: <li><a href="#the-p"><span class="secno"><del class=
                    611: "diff-old">3.9.1.</del> <ins class="diff-chg">3.9.1</ins></span>
                    612: The <code>p</code> element</a></li>
                    613: <li><a href="#the-hr"><span class="secno"><del class=
                    614: "diff-old">3.9.2.</del> <ins class="diff-chg">3.9.2</ins></span>
                    615: The <code>hr</code> element</a></li>
                    616: <li><a href="#the-br"><span class="secno"><del class=
                    617: "diff-old">3.9.3.</del> <ins class="diff-chg">3.9.3</ins></span>
                    618: The <code>br</code> element</a></li>
                    619: <li><a href="#the-pre"><span class="secno"><del class=
                    620: "diff-old">3.9.4.</del> <ins class="diff-chg">3.9.4</ins></span>
                    621: The <code><del class="diff-old">dialog</del> <ins class=
                    622: "diff-chg">pre</ins></code> element</a> <del class="diff-old">3.10.
                    623: Preformatted text</del></li>
                    624: <li><a href="#the-dialog"><span class="secno"><del class=
                    625: "diff-old">3.10.1.</del> <ins class="diff-chg">3.9.5</ins></span>
                    626: The <code><del class="diff-old">pre</del> <ins class=
                    627: "diff-chg">dialog</ins></code> element</a></li>
                    628: <li><a href="#the-blockquote"><span class="secno"><del class=
                    629: "diff-old">3.11.</del> <ins class="diff-chg">3.9.6</ins></span>
                    630: <del class="diff-old">Lists</del> <ins class="diff-chg">The</ins>
                    631: <code><ins class="diff-chg">blockquote</ins></code> <ins class=
                    632: "diff-chg">element</ins></a></li>
                    633: <li><a href="#the-ol"><span class="secno"><del class=
                    634: "diff-old">3.11.1.</del> <ins class="diff-chg">3.9.7</ins></span>
                    635: The <code>ol</code> element</a></li>
                    636: <li><a href="#the-ul"><span class="secno"><del class=
                    637: "diff-old">3.11.2.</del> <ins class="diff-chg">3.9.8</ins></span>
                    638: The <code>ul</code> element</a></li>
                    639: <li><a href="#the-li"><span class="secno"><del class=
                    640: "diff-old">3.11.3.</del> <ins class="diff-chg">3.9.9</ins></span>
                    641: The <code>li</code> element</a></li>
                    642: <li><a href="#the-dl"><span class="secno"><del class=
                    643: "diff-old">3.11.4.</del> <ins class="diff-chg">3.9.10</ins></span>
                    644: The <code>dl</code> element</a></li>
                    645: <li><a href="#the-dt"><span class="secno"><del class=
                    646: "diff-old">3.11.5.</del> <ins class="diff-chg">3.9.11</ins></span>
                    647: The <code>dt</code> element</a></li>
                    648: <li><a href="#the-dd"><span class="secno"><del class=
                    649: "diff-old">3.11.6.</del> <ins class="diff-chg">3.9.12</ins></span>
                    650: The <code>dd</code> element</a></li>
                    651: </ul>
                    652: </li>
                    653: <li><a href="#text-level"><span class="secno"><del class=
                    654: "diff-old">3.12.</del> <ins class="diff-chg">3.10</ins></span>
                    655: <del class="diff-old">Phrase elements</del> <ins class=
                    656: "diff-chg">Text-level semantics</ins></a>
                    657: <ul class="toc">
                    658: <li><a href="#the-a"><span class="secno"><del class=
                    659: "diff-old">3.12.1.</del> <ins class="diff-chg">3.10.1</ins></span>
                    660: The <code>a</code> element</a></li>
                    661: <li><a href="#the-q"><span class="secno"><del class=
                    662: "diff-old">3.12.2.</del> <ins class="diff-chg">3.10.2</ins></span>
                    663: The <code>q</code> element</a></li>
                    664: <li><a href="#the-cite"><span class="secno"><del class=
                    665: "diff-old">3.12.3.</del> <ins class="diff-chg">3.10.3</ins></span>
                    666: The <code>cite</code> element</a></li>
                    667: <li><a href="#the-em"><span class="secno"><del class=
                    668: "diff-old">3.12.4.</del> <ins class="diff-chg">3.10.4</ins></span>
                    669: The <code>em</code> element</a></li>
                    670: <li><a href="#the-strong"><span class="secno"><del class=
                    671: "diff-old">3.12.5.</del> <ins class="diff-chg">3.10.5</ins></span>
                    672: The <code>strong</code> element</a></li>
                    673: <li><a href="#the-small"><span class="secno"><del class=
                    674: "diff-old">3.12.6.</del> <ins class="diff-chg">3.10.6</ins></span>
                    675: The <code>small</code> element</a></li>
                    676: <li><a href="#the-mark"><span class="secno"><del class=
                    677: "diff-old">3.12.7.</del> <ins class="diff-chg">3.10.7</ins></span>
                    678: The <code><del class="diff-old">m</del> <ins class=
                    679: "diff-chg">mark</ins></code> element</a></li>
                    680: <li><a href="#the-dfn"><span class="secno"><del class=
                    681: "diff-old">3.12.8.</del> <ins class="diff-chg">3.10.8</ins></span>
                    682: The <code>dfn</code> element</a></li>
                    683: <li><a href="#the-abbr"><span class="secno"><del class=
                    684: "diff-old">3.12.9.</del> <ins class="diff-chg">3.10.9</ins></span>
                    685: The <code>abbr</code> element</a></li>
                    686: <li><a href="#the-time"><span class="secno"><del class=
                    687: "diff-old">3.12.10.</del> <ins class=
                    688: "diff-chg">3.10.10</ins></span> The <code>time</code>
                    689: element</a></li>
                    690: <li><a href="#the-progress"><span class="secno"><del class=
                    691: "diff-old">3.12.11.</del> <ins class=
                    692: "diff-chg">3.10.11</ins></span> The <code>progress</code>
                    693: element</a></li>
                    694: <li><a href="#the-meter"><span class="secno"><del class=
                    695: "diff-old">3.12.12.</del> <ins class=
                    696: "diff-chg">3.10.12</ins></span> The <code>meter</code>
                    697: element</a></li>
                    698: <li><a href="#the-code"><span class="secno"><del class=
                    699: "diff-old">3.12.13.</del> <ins class=
                    700: "diff-chg">3.10.13</ins></span> The <code>code</code>
                    701: element</a></li>
                    702: <li><a href="#the-var"><span class="secno"><del class=
                    703: "diff-old">3.12.14.</del> <ins class=
                    704: "diff-chg">3.10.14</ins></span> The <code>var</code>
                    705: element</a></li>
                    706: <li><a href="#the-samp"><span class="secno"><del class=
                    707: "diff-old">3.12.15.</del> <ins class=
                    708: "diff-chg">3.10.15</ins></span> The <code>samp</code>
                    709: element</a></li>
                    710: <li><a href="#the-kbd"><span class="secno"><del class=
                    711: "diff-old">3.12.16.</del> <ins class=
                    712: "diff-chg">3.10.16</ins></span> The <code>kbd</code>
                    713: element</a></li>
                    714: <li><a href="#the-sub"><span class="secno"><del class=
                    715: "diff-old">3.12.17.</del> <ins class=
                    716: "diff-chg">3.10.17</ins></span> The <code>sub</code> and
                    717: <code>sup</code> elements</a></li>
                    718: <li><a href="#the-span"><span class="secno"><del class=
                    719: "diff-old">3.12.18.</del> <ins class=
                    720: "diff-chg">3.10.18</ins></span> The <code>span</code>
                    721: element</a></li>
                    722: <li><a href="#the-i"><span class="secno"><del class=
                    723: "diff-old">3.12.19.</del> <ins class=
                    724: "diff-chg">3.10.19</ins></span> The <code>i</code> element</a></li>
                    725: <li><a href="#the-b"><span class="secno"><del class=
                    726: "diff-old">3.12.20.</del> <ins class=
                    727: "diff-chg">3.10.20</ins></span> The <code>b</code> element</a></li>
                    728: <li><a href="#the-bdo"><span class="secno"><del class=
                    729: "diff-old">3.12.21.</del> <ins class=
                    730: "diff-chg">3.10.21</ins></span> The <code>bdo</code>
                    731: element</a></li>
                    732: <li><a href="#the-ruby"><span class="secno"><ins class=
                    733: "diff-new">3.10.22</ins></span> <ins class="diff-new">The</ins>
                    734: <code><ins class="diff-new">ruby</ins></code> <ins class=
                    735: "diff-new">element</ins></a></li>
                    736: <li><a href="#the-rt"><span class="secno"><ins class=
                    737: "diff-new">3.10.23</ins></span> <ins class="diff-new">The</ins>
                    738: <code><ins class="diff-new">rt</ins></code> <ins class=
                    739: "diff-new">element</ins></a></li>
                    740: <li><a href="#the-rp"><span class="secno"><ins class=
                    741: "diff-new">3.10.24</ins></span> <ins class="diff-new">The</ins>
                    742: <code><ins class="diff-new">rp</ins></code> <ins class=
                    743: "diff-new">element</ins></a></li>
                    744: <li><a href="#usage"><span class="secno"><ins class=
                    745: "diff-new">3.10.25</ins></span> <ins class="diff-new">Usage
                    746: summary</ins></a></li>
                    747: <li><a href="#footnotes"><span class="secno"><ins class=
                    748: "diff-new">3.10.26</ins></span> <ins class=
                    749: "diff-new">Footnotes</ins></a></li>
                    750: </ul>
                    751: </li>
                    752: <li><a href="#edits"><span class="secno"><del class=
                    753: "diff-old">3.13.</del> <ins class="diff-chg">3.11</ins></span>
                    754: Edits</a>
                    755: <ul class="toc">
                    756: <li><a href="#the-ins"><span class="secno"><del class=
                    757: "diff-old">3.13.1.</del> <ins class="diff-chg">3.11.1</ins></span>
                    758: The <code>ins</code> element</a></li>
                    759: <li><a href="#the-del"><span class="secno"><del class=
                    760: "diff-old">3.13.2.</del> <ins class="diff-chg">3.11.2</ins></span>
                    761: The <code>del</code> element</a></li>
                    762: <li><a href="#attributes"><span class="secno"><del class=
                    763: "diff-old">3.13.3.</del> <ins class="diff-chg">3.11.3</ins></span>
                    764: Attributes common to <code>ins</code> and <code>del</code>
                    765: elements</a></li>
                    766: <li><a href="#edits0"><span class="secno"><ins class=
                    767: "diff-new">3.11.4</ins></span> <ins class="diff-new">Edits and
                    768: paragraphs</ins></a></li>
                    769: <li><a href="#edits1"><span class="secno"><ins class=
                    770: "diff-new">3.11.5</ins></span> <ins class="diff-new">Edits and
                    771: lists</ins></a></li>
                    772: </ul>
                    773: </li>
                    774: <li><a href="#embedded0"><span class="secno"><del class=
                    775: "diff-old">3.14.</del> <ins class="diff-chg">3.12</ins></span>
                    776: Embedded content</a>
                    777: <ul class="toc">
                    778: <li><a href="#the-figure"><span class="secno"><del class=
                    779: "diff-old">3.14.1.</del> <ins class="diff-chg">3.12.1</ins></span>
                    780: The <code>figure</code> element</a></li>
                    781: <li><a href="#the-img"><span class="secno"><del class=
                    782: "diff-old">3.14.2.</del> <ins class="diff-chg">3.12.2</ins></span>
                    783: The <code>img</code> element</a></li>
                    784: <li><a href="#the-iframe"><span class="secno"><del class=
                    785: "diff-old">3.14.3.</del> <ins class="diff-chg">3.12.3</ins></span>
                    786: The <code>iframe</code> element</a></li>
                    787: <li><a href="#the-embed"><span class="secno"><del class=
                    788: "diff-old">3.14.4.</del> <ins class="diff-chg">3.12.4</ins></span>
                    789: The <code>embed</code> element</a></li>
                    790: <li><a href="#the-object"><span class="secno"><del class=
                    791: "diff-old">3.14.5.</del> <ins class="diff-chg">3.12.5</ins></span>
                    792: The <code>object</code> element</a></li>
                    793: <li><a href="#the-param"><span class="secno"><del class=
                    794: "diff-old">3.14.6.</del> <ins class="diff-chg">3.12.6</ins></span>
                    795: The <code>param</code> element</a></li>
                    796: <li><a href="#video"><span class="secno"><del class=
                    797: "diff-old">3.14.7.</del> <ins class="diff-chg">3.12.7</ins></span>
                    798: The <code>video</code> element</a>
                    799: <ul class="toc">
                    800: <li><a href="#video0"><span class="secno"><del class=
                    801: "diff-old">3.14.7.1.</del> <ins class=
                    802: "diff-chg">3.12.7.1.</ins></span> Video and audio codecs for
                    803: <code>video</code> elements</a></li>
                    804: </ul>
                    805: </li>
                    806: <li><a href="#audio"><span class="secno"><del class=
                    807: "diff-old">3.14.8.</del> <ins class="diff-chg">3.12.8</ins></span>
                    808: The <code>audio</code> element</a>
                    809: <ul class="toc">
                    810: <li><a href="#audio0"><span class="secno"><del class=
                    811: "diff-old">3.14.8.1.</del> <ins class=
                    812: "diff-chg">3.12.8.1.</ins></span> Audio codecs for
                    813: <code>audio</code> elements</a></li>
                    814: </ul>
                    815: </li>
                    816: <li><a href="#the-source"><span class="secno"><ins class=
                    817: "diff-new">3.12.9</ins></span> <ins class="diff-new">The</ins>
                    818: <code><ins class="diff-new">source</ins></code> <ins class=
                    819: "diff-new">element</ins></a></li>
                    820: <li><a href="#media"><span class="secno"><del class=
                    821: "diff-old">3.14.9.</del> <ins class="diff-chg">3.12.10</ins></span>
                    822: Media elements</a>
                    823: <ul class="toc">
                    824: <li><a href="#error"><span class="secno"><del class=
                    825: "diff-old">3.14.9.1.</del> <ins class=
                    826: "diff-chg">3.12.10.1.</ins></span> Error codes</a></li>
                    827: <li><a href="#location"><span class="secno"><del class=
                    828: "diff-old">3.14.9.2.</del> <ins class=
                    829: "diff-chg">3.12.10.2.</ins></span> Location of the media
                    830: resource</a></li>
                    831: <li><a href="#network0"><span class="secno"><del class=
                    832: "diff-old">3.14.9.3.</del> <ins class=
                    833: "diff-chg">3.12.10.3.</ins></span> Network states</a></li>
                    834: <li><a href="#loading"><span class="secno"><del class=
                    835: "diff-old">3.14.9.4.</del> <ins class=
                    836: "diff-chg">3.12.10.4.</ins></span> Loading the media
                    837: resource</a></li>
                    838: <li><a href="#offsets"><span class="secno"><del class=
                    839: "diff-old">3.14.9.5.</del> <ins class=
                    840: "diff-chg">3.12.10.5.</ins></span> Offsets into the media
                    841: resource</a></li>
                    842: <li><a href="#the-ready"><span class="secno"><del class=
                    843: "diff-old">3.14.9.6.</del> <ins class=
                    844: "diff-chg">3.12.10.6.</ins></span> The ready states</a></li>
                    845: <li><a href="#playing"><span class="secno"><del class=
                    846: "diff-old">3.14.9.7.</del> <ins class=
                    847: "diff-chg">3.12.10.7.</ins></span> Playing the media
                    848: resource</a></li>
                    849: <li><a href="#seeking"><span class="secno"><del class=
                    850: "diff-old">3.14.9.8.</del> <ins class=
                    851: "diff-chg">3.12.10.8.</ins></span> Seeking</a></li>
                    852: <li><a href="#cue-ranges"><span class="secno"><del class=
                    853: "diff-old">3.14.9.9.</del> <ins class=
                    854: "diff-chg">3.12.10.9.</ins></span> Cue ranges</a></li>
                    855: <li><a href="#user-interface"><span class="secno"><del class=
                    856: "diff-old">3.14.9.10.</del> <ins class=
                    857: "diff-chg">3.12.10.10.</ins></span> User interface</a></li>
                    858: <li><a href="#time-ranges"><span class="secno"><del class=
                    859: "diff-old">3.14.9.11.</del> <ins class=
                    860: "diff-chg">3.12.10.11.</ins></span> Time <del class=
                    861: "diff-old">range</del> <ins class="diff-chg">ranges</ins></a></li>
                    862: <li><a href="#byte-ranges"><span class="secno"><ins class=
                    863: "diff-chg">3.12.10.12.</ins></span> <ins class="diff-chg">Byte
                    864: ranges</ins></a></li>
                    865: <li><a href="#mediaevents"><span class="secno"><del class=
                    866: "diff-old">3.14.9.12.</del> <ins class=
                    867: "diff-chg">3.12.10.13.</ins></span> Event summary</a></li>
                    868: <li><a href="#security0"><span class="secno"><del class=
                    869: "diff-old">3.14.9.13.</del> <ins class=
                    870: "diff-chg">3.12.10.14.</ins></span> Security and privacy
                    871: considerations</a></li>
                    872: </ul>
                    873: </li>
                    874: <li><del class="diff-old">3.14.10. The source element</del>
                    875: <a href="#the-canvas"><span class="secno"><del class=
                    876: "diff-old">3.14.11.</del> <ins class=
                    877: "diff-chg">3.12.11</ins></span> The <code>canvas</code> element</a>
                    878: <ul class="toc">
                    879: <li><a href="#the-2d"><span class="secno"><del class=
                    880: "diff-old">3.14.11.1.</del> <ins class=
                    881: "diff-chg">3.12.11.1.</ins></span> The 2D context</a>
                    882: <ul class="toc">
                    883: <li><a href="#the-canvas0"><span class="secno"><del class=
                    884: "diff-old">3.14.11.1.1.</del> <ins class=
                    885: "diff-chg">3.12.11.1.1.</ins></span> The canvas state</a></li>
                    886: <li><a href="#transformations"><span class="secno"><del class=
                    887: "diff-old">3.14.11.1.2.</del> <ins class=
                    888: "diff-chg">3.12.11.1.2.</ins></span> Transformations</a></li>
                    889: <li><a href="#compositing"><span class="secno"><del class=
                    890: "diff-old">3.14.11.1.3.</del> <ins class=
                    891: "diff-chg">3.12.11.1.3.</ins></span> Compositing</a></li>
                    892: <li><a href="#colors"><span class="secno"><del class=
                    893: "diff-old">3.14.11.1.4.</del> <ins class=
                    894: "diff-chg">3.12.11.1.4.</ins></span> Colors and styles</a></li>
                    895: <li><a href="#line-styles"><span class="secno"><del class=
                    896: "diff-old">3.14.11.1.5.</del> <ins class=
                    897: "diff-chg">3.12.11.1.5.</ins></span> Line styles</a></li>
                    898: <li><a href="#shadows"><span class="secno"><del class=
                    899: "diff-old">3.14.11.1.6.</del> <ins class=
                    900: "diff-chg">3.12.11.1.6.</ins></span> Shadows</a></li>
                    901: <li><a href="#simple"><span class="secno"><del class=
                    902: "diff-old">3.14.11.1.7.</del> <ins class=
                    903: "diff-chg">3.12.11.1.7.</ins></span> Simple shapes
                    904: (rectangles)</a></li>
                    905: <li><a href="#complex"><span class="secno"><del class=
                    906: "diff-old">3.14.11.1.8.</del> <ins class=
                    907: "diff-chg">3.12.11.1.8.</ins></span> Complex shapes
                    908: (paths)</a></li>
                    909: <li><a href="#text"><span class="secno"><ins class=
                    910: "diff-new">3.12.11.1.9.</ins></span> <ins class=
                    911: "diff-new">Text</ins></a></li>
                    912: <li><a href="#images"><span class="secno"><del class=
                    913: "diff-old">3.14.11.1.9.</del> <ins class=
                    914: "diff-chg">3.12.11.1.10.</ins></span> Images</a></li>
                    915: <li><a href="#pixel"><span class="secno"><del class=
                    916: "diff-old">3.14.11.1.10.</del> <ins class=
                    917: "diff-chg">3.12.11.1.11.</ins></span> Pixel manipulation</a></li>
                    918: <li><a href="#drawing"><span class="secno"><del class=
                    919: "diff-old">3.14.11.1.11.</del> <ins class=
                    920: "diff-chg">3.12.11.1.12.</ins></span> Drawing model</a></li>
                    921: </ul>
                    922: </li>
                    923: <li><a href="#color"><span class="secno"><del class=
                    924: "diff-old">3.14.11.2.</del> <ins class=
                    925: "diff-chg">3.12.11.2.</ins></span> Color spaces and color
                    926: correction</a></li>
                    927: <li><a href="#security1"><span class="secno"><ins class=
                    928: "diff-new">3.12.11.3.</ins></span> <ins class="diff-new">Security
                    929: with</ins> <code><ins class="diff-new">canvas</ins></code>
                    930: <ins class="diff-new">elements</ins></a></li>
                    931: </ul>
                    932: </li>
                    933: <li><a href="#the-map"><span class="secno"><del class=
                    934: "diff-old">3.14.12.</del> <ins class=
                    935: "diff-chg">3.12.12</ins></span> The <code>map</code>
                    936: element</a></li>
                    937: <li><a href="#the-area"><span class="secno"><del class=
                    938: "diff-old">3.14.13.</del> <ins class=
                    939: "diff-chg">3.12.13</ins></span> The <code>area</code>
                    940: element</a></li>
                    941: <li><a href="#image-maps"><span class="secno"><del class=
                    942: "diff-old">3.14.14.</del> <ins class=
                    943: "diff-chg">3.12.14</ins></span> Image maps</a></li>
                    944: <li><a href="#mathml"><span class="secno"><ins class=
                    945: "diff-new">3.12.15</ins></span> <ins class=
                    946: "diff-new">MathML</ins></a></li>
                    947: <li><a href="#svg"><span class="secno"><ins class=
                    948: "diff-new">3.12.16</ins></span> <ins class=
                    949: "diff-new">SVG</ins></a></li>
                    950: <li><a href="#dimension"><span class="secno"><del class=
                    951: "diff-old">3.14.15.</del> <ins class=
                    952: "diff-chg">3.12.17</ins></span> Dimension attributes</a></li>
                    953: </ul>
                    954: </li>
                    955: <li><a href="#tabular"><span class="secno"><del class=
                    956: "diff-old">3.15.</del> <ins class="diff-chg">3.13</ins></span>
                    957: Tabular data</a>
                    958: <ul class="toc">
                    959: <li><a href="#table-intro"><span class="secno"><ins class=
                    960: "diff-new">3.13.1</ins></span> <ins class=
                    961: "diff-new">Introduction</ins></a></li>
                    962: <li><a href="#the-table"><span class="secno"><del class=
                    963: "diff-old">3.15.1.</del> <ins class="diff-chg">3.13.2</ins></span>
                    964: The <code>table</code> element</a></li>
                    965: <li><a href="#the-caption"><span class="secno"><del class=
                    966: "diff-old">3.15.2.</del> <ins class="diff-chg">3.13.3</ins></span>
                    967: The <code>caption</code> element</a></li>
                    968: <li><a href="#the-colgroup"><span class="secno"><del class=
                    969: "diff-old">3.15.3.</del> <ins class="diff-chg">3.13.4</ins></span>
                    970: The <code>colgroup</code> element</a></li>
                    971: <li><a href="#the-col"><span class="secno"><del class=
                    972: "diff-old">3.15.4.</del> <ins class="diff-chg">3.13.5</ins></span>
                    973: The <code>col</code> element</a></li>
                    974: <li><a href="#the-tbody"><span class="secno"><del class=
                    975: "diff-old">3.15.5.</del> <ins class="diff-chg">3.13.6</ins></span>
                    976: The <code>tbody</code> element</a></li>
                    977: <li><a href="#the-thead"><span class="secno"><del class=
                    978: "diff-old">3.15.6.</del> <ins class="diff-chg">3.13.7</ins></span>
                    979: The <code>thead</code> element</a></li>
                    980: <li><a href="#the-tfoot"><span class="secno"><del class=
                    981: "diff-old">3.15.7.</del> <ins class="diff-chg">3.13.8</ins></span>
                    982: The <code>tfoot</code> element</a></li>
                    983: <li><a href="#the-tr"><span class="secno"><del class=
                    984: "diff-old">3.15.8.</del> <ins class="diff-chg">3.13.9</ins></span>
                    985: The <code>tr</code> element</a></li>
                    986: <li><a href="#the-td"><span class="secno"><del class=
                    987: "diff-old">3.15.9.</del> <ins class="diff-chg">3.13.10</ins></span>
                    988: The <code>td</code> element</a></li>
                    989: <li><a href="#the-th"><span class="secno"><del class=
                    990: "diff-old">3.15.10.</del> <ins class=
                    991: "diff-chg">3.13.11</ins></span> The <code>th</code>
                    992: element</a></li>
                    993: <li><a href="#attributes0"><span class="secno"><ins class=
                    994: "diff-new">3.13.12</ins></span> <ins class="diff-new">Attributes
                    995: common to</ins> <code><ins class="diff-new">td</ins></code>
                    996: <ins class="diff-new">and</ins> <code><ins class=
                    997: "diff-new">th</ins></code> <ins class=
                    998: "diff-new">elements</ins></a></li>
                    999: <li><a href="#processing"><span class="secno"><del class=
                   1000: "diff-old">3.15.11.</del> <ins class=
                   1001: "diff-chg">3.13.13</ins></span> Processing model</a>
                   1002: <ul class="toc">
                   1003: <li><a href="#forming"><span class="secno"><del class=
                   1004: "diff-old">3.15.11.1.</del> <ins class=
                   1005: "diff-chg">3.13.13.1.</ins></span> Forming a table</a></li>
                   1006: <li><a href="#header-and-data-cell-semantics"><span class=
                   1007: "secno"><del class="diff-old">3.15.11.2.</del> <ins class=
                   1008: "diff-chg">3.13.13.2.</ins></span> Forming relationships between
                   1009: data cells and header cells</a></li>
                   1010: </ul>
                   1011: </li>
                   1012: </ul>
                   1013: </li>
                   1014: <li><a href="#forms"><span class="secno"><del class=
                   1015: "diff-old">3.16.</del> <ins class="diff-chg">3.14</ins></span>
                   1016: Forms</a>
                   1017: <ul class="toc">
                   1018: <li><a href="#the-form"><span class="secno"><del class=
                   1019: "diff-old">3.16.1.</del> <ins class="diff-chg">3.14.1</ins></span>
                   1020: The <code>form</code> element</a></li>
                   1021: <li><a href="#the-fieldset"><span class="secno"><del class=
                   1022: "diff-old">3.16.2.</del> <ins class="diff-chg">3.14.2</ins></span>
                   1023: The <code>fieldset</code> element</a></li>
                   1024: <li><a href="#the-input"><span class="secno"><del class=
                   1025: "diff-old">3.16.3.</del> <ins class="diff-chg">3.14.3</ins></span>
                   1026: The <code>input</code> element</a></li>
                   1027: <li><a href="#the-button"><span class="secno"><del class=
                   1028: "diff-old">3.16.4.</del> <ins class="diff-chg">3.14.4</ins></span>
                   1029: The <code>button</code> element</a></li>
                   1030: <li><a href="#the-label"><span class="secno"><del class=
                   1031: "diff-old">3.16.5.</del> <ins class="diff-chg">3.14.5</ins></span>
                   1032: The <code>label</code> element</a></li>
                   1033: <li><a href="#the-select"><span class="secno"><del class=
                   1034: "diff-old">3.16.6.</del> <ins class="diff-chg">3.14.6</ins></span>
                   1035: The <code>select</code> element</a></li>
                   1036: <li><a href="#the-datalist"><span class="secno"><del class=
                   1037: "diff-old">3.16.7.</del> <ins class="diff-chg">3.14.7</ins></span>
                   1038: The <code>datalist</code> element</a></li>
                   1039: <li><a href="#the-optgroup"><span class="secno"><del class=
                   1040: "diff-old">3.16.8.</del> <ins class="diff-chg">3.14.8</ins></span>
                   1041: The <code>optgroup</code> element</a></li>
                   1042: <li><a href="#the-option"><span class="secno"><del class=
                   1043: "diff-old">3.16.9.</del> <ins class="diff-chg">3.14.9</ins></span>
                   1044: The <code>option</code> element</a></li>
                   1045: <li><a href="#the-textarea"><span class="secno"><del class=
                   1046: "diff-old">3.16.10.</del> <ins class=
                   1047: "diff-chg">3.14.10</ins></span> The <code>textarea</code>
                   1048: element</a></li>
                   1049: <li><a href="#the-output"><span class="secno"><del class=
                   1050: "diff-old">3.16.11.</del> <ins class=
                   1051: "diff-chg">3.14.11</ins></span> The <code>output</code>
                   1052: element</a></li>
                   1053: <li><a href="#processing0"><span class="secno"><del class=
                   1054: "diff-old">3.16.12.</del> <ins class=
                   1055: "diff-chg">3.14.12</ins></span> Processing model</a>
                   1056: <ul class="toc">
                   1057: <li><a href="#form-submission"><span class="secno"><del class=
                   1058: "diff-old">3.16.12.1.</del> <ins class=
                   1059: "diff-chg">3.14.12.1.</ins></span> Form submission</a></li>
                   1060: </ul>
                   1061: </li>
                   1062: </ul>
                   1063: </li>
                   1064: <li><a href="#scripting0"><span class="secno"><del class=
                   1065: "diff-old">3.17.</del> <ins class="diff-chg">3.15</ins></span>
                   1066: Scripting</a>
                   1067: <ul class="toc">
                   1068: <li><a href="#script"><span class="secno"><del class=
                   1069: "diff-old">3.17.1.</del> <ins class="diff-chg">3.15.1</ins></span>
                   1070: The <code>script</code> element</a>
                   1071: <ul class="toc">
                   1072: <li><a href="#scriptingLanguages"><span class="secno"><del class=
                   1073: "diff-old">3.17.1.1.</del> <ins class=
                   1074: "diff-chg">3.15.1.1.</ins></span> Scripting languages</a></li>
                   1075: </ul>
                   1076: </li>
                   1077: <li><a href="#the-noscript"><span class="secno"><del class=
                   1078: "diff-old">3.17.2.</del> <ins class="diff-chg">3.15.2</ins></span>
                   1079: The <code>noscript</code> element</a></li>
                   1080: <li><a href="#the-event-source"><span class="secno"><del class=
                   1081: "diff-old">3.17.3.</del> <ins class="diff-chg">3.15.3</ins></span>
                   1082: The <code>event-source</code> element</a></li>
                   1083: </ul>
                   1084: </li>
                   1085: <li><a href="#interactive-elements"><span class="secno"><del class=
                   1086: "diff-old">3.18.</del> <ins class="diff-chg">3.16</ins></span>
                   1087: Interactive elements</a>
                   1088: <ul class="toc">
                   1089: <li><a href="#the-details"><span class="secno"><del class=
                   1090: "diff-old">3.18.1.</del> <ins class="diff-chg">3.16.1</ins></span>
                   1091: The <code>details</code> element</a></li>
                   1092: <li><a href="#datagrid"><span class="secno"><del class=
                   1093: "diff-old">3.18.2.</del> <ins class="diff-chg">3.16.2</ins></span>
                   1094: The <code>datagrid</code> element</a>
                   1095: <ul class="toc">
                   1096: <li><a href="#the-datagrid"><span class="secno"><del class=
                   1097: "diff-old">3.18.2.1.</del> <ins class=
                   1098: "diff-chg">3.16.2.1.</ins></span> The <code>datagrid</code> data
                   1099: model</a></li>
                   1100: <li><a href="#how-rows"><span class="secno"><del class=
                   1101: "diff-old">3.18.2.2.</del> <ins class=
                   1102: "diff-chg">3.16.2.2.</ins></span> How rows are identified</a></li>
                   1103: <li><a href="#the-data"><span class="secno"><del class=
                   1104: "diff-old">3.18.2.3.</del> <ins class=
                   1105: "diff-chg">3.16.2.3.</ins></span> The data provider
                   1106: interface</a></li>
                   1107: <li><a href="#the-default"><span class="secno"><del class=
                   1108: "diff-old">3.18.2.4.</del> <ins class=
                   1109: "diff-chg">3.16.2.4.</ins></span> The default data provider</a>
                   1110: <ul class="toc">
                   1111: <li><a href="#commonDefaultDataGridMethodDefinitions"><span class=
                   1112: "secno"><del class="diff-old">3.18.2.4.1.</del> <ins class=
                   1113: "diff-chg">3.16.2.4.1.</ins></span> Common default data provider
                   1114: method definitions for cells</a></li>
                   1115: </ul>
                   1116: </li>
                   1117: <li><a href="#populating"><span class="secno"><del class=
                   1118: "diff-old">3.18.2.5.</del> <ins class=
                   1119: "diff-chg">3.16.2.5.</ins></span> Populating the
                   1120: <code>datagrid</code> element</a></li>
                   1121: <li><a href="#updating"><span class="secno"><del class=
                   1122: "diff-old">3.18.2.6.</del> <ins class=
                   1123: "diff-chg">3.16.2.6.</ins></span> Updating the
                   1124: <code>datagrid</code></a></li>
                   1125: <li><a href="#requirements"><span class="secno"><del class=
                   1126: "diff-old">3.18.2.7.</del> <ins class=
                   1127: "diff-chg">3.16.2.7.</ins></span> Requirements for interactive user
                   1128: agents</a></li>
                   1129: <li><a href="#the-selection"><span class="secno"><del class=
                   1130: "diff-old">3.18.2.8.</del> <ins class=
                   1131: "diff-chg">3.16.2.8.</ins></span> The selection</a></li>
                   1132: <li><a href="#columns"><span class="secno"><del class=
                   1133: "diff-old">3.18.2.9.</del> <ins class=
                   1134: "diff-chg">3.16.2.9.</ins></span> Columns and captions</a></li>
                   1135: </ul>
                   1136: </li>
                   1137: <li><a href="#the-command"><span class="secno"><del class=
                   1138: "diff-old">3.18.3.</del> <ins class="diff-chg">3.16.3</ins></span>
                   1139: The <code>command</code> element</a></li>
                   1140: <li><a href="#menus"><span class="secno"><del class=
                   1141: "diff-old">3.18.4.</del> <ins class="diff-chg">3.16.4</ins></span>
                   1142: The <code>menu</code> element</a>
                   1143: <ul class="toc">
                   1144: <li><a href="#menus-intro"><span class="secno"><del class=
                   1145: "diff-old">3.18.4.1.</del> <ins class=
                   1146: "diff-chg">3.16.4.1.</ins></span> Introduction</a></li>
                   1147: <li><a href="#building"><span class="secno"><del class=
                   1148: "diff-old">3.18.4.2.</del> <ins class=
                   1149: "diff-chg">3.16.4.2.</ins></span> Building menus and tool
                   1150: bars</a></li>
                   1151: <li><a href="#context"><span class="secno"><del class=
                   1152: "diff-old">3.18.4.3.</del> <ins class=
                   1153: "diff-chg">3.16.4.3.</ins></span> Context menus</a></li>
                   1154: <li><a href="#toolbars"><span class="secno"><del class=
                   1155: "diff-old">3.18.4.4.</del> <ins class=
                   1156: "diff-chg">3.16.4.4.</ins></span> Toolbars</a></li>
                   1157: </ul>
                   1158: </li>
                   1159: <li><a href="#commands"><span class="secno"><del class=
                   1160: "diff-old">3.18.5.</del> <ins class="diff-chg">3.16.5</ins></span>
                   1161: Commands</a>
                   1162: <ul class="toc">
                   1163: <li><a href="#using"><span class="secno"><del class=
                   1164: "diff-old">3.18.5.1.</del> <ins class=
                   1165: "diff-chg">3.16.5.1.</ins></span> Using the <code>a</code> element
                   1166: to define a command</a></li>
                   1167: <li><a href="#using0"><span class="secno"><del class=
                   1168: "diff-old">3.18.5.2.</del> <ins class=
                   1169: "diff-chg">3.16.5.2.</ins></span> Using the <code>button</code>
                   1170: element to define a command</a></li>
                   1171: <li><a href="#using1"><span class="secno"><del class=
                   1172: "diff-old">3.18.5.3.</del> <ins class=
                   1173: "diff-chg">3.16.5.3.</ins></span> Using the <code>input</code>
                   1174: element to define a command</a></li>
                   1175: <li><a href="#using2"><span class="secno"><del class=
                   1176: "diff-old">3.18.5.4.</del> <ins class=
                   1177: "diff-chg">3.16.5.4.</ins></span> Using the <code>option</code>
                   1178: element to define a command</a></li>
                   1179: <li><a href="#using3"><span class="secno"><del class=
                   1180: "diff-old">3.18.5.5.</del> <ins class=
                   1181: "diff-chg">3.16.5.5.</ins></span> Using the <code>command</code>
                   1182: element to define a command</a></li>
                   1183: </ul>
                   1184: </li>
                   1185: </ul>
                   1186: </li>
                   1187: <li><a href="#datatemplate"><span class="secno"><del class=
                   1188: "diff-old">3.19.</del> <ins class="diff-chg">3.17</ins></span> Data
                   1189: Templates</a>
                   1190: <ul class="toc">
                   1191: <li><a href="#introduction0"><span class="secno"><del class=
                   1192: "diff-old">3.19.1.</del> <ins class="diff-chg">3.17.1</ins></span>
                   1193: Introduction</a></li>
                   1194: <li><a href="#the-datatemplate"><span class="secno"><del class=
                   1195: "diff-old">3.19.2.</del> <ins class="diff-chg">3.17.2</ins></span>
                   1196: The <code>datatemplate</code> element</a></li>
                   1197: <li><a href="#the-rule"><span class="secno"><del class=
                   1198: "diff-old">3.19.3.</del> <ins class="diff-chg">3.17.3</ins></span>
                   1199: The <code>rule</code> element</a></li>
                   1200: <li><a href="#the-nest"><span class="secno"><del class=
                   1201: "diff-old">3.19.4.</del> <ins class="diff-chg">3.17.4</ins></span>
                   1202: The <code>nest</code> element</a></li>
                   1203: <li><a href="#global0"><span class="secno"><del class=
                   1204: "diff-old">3.19.5.</del> <ins class="diff-chg">3.17.5</ins></span>
                   1205: Global attributes for data templates</a></li>
                   1206: <li><a href="#processing1"><span class="secno"><del class=
                   1207: "diff-old">3.19.6.</del> <ins class="diff-chg">3.17.6</ins></span>
                   1208: Processing model</a>
                   1209: <ul class="toc">
                   1210: <li><a href="#the-originalcontent"><span class="secno"><del class=
                   1211: "diff-old">3.19.6.1.</del> <ins class=
                   1212: "diff-chg">3.17.6.1.</ins></span> The <code title=
                   1213: "dom-originalContent">originalContent</code> DOM attribute</a></li>
                   1214: <li><a href="#the-template"><span class="secno"><del class=
                   1215: "diff-old">3.19.6.2.</del> <ins class=
                   1216: "diff-chg">3.17.6.2.</ins></span> The <code title=
                   1217: "attr-template">template</code> attribute</a></li>
                   1218: <li><a href="#the-ref"><span class="secno"><del class=
                   1219: "diff-old">3.19.6.3.</del> <ins class=
                   1220: "diff-chg">3.17.6.3.</ins></span> The <code title=
                   1221: "attr-ref">ref</code> attribute</a></li>
                   1222: <li><a href="#the-nodedatatemplate"><span class="secno"><del class=
                   1223: "diff-old">3.19.6.4.</del> <ins class=
                   1224: "diff-chg">3.17.6.4.</ins></span> The <code>NodeDataTemplate</code>
                   1225: interface</a></li>
                   1226: <li><a href="#mutations"><span class="secno"><del class=
                   1227: "diff-old">3.19.6.5.</del> <ins class=
                   1228: "diff-chg">3.17.6.5.</ins></span> Mutations</a></li>
                   1229: <li><a href="#updating0"><span class="secno"><del class=
                   1230: "diff-old">3.19.6.6.</del> <ins class=
                   1231: "diff-chg">3.17.6.6.</ins></span> Updating the generated
                   1232: content</a></li>
                   1233: </ul>
                   1234: </li>
                   1235: </ul>
                   1236: </li>
                   1237: <li><a href="#miscellaneous"><span class="secno"><del class=
                   1238: "diff-old">3.20.</del> <ins class="diff-chg">3.18</ins></span>
                   1239: Miscellaneous elements</a>
                   1240: <ul class="toc">
                   1241: <li><a href="#the-legend"><span class="secno"><del class=
                   1242: "diff-old">3.20.1.</del> <ins class="diff-chg">3.18.1</ins></span>
                   1243: The <code>legend</code> element</a></li>
                   1244: <li><a href="#the-div"><span class="secno"><del class=
                   1245: "diff-old">3.20.2.</del> <ins class="diff-chg">3.18.2</ins></span>
                   1246: The <code>div</code> element</a></li>
                   1247: </ul>
                   1248: </li>
                   1249: </ul>
                   1250: </li>
                   1251: <li><a href="#web-browsers"><span class="secno">4.</span> Web
                   1252: browsers</a>
                   1253: <ul class="toc">
                   1254: <li><a href="#windows"><span class="secno"><del class=
                   1255: "diff-old">4.1.</del> <ins class="diff-chg">4.1</ins></span>
                   1256: Browsing contexts</a>
                   1257: <ul class="toc">
                   1258: <li><a href="#nested"><span class="secno"><del class=
                   1259: "diff-old">4.1.1.</del> <ins class="diff-chg">4.1.1</ins></span>
                   1260: Nested browsing contexts</a></li>
                   1261: <li><a href="#auxiliary"><span class="secno"><del class=
                   1262: "diff-old">4.1.2.</del> <ins class="diff-chg">4.1.2</ins></span>
                   1263: Auxiliary browsing contexts</a></li>
                   1264: <li><a href="#secondary"><span class="secno"><del class=
                   1265: "diff-old">4.1.3.</del> <ins class="diff-chg">4.1.3</ins></span>
                   1266: Secondary browsing contexts</a></li>
                   1267: <li><a href="#security2"><span class="secno"><ins class=
                   1268: "diff-new">4.1.4</ins></span> <ins class=
                   1269: "diff-new">Security</ins></a></li>
                   1270: <li><a href="#threads"><span class="secno"><del class=
                   1271: "diff-old">4.1.4.</del> <ins class="diff-chg">4.1.5</ins></span>
                   1272: Threads</a></li>
                   1273: <li><a href="#browsing"><span class="secno"><del class=
                   1274: "diff-old">4.1.5.</del> <ins class="diff-chg">4.1.6</ins></span>
                   1275: Browsing context names</a></li>
                   1276: </ul>
                   1277: </li>
                   1278: <li><a href="#the-default0"><span class="secno"><del class=
                   1279: "diff-old">4.2.</del> <ins class="diff-chg">4.2</ins></span> The
                   1280: default view</a>
                   1281: <ul class="toc">
                   1282: <li><a href="#security3"><span class="secno"><del class=
                   1283: "diff-old">4.2.1.</del> <ins class="diff-chg">4.2.1</ins></span>
                   1284: Security</a></li>
                   1285: <li><a href="#constructors"><span class="secno"><del class=
                   1286: "diff-old">4.2.2.</del> <ins class="diff-chg">4.2.2</ins></span>
                   1287: Constructors</a></li>
                   1288: <li><a href="#apis-for"><span class="secno"><del class=
                   1289: "diff-old">4.2.3.</del> <ins class="diff-chg">4.2.3</ins></span>
                   1290: APIs for creating and navigating browsing contexts by name</a></li>
                   1291: <li><a href="#accessing"><span class="secno"><del class=
                   1292: "diff-old">4.2.4.</del> <ins class="diff-chg">4.2.4</ins></span>
                   1293: Accessing other browsing contexts</a></li>
                   1294: </ul>
                   1295: </li>
                   1296: <li><a href="#origin"><span class="secno"><del class=
                   1297: "diff-old">4.3.</del> <ins class="diff-chg">4.3</ins></span>
                   1298: <del class="diff-old">Scripting</del> <ins class=
                   1299: "diff-chg">Origin</ins></a>
                   1300: <ul class="toc">
                   1301: <li><a href="#relaxing"><span class="secno"><del class=
                   1302: "diff-old">4.3.1.</del> <ins class="diff-chg">4.3.1</ins></span>
                   1303: <del class="diff-old">Running executable code</del> <ins class=
                   1304: "diff-chg">Relaxing the same-origin restriction</ins></a></li>
                   1305: <li><a href="#the-string"><span class="secno"><del class=
                   1306: "diff-old">4.3.2.</del> <ins class="diff-chg">4.3.2</ins></span>
                   1307: <del class="diff-old">Origin</del> <ins class="diff-chg">The string
                   1308: representing the script's domain in IDNA format</ins></a></li>
                   1309: </ul>
                   1310: </li>
                   1311: <li><a href="#scripting"><span class="secno"><del class=
                   1312: "diff-old">4.3.3.</del> <ins class="diff-chg">4.4</ins></span>
                   1313: <del class="diff-old">Unscripted same-origin checks</del>
                   1314: <ins class="diff-chg">Scripting</ins></a>
                   1315: <ul class="toc">
                   1316: <li><a href="#script0"><span class="secno"><del class=
                   1317: "diff-old">4.3.4.</del> <ins class="diff-chg">4.4.1</ins></span>
                   1318: <ins class="diff-chg">Script execution contexts</ins></a></li>
                   1319: <li><a href="#security4"><span class="secno"><ins class=
                   1320: "diff-chg">4.4.2</ins></span> Security exceptions</a></li>
                   1321: <li><a href="#javascript-protocol"><span class="secno"><del class=
                   1322: "diff-old">4.3.5.</del> <ins class="diff-chg">4.4.3</ins></span>
                   1323: The <code title="">javascript:</code> protocol</a></li>
                   1324: <li><a href="#events"><span class="secno"><del class=
                   1325: "diff-old">4.3.6.</del> <ins class="diff-chg">4.4.4</ins></span>
                   1326: Events</a>
                   1327: <ul class="toc">
                   1328: <li><a href="#event-handler-attributes"><span class=
                   1329: "secno"><del class="diff-old">4.3.6.1.</del> <ins class=
                   1330: "diff-chg">4.4.4.1.</ins></span> Event handler attributes</a></li>
                   1331: <li><a href="#event"><span class="secno"><del class=
                   1332: "diff-old">4.3.6.2.</del> <ins class=
                   1333: "diff-chg">4.4.4.2.</ins></span> Event firing</a></li>
                   1334: <li><a href="#events0"><span class="secno"><del class=
                   1335: "diff-old">4.3.6.3.</del> <ins class=
                   1336: "diff-chg">4.4.4.3.</ins></span> Events and the <code>Window</code>
                   1337: object</a></li>
                   1338: <li><a href="#runtime-script-errors"><span class=
                   1339: "secno"><del class="diff-old">4.3.6.4.</del> <ins class=
                   1340: "diff-chg">4.4.4.4.</ins></span> Runtime script errors</a></li>
                   1341: </ul>
                   1342: </li>
                   1343: </ul>
                   1344: </li>
                   1345: <li><a href="#user-prompts"><span class="secno"><del class=
                   1346: "diff-old">4.4.</del> <ins class="diff-chg">4.5</ins></span> User
                   1347: prompts</a>
                   1348: <ul class="toc">
                   1349: <li><a href="#simple0"><span class="secno"><ins class=
                   1350: "diff-new">4.5.1</ins></span> <ins class="diff-new">Simple
                   1351: dialogs</ins></a></li>
                   1352: <li><a href="#printing"><span class="secno"><ins class=
                   1353: "diff-new">4.5.2</ins></span> <ins class=
                   1354: "diff-new">Printing</ins></a></li>
                   1355: <li><a href="#dialogs"><span class="secno"><ins class=
                   1356: "diff-new">4.5.3</ins></span> <ins class="diff-new">Dialogs
                   1357: implemented using separate documents</ins></a></li>
                   1358: <li><a href="#notifications"><span class="secno"><ins class=
                   1359: "diff-new">4.5.4</ins></span> <ins class=
                   1360: "diff-new">Notifications</ins></a></li>
                   1361: </ul>
                   1362: </li>
                   1363: <li><a href="#browser"><span class="secno"><del class=
                   1364: "diff-old">4.5.</del> <ins class="diff-chg">4.6</ins></span>
                   1365: Browser state</a>
                   1366: <ul class="toc">
                   1367: <li><a href="#custom-handlers"><span class="secno"><del class=
                   1368: "diff-old">4.5.1.</del> <ins class="diff-chg">4.6.1</ins></span>
                   1369: Custom protocol and content handlers</a>
                   1370: <ul class="toc">
                   1371: <li><a href="#security5"><span class="secno"><del class=
                   1372: "diff-old">4.5.1.1.</del> <ins class=
                   1373: "diff-chg">4.6.1.1.</ins></span> Security and privacy</a></li>
                   1374: <li><a href="#sample-handler-impl"><span class="secno"><del class=
                   1375: "diff-old">4.5.1.2.</del> <ins class=
                   1376: "diff-chg">4.6.1.2.</ins></span> Sample user interface</a></li>
                   1377: </ul>
                   1378: </li>
                   1379: </ul>
                   1380: </li>
                   1381: <li><a href="#offline"><span class="secno"><del class=
                   1382: "diff-old">4.6.</del> <ins class="diff-chg">4.7</ins></span>
                   1383: Offline Web applications</a>
                   1384: <ul class="toc">
                   1385: <li><a href="#introduction1"><span class="secno"><del class=
                   1386: "diff-old">4.6.1.</del> <ins class="diff-chg">4.7.1</ins></span>
                   1387: Introduction</a></li>
                   1388: <li><a href="#appcache"><span class="secno"><del class=
                   1389: "diff-old">4.6.2.</del> <ins class="diff-chg">4.7.2</ins></span>
                   1390: Application caches</a></li>
                   1391: <li><a href="#manifests"><span class="secno"><del class=
                   1392: "diff-old">4.6.3.</del> <ins class="diff-chg">4.7.3</ins></span>
                   1393: The cache manifest syntax</a>
                   1394: <ul class="toc">
                   1395: <li><a href="#writing"><span class="secno"><del class=
                   1396: "diff-old">4.6.3.1.</del> <ins class=
                   1397: "diff-chg">4.7.3.1.</ins></span> Writing cache manifests</a></li>
                   1398: <li><a href="#parsing0"><span class="secno"><del class=
                   1399: "diff-old">4.6.3.2.</del> <ins class=
                   1400: "diff-chg">4.7.3.2.</ins></span> Parsing cache manifests</a></li>
                   1401: </ul>
                   1402: </li>
                   1403: <li><a href="#updating1"><span class="secno"><del class=
                   1404: "diff-old">4.6.4.</del> <ins class="diff-chg">4.7.4</ins></span>
                   1405: Updating an application cache</a></li>
                   1406: <li><a href="#processing2"><span class="secno"><del class=
                   1407: "diff-old">4.6.5.</del> <ins class="diff-chg">4.7.5</ins></span>
                   1408: Processing model</a>
                   1409: <ul class="toc">
                   1410: <li><a href="#changes"><span class="secno"><del class=
                   1411: "diff-old">4.6.5.1.</del> <ins class=
                   1412: "diff-chg">4.7.5.1.</ins></span> Changes to the networking
                   1413: model</a></li>
                   1414: </ul>
                   1415: </li>
                   1416: <li><a href="#application"><span class="secno"><del class=
                   1417: "diff-old">4.6.6.</del> <ins class="diff-chg">4.7.6</ins></span>
                   1418: Application cache API</a></li>
                   1419: <li><a href="#browser0"><span class="secno"><del class=
                   1420: "diff-old">4.6.7.</del> <ins class="diff-chg">4.7.7</ins></span>
                   1421: Browser state</a></li>
                   1422: </ul>
                   1423: </li>
                   1424: <li><a href="#history"><span class="secno"><del class=
                   1425: "diff-old">4.7.</del> <ins class="diff-chg">4.8</ins></span>
                   1426: Session history and navigation</a>
                   1427: <ul class="toc">
                   1428: <li><a href="#the-session"><span class="secno"><del class=
                   1429: "diff-old">4.7.1.</del> <ins class="diff-chg">4.8.1</ins></span>
                   1430: The session history of browsing contexts</a></li>
                   1431: <li><a href="#the-history"><span class="secno"><del class=
                   1432: "diff-old">4.7.2.</del> <ins class="diff-chg">4.8.2</ins></span>
                   1433: The <code>History</code> interface</a></li>
                   1434: <li><a href="#activating"><span class="secno"><del class=
                   1435: "diff-old">4.7.3.</del> <ins class="diff-chg">4.8.3</ins></span>
                   1436: Activating state <del class="diff-old">objects</del> <ins class=
                   1437: "diff-chg">object entries</ins></a></li>
                   1438: <li><a href="#the-location"><span class="secno"><del class=
                   1439: "diff-old">4.7.4.</del> <ins class="diff-chg">4.8.4</ins></span>
                   1440: The <code>Location</code> interface</a>
                   1441: <ul class="toc">
                   1442: <li><a href="#security6"><span class="secno"><del class=
                   1443: "diff-old">4.7.4.1.</del> <ins class=
                   1444: "diff-chg">4.8.4.1.</ins></span> Security</a></li>
                   1445: </ul>
                   1446: </li>
                   1447: <li><a href="#history-notes"><span class="secno"><del class=
                   1448: "diff-old">4.7.5.</del> <ins class="diff-chg">4.8.5</ins></span>
                   1449: Implementation notes for session history</a></li>
                   1450: </ul>
                   1451: </li>
                   1452: <li><a href="#browsing0"><span class="secno"><ins class=
                   1453: "diff-new">4.9</ins></span> <ins class="diff-new">Browsing the
                   1454: Web</ins></a>
                   1455: <ul class="toc">
                   1456: <li><a href="#navigating"><span class="secno"><del class=
                   1457: "diff-old">4.8.</del> <ins class="diff-chg">4.9.1</ins></span>
                   1458: Navigating across documents</a></li>
                   1459: <li><a href="#read-html"><span class="secno"><del class=
                   1460: "diff-old">4.8.1.</del> <ins class="diff-chg">4.9.2</ins></span>
                   1461: Page load processing model for HTML files</a></li>
                   1462: <li><a href="#read-xml"><span class="secno"><del class=
                   1463: "diff-old">4.8.2.</del> <ins class="diff-chg">4.9.3</ins></span>
                   1464: Page load processing model for XML files</a></li>
                   1465: <li><a href="#read-text"><span class="secno"><del class=
                   1466: "diff-old">4.8.3.</del> <ins class="diff-chg">4.9.4</ins></span>
                   1467: Page load processing model for text files</a></li>
                   1468: <li><a href="#read-image"><span class="secno"><del class=
                   1469: "diff-old">4.8.4.</del> <ins class="diff-chg">4.9.5</ins></span>
                   1470: Page load processing model for images</a></li>
                   1471: <li><a href="#read-plugin"><span class="secno"><del class=
                   1472: "diff-old">4.8.5.</del> <ins class="diff-chg">4.9.6</ins></span>
                   1473: Page load processing model for content that uses plugins</a></li>
                   1474: <li><a href="#read-ua-inline"><span class="secno"><del class=
                   1475: "diff-old">4.8.6.</del> <ins class="diff-chg">4.9.7</ins></span>
                   1476: Page load processing model for inline content that doesn't have a
                   1477: DOM</a></li>
                   1478: <li><a href="#scroll-to-fragid"><span class="secno"><del class=
                   1479: "diff-old">4.8.7.</del> <ins class="diff-chg">4.9.8</ins></span>
                   1480: Navigating to a fragment identifier</a></li>
                   1481: <li><a href="#history0"><span class="secno"><ins class=
                   1482: "diff-new">4.9.9</ins></span> <ins class="diff-new">History
                   1483: traversal</ins></a></li>
                   1484: </ul>
                   1485: </li>
                   1486: <li><a href="#content-type-sniffing"><span class=
                   1487: "secno"><del class="diff-old">4.9.</del> <ins class=
                   1488: "diff-chg">4.10</ins></span> Determining the type of a new resource
                   1489: in a browsing context</a>
                   1490: <ul class="toc">
                   1491: <li><a href="#content-type0"><span class="secno"><del class=
                   1492: "diff-old">4.9.1.</del> <ins class="diff-chg">4.10.1</ins></span>
                   1493: Content-Type sniffing: text or binary</a></li>
                   1494: <li><a href="#content-type1"><span class="secno"><del class=
                   1495: "diff-old">4.9.2.</del> <ins class="diff-chg">4.10.2</ins></span>
                   1496: Content-Type sniffing: unknown type</a></li>
                   1497: <li><a href="#content-type2"><span class="secno"><del class=
                   1498: "diff-old">4.9.3.</del> <ins class="diff-chg">4.10.3</ins></span>
                   1499: Content-Type sniffing: image</a></li>
                   1500: <li><a href="#content-type3"><span class="secno"><del class=
                   1501: "diff-old">4.9.4.</del> <ins class="diff-chg">4.10.4</ins></span>
                   1502: Content-Type sniffing: feed or HTML</a></li>
                   1503: <li><a href="#content-type"><span class="secno"><del class=
                   1504: "diff-old">4.9.5.</del> <ins class="diff-chg">4.10.5</ins></span>
                   1505: Content-Type metadata</a></li>
                   1506: </ul>
                   1507: </li>
                   1508: <li><a href="#structured"><span class="secno"><del class=
                   1509: "diff-old">4.10.</del> <ins class="diff-chg">4.11</ins></span>
                   1510: <del class="diff-old">Client-side session and persistent</del>
                   1511: <ins class="diff-chg">Structured client-side</ins> storage
                   1512: <del class="diff-old">of</del></a>
                   1513: <ul class="toc">
                   1514: <li><a href="#storage"><span class="secno"><ins class=
                   1515: "diff-chg">4.11.1</ins></span> <ins class="diff-chg">Storing</ins>
                   1516: name/value pairs</a>
                   1517: <ul class="toc">
                   1518: <li><a href="#introduction2"><span class="secno"><del class=
                   1519: "diff-old">4.10.1.</del> <ins class=
                   1520: "diff-chg">4.11.1.1.</ins></span> Introduction</a></li>
                   1521: <li><a href="#the-storage"><span class="secno"><del class=
                   1522: "diff-old">4.10.2.</del> <ins class=
                   1523: "diff-chg">4.11.1.2.</ins></span> The <code>Storage</code>
                   1524: interface</a></li>
                   1525: <li><a href="#the-sessionstorage"><span class="secno"><del class=
                   1526: "diff-old">4.10.3.</del> <ins class=
                   1527: "diff-chg">4.11.1.3.</ins></span> The <code title=
                   1528: "dom-sessionStorage">sessionStorage</code> attribute</a></li>
                   1529: <li><a href="#the-localstorage"><span class="secno"><del class=
                   1530: "diff-old">4.10.4.</del> <ins class=
                   1531: "diff-chg">4.11.1.4.</ins></span> The <del class=
                   1532: "diff-old">globalStorage</del> <code title=
                   1533: "dom-localStorage"><ins class="diff-chg">localStorage</ins></code>
                   1534: attribute</a></li>
                   1535: <li><a href="#the-storage0"><span class="secno"><del class=
                   1536: "diff-old">4.10.5.</del> <ins class=
                   1537: "diff-chg">4.11.1.5.</ins></span> The <code title=
                   1538: "event-storage">storage</code> event</a> <del class=
                   1539: "diff-old">4.10.6. Miscellaneous implementation requirements for
                   1540: storage areas</del>
                   1541: <ul class="toc">
                   1542: <li><a href="#event0"><span class="secno"><del class=
                   1543: "diff-old">4.10.6.1.</del> <ins class=
                   1544: "diff-chg">4.11.1.5.1.</ins></span> <del class="diff-old">Disk
                   1545: space</del> <ins class="diff-chg">Event definition</ins></a></li>
                   1546: </ul>
                   1547: </li>
                   1548: <li><a href="#threads0"><span class="secno"><del class=
                   1549: "diff-old">4.10.6.2.</del> <ins class=
                   1550: "diff-chg">4.11.1.6.</ins></span> Threads</a></li>
                   1551: </ul>
                   1552: </li>
                   1553: <li><a href="#sql"><span class="secno"><del class=
                   1554: "diff-old">4.10.7.</del> <ins class="diff-chg">4.11.2</ins></span>
                   1555: <del class="diff-old">Security and privacy</del> <ins class=
                   1556: "diff-chg">Database storage</ins></a>
                   1557: <ul class="toc">
                   1558: <li><a href="#introduction3"><span class="secno"><del class=
                   1559: "diff-old">4.10.7.1.</del> <ins class=
                   1560: "diff-chg">4.11.2.1.</ins></span> <del class="diff-old">User
                   1561: tracking</del> <ins class="diff-chg">Introduction</ins></a></li>
                   1562: <li><a href="#databases"><span class="secno"><del class=
                   1563: "diff-old">4.10.7.2.</del> <ins class=
                   1564: "diff-chg">4.11.2.2.</ins></span> <del class="diff-old">Cookie
                   1565: resurrection</del> <ins class="diff-chg">Databases</ins></a></li>
                   1566: <li><a href="#executing"><span class="secno"><del class=
                   1567: "diff-old">4.10.7.3.</del> <ins class=
                   1568: "diff-chg">4.11.2.3.</ins></span> <del class="diff-old">DNS
                   1569: spoofing attacks</del> <ins class="diff-chg">Executing SQL
                   1570: statements</ins></a></li>
                   1571: <li><a href="#database"><span class="secno"><del class=
                   1572: "diff-old">4.10.7.4.</del> <ins class=
                   1573: "diff-chg">4.11.2.4.</ins></span> <del class=
                   1574: "diff-old">Cross-directory attacks</del> <ins class=
                   1575: "diff-chg">Database query results</ins></a></li>
                   1576: <li><a href="#errors"><span class="secno"><del class=
                   1577: "diff-old">4.10.7.5.</del> <ins class=
                   1578: "diff-chg">4.11.2.5.</ins></span> <del class=
                   1579: "diff-old">Implementation risks</del> <ins class=
                   1580: "diff-chg">Errors</ins></a></li>
                   1581: <li><a href="#processing3"><span class="secno"><del class=
                   1582: "diff-old">4.11.</del> <ins class="diff-chg">4.11.2.6.</ins></span>
                   1583: <del class="diff-old">Client-side database storage</del>
                   1584: <ins class="diff-chg">Processing model</ins></a></li>
                   1585: </ul>
                   1586: </li>
                   1587: <li><a href="#disk-space"><span class="secno"><del class=
                   1588: "diff-old">4.11.1.</del> <ins class="diff-chg">4.11.3</ins></span>
                   1589: <del class="diff-old">Introduction</del> <ins class="diff-chg">Disk
                   1590: space</ins></a></li>
                   1591: <li><a href="#privacy"><span class="secno"><del class=
                   1592: "diff-old">4.11.2.</del> <ins class="diff-chg">4.11.4</ins></span>
                   1593: <del class="diff-old">Databases</del> <ins class=
                   1594: "diff-chg">Privacy</ins></a>
                   1595: <ul class="toc">
                   1596: <li><a href="#user-tracking"><span class="secno"><del class=
                   1597: "diff-old">4.11.3.</del> <ins class=
                   1598: "diff-chg">4.11.4.1.</ins></span> <del class="diff-old">Executing
                   1599: SQL statements</del> <ins class="diff-chg">User
                   1600: tracking</ins></a></li>
                   1601: <li><a href="#cookie"><span class="secno"><del class=
                   1602: "diff-old">4.11.4.</del> <ins class=
                   1603: "diff-chg">4.11.4.2.</ins></span> <del class="diff-old">Database
                   1604: query results</del> <ins class="diff-chg">Cookie
                   1605: resurrection</ins></a></li>
                   1606: </ul>
                   1607: </li>
                   1608: <li><a href="#security7"><span class="secno"><del class=
                   1609: "diff-old">4.11.5.</del> <ins class="diff-chg">4.11.5</ins></span>
                   1610: <del class="diff-old">Errors</del> <ins class=
                   1611: "diff-chg">Security</ins></a>
                   1612: <ul class="toc">
                   1613: <li><a href="#dns-spoofing"><span class="secno"><del class=
                   1614: "diff-old">4.11.6.</del> <ins class=
                   1615: "diff-chg">4.11.5.1.</ins></span> <del class="diff-old">Processing
                   1616: model</del> <ins class="diff-chg">DNS spoofing
                   1617: attacks</ins></a></li>
                   1618: <li><a href="#cross-directory"><span class="secno"><del class=
                   1619: "diff-old">4.11.7.</del> <ins class=
                   1620: "diff-chg">4.11.5.2.</ins></span> <del class=
                   1621: "diff-old">Privacy</del> <ins class="diff-chg">Cross-directory
                   1622: attacks</ins></a></li>
                   1623: <li><a href="#implementation"><span class="secno"><del class=
                   1624: "diff-old">4.11.8.</del> <ins class=
                   1625: "diff-chg">4.11.5.3.</ins></span> <del class=
                   1626: "diff-old">Security</del> <ins class="diff-chg">Implementation
                   1627: risks</ins></a></li>
                   1628: <li><a href="#sql-and"><span class="secno"><del class=
                   1629: "diff-old">4.11.8.1.</del> <ins class=
                   1630: "diff-chg">4.11.5.4.</ins></span> <del class="diff-old">User</del>
                   1631: <ins class="diff-chg">SQL and user</ins> agents</a></li>
                   1632: <li><a href="#sql-injection"><span class="secno"><del class=
                   1633: "diff-old">4.11.8.2.</del> <ins class=
                   1634: "diff-chg">4.11.5.5.</ins></span> SQL injection</a></li>
                   1635: </ul>
                   1636: </li>
                   1637: </ul>
                   1638: </li>
                   1639: <li><a href="#links"><span class="secno"><del class=
                   1640: "diff-old">4.12.</del> <ins class="diff-chg">4.12</ins></span>
                   1641: Links</a>
                   1642: <ul class="toc">
                   1643: <li><a href="#hyperlink"><span class="secno"><del class=
                   1644: "diff-old">4.12.1.</del> <ins class="diff-chg">4.12.1</ins></span>
                   1645: Hyperlink elements</a></li>
                   1646: <li><a href="#following"><span class="secno"><del class=
                   1647: "diff-old">4.12.2.</del> <ins class="diff-chg">4.12.2</ins></span>
                   1648: Following hyperlinks</a>
                   1649: <ul class="toc">
                   1650: <li><a href="#hyperlink0"><span class="secno">4.12.2.1.</span>
                   1651: Hyperlink auditing</a></li>
                   1652: </ul>
                   1653: </li>
                   1654: <li><a href="#linkTypes"><span class="secno"><del class=
                   1655: "diff-old">4.12.3.</del> <ins class="diff-chg">4.12.3</ins></span>
                   1656: Link types</a>
                   1657: <ul class="toc">
                   1658: <li><a href="#link-type"><span class="secno">4.12.3.1.</span> Link
                   1659: type " <code>alternate</code> "</a></li>
                   1660: <li><a href="#link-type0"><span class="secno">4.12.3.2.</span> Link
                   1661: type " <code>archives</code> "</a></li>
                   1662: <li><a href="#link-type1"><span class="secno">4.12.3.3.</span> Link
                   1663: type " <code>author</code> "</a></li>
                   1664: <li><a href="#link-type2"><span class="secno">4.12.3.4.</span> Link
                   1665: type " <code>bookmark</code> "</a></li>
                   1666: <li><a href="#link-type3"><span class="secno">4.12.3.5.</span> Link
                   1667: type " <code><del class="diff-old">contact</del> <ins class=
                   1668: "diff-chg">external</ins></code> "</a></li>
                   1669: <li><a href="#link-type4"><span class="secno">4.12.3.6.</span> Link
                   1670: type " <code><del class="diff-old">external</del> <ins class=
                   1671: "diff-chg">feed</ins></code> "</a></li>
                   1672: <li><a href="#link-type5"><span class="secno">4.12.3.7.</span> Link
                   1673: type " <code><del class="diff-old">feed " 4.12.3.8. Link type
                   1674: "</del> help</code> "</a></li>
                   1675: <li><a href="#rel-icon"><span class="secno"><del class=
                   1676: "diff-old">4.12.3.9.</del> <ins class=
                   1677: "diff-chg">4.12.3.8.</ins></span> Link type " <code>icon</code>
                   1678: "</a></li>
                   1679: <li><a href="#link-type6"><span class="secno"><del class=
                   1680: "diff-old">4.12.3.10.</del> <ins class=
                   1681: "diff-chg">4.12.3.9.</ins></span> Link type " <code>license</code>
                   1682: "</a></li>
                   1683: <li><a href="#link-type7"><span class="secno"><del class=
                   1684: "diff-old">4.12.3.11.</del> <ins class=
                   1685: "diff-chg">4.12.3.10.</ins></span> Link type "
                   1686: <code>nofollow</code> "</a></li>
                   1687: <li><a href="#link-type8"><span class="secno"><del class=
                   1688: "diff-old">4.12.3.12.</del> <ins class=
                   1689: "diff-chg">4.12.3.11.</ins></span> Link type "
                   1690: <code>noreferrer</code> "</a></li>
                   1691: <li><a href="#link-type9"><span class="secno"><del class=
                   1692: "diff-old">4.12.3.13.</del> <ins class=
                   1693: "diff-chg">4.12.3.12.</ins></span> Link type "
                   1694: <code>pingback</code> "</a></li>
                   1695: <li><a href="#link-type10"><span class="secno"><del class=
                   1696: "diff-old">4.12.3.14.</del> <ins class=
                   1697: "diff-chg">4.12.3.13.</ins></span> Link type "
                   1698: <code>prefetch</code> "</a></li>
                   1699: <li><a href="#link-type11"><span class="secno"><del class=
                   1700: "diff-old">4.12.3.15.</del> <ins class=
                   1701: "diff-chg">4.12.3.14.</ins></span> Link type " <code>search</code>
                   1702: "</a></li>
                   1703: <li><a href="#link-type12"><span class="secno"><del class=
                   1704: "diff-old">4.12.3.16.</del> <ins class=
                   1705: "diff-chg">4.12.3.15.</ins></span> Link type "
                   1706: <code>stylesheet</code> "</a></li>
                   1707: <li><a href="#link-type13"><span class="secno"><del class=
                   1708: "diff-old">4.12.3.17.</del> <ins class=
                   1709: "diff-chg">4.12.3.16.</ins></span> Link type " <code>sidebar</code>
                   1710: "</a></li>
                   1711: <li><a href="#link-type14"><span class="secno"><del class=
                   1712: "diff-old">4.12.3.18.</del> <ins class=
                   1713: "diff-chg">4.12.3.17.</ins></span> Link type " <code>tag</code>
                   1714: "</a></li>
                   1715: <li><a href="#hierarchical"><span class="secno"><del class=
                   1716: "diff-old">4.12.3.19.</del> <ins class=
                   1717: "diff-chg">4.12.3.18.</ins></span> Hierarchical link types</a>
                   1718: <ul class="toc">
                   1719: <li><a href="#link-type15"><span class="secno"><del class=
                   1720: "diff-old">4.12.3.19.1.</del> <ins class=
                   1721: "diff-chg">4.12.3.18.1.</ins></span> Link type " <code>index</code>
                   1722: "</a></li>
                   1723: <li><a href="#link-type16"><span class="secno"><del class=
                   1724: "diff-old">4.12.3.19.2.</del> <ins class=
                   1725: "diff-chg">4.12.3.18.2.</ins></span> Link type " <code>up</code>
                   1726: "</a></li>
                   1727: </ul>
                   1728: </li>
                   1729: <li><a href="#sequential0"><span class="secno"><del class=
                   1730: "diff-old">4.12.3.20.</del> <ins class=
                   1731: "diff-chg">4.12.3.19.</ins></span> Sequential link types</a>
                   1732: <ul class="toc">
                   1733: <li><a href="#link-type17"><span class="secno"><del class=
                   1734: "diff-old">4.12.3.20.1.</del> <ins class=
                   1735: "diff-chg">4.12.3.19.1.</ins></span> Link type " <code>first</code>
                   1736: "</a></li>
                   1737: <li><a href="#link-type18"><span class="secno"><del class=
                   1738: "diff-old">4.12.3.20.2.</del> <ins class=
                   1739: "diff-chg">4.12.3.19.2.</ins></span> Link type " <code>last</code>
                   1740: "</a></li>
                   1741: <li><a href="#link-type19"><span class="secno"><del class=
                   1742: "diff-old">4.12.3.20.3.</del> <ins class=
                   1743: "diff-chg">4.12.3.19.3.</ins></span> Link type " <code>next</code>
                   1744: "</a></li>
                   1745: <li><a href="#link-type20"><span class="secno"><del class=
                   1746: "diff-old">4.12.3.20.4.</del> <ins class=
                   1747: "diff-chg">4.12.3.19.4.</ins></span> Link type " <code>prev</code>
                   1748: "</a></li>
                   1749: </ul>
                   1750: </li>
                   1751: <li><a href="#other0"><span class="secno"><del class=
                   1752: "diff-old">4.12.3.21.</del> <ins class=
                   1753: "diff-chg">4.12.3.20.</ins></span> Other link types</a></li>
                   1754: </ul>
                   1755: </li>
                   1756: </ul>
                   1757: </li>
                   1758: <li><a href="#interfaces"><span class="secno"><del class=
                   1759: "diff-old">4.13.</del> <ins class="diff-chg">4.13</ins></span>
                   1760: Interfaces for URI manipulation</a></li>
                   1761: </ul>
                   1762: </li>
                   1763: <li><a href="#editing"><span class="secno">5.</span> Editing</a>
                   1764: <ul class="toc">
                   1765: <li><a href="#editing-intro"><span class="secno"><del class=
                   1766: "diff-old">5.1.</del> <ins class="diff-chg">5.1</ins></span>
                   1767: Introduction</a></li>
                   1768: <li><a href="#contenteditable"><span class="secno"><del class=
                   1769: "diff-old">5.2.</del> <ins class="diff-chg">5.2</ins></span> The
                   1770: <code title="attr-contenteditable">contenteditable</code>
                   1771: attribute</a>
                   1772: <ul class="toc">
                   1773: <li><a href="#user-editing"><span class="secno"><del class=
                   1774: "diff-old">5.2.1.</del> <ins class="diff-chg">5.2.1</ins></span>
                   1775: User editing actions</a></li>
                   1776: <li><a href="#making"><span class="secno"><del class=
                   1777: "diff-old">5.2.2.</del> <ins class="diff-chg">5.2.2</ins></span>
                   1778: Making entire documents editable</a></li>
                   1779: </ul>
                   1780: </li>
                   1781: <li><a href="#dnd"><span class="secno"><del class=
                   1782: "diff-old">5.3.</del> <ins class="diff-chg">5.3</ins></span> Drag
                   1783: and drop</a>
                   1784: <ul class="toc">
                   1785: <li><a href="#introduction4"><span class="secno"><ins class=
                   1786: "diff-new">5.3.1</ins></span> <ins class=
                   1787: "diff-new">Introduction</ins></a></li>
                   1788: <li><a href="#the-dragevent"><span class="secno"><del class=
                   1789: "diff-old">5.3.1.</del> <ins class="diff-chg">5.3.2</ins></span>
                   1790: The <code>DragEvent</code> and <code>DataTransfer</code>
                   1791: interfaces</a></li>
                   1792: <li><a href="#events1"><span class="secno"><del class=
                   1793: "diff-old">5.3.2.</del> <ins class="diff-chg">5.3.3</ins></span>
                   1794: Events fired during a drag-and-drop action</a></li>
                   1795: <li><a href="#drag-and-drop"><span class="secno"><del class=
                   1796: "diff-old">5.3.3.</del> <ins class="diff-chg">5.3.4</ins></span>
                   1797: Drag-and-drop processing model</a>
                   1798: <ul class="toc">
                   1799: <li><a href="#when-the"><span class="secno"><del class=
                   1800: "diff-old">5.3.3.1.</del> <ins class=
                   1801: "diff-chg">5.3.4.1.</ins></span> When the drag-and-drop operation
                   1802: starts or ends in another document</a></li>
                   1803: <li><a href="#when-the0"><span class="secno"><del class=
                   1804: "diff-old">5.3.3.2.</del> <ins class=
                   1805: "diff-chg">5.3.4.2.</ins></span> When the drag-and-drop operation
                   1806: starts or ends in another application</a></li>
                   1807: </ul>
                   1808: </li>
                   1809: <li><a href="#the-draggable"><span class="secno"><del class=
                   1810: "diff-old">5.3.4.</del> <ins class="diff-chg">5.3.5</ins></span>
                   1811: The <code>draggable</code> attribute</a></li>
                   1812: <li><a href="#copy-and"><span class="secno"><del class=
                   1813: "diff-old">5.3.5.</del> <ins class="diff-chg">5.3.6</ins></span>
                   1814: Copy and paste</a>
                   1815: <ul class="toc">
                   1816: <li><a href="#copy-to"><span class="secno"><del class=
                   1817: "diff-old">5.3.5.1.</del> <ins class=
                   1818: "diff-chg">5.3.6.1.</ins></span> Copy to clipboard</a></li>
                   1819: <li><a href="#cut-to"><span class="secno"><del class=
                   1820: "diff-old">5.3.5.2.</del> <ins class=
                   1821: "diff-chg">5.3.6.2.</ins></span> Cut to clipboard</a></li>
                   1822: <li><a href="#paste"><span class="secno"><del class=
                   1823: "diff-old">5.3.5.3.</del> <ins class=
                   1824: "diff-chg">5.3.6.3.</ins></span> Paste from clipboard</a></li>
                   1825: <li><a href="#paste0"><span class="secno"><del class=
                   1826: "diff-old">5.3.5.4.</del> <ins class=
                   1827: "diff-chg">5.3.6.4.</ins></span> Paste from selection</a></li>
                   1828: </ul>
                   1829: </li>
                   1830: <li><a href="#security8"><span class="secno"><del class=
                   1831: "diff-old">5.3.6.</del> <ins class="diff-chg">5.3.7</ins></span>
                   1832: Security risks in the drag-and-drop model</a></li>
                   1833: </ul>
                   1834: </li>
                   1835: <li><a href="#undo"><span class="secno"><del class=
                   1836: "diff-old">5.4.</del> <ins class="diff-chg">5.4</ins></span> Undo
                   1837: history</a>
                   1838: <ul class="toc">
                   1839: <li><a href="#the-undomanager"><span class="secno"><del class=
                   1840: "diff-old">5.4.1.</del> <ins class="diff-chg">5.4.1</ins></span>
                   1841: The <code>UndoManager</code> interface</a></li>
                   1842: <li><a href="#undo-moving"><span class="secno"><del class=
                   1843: "diff-old">5.4.2.</del> <ins class="diff-chg">5.4.2</ins></span>
                   1844: Undo: moving back in the undo transaction history</a></li>
                   1845: <li><a href="#redo-moving"><span class="secno"><del class=
                   1846: "diff-old">5.4.3.</del> <ins class="diff-chg">5.4.3</ins></span>
                   1847: Redo: moving forward in the undo transaction history</a></li>
                   1848: <li><a href="#the-undomanagerevent"><span class="secno"><del class=
                   1849: "diff-old">5.4.4.</del> <ins class="diff-chg">5.4.4</ins></span>
                   1850: The <code>UndoManagerEvent</code> interface and the <code title=
                   1851: "event-undo">undo</code> and <code title="event-redo">redo</code>
                   1852: events</a></li>
                   1853: <li><a href="#implementation0"><span class="secno"><del class=
                   1854: "diff-old">5.4.5.</del> <ins class="diff-chg">5.4.5</ins></span>
                   1855: Implementation notes</a></li>
                   1856: </ul>
                   1857: </li>
                   1858: <li><del class="diff-old">5.5. Command APIs</del> <a href=
                   1859: "#selection"><span class="secno"><del class="diff-old">5.6.</del>
                   1860: <ins class="diff-chg">5.5</ins></span> The text selection APIs</a>
                   1861: <ul class="toc">
                   1862: <li><a href="#documentSelection"><span class="secno"><del class=
                   1863: "diff-old">5.6.1.</del> <ins class="diff-chg">5.5.1</ins></span>
                   1864: APIs for the browsing context selection</a></li>
                   1865: <li><a href="#textFieldSelection"><span class="secno"><del class=
                   1866: "diff-old">5.6.2.</del> <ins class="diff-chg">5.5.2</ins></span>
                   1867: APIs for the text field selections</a></li>
                   1868: </ul>
                   1869: </li>
                   1870: <li><a href="#command"><span class="secno"><ins class=
                   1871: "diff-new">5.6</ins></span> <ins class="diff-new">Command
                   1872: APIs</ins></a></li>
                   1873: </ul>
                   1874: </li>
                   1875: <li><a href="#comms"><span class="secno">6.</span>
                   1876: Communication</a>
                   1877: <ul class="toc">
                   1878: <li><a href="#event1"><span class="secno"><del class=
                   1879: "diff-old">6.1.</del> <ins class="diff-chg">6.1</ins></span> Event
                   1880: definitions</a></li>
                   1881: <li><a href="#server-sent-events"><span class="secno"><del class=
                   1882: "diff-old">6.2.</del> <ins class="diff-chg">6.2</ins></span>
                   1883: Server-sent DOM events</a>
                   1884: <ul class="toc">
                   1885: <li><a href="#the-remoteeventtarget"><span class=
                   1886: "secno"><del class="diff-old">6.2.1.</del> <ins class=
                   1887: "diff-chg">6.2.1</ins></span> The <code>RemoteEventTarget</code>
                   1888: interface</a></li>
                   1889: <li><a href="#connecting"><span class="secno"><del class=
                   1890: "diff-old">6.2.2.</del> <ins class="diff-chg">6.2.2</ins></span>
                   1891: Connecting to an event stream</a></li>
                   1892: <li><a href="#parsing1"><span class="secno"><del class=
                   1893: "diff-old">6.2.3.</del> <ins class="diff-chg">6.2.3</ins></span>
                   1894: Parsing an event stream</a></li>
                   1895: <li><a href="#event-stream-interpretation"><span class=
                   1896: "secno"><del class="diff-old">6.2.4.</del> <ins class=
                   1897: "diff-chg">6.2.4</ins></span> Interpreting an event stream</a></li>
                   1898: <li><a href="#notes"><span class="secno"><del class=
                   1899: "diff-old">6.2.5.</del> <ins class="diff-chg">6.2.5</ins></span>
                   1900: Notes</a></li>
                   1901: </ul>
                   1902: </li>
                   1903: <li><a href="#network"><span class="secno"><del class=
                   1904: "diff-old">6.3.</del> <ins class="diff-chg">6.3</ins></span>
                   1905: Network connections</a>
                   1906: <ul class="toc">
                   1907: <li><a href="#network-intro"><span class="secno"><del class=
                   1908: "diff-old">6.3.1.</del> <ins class="diff-chg">6.3.1</ins></span>
                   1909: Introduction</a></li>
                   1910: <li><a href="#the-connection"><span class="secno"><del class=
                   1911: "diff-old">6.3.2.</del> <ins class="diff-chg">6.3.2</ins></span>
                   1912: The <code>Connection</code> interface</a></li>
                   1913: <li><a href="#connection"><span class="secno"><del class=
                   1914: "diff-old">6.3.3.</del> <ins class="diff-chg">6.3.3</ins></span>
                   1915: Connection Events</a></li>
                   1916: <li><a href="#tcp-connections"><span class="secno"><del class=
                   1917: "diff-old">6.3.4.</del> <ins class="diff-chg">6.3.4</ins></span>
                   1918: TCP connections</a></li>
                   1919: <li><a href="#broadcast"><span class="secno"><del class=
                   1920: "diff-old">6.3.5.</del> <ins class="diff-chg">6.3.5</ins></span>
                   1921: Broadcast connections</a>
                   1922: <ul class="toc">
                   1923: <li><a href="#broadcasting"><span class="secno">6.3.5.1.</span>
                   1924: Broadcasting over TCP/IP</a></li>
                   1925: <li><a href="#bluetooth-broadcast"><span class=
                   1926: "secno">6.3.5.2.</span> Broadcasting over Bluetooth</a></li>
                   1927: <li><a href="#irda-broadcast"><span class="secno">6.3.5.3.</span>
                   1928: Broadcasting over IrDA</a></li>
                   1929: </ul>
                   1930: </li>
                   1931: <li><a href="#peer-to-peer"><span class="secno"><del class=
                   1932: "diff-old">6.3.6.</del> <ins class="diff-chg">6.3.6</ins></span>
                   1933: Peer-to-peer connections</a>
                   1934: <ul class="toc">
                   1935: <li><a href="#peer-to-peer0"><span class="secno">6.3.6.1.</span>
                   1936: Peer-to-peer connections over TCP/IP</a></li>
                   1937: <li><a href="#bluetooth-peer"><span class="secno">6.3.6.2.</span>
                   1938: Peer-to-peer connections over Bluetooth</a></li>
                   1939: <li><a href="#irda-peer"><span class="secno">6.3.6.3.</span>
                   1940: Peer-to-peer connections over IrDA</a></li>
                   1941: </ul>
                   1942: </li>
                   1943: <li><a href="#the-common"><span class="secno"><del class=
                   1944: "diff-old">6.3.7.</del> <ins class="diff-chg">6.3.7</ins></span>
                   1945: The common protocol for TCP-based connections</a>
                   1946: <ul class="toc">
                   1947: <li><a href="#clients"><span class="secno">6.3.7.1.</span> Clients
                   1948: connecting over TCP</a></li>
                   1949: <li><a href="#servers"><span class="secno">6.3.7.2.</span> Servers
                   1950: accepting connections over TCP</a></li>
                   1951: <li><a href="#sending"><span class="secno">6.3.7.3.</span> Sending
                   1952: and receiving data over TCP</a></li>
                   1953: </ul>
                   1954: </li>
                   1955: <li><a href="#network-security"><span class="secno"><del class=
                   1956: "diff-old">6.3.8.</del> <ins class="diff-chg">6.3.8</ins></span>
                   1957: Security</a></li>
                   1958: <li><a href="#network-other-specs"><span class="secno"><del class=
                   1959: "diff-old">6.3.9.</del> <ins class="diff-chg">6.3.9</ins></span>
                   1960: Relationship to other standards</a></li>
                   1961: </ul>
                   1962: </li>
                   1963: <li><a href="#crossDocumentMessages"><span class=
                   1964: "secno"><del class="diff-old">6.4.</del> <ins class=
                   1965: "diff-chg">6.4</ins></span> Cross-document messaging</a>
                   1966: <ul class="toc">
                   1967: <li><a href="#processing4"><span class="secno"><del class=
                   1968: "diff-old">6.4.1.</del> <ins class="diff-chg">6.4.1</ins></span>
                   1969: Processing model</a></li>
                   1970: </ul>
                   1971: </li>
                   1972: </ul>
                   1973: </li>
                   1974: <li><a href="#repetition"><span class="secno">7.</span> Repetition
                   1975: templates</a></li>
                   1976: <li><a href="#syntax"><span class="secno">8.</span> The HTML
                   1977: syntax</a>
                   1978: <ul class="toc">
                   1979: <li><a href="#writing0"><span class="secno"><del class=
                   1980: "diff-old">8.1.</del> <ins class="diff-chg">8.1</ins></span>
                   1981: Writing HTML documents</a>
                   1982: <ul class="toc">
                   1983: <li><a href="#the-doctype"><span class="secno"><del class=
                   1984: "diff-old">8.1.1.</del> <ins class="diff-chg">8.1.1</ins></span>
                   1985: The DOCTYPE</a></li>
                   1986: <li><a href="#elements0"><span class="secno"><del class=
                   1987: "diff-old">8.1.2.</del> <ins class="diff-chg">8.1.2</ins></span>
                   1988: Elements</a>
                   1989: <ul class="toc">
                   1990: <li><a href="#start"><span class="secno">8.1.2.1.</span> Start
                   1991: tags</a></li>
                   1992: <li><a href="#end-tags"><span class="secno">8.1.2.2.</span> End
                   1993: tags</a></li>
                   1994: <li><a href="#attributes1"><span class="secno">8.1.2.3.</span>
                   1995: Attributes</a></li>
                   1996: <li><a href="#optional"><span class="secno">8.1.2.4.</span>
                   1997: Optional tags</a></li>
                   1998: <li><a href="#element-restrictions"><span class=
                   1999: "secno">8.1.2.5.</span> Restrictions on content models</a></li>
                   2000: <li><a href="#cdata-rcdata-restrictions"><span class=
                   2001: "secno">8.1.2.6.</span> Restrictions on the contents of CDATA and
                   2002: RCDATA elements</a></li>
                   2003: </ul>
                   2004: </li>
                   2005: <li><a href="#text0"><span class="secno"><del class=
                   2006: "diff-old">8.1.3.</del> <ins class="diff-chg">8.1.3</ins></span>
                   2007: Text</a>
                   2008: <ul class="toc">
                   2009: <li><a href="#newlines"><span class="secno">8.1.3.1.</span>
                   2010: Newlines</a></li>
                   2011: </ul>
                   2012: </li>
                   2013: <li><a href="#character"><span class="secno"><del class=
                   2014: "diff-old">8.1.4.</del> <ins class="diff-chg">8.1.4</ins></span>
                   2015: Character <del class="diff-old">entity</del> references</a></li>
                   2016: <li><a href="#cdata"><span class="secno"><ins class=
                   2017: "diff-new">8.1.5</ins></span> <ins class="diff-new">CDATA
                   2018: blocks</ins></a></li>
                   2019: <li><a href="#comments"><span class="secno"><del class=
                   2020: "diff-old">8.1.5.</del> <ins class="diff-chg">8.1.6</ins></span>
                   2021: Comments</a></li>
                   2022: </ul>
                   2023: </li>
                   2024: <li><a href="#parsing"><span class="secno"><del class=
                   2025: "diff-old">8.2.</del> <ins class="diff-chg">8.2</ins></span>
                   2026: Parsing HTML documents</a>
                   2027: <ul class="toc">
                   2028: <li><a href="#overview"><span class="secno"><del class=
                   2029: "diff-old">8.2.1.</del> <ins class="diff-chg">8.2.1</ins></span>
                   2030: Overview of the parsing model</a></li>
                   2031: <li><a href="#the-input0"><span class="secno"><del class=
                   2032: "diff-old">8.2.2.</del> <ins class="diff-chg">8.2.2</ins></span>
                   2033: The input stream</a>
                   2034: <ul class="toc">
                   2035: <li><a href="#determining"><span class="secno">8.2.2.1.</span>
                   2036: Determining the character encoding</a></li>
                   2037: <li><a href="#character0"><span class="secno">8.2.2.2.</span>
                   2038: Character encoding requirements</a></li>
                   2039: <li><a href="#preprocessing"><span class="secno">8.2.2.3.</span>
                   2040: Preprocessing the input stream</a></li>
                   2041: <li><a href="#changing"><span class="secno">8.2.2.4.</span>
                   2042: Changing the encoding while parsing</a></li>
                   2043: </ul>
                   2044: </li>
                   2045: <li><a href="#parse"><span class="secno"><del class=
                   2046: "diff-old">8.2.3.</del> <ins class="diff-chg">8.2.3</ins></span>
                   2047: <del class="diff-old">Tokenisation</del> <ins class=
                   2048: "diff-chg">Parse state</ins></a>
                   2049: <ul class="toc">
                   2050: <li><a href="#the-insertion"><span class="secno">8.2.3.1.</span>
                   2051: <del class="diff-old">Tokenising entities</del> <ins class=
                   2052: "diff-chg">The insertion mode</ins></a></li>
                   2053: <li><a href="#the-stack"><span class="secno"><del class=
                   2054: "diff-old">8.2.4.</del> <ins class="diff-chg">8.2.3.2.</ins></span>
                   2055: <del class="diff-old">Tree construction</del> <ins class=
                   2056: "diff-chg">The stack of open elements</ins></a></li>
                   2057: <li><a href="#the-list"><span class="secno"><del class=
                   2058: "diff-old">8.2.4.1.</del> <ins class=
                   2059: "diff-chg">8.2.3.3.</ins></span> The <del class="diff-old">initial
                   2060: phase</del> <ins class="diff-chg">list of active formatting
                   2061: elements</ins></a></li>
                   2062: <li><a href="#the-element"><span class="secno"><del class=
                   2063: "diff-old">8.2.4.2.</del> <ins class=
                   2064: "diff-chg">8.2.3.4.</ins></span> The <del class=
                   2065: "diff-old">root</del> element <del class="diff-old">phase</del>
                   2066: <ins class="diff-chg">pointers</ins></a></li>
                   2067: <li><a href="#the-scripting"><span class="secno"><del class=
                   2068: "diff-old">8.2.4.3.</del> <ins class=
                   2069: "diff-chg">8.2.3.5.</ins></span> The <del class="diff-old">main
                   2070: phase</del> <ins class="diff-chg">scripting state</ins></a></li>
                   2071: </ul>
                   2072: </li>
                   2073: <li><a href="#tokenisation"><span class="secno"><ins class=
                   2074: "diff-chg">8.2.4</ins></span> <ins class=
                   2075: "diff-chg">Tokenisation</ins></a>
                   2076: <ul class="toc">
                   2077: <li><a href="#tokenising"><span class="secno"><del class=
                   2078: "diff-old">8.2.4.3.1.</del> <ins class=
                   2079: "diff-chg">8.2.4.1.</ins></span> <del class="diff-old">The stack of
                   2080: open elements</del> <ins class="diff-chg">Tokenising character
                   2081: references</ins></a></li>
                   2082: </ul>
                   2083: </li>
                   2084: <li><a href="#tree-construction"><span class="secno"><del class=
                   2085: "diff-old">8.2.4.3.2.</del> <ins class=
                   2086: "diff-chg">8.2.5</ins></span> <del class="diff-old">The list of
                   2087: active formatting elements</del> <ins class="diff-chg">Tree
                   2088: construction</ins></a>
                   2089: <ul class="toc">
                   2090: <li><a href="#creating"><span class="secno"><del class=
                   2091: "diff-old">8.2.4.3.3.</del> <ins class=
                   2092: "diff-chg">8.2.5.1.</ins></span> Creating and inserting <del class=
                   2093: "diff-old">HTML</del> elements</a></li>
                   2094: <li><a href="#closing"><span class="secno"><del class=
                   2095: "diff-old">8.2.4.3.4.</del> <ins class=
                   2096: "diff-chg">8.2.5.2.</ins></span> Closing elements that have implied
                   2097: end tags</a></li>
                   2098: <li><a href="#foster"><span class="secno"><del class=
                   2099: "diff-old">8.2.4.3.5.</del> <ins class=
                   2100: "diff-chg">8.2.5.3.</ins></span> <ins class="diff-chg">Foster
                   2101: parenting</ins></a></li>
                   2102: <li><a href="#the-initial"><span class="secno"><ins class=
                   2103: "diff-chg">8.2.5.4.</ins></span> The <del class="diff-old">element
                   2104: pointers</del> <ins class="diff-chg">"initial" insertion
                   2105: mode</ins></a></li>
                   2106: <li><a href="#the-before"><span class="secno"><del class=
                   2107: "diff-old">8.2.4.3.6.</del> <ins class=
                   2108: "diff-chg">8.2.5.5.</ins></span> The <ins class="diff-new">"before
                   2109: html"</ins> insertion mode</a></li>
                   2110: <li><a href="#the-before0"><span class="secno"><del class=
                   2111: "diff-old">8.2.4.3.7.</del> <ins class=
                   2112: "diff-chg">8.2.5.6.</ins></span> <del class="diff-old">How to
                   2113: handle tokens in the main phase</del> <ins class="diff-chg">The
                   2114: "before head" insertion mode</ins></a></li>
                   2115: <li><a href="#parsing-main-inhead"><span class="secno"><del class=
                   2116: "diff-old">8.2.4.4.</del> <ins class=
                   2117: "diff-chg">8.2.5.7.</ins></span> The <del class="diff-old">trailing
                   2118: end phase</del> <ins class="diff-chg">"in head" insertion
                   2119: mode</ins></a></li>
                   2120: <li><a href="#parsing-main-inheadnoscript"><span class=
                   2121: "secno"><del class="diff-old">8.2.5.</del> <ins class=
                   2122: "diff-chg">8.2.5.8.</ins></span> The <del class=
                   2123: "diff-old">End</del> <ins class="diff-chg">"in head noscript"
                   2124: insertion mode</ins></a></li>
                   2125: <li><a href="#the-after"><span class="secno"><del class=
                   2126: "diff-old">8.3.</del> <ins class="diff-chg">8.2.5.9.</ins></span>
                   2127: <del class="diff-old">Namespaces</del> <ins class="diff-chg">The
                   2128: "after head" insertion mode</ins></a></li>
                   2129: <li><a href="#parsing-main-inbody"><span class="secno"><del class=
                   2130: "diff-old">8.4.</del> <ins class="diff-chg">8.2.5.10.</ins></span>
                   2131: <del class="diff-old">Serialising HTML fragments</del> <ins class=
                   2132: "diff-chg">The "in body" insertion mode</ins></a></li>
                   2133: <li><a href="#parsing-main-intable"><span class="secno"><del class=
                   2134: "diff-old">8.5.</del> <ins class="diff-chg">8.2.5.11.</ins></span>
                   2135: <del class="diff-old">Parsing HTML fragments</del> <ins class=
                   2136: "diff-chg">The "in table" insertion mode</ins></a></li>
                   2137: <li><a href="#parsing-main-incaption"><span class=
                   2138: "secno"><del class="diff-old">8.6.</del> <ins class=
                   2139: "diff-chg">8.2.5.12.</ins></span> <del class=
                   2140: "diff-old">Entities</del> <ins class="diff-chg">The "in caption"
                   2141: insertion mode</ins></a></li>
                   2142: <li><a href="#parsing-main-incolgroup"><span class=
                   2143: "secno"><del class="diff-old">9.</del> <ins class=
                   2144: "diff-chg">8.2.5.13.</ins></span> <del class="diff-old">WYSIWYG
                   2145: editors</del> <ins class="diff-chg">The "in column group" insertion
                   2146: mode</ins></a></li>
                   2147: <li><a href="#parsing-main-intbody"><span class="secno"><del class=
                   2148: "diff-old">9.1.</del> <ins class="diff-chg">8.2.5.14.</ins></span>
                   2149: <del class="diff-old">Presentational markup</del> <ins class=
                   2150: "diff-chg">The "in table body" insertion mode</ins></a></li>
                   2151: <li><a href="#parsing-main-intr"><span class="secno"><del class=
                   2152: "diff-old">9.1.1.</del> <ins class=
                   2153: "diff-chg">8.2.5.15.</ins></span> <del class="diff-old">WYSIWYG
                   2154: signature</del> <ins class="diff-chg">The "in row" insertion
                   2155: mode</ins></a></li>
                   2156: <li><a href="#parsing-main-intd"><span class="secno"><del class=
                   2157: "diff-old">9.1.2.</del> <ins class=
                   2158: "diff-chg">8.2.5.16.</ins></span> The <del class="diff-old">font
                   2159: element</del> <ins class="diff-chg">"in cell" insertion
                   2160: mode</ins></a></li>
                   2161: <li><a href="#parsing-main-inselect"><span class=
                   2162: "secno"><ins class="diff-chg">8.2.5.17.</ins></span> <ins class=
                   2163: "diff-chg">The "in select" insertion mode</ins></a></li>
                   2164: <li><a href="#parsing-main-inselectintable"><span class=
                   2165: "secno"><ins class="diff-chg">8.2.5.18.</ins></span> <ins class=
                   2166: "diff-chg">The "in select in table" insertion mode</ins></a></li>
                   2167: <li><a href="#parsing-main-inforeign"><span class=
                   2168: "secno"><ins class="diff-chg">8.2.5.19.</ins></span> <ins class=
                   2169: "diff-chg">The "in foreign content" insertion mode</ins></a></li>
                   2170: <li><a href="#parsing-main-afterbody"><span class=
                   2171: "secno"><ins class="diff-chg">8.2.5.20.</ins></span> <ins class=
                   2172: "diff-chg">The "after body" insertion mode</ins></a></li>
                   2173: <li><a href="#parsing-main-inframeset"><span class=
                   2174: "secno"><ins class="diff-chg">8.2.5.21.</ins></span> <ins class=
                   2175: "diff-chg">The "in frameset" insertion mode</ins></a></li>
                   2176: <li><a href="#parsing-main-afterframeset"><span class=
                   2177: "secno"><ins class="diff-chg">8.2.5.22.</ins></span> <ins class=
                   2178: "diff-chg">The "after frameset" insertion mode</ins></a></li>
                   2179: <li><a href="#the-after0"><span class="secno"><ins class=
                   2180: "diff-chg">8.2.5.23.</ins></span> <ins class="diff-chg">The "after
                   2181: after body" insertion mode</ins></a></li>
                   2182: <li><a href="#the-after1"><span class="secno"><ins class=
                   2183: "diff-chg">8.2.5.24.</ins></span> <ins class="diff-chg">The "after
                   2184: after frameset" insertion mode</ins></a></li>
                   2185: </ul>
                   2186: </li>
                   2187: <li><a href="#the-end"><span class="secno"><ins class=
1.2     ! mike     2188: "diff-chg">8.2.6</ins></span> <ins class="diff-chg">The
1.1       mike     2189: end</ins></a></li>
                   2190: </ul>
                   2191: </li>
                   2192: <li><a href="#namespaces"><span class="secno"><ins class=
                   2193: "diff-new">8.3</ins></span> <ins class=
                   2194: "diff-new">Namespaces</ins></a></li>
                   2195: <li><a href="#serializing"><span class="secno"><ins class=
                   2196: "diff-new">8.4</ins></span> <ins class="diff-new">Serializing HTML
                   2197: fragments</ins></a></li>
                   2198: <li><a href="#parsing2"><span class="secno"><ins class=
                   2199: "diff-new">8.5</ins></span> <ins class="diff-new">Parsing HTML
                   2200: fragments</ins></a></li>
                   2201: <li><a href="#named"><span class="secno"><ins class=
                   2202: "diff-new">8.6</ins></span> <ins class="diff-new">Named character
                   2203: references</ins></a></li>
                   2204: </ul>
                   2205: </li>
                   2206: <li><a href="#rendering"><span class="secno"><del class=
                   2207: "diff-old">10.</del> <ins class="diff-chg">9.</ins></span>
                   2208: Rendering <ins class="diff-new">and user-agent behavior</ins></a>
                   2209: <ul class="toc">
                   2210: <li><a href="#rendering0"><span class="secno"><del class=
                   2211: "diff-old">10.1.</del> <ins class="diff-chg">9.1</ins></span>
                   2212: Rendering and the DOM</a></li>
                   2213: <li><a href="#rendering1"><span class="secno"><del class=
                   2214: "diff-old">10.2.</del> <ins class="diff-chg">9.2</ins></span>
                   2215: Rendering and menus/toolbars</a>
                   2216: <ul class="toc">
                   2217: <li><a href="#the-icon"><span class="secno"><del class=
                   2218: "diff-old">10.2.1.</del> <ins class="diff-chg">9.2.1</ins></span>
                   2219: The 'icon' property</a></li>
                   2220: </ul>
                   2221: </li>
                   2222: <li><a href="#obsolete"><span class="secno"><ins class=
                   2223: "diff-new">9.3</ins></span> <ins class="diff-new">Obsolete
                   2224: elements, attributes, and APIs</ins></a>
                   2225: <ul class="toc">
                   2226: <li><a href="#the-body0"><span class="secno"><ins class=
                   2227: "diff-new">9.3.1</ins></span> <ins class="diff-new">The</ins>
                   2228: <code><ins class="diff-new">body</ins></code> <ins class=
                   2229: "diff-new">element</ins></a></li>
                   2230: <li><a href="#the-applet"><span class="secno"><ins class=
                   2231: "diff-new">9.3.2</ins></span> <ins class="diff-new">The</ins>
                   2232: <code><ins class="diff-new">applet</ins></code> <ins class=
                   2233: "diff-new">element</ins></a></li>
                   2234: </ul>
                   2235: </li>
                   2236: </ul>
                   2237: </li>
                   2238: <li><a href="#no"><span class="secno"><del class=
                   2239: "diff-old">11.</del> <ins class="diff-chg">10.</ins></span> Things
                   2240: that you can't do with this specification because they are better
                   2241: handled using other technologies that are further described
                   2242: herein</a>
                   2243: <ul class="toc">
                   2244: <li><a href="#localization"><span class="secno"><del class=
                   2245: "diff-old">11.1.</del> <ins class="diff-chg">10.1</ins></span>
                   2246: <del class="diff-old">Localisation</del> <ins class=
                   2247: "diff-chg">Localization</ins></a></li>
                   2248: <li><a href="#declarative"><span class="secno"><del class=
                   2249: "diff-old">11.2.</del> <ins class="diff-chg">10.2</ins></span>
                   2250: Declarative 2D vector graphics and animation</a></li>
                   2251: <li><a href="#declarative0"><span class="secno"><del class=
                   2252: "diff-old">11.3.</del> <ins class="diff-chg">10.3</ins></span>
                   2253: Declarative 3D scenes</a></li>
                   2254: <li><a href="#timers"><span class="secno"><del class=
                   2255: "diff-old">11.4.</del> <ins class="diff-chg">10.4</ins></span>
                   2256: Timers</a></li>
                   2257: </ul>
                   2258: </li>
                   2259: <li class="no-num"><del class="diff-old">11.5. Events</del>
                   2260: <a href="#index"><ins class="diff-chg">Index</ins></a></li>
                   2261: <li class="no-num"><a href="#references">References</a></li>
                   2262: <li class="no-num"><a href=
                   2263: "#acknowledgements">Acknowledgements</a></li>
                   2264: </ul>
                   2265: <hr>
                   2266: <h2 id="introduction"><span class="secno">1.</span>
                   2267: Introduction</h2>
                   2268: <p><em>This section is non-normative.</em></p>
                   2269: <p>The World Wide Web's markup language has always been HTML. HTML
                   2270: was primarily designed as a language for semantically describing
                   2271: scientific documents, although its general design and adaptations
                   2272: over the years has enabled it to be used to describe a number of
                   2273: other types of documents.</p>
                   2274: <p>The main area that has not been adequately addressed by HTML is
                   2275: a vague subject referred to as Web Applications. This specification
                   2276: attempts to rectify this, while at the same time updating the HTML
                   2277: specifications to address issues raised in the past few years.</p>
                   2278: <h3 id="scope"><span class="secno"><del class="diff-old">1.1.</del>
                   2279: <ins class="diff-chg">1.1</ins></span> Scope</h3>
                   2280: <p><em>This section is non-normative.</em></p>
                   2281: <p>This specification is limited to providing a semantic-level
                   2282: markup language and associated semantic-level scripting APIs for
                   2283: authoring accessible pages on the Web ranging from static documents
                   2284: to dynamic applications.</p>
                   2285: <p>The scope of this specification does not include <del class=
                   2286: "diff-old">addressing</del> <ins class="diff-chg">providing
                   2287: mechanisms for media-specific customization of</ins> presentation
                   2288: <del class="diff-old">concerns</del> (although default rendering
                   2289: rules for Web browsers are included at the end of this <del class=
                   2290: "diff-old">specification).</del> <ins class=
                   2291: "diff-chg">specification, and several mechanisms for hooking into
                   2292: CSS are provided as part of the language).</ins></p>
                   2293: <p>The scope of this specification does not include documenting
                   2294: every HTML or DOM feature supported by Web browsers. Browsers
                   2295: support many features that are considered to be very bad for
                   2296: accessibility or that are otherwise inappropriate. For example, the
                   2297: <code>blink</code> element is clearly presentational and authors
                   2298: wishing to cause text to blink should instead use CSS.</p>
                   2299: <p>The scope of this specification is not to describe an entire
                   2300: operating system. In particular, hardware configuration software,
                   2301: image manipulation tools, and applications that users would be
                   2302: expected to use with high-end workstations on a daily basis are out
                   2303: of scope. In terms of applications, this specification is targeted
                   2304: specifically at applications that would be expected to be used by
                   2305: users on an occasional basis, or regularly but from disparate
                   2306: locations, with low CPU requirements. For instance online
                   2307: purchasing systems, searching systems, games (especially
                   2308: multiplayer online games), public telephone books or address books,
                   2309: communications software (e-mail clients, instant messaging clients,
                   2310: discussion software), document editing software, etc.</p>
                   2311: <p>For sophisticated cross-platform applications, there already
                   2312: exist several proprietary solutions (such as Mozilla's XUL, Adobe's
                   2313: Flash, or Microsoft's Silverlight). These solutions are evolving
                   2314: faster than any standards process could follow, and the
                   2315: requirements are evolving even faster. These systems are also
                   2316: significantly more complicated to specify, and are orders of
                   2317: magnitude more difficult to achieve interoperability with, than the
                   2318: solutions described in this document. Platform-specific solutions
                   2319: for such sophisticated applications (for example the MacOS X Core
                   2320: APIs) are even further ahead.</p>
                   2321: <h4 id="relationship"><span class="secno"><del class=
                   2322: "diff-old">1.1.1.</del> <ins class="diff-chg">1.1.1</ins></span>
                   2323: Relationship to HTML 4.01, XHTML 1.1, DOM2 HTML</h4>
                   2324: <p><em>This section is non-normative.</em></p>
1.2     ! mike     2325: <p>This specification represents a new version of <del class=
        !          2326: "diff-old">HTML4 and XHTML1,</del> <ins class="diff-chg">the HTML
        !          2327: language,</ins> along with a new version of the associated DOM2
        !          2328: HTML API. Migration from HTML4 or XHTML1 to the format and APIs
        !          2329: described in this specification should in most cases be
        !          2330: straightforward, as care has been taken to ensure that
        !          2331: backwards-compatibility is retained.</p>
1.1       mike     2332: <p>This specification will eventually supplant Web Forms 2.0 as
                   2333: well. <a href="#references">[WF2]</a></p>
                   2334: <h4 id="relationship0"><span class="secno"><del class=
                   2335: "diff-old">1.1.2.</del> <ins class="diff-chg">1.1.2</ins></span>
                   2336: Relationship to XHTML2</h4>
                   2337: <p><em>This section is non-normative.</em></p>
                   2338: <p>XHTML2 <a href="#references">[XHTML2]</a> defines a new HTML
                   2339: vocabulary with better features for hyperlinks, multimedia content,
                   2340: annotating document edits, rich metadata, declarative interactive
                   2341: forms, and describing the semantics of human literary works such as
                   2342: poems and scientific papers.</p>
                   2343: <p>However, it lacks elements to express the semantics of many of
                   2344: the non-document types of content often seen on the Web. For
                   2345: instance, forum sites, auction sites, search engines, online shops,
                   2346: and the like, do not fit the document metaphor well, and are not
                   2347: covered by XHTML2.</p>
                   2348: <p><em>This</em> specification aims to extend HTML so that it is
                   2349: also suitable in these contexts.</p>
                   2350: <p>XHTML2 and this specification use different namespaces and
                   2351: therefore can both be implemented in the same XML processor.</p>
                   2352: <h4 id="relationship1"><span class="secno"><del class=
                   2353: "diff-old">1.1.3.</del> <ins class="diff-chg">1.1.3</ins></span>
                   2354: Relationship to XUL, Flash, Silverlight, and other proprietary UI
                   2355: languages</h4>
                   2356: <p><em>This section is non-normative.</em></p>
                   2357: <p>This specification is independent of the various proprietary UI
                   2358: languages that various vendors provide. As an open, <del class=
                   2359: "diff-old">vender-neutral</del> <ins class=
                   2360: "diff-chg">vendor-neutral</ins> language, HTML provides for a
                   2361: solution to the same problems without the risk of vendor
                   2362: lock-in.</p>
                   2363: <h3 id="structure"><span class="secno"><del class=
                   2364: "diff-old">1.2.</del> <ins class="diff-chg">1.2</ins></span>
                   2365: Structure of this specification</h3>
                   2366: <p><em>This section is non-normative.</em></p>
                   2367: <p>This specification is divided into the following important
                   2368: sections:</p>
                   2369: <dl>
                   2370: <dt><a href="#dom">The DOM</a></dt>
                   2371: <dd>The DOM, or Document Object Model, provides a base for the rest
                   2372: of the specification.</dd>
                   2373: <dt><a href="#semantics">The Semantics</a></dt>
                   2374: <dd>Documents are built from elements. These elements form a tree
                   2375: using the DOM. Each element also has a predefined meaning, which is
                   2376: explained in this section. User agent requirements for how to
                   2377: handle each element are also given, along with rules for authors on
                   2378: how to use the element.</dd>
                   2379: <dt><a href="#windows">Browsing Contexts</a></dt>
                   2380: <dd>HTML documents do not exist in a vacuum — this section defines
                   2381: many of the features that affect environments that deal with
                   2382: multiple pages, links between pages, and running scripts.</dd>
                   2383: <dt>APIs</dt>
                   2384: <dd><a href="#editing">The Editing APIs</a> : HTML documents can
                   2385: provide a number of mechanisms for users to modify content, which
                   2386: are described in this section.</dd>
                   2387: <dd><a href="#comms">The Communication APIs</a> : Applications
                   2388: written in HTML often require mechanisms to communicate with remote
                   2389: servers, as well as communicating with other applications from
                   2390: different domains running on the same client.</dd>
                   2391: <dd><a href="#repetition">Repetition Templates</a> : A mechanism to
                   2392: support repeating sections in forms.</dd>
                   2393: <dt><a href="#syntax">The Language Syntax</a></dt>
                   2394: <dd>All of these features would be for naught if they couldn't be
                   2395: represented in a <del class="diff-old">serialised</del> <ins class=
                   2396: "diff-chg">serialized</ins> form and sent to other people, and so
                   2397: this section defines the syntax of HTML, along with rules for how
                   2398: to parse HTML.</dd>
                   2399: </dl>
                   2400: <p>There are also a couple of appendices, defining <del class=
                   2401: "diff-old">shims for WYSIWYG editors ,</del> <a href=
                   2402: "#rendering">rendering rules</a> for Web <del class=
                   2403: "diff-old">browsers,</del> <ins class="diff-chg">browsers</ins> and
                   2404: listing <a href="#no">areas that are out of scope</a> for this
                   2405: specification.</p>
                   2406: <h4 id="how-to"><span class="secno"><del class=
                   2407: "diff-old">1.2.1.</del> <ins class="diff-chg">1.2.1</ins></span>
                   2408: How to read this specification</h4>
                   2409: <p>This specification should be read like all other specifications.
                   2410: First, it should be read cover-to-cover, multiple times. Then, it
                   2411: should be read backwards at least once. Then it should be read by
                   2412: picking random sections from the contents list and following all
                   2413: the cross-references.</p>
                   2414: <h3 id="conformance"><span class="secno"><del class=
                   2415: "diff-old">1.3.</del> <ins class="diff-chg">1.3</ins></span>
                   2416: Conformance requirements</h3>
                   2417: <p>All diagrams, examples, and notes in this specification are
                   2418: non-normative, as are all sections explicitly marked non-normative.
                   2419: Everything else in this specification is normative.</p>
                   2420: <p>The key words "MUST", "MUST NOT", "REQUIRED", <del class=
                   2421: "diff-old">"SHALL", "SHALL NOT",</del> "SHOULD", "SHOULD NOT",
                   2422: "RECOMMENDED", "MAY", and "OPTIONAL" in the normative parts of this
                   2423: document are to be interpreted as described in RFC2119. For
                   2424: readability, these words do not appear in all uppercase letters in
                   2425: this specification. <a href="#references">[RFC2119]</a></p>
                   2426: <p>Requirements phrased in the imperative as part of algorithms
                   2427: (such as "strip any leading space characters" or "return false and
                   2428: abort these steps") are to be interpreted with the meaning of the
                   2429: key word ("must", "should", "may", etc) used in introducing the
                   2430: algorithm.</p>
                   2431: <p>This specification describes the conformance criteria for user
                   2432: agents (relevant to implementors) and documents (relevant to
                   2433: authors and authoring tool implementors).</p>
                   2434: <p class="note">There is no implied relationship between document
                   2435: conformance requirements and implementation conformance
                   2436: requirements. User agents are not free to handle non-conformant
                   2437: documents as they please; the processing model described in this
                   2438: specification applies to implementations regardless of the
                   2439: conformity of the input documents.</p>
                   2440: <p>User agents fall into several (overlapping) categories with
                   2441: different conformance requirements.</p>
                   2442: <dl>
                   2443: <dt id="interactive">Web browsers and other interactive user
                   2444: agents</dt>
                   2445: <dd>
                   2446: <p>Web browsers that support <a href="#xhtml5">XHTML</a> must
                   2447: process elements and attributes from the <a href=
                   2448: "#html-namespace0">HTML namespace</a> found in <a href=
                   2449: "#xml-documents">XML documents</a> as described in this
                   2450: specification, so that users can interact with them, unless the
                   2451: semantics of those elements have been overridden by other
                   2452: specifications.</p>
                   2453: <p class="example">A conforming XHTML processor would, upon finding
                   2454: an XHTML <code><a href="#script1">script</a></code> element in an
                   2455: XML document, execute the script contained in that element.
                   2456: However, if the element is found within an XSLT transformation
                   2457: sheet (assuming the UA also supports XSLT), then the processor
                   2458: would instead treat the <code><a href="#script1">script</a></code>
                   2459: element as an opaque element that forms part of the transform.</p>
                   2460: <p>Web browsers that support <a href="#html5" title=
                   2461: "HTML5">HTML</a> must process documents <del class=
                   2462: "diff-old">labelled</del> <ins class="diff-chg">labeled</ins> as
                   2463: <code>text/html</code> as described in this specification, so that
                   2464: users can interact with them.</p>
                   2465: </dd>
                   2466: <dt id="non-interactive">Non-interactive presentation user
                   2467: agents</dt>
                   2468: <dd>
                   2469: <p>User agents that process HTML and XHTML documents purely to
                   2470: render non-interactive versions of them must comply to the same
                   2471: conformance criteria as Web browsers, except that they are exempt
                   2472: from requirements regarding user interaction.</p>
                   2473: <p class="note">Typical examples of non-interactive presentation
                   2474: user agents are printers (static UAs) and overhead displays
                   2475: (dynamic UAs). It is expected that most static non-interactive
                   2476: presentation user agents will also opt to <a href=
                   2477: "#non-scripted">lack scripting support</a> .</p>
                   2478: <p class="example">A non-interactive but dynamic presentation UA
                   2479: would still execute scripts, allowing forms to be dynamically
                   2480: submitted, and so forth. However, since the concept of "focus" is
                   2481: irrelevant when the user cannot interact with the document, the UA
                   2482: would not need to support any of the focus-related DOM APIs.</p>
                   2483: </dd>
                   2484: <dt><dfn id="non-scripted">User agents with no scripting
                   2485: support</dfn></dt>
                   2486: <dd>
                   2487: <p>Implementations that do not support scripting (or which have
                   2488: their scripting features disabled <del class="diff-old">)</del>
                   2489: <ins class="diff-chg">entirely)</ins> are exempt from supporting
                   2490: the events and DOM interfaces mentioned in this specification. For
                   2491: the parts of this specification that are defined in terms of an
                   2492: events model or in terms of the DOM, such user agents must still
                   2493: act as if events and the DOM were supported.</p>
                   2494: <p class="note">Scripting can form an integral part of an
                   2495: application. Web browsers that do not support scripting, or that
                   2496: have scripting disabled, might be unable to fully convey the
                   2497: author's intent.</p>
                   2498: </dd>
                   2499: <dt>Conformance checkers</dt>
                   2500: <dd id="conformance-checkers">
                   2501: <p>Conformance checkers must verify that a document conforms to the
                   2502: applicable conformance criteria described in this specification.
                   2503: <del class="diff-old">Conformance</del> <ins class=
                   2504: "diff-chg">Automated conformance</ins> checkers are exempt from
                   2505: detecting errors that require interpretation of the author's intent
                   2506: (for example, while a document is non-conforming if the content of
                   2507: a <code><a href="#blockquote">blockquote</a></code> element is not
                   2508: a quote, conformance checkers <ins class="diff-new">running without
                   2509: the input of human judgement</ins> do not have to check that
                   2510: <code><a href="#blockquote">blockquote</a></code> elements only
                   2511: contain quoted material).</p>
                   2512: <p>Conformance checkers must check that the input document conforms
                   2513: when <ins class="diff-chg">parsed without a</ins> <a href=
                   2514: "#browsing1"><ins class="diff-chg">browsing context</ins></a>
                   2515: <ins class="diff-chg">(meaning that no scripts are run, and that
                   2516: the parser's</ins> <a href="#scripting2">scripting <ins class=
                   2517: "diff-new">flag</ins></a> is <del class="diff-old">disabled ,</del>
                   2518: <ins class="diff-chg">disabled),</ins> and should also check that
                   2519: the input document conforms when <del class="diff-old">scripting is
                   2520: enabled .</del> <ins class="diff-chg">parsed with a</ins> <a href=
                   2521: "#browsing1"><ins class="diff-chg">browsing context</ins></a>
                   2522: <ins class="diff-chg">in which scripts execute, and that the
                   2523: scripts never cause non-conforming states to occur other than
                   2524: transiently during script execution itself.</ins> (This is only a
                   2525: "SHOULD" and not a "MUST" requirement because it has been proven to
                   2526: be impossible. <a href="#references">[HALTINGPROBLEM]</a> )</p>
                   2527: <p>The term "HTML5 validator" can be used to refer to a conformance
                   2528: checker that itself conforms to the applicable requirements of this
                   2529: specification.</p>
                   2530: <div class="note">
                   2531: <p>XML DTDs cannot express all the conformance requirements of this
                   2532: specification. Therefore, a validating XML processor and a DTD
                   2533: cannot constitute a conformance checker. Also, since neither of the
                   2534: two authoring formats defined in this specification are
                   2535: applications of SGML, a validating SGML system cannot constitute a
                   2536: conformance checker either.</p>
                   2537: <p>To put it another way, there are three types of conformance
                   2538: criteria:</p>
                   2539: <ol>
                   2540: <li>Criteria that can be expressed in a DTD.</li>
                   2541: <li>Criteria that cannot be expressed by a DTD, but can still be
                   2542: checked by a machine.</li>
                   2543: <li>Criteria that can only be checked by a human.</li>
                   2544: </ol>
                   2545: <p>A conformance checker must check for the first two. A simple
                   2546: DTD-based validator only checks for the first class of errors and
                   2547: is therefore not a conforming conformance checker according to this
                   2548: specification.</p>
                   2549: </div>
                   2550: </dd>
                   2551: <dt>Data mining tools</dt>
                   2552: <dd id="data-mining">
                   2553: <p>Applications and tools that process HTML and XHTML documents for
                   2554: reasons other than to either render the documents or check them for
                   2555: conformance should act in accordance to the semantics of the
                   2556: documents that they process.</p>
                   2557: <p class="example">A tool that generates <a href="#outline" title=
                   2558: "outline">document outlines</a> but increases the nesting level for
                   2559: each paragraph and does not increase the nesting level for each
                   2560: section would not be conforming.</p>
                   2561: </dd>
                   2562: <dt id="editors">Authoring tools and markup generators</dt>
                   2563: <dd>
                   2564: <p>Authoring tools and markup generators must generate conforming
                   2565: documents. Conformance criteria that apply to authors also apply to
                   2566: authoring tools, where appropriate.</p>
                   2567: <p>Authoring tools are exempt from the strict requirements of using
                   2568: elements only for their specified purpose, but only to the extent
                   2569: that authoring tools are not yet able to determine author
                   2570: intent.</p>
                   2571: <p class="example">For example, it is not conforming to use an
                   2572: <code><a href="#address">address</a></code> element for arbitrary
                   2573: contact information; that element can only be used for marking up
                   2574: contact information for the author of the document or section.
1.2     ! mike     2575: However, since an authoring <del class="diff-old">tools</del>
        !          2576: <ins class="diff-chg">tool</ins> is likely unable to determine the
1.1       mike     2577: difference, an authoring tool is exempt from that requirement.</p>
                   2578: <p class="note">In terms of conformance checking, an editor is
                   2579: therefore required to output documents that conform to the same
                   2580: extent that a conformance checker will verify.</p>
                   2581: <p>When an authoring tool is used to edit a non-conforming
                   2582: document, it may preserve the conformance errors in sections of the
                   2583: document that were not edited during the editing session (i.e. an
                   2584: editing tool is allowed to round-trip <del class=
                   2585: "diff-old">errorneous</del> <ins class="diff-chg">erroneous</ins>
                   2586: content). However, an authoring tool must not claim that the output
                   2587: is conformant if errors have been so preserved.</p>
                   2588: <p>Authoring tools are expected to come in two broad varieties:
                   2589: tools that work from structure or semantic data, and tools that
                   2590: work on a What-You-See-Is-What-You-Get media-specific editing basis
                   2591: (WYSIWYG).</p>
                   2592: <p>The former is the preferred mechanism for tools that author
                   2593: HTML, since the structure in the source information can be used to
                   2594: make informed choices regarding which HTML elements and attributes
                   2595: are most appropriate.</p>
                   2596: <p>However, WYSIWYG tools are <del class=
                   2597: "diff-old">legitimate,</del> <ins class="diff-chg">legitimate.
                   2598: WYSIWYG tools should use elements they know are appropriate,</ins>
                   2599: and <del class="diff-old">this specification makes</del>
                   2600: <ins class="diff-chg">should not use elements that they do not know
                   2601: to be appropriate. This might in</ins> certain <del class=
                   2602: "diff-old">concessions</del> <ins class="diff-chg">extreme cases
                   2603: mean limiting the use of flow elements</ins> to <del class=
                   2604: "diff-old">WYSIWYG editors .</del> <ins class="diff-chg">just a few
                   2605: elements, like</ins> <code><a href="#div"><ins class=
                   2606: "diff-chg">div</ins></a></code> ,<code><a href="#b"><ins class=
                   2607: "diff-chg">b</ins></a></code> ,<code><a href="#i"><ins class=
                   2608: "diff-chg">i</ins></a></code> ,<ins class="diff-chg">and</ins>
                   2609: <code><a href="#span"><ins class="diff-chg">span</ins></a></code>
                   2610: <ins class="diff-chg">and making liberal use of the</ins>
                   2611: <code title="attr-style"><a href="#style"><ins class=
                   2612: "diff-chg">style</ins></a></code> <ins class=
                   2613: "diff-chg">attribute.</ins></p>
                   2614: <p>All authoring tools, whether WYSIWYG or not, should make a best
                   2615: effort attempt at enabling users to create well-structured,
                   2616: semantically rich, media-independent content.</p>
                   2617: </dd>
                   2618: </dl>
                   2619: <p>Some conformance requirements are phrased as requirements on
                   2620: elements, attributes, methods or objects. Such requirements fall
                   2621: into two <del class="diff-old">categories;</del> <ins class=
                   2622: "diff-chg">categories:</ins> those describing content model
                   2623: restrictions, and those describing implementation <del class=
                   2624: "diff-old">behaviour.</del> <ins class="diff-chg">behavior.</ins>
                   2625: The former category of requirements are requirements on documents
                   2626: and authoring tools. The second category are requirements on user
                   2627: agents.</p>
                   2628: <p>Conformance requirements phrased as algorithms or specific steps
                   2629: may be implemented in any manner, so long as the end result is
                   2630: equivalent. (In particular, the algorithms defined in this
                   2631: specification are intended to be easy to follow, and not intended
                   2632: to be performant.)</p>
                   2633: <p id="hardwareLimitations">User agents may impose
                   2634: implementation-specific limits on otherwise unconstrained inputs,
                   2635: e.g. to prevent denial of service attacks, to guard against running
                   2636: out of memory, or to work around platform-specific limitations.</p>
                   2637: <p>For compatibility with existing content and prior
                   2638: specifications, this specification describes two authoring formats:
                   2639: one based on XML (referred to as <dfn id="xhtml5" title=
                   2640: "XHTML">XHTML5</dfn> ), and one using a <a href="#parsing">custom
                   2641: format</a> inspired by SGML (referred to as <dfn id=
                   2642: "html5">HTML5</dfn> ). Implementations may support only one of
                   2643: these two formats, although supporting both is encouraged.</p>
                   2644: <p id="authors-using-xhtml"><a href="#xhtml5">XHTML</a> documents (
                   2645: <a href="#xml-documents">XML documents</a> using elements from the
                   2646: <a href="#html-namespace0">HTML namespace</a> ) that use the new
                   2647: features described in this specification and that are served over
                   2648: the wire (e.g. by HTTP) must be sent using an XML MIME type such as
                   2649: <code>application/xml</code> or <code>application/xhtml+xml</code>
                   2650: and must not be served as <code>text/html</code> . <a href=
                   2651: "#references">[RFC3023]</a></p>
                   2652: <p>Such XML documents may contain a <code>DOCTYPE</code> if
                   2653: desired, but this is not required to conform to this
                   2654: specification.</p>
                   2655: <p class="note">According to the XML specification, XML processors
                   2656: are not guaranteed to process the external DTD subset referenced in
                   2657: the DOCTYPE. This means, for example, that using <del class=
                   2658: "diff-old">entities</del> <ins class="diff-chg">entity
                   2659: references</ins> for characters in XHTML documents is unsafe
                   2660: (except for <del class="diff-old">&amp;lt;, &amp;gt;,
                   2661: &amp;amp;,</del> <code title=""><ins class=
                   2662: "diff-chg">&amp;lt;</ins></code> ,<code title=""><ins class=
                   2663: "diff-chg">&amp;gt;</ins></code> ,<code title=""><ins class=
                   2664: "diff-chg">&amp;amp;</ins></code> ,<code title="">&amp;quot;</code>
                   2665: and <del class="diff-old">&amp;apos;). For interoperability,
                   2666: authors are advised to avoid optional features of XML.</del>
                   2667: <code title=""><ins class="diff-chg">&amp;apos;</ins></code>
                   2668: <ins class="diff-chg">).</ins></p>
                   2669: <p id="authors-using-html"><a href="#html5" title="HTML5">HTML
                   2670: documents</a> , if they are served over the wire (e.g. by HTTP)
                   2671: must be <del class="diff-old">labelled</del> <ins class=
                   2672: "diff-chg">labeled</ins> with the <code>text/html</code> MIME
                   2673: type.</p>
                   2674: <p id="entity-references">The language in this specification
                   2675: assumes that the user agent expands all entity references, and
                   2676: therefore does not include entity reference nodes in the DOM. If
                   2677: user agents do include entity reference nodes in the DOM, then user
                   2678: agents must handle them as if they were fully expanded when
                   2679: implementing this specification. For example, if a requirement
                   2680: talks about an element's child text nodes, then any text nodes that
                   2681: are children of an entity reference that is a child of that element
                   2682: would be used as well. <ins class="diff-chg">Entity references to
                   2683: unknown entities must be treated as if they contained just an empty
                   2684: text node for the purposes of the algorithms defined in this
                   2685: specification.</ins></p>
                   2686: <h4 id="common"><span class="secno"><del class=
                   2687: "diff-old">1.3.1.</del> <ins class="diff-chg">1.3.1</ins></span>
                   2688: Common conformance requirements for APIs exposed to JavaScript</h4>
                   2689: <p class="big-issue">A lot of arrays/lists/ <a href="#collections0"
                   2690: title="collections">collection</a> s in this spec assume zero-based
                   2691: indexes but use the term " <var title="">index</var> th" liberally.
                   2692: We should define those to be zero-based and be clearer about
                   2693: this.</p>
                   2694: <p>Unless <del class="diff-old">other</del> <ins class=
                   2695: "diff-chg">otherwise</ins> specified, if a DOM attribute that is a
                   2696: floating point number type ( <code title="">float</code> ) is
                   2697: assigned an Infinity or Not-a-Number value, a <code title=
                   2698: "big-issue">NOT_SUPPORTED_ERR</code> exception must be raised.</p>
                   2699: <p>Unless <del class="diff-old">other specified, if a DOM attribute
                   2700: that is a signed numeric type is assigned a negative value, a
                   2701: NOT_SUPPORTED_ERR exception must be raised. Unless other</del>
                   2702: <ins class="diff-chg">otherwise</ins> specified, if a method with
                   2703: an argument that is a floating point number type ( <code title=
                   2704: "">float</code> ) is passed an Infinity or Not-a-Number value, a
                   2705: <code title="big-issue">NOT_SUPPORTED_ERR</code> exception must be
                   2706: raised.</p>
                   2707: <p>Unless <del class="diff-old">other</del> <ins class=
                   2708: "diff-chg">otherwise</ins> specified, if a method is passed fewer
                   2709: arguments than is defined for that method in its IDL definition, a
                   2710: <code title="big-issue">NOT_SUPPORTED_ERR</code> exception must be
                   2711: raised.</p>
                   2712: <p>Unless <del class="diff-old">other</del> <ins class=
                   2713: "diff-chg">otherwise</ins> specified, if a method is passed more
                   2714: arguments than is defined for that method in its IDL definition,
                   2715: the excess arguments must be ignored. <del class="diff-old">Unless
                   2716: other specified, if a method is expecting, as one of its arguments,
                   2717: as defined by its IDL definition, an object implementing a
                   2718: particular interface X , and the argument passed is an object whose
                   2719: [[Class]] property is neither that interface X , nor the name of an
                   2720: interface Y where this specification requires that all objects
                   2721: implementing interface Y also implement interface X , nor the name
                   2722: of an interface that inherits from the expected interface X , then
                   2723: a TYPE_MISMATCH_ERR exception must be raised. Anything else?
                   2724: Passing the wrong type of object, maybe? Implied conversions to
                   2725: int/float?</del></p>
                   2726: <h4 id="dependencies"><span class="secno"><del class=
                   2727: "diff-old">1.3.2.</del> <ins class="diff-chg">1.3.2</ins></span>
                   2728: Dependencies</h4>
                   2729: <p>This specification relies on several other underlying
                   2730: specifications.</p>
                   2731: <dl>
                   2732: <dt>XML</dt>
                   2733: <dd>
                   2734: <p>Implementations that support XHTML5 must support some version of
                   2735: XML, as well as its corresponding namespaces specification, because
                   2736: XHTML5 uses an XML <del class="diff-old">serialisation</del>
                   2737: <ins class="diff-chg">serialization</ins> with namespaces. <a href=
                   2738: "#references">[XML]</a> <a href="#references">[XMLNAMES]</a></p>
                   2739: </dd>
                   2740: <dt>XML Base</dt>
                   2741: <dd>
                   2742: <p id="xmlBase">User agents must follow the rules given by XML Base
                   2743: to resolve relative URIs in HTML and XHTML fragments. That is the
                   2744: mechanism used in this specification for resolving relative URIs in
                   2745: DOM trees. <a href="#references">[XMLBASE]</a></p>
                   2746: <p class="note">It is possible for <code title=
1.2     ! mike     2747: "attr-xml-base"><a href="#xmlbase">xml:base</a></code> attributes
        !          2748: to be present even in HTML fragments, as such attributes can be
        !          2749: added dynamically using script. <ins class="diff-new">(Such scripts
        !          2750: would not be conforming, however, as</ins> <code title=
        !          2751: "attr-xml-base"><a href="#xmlbase"><ins class=
        !          2752: "diff-new">xml:base</ins></a></code> <ins class=
        !          2753: "diff-new">attributes as not allowed in</ins> <a href=
        !          2754: "#html-"><ins class="diff-new">HTML documents</ins></a> .)</p>
1.1       mike     2755: </dd>
                   2756: <dt>DOM</dt>
                   2757: <dd>
                   2758: <p>Implementations must support some version of DOM Core and DOM
                   2759: Events, because this specification is defined in terms of the DOM,
                   2760: and some of the features are defined as extensions to the DOM Core
                   2761: interfaces. <a href="#references">[DOM3CORE]</a> <a href=
                   2762: "#references">[DOM3EVENTS]</a></p>
                   2763: </dd>
                   2764: <dt>ECMAScript</dt>
                   2765: <dd>
                   2766: <p>Implementations that use ECMAScript to implement the APIs
                   2767: defined in this specification must implement them in a manner
                   2768: consistent with the ECMAScript Bindings <del class="diff-old">for
                   2769: DOM Specifications</del> <ins class="diff-chg">defined in the Web
                   2770: IDL</ins> specification, as this specification uses that
                   2771: specification's terminology. <a href="#references"><del class=
                   2772: "diff-old">[EBFD]</del> <ins class=
                   2773: "diff-chg">[WebIDL]</ins></a></p>
                   2774: </dd>
                   2775: <dt id="mq"><ins class="diff-chg">Media Queries</ins></dt>
                   2776: <dd>
                   2777: <p><ins class="diff-chg">Implementations must support some version
                   2778: of the Media Queries language. However, when applying the rules of
                   2779: the Media Queries specification to media queries found in content
                   2780: attributes of</ins> <a href="#html-elements"><ins class=
                   2781: "diff-chg">HTML elements</ins></a> ,<ins class="diff-chg">user
                   2782: agents must act as if all U+000B LINE TABULATION characters in the
                   2783: attribute were in fact U+0020 SPACE characters. This is required to
                   2784: provide a consistent processing of</ins> <a href="#space" title=
                   2785: "space character"><ins class="diff-chg">space characters</ins></a>
                   2786: <ins class="diff-chg">in HTML.</ins> <a href=
                   2787: "#references"><ins class="diff-chg">[MQ]</ins></a></p>
                   2788: </dd>
                   2789: </dl>
                   2790: <p>This specification does not require support of any particular
                   2791: network transport protocols, style sheet language, scripting
                   2792: language, or any of the DOM and WebAPI specifications beyond those
                   2793: described above. However, the language described by this
                   2794: specification is biased towards CSS as the styling language,
                   2795: ECMAScript as the scripting language, and HTTP as the network
                   2796: protocol, and several features assume that those languages and
                   2797: protocols are in use.</p>
                   2798: <p class="note">This specification might have certain additional
                   2799: requirements on character encodings, image formats, audio formats,
                   2800: and video formats in the respective sections.</p>
                   2801: <h4 id="features"><span class="secno"><del class=
                   2802: "diff-old">1.3.3.</del> <ins class="diff-chg">1.3.3</ins></span>
                   2803: Features defined in other specifications</h4>
                   2804: <p>Some elements are defined in terms of their DOM <dfn id=
                   2805: "textcontent"><code>textContent</code></dfn> attribute. This is an
                   2806: attribute defined on the <code>Node</code> interface in DOM3 Core.
                   2807: <a href="#references">[DOM3CORE]</a></p>
                   2808: <p class="big-issue">Should textContent be defined differently for
                   2809: dir="" and &lt;bdo&gt; ? Should we come up with an alternative to
                   2810: textContent that handles those and other things, like alt=""?</p>
                   2811: <p>The interface <dfn id=
                   2812: "domtimestamp"><code>DOMTimeStamp</code></dfn> is defined in DOM3
                   2813: Core. <a href="#references">[DOM3CORE]</a></p>
                   2814: <p>The term <dfn id="activation0">activation behavior</dfn> is used
                   2815: as defined in the DOM3 Events specification. <a href=
                   2816: "#references">[DOM3EVENTS]</a> <span class="big-issue">At the time
                   2817: of writing, DOM3 Events hadn't yet been updated to define that
                   2818: phrase.</span></p>
                   2819: <p id="alternate-style-sheets">The rules for handling alternative
                   2820: style sheets are defined in the CSS object model specification.
                   2821: <a href="#references">[CSSOM]</a></p>
                   2822: <p class="big-issue">See <del class=
                   2823: "diff-old">http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?rev=1.35&amp;content-type=text/html;%20charset=utf-8</del>
                   2824: <a href=
                   2825: "http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?content-type=text/html;%20charset=utf-8">
                   2826: <ins class=
                   2827: "diff-chg">http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Overview.html?content-type=text/html;%20charset=utf-8</ins></a></p>
                   2828: <p>Certain features are defined in terms of CSS &lt;color&gt;
                   2829: values. When the CSS value <code title="">currentColor</code> is
                   2830: specified in this context, the "computed value of the 'color'
                   2831: property" for the purposes of determining the computed value of the
                   2832: <code title="">currentColor</code> keyword is the computed value of
                   2833: the 'color' property on the element in question. <a href=
                   2834: "#references">[CSS3COLOR]</a></p>
                   2835: <p class="example">If a canvas gradient's <code title=
                   2836: "dom-canvasgradient-addColorStop"><a href=
                   2837: "#addcolorstop">addColorStop()</a></code> method is called with the
                   2838: <code title="">currentColor</code> keyword as the color, then the
                   2839: computed value of the 'color' property on the <code><a href=
                   2840: "#canvas">canvas</a></code> element is the one that is used.</p>
                   2841: <h3 id="terminology"><span class="secno"><del class=
                   2842: "diff-old">1.4.</del> <ins class="diff-chg">1.4</ins></span>
                   2843: Terminology</h3>
                   2844: <p>This specification refers to both HTML and XML attributes and
                   2845: DOM attributes, often in the same context. When it is not clear
                   2846: which is being referred to, they are referred to as <dfn id=
                   2847: "content">content attributes</dfn> for HTML and XML attributes, and
                   2848: <dfn id="dom-attributes">DOM attributes</dfn> for those from the
                   2849: DOM. Similarly, the term "properties" is used for both ECMAScript
                   2850: object properties and CSS properties. When these are ambiguous they
                   2851: are qualified as object properties and CSS properties
                   2852: respectively.</p>
                   2853: <p id="html-namespace">To ease migration from HTML to XHTML, UAs
                   2854: conforming to this specification will place elements in HTML in the
                   2855: <code>http://www.w3.org/1999/xhtml</code> namespace, at least for
                   2856: the purposes of the DOM and CSS. The term " <dfn id=
                   2857: "elements1">elements in the HTML namespace</dfn> ", or " <dfn id=
                   2858: "html-elements">HTML elements</dfn> " for short, when used in this
                   2859: specification, thus refers to both HTML and XHTML elements.</p>
                   2860: <p>Unless otherwise stated, all elements defined or mentioned in
                   2861: this specification are in the
                   2862: <code>http://www.w3.org/1999/xhtml</code> namespace, and all
                   2863: attributes defined or mentioned in this specification have no
                   2864: namespace (they are in the per-element partition).</p>
                   2865: <p>The term <a href="#html-">HTML documents</a> is sometimes used
                   2866: in contrast with <a href="#xml-documents">XML documents</a> to
                   2867: <del class="diff-old">mean</del> specifically <ins class=
                   2868: "diff-new">mean</ins> documents that were parsed using an <a href=
                   2869: "#html-0">HTML parser</a> (as opposed to using an XML parser or
                   2870: created purely through the DOM).</p>
                   2871: <p>Generally, when the specification states that a feature applies
                   2872: to HTML or XHTML, it also includes the other. When a feature
                   2873: specifically only applies to one of the two languages, it is called
                   2874: out by explicitly stating that it does not apply to the other
                   2875: format, as in "for HTML, ... (this does not apply to XHTML)".</p>
                   2876: <p>This specification uses the term <em>document</em> to refer to
                   2877: any use of HTML, ranging from short static documents to long essays
                   2878: or reports with rich multimedia, as well as to fully-fledged
                   2879: interactive applications.</p>
                   2880: <p>For readability, the term URI is used to refer to both ASCII
                   2881: URIs and Unicode IRIs, as those terms are defined by RFC 3986 and
                   2882: RFC 3987 respectively. On the rare occasions where IRIs are not
                   2883: allowed but ASCII URIs are, this is called out explicitly. <a href=
                   2884: "#references">[RFC3986]</a> <a href="#references">[RFC3987]</a></p>
                   2885: <p>The term <dfn id="root-element">root element</dfn> , when not
                   2886: <del class="diff-old">qualified to</del> explicitly <del class=
                   2887: "diff-old">refer</del> <ins class="diff-chg">qualified as
                   2888: referring</ins> to the document's root element, means the furthest
                   2889: ancestor element node of whatever node is being discussed, or the
                   2890: node itself <del class="diff-old">is there is none.</del>
                   2891: <ins class="diff-chg">if it has no ancestors.</ins> When the node
                   2892: is a part of the document, then that is indeed the document's root
                   2893: <del class="diff-old">element. However,</del> <ins class=
                   2894: "diff-chg">element; however,</ins> if the node is not currently
                   2895: part of the document tree, the root element will be an orphaned
                   2896: node.</p>
                   2897: <p>An element is said to have been <dfn id="inserted" title=
                   2898: "insert an element into a document">inserted into a document</dfn>
                   2899: when its <a href="#root-element">root element</a> changes and is
                   2900: now the document's <a href="#root-element">root element</a> .</p>
                   2901: <p>The term <dfn id="tree-order">tree order</dfn> means a
                   2902: pre-order, depth-first traversal of DOM nodes involved (through the
                   2903: <code title="">parentNode</code> / <code title="">childNodes</code>
                   2904: relationship).</p>
                   2905: <p>When it is stated that some element or attribute is <dfn id=
                   2906: "ignored" title="ignore">ignored</dfn> , or treated as some other
                   2907: value, or handled as if it was something else, this refers only to
                   2908: the processing of the node after it is in the DOM. A user agent
                   2909: must not mutate the DOM in such situations.</p>
                   2910: <p>When an XML name, such as an attribute or element name, is
                   2911: referred to in the form <code><var title="">prefix</var> :
                   2912: <var title="">localName</var></code> , as in <code>xml:id</code> or
                   2913: <code>svg:rect</code> , it refers to a name with the local name
                   2914: <var title="">localName</var> and the namespace given by the
                   2915: prefix, as defined by the following table:</p>
                   2916: <dl>
                   2917: <dt><code title="">xml</code></dt>
                   2918: <dd><code>http://www.w3.org/XML/1998/namespace</code></dd>
                   2919: <dt><code title="">html</code></dt>
                   2920: <dd><code>http://www.w3.org/1999/xhtml</code></dd>
                   2921: <dt><code title="">svg</code></dt>
                   2922: <dd><code>http://www.w3.org/2000/svg</code></dd>
                   2923: </dl>
                   2924: <p>For simplicity, terms such as <em>shown</em> ,
                   2925: <em>displayed</em> , and <em>visible</em> might sometimes be used
                   2926: when referring to the way a document is rendered to the user. These
                   2927: terms are not meant to imply a visual medium; they must be
                   2928: considered to apply to other media in equivalent ways.</p>
                   2929: <p><del class="diff-old">Various</del> DOM interfaces <del class=
                   2930: "diff-old">are</del> defined in this specification <del class=
                   2931: "diff-old">using pseudo-IDL. This looks like OMG IDL but isn't. For
                   2932: instance, method overloading is used, and types from the W3C DOM
                   2933: specifications are used without qualification. Language-specific
                   2934: bindings for these abstract interface definitions</del> <ins class=
                   2935: "diff-chg">use Web IDL. User agents</ins> must <del class=
                   2936: "diff-old">be derived in the way consistent with W3C DOM
                   2937: specifications. Some interface-specific binding information for
                   2938: ECMAScript is included in this specification. The current situation
                   2939: with IDL blocks is pitiful. IDL is totally inadequate to properly
                   2940: represent what objects have to look like in JS; IDL can't say if a
                   2941: member is enumerable, what the indexing behaviour is, what the
                   2942: stringification behaviour is, what behaviour setting a member whose
                   2943: type is a particular interface should be (e.g. setting of
                   2944: document.location or element.className), what constructor an object
                   2945: implementing an interface should claim to have, how overloads work,
                   2946: etc. I think we should make</del> <ins class="diff-chg">implement
                   2947: these interfaces as defined by</ins> the <ins class=
                   2948: "diff-new">Web</ins> IDL <del class="diff-old">blocks
                   2949: non-normative, and/or replace them with something else that is
                   2950: better for JS while still being clear on how it applies to other
                   2951: languages. However, we do need to have something that says what
                   2952: types the methods take as arguments, since we have to raise
                   2953: exceptions if they are wrong.</del> <ins class=
                   2954: "diff-chg">specification.</ins> <a href="#references"><ins class=
                   2955: "diff-chg">[WEBIDL]</ins></a></p>
                   2956: <p>The construction "a <code>Foo</code> object", where
                   2957: <code>Foo</code> is actually an interface, is sometimes used
                   2958: instead of the more accurate "an object implementing the interface
                   2959: <code>Foo</code> ".</p>
                   2960: <p>A DOM attribute is said to be <em>getting</em> when its value is
                   2961: being retrieved (e.g. by author script), and is said to be
                   2962: <em>setting</em> when a new value is assigned to it.</p>
                   2963: <p>If a DOM object is said to be <dfn id="live">live</dfn> , then
                   2964: that means that any attributes returning that object must always
                   2965: return the same object (not a new object each time), and the
                   2966: attributes and methods on that object must operate on the actual
                   2967: underlying data, not a snapshot of the data.</p>
                   2968: <p>The terms <em>fire</em> and <em>dispatch</em> are used
                   2969: interchangeably in the context of events, as in the DOM Events
                   2970: specifications. <a href="#references">[DOM3EVENTS]</a></p>
                   2971: <p>The term <dfn id="text-node">text node</dfn> refers to any
                   2972: <code>Text</code> node, including <code>CDATASection</code>
                   2973: <del class="diff-old">nodes (any</del> <ins class="diff-chg">nodes;
                   2974: specifically, any</ins> <code>Node</code> with node type
                   2975: <del class="diff-old">3</del> <code title=""><ins class=
                   2976: "diff-chg">TEXT_NODE</ins></code> <ins class="diff-chg">(3)</ins>
                   2977: or <del class="diff-old">4).</del> <code title=""><ins class=
                   2978: "diff-chg">CDATA_SECTION_NODE</ins></code> <ins class=
                   2979: "diff-chg">(4).</ins> <a href="#references"><ins class=
                   2980: "diff-chg">[DOM3CORE]</ins></a></p>
                   2981: <p><ins class="diff-chg">The term</ins> <dfn id=
                   2982: "plugin"><ins class="diff-chg">plugin</ins></dfn> <ins class=
                   2983: "diff-chg">is used to mean any content handler, typically a
                   2984: third-party content handler, for Web content types that are not
                   2985: supported by the user agent natively, or for content types that do
                   2986: not expose a DOM, that supports rendering the content as part of
                   2987: the user agent's interface.</ins></p>
                   2988: <p class="example"><ins class="diff-chg">One example of a plugin
                   2989: would be a PDF viewer that is instantiated in a</ins> <a href=
                   2990: "#browsing1"><ins class="diff-chg">browsing context</ins></a>
                   2991: <ins class="diff-chg">when the user navigates to a PDF file. This
                   2992: would count as a plugin regardless of whether the party that
                   2993: implemented the PDF viewer component was the same as that which
                   2994: implemented the user agent itself. However, a PDF viewer
                   2995: application that launches separate from the user agent (as opposed
                   2996: to using the same interface) is not a plugin by this
                   2997: definition.</ins></p>
                   2998: <p class="note"><ins class="diff-chg">This specification does not
                   2999: define a mechanism for interacting with plugins, as it is expected
                   3000: to be user-agent- and platform-specific. Some UAs might opt to
                   3001: support a plugin mechanism such as the Netscape Plugin API; others
                   3002: might use remote content converters or have built-in support for
                   3003: certain types.</ins> <a href="#references"><ins class=
                   3004: "diff-chg">[NPAPI]</ins></a></p>
                   3005: <p class="warning"><ins class="diff-chg">Browsers should take
                   3006: extreme care when interacting with external content intended
                   3007: for</ins> <a href="#plugin" title="plugin"><ins class=
                   3008: "diff-chg">plugins</ins></a> .<ins class="diff-chg">When
                   3009: third-party software is run with the same privileges as the user
                   3010: agent itself, vulnerabilities in the third-party software become as
                   3011: dangerous as those in the user agent.</ins></p>
                   3012: <p>Some of the algorithms in this specification, for historical
                   3013: reasons, require the user agent to <dfn id="pause">pause</dfn>
                   3014: until some condition has been met. While a user agent is paused, it
                   3015: must ensure that no scripts execute (e.g. no event handlers, no
                   3016: timers, etc). User agents should remain responsive to user input
                   3017: while paused, <del class="diff-old">however.</del> <ins class=
                   3018: "diff-chg">however, albeit without letting the user interact with
                   3019: Web pages where that would involve invoking any script.</ins></p>
                   3020: <h4 id="html-vs"><span class="secno"><del class=
                   3021: "diff-old">1.4.1.</del> <ins class="diff-chg">1.4.1</ins></span>
                   3022: HTML vs XHTML</h4>
                   3023: <p><em>This section is non-normative.</em></p>
                   3024: <p>This specification defines an abstract language for describing
                   3025: documents and applications, and some APIs for interacting with
                   3026: in-memory representations of resources that use this language.</p>
                   3027: <p>The in-memory representation is known as "DOM5 HTML", or "the
                   3028: DOM" for short.</p>
                   3029: <p>There are various concrete syntaxes that can be used to transmit
                   3030: resources that use this abstract language, two of which are defined
                   3031: in this specification.</p>
                   3032: <p>The first such concrete syntax is "HTML5". This is the format
                   3033: recommended for most authors. It is compatible with all legacy Web
                   3034: browsers. If a document is transmitted with the MIME type
                   3035: <code title="">text/html</code> , then it will be processed as an
                   3036: "HTML5" document by Web browsers.</p>
                   3037: <p>The second concrete syntax uses XML, and is known as "XHTML5".
                   3038: When a document is transmitted with an XML MIME type, such as
                   3039: <code title="">application/xhtml+xml</code> , then it is processed
                   3040: by an XML processor by Web browsers, and treated as an "XHTML5"
                   3041: document. Authors are reminded that the processing for XML and HTML
                   3042: differs; in particular, even minor syntax errors will prevent an
                   3043: XML document from being rendered fully, whereas they would be
                   3044: ignored in the "HTML5" syntax.</p>
                   3045: <p>The "DOM5 HTML", "HTML5", and "XHTML5" representations cannot
                   3046: all represent the same content. For example, namespaces cannot be
                   3047: represented using "HTML5", but they are supported in "DOM5 HTML"
                   3048: and "XHTML5". Similarly, documents that use the <code><a href=
                   3049: "#noscript">noscript</a></code> feature can be represented using
                   3050: "HTML5", but cannot be represented with "XHTML5" and "DOM5 HTML".
                   3051: Comments that contain the string " <code title="">--&gt;</code> "
                   3052: can be represented in "DOM5 HTML" but not in "HTML5" and "XHTML5".
                   3053: And so forth.</p>
                   3054: <h2 id="dom"><span class="secno">2.</span> The Document Object
                   3055: Model</h2>
                   3056: <p>The Document Object Model (DOM) is a representation — a model —
                   3057: of a document and its content. <a href="#references">[DOM3CORE]</a>
                   3058: The DOM is not just an API; the conformance criteria of HTML
                   3059: implementations are defined, in this specification, in terms of
                   3060: operations on the DOM.</p>
                   3061: <p>This specification defines the language represented in the DOM
                   3062: by features together called DOM5 HTML. DOM5 HTML consists of DOM
                   3063: Core <code>Document</code> nodes and DOM Core <code>Element</code>
                   3064: nodes, along with text nodes and other content.</p>
                   3065: <p>Elements in the DOM represent things; that is, they have
                   3066: intrinsic <em>meaning</em> , also known as semantics.</p>
                   3067: <p class="example">For example, an <code><a href=
                   3068: "#ol">ol</a></code> element represents an ordered list.</p>
                   3069: <p>In addition, documents and elements in the DOM host APIs that
                   3070: extend the DOM Core APIs, providing new features to application
                   3071: developers using DOM5 HTML.</p>
                   3072: <h3 id="documents"><span class="secno"><del class=
                   3073: "diff-old">2.1.</del> <ins class="diff-chg">2.1</ins></span>
                   3074: Documents</h3>
                   3075: <p>Every XML and HTML document in an HTML UA is represented by a
                   3076: <code>Document</code> object. <a href=
                   3077: "#references">[DOM3CORE]</a></p>
                   3078: <p><code>Document</code> objects are assumed to be <dfn id=
                   3079: "xml-documents">XML documents</dfn> unless they are flagged as
                   3080: being <dfn id="html-">HTML documents</dfn> when they are created.
                   3081: Whether a document is an <a href="#html-" title=
                   3082: "HTML documents">HTML document</a> or an <a href="#xml-documents"
                   3083: title="XML documents">XML document</a> affects the <del class=
                   3084: "diff-old">behaviour</del> <ins class="diff-chg">behavior</ins> of
                   3085: certain APIs, as well as a few CSS rendering rules. <a href=
                   3086: "#references">[CSS21]</a></p>
                   3087: <p class="note">A <code>Document</code> object created by the
                   3088: <code title="">createDocument()</code> API on the
                   3089: <code>DOMImplementation</code> object is initially an <a href=
                   3090: "#xml-documents" title="XML documents">XML document</a> , but can
                   3091: be made into an <a href="#html-" title="HTML documents">HTML
                   3092: document</a> by calling <code title="dom-document-open"><a href=
                   3093: "#open">document.open()</a></code> on it.</p>
                   3094: <p>All <code>Document</code> objects (in user agents implementing
                   3095: this specification) must also implement the <code><a href=
                   3096: "#htmldocument">HTMLDocument</a></code> interface, available using
                   3097: binding-specific methods. (This is the case whether or not the
                   3098: document in question is an <a href="#html-" title=
                   3099: "HTML documents">HTML document</a> or indeed whether it contains
                   3100: any <a href="#html-elements">HTML elements</a> at all.)
                   3101: <code>Document</code> objects must also implement the
                   3102: document-level interface of any other namespaces found in the
                   3103: document that the UA supports. For example, if an HTML
                   3104: implementation also supports SVG, then the <code>Document</code>
                   3105: object must implement <code><a href=
                   3106: "#htmldocument">HTMLDocument</a></code> and
                   3107: <code>SVGDocument</code> .</p>
                   3108: <p class="note">Because the <code><a href=
                   3109: "#htmldocument">HTMLDocument</a></code> interface is now obtained
                   3110: using binding-specific casting methods instead of simply being the
                   3111: primary interface of the document object, it is no longer defined
                   3112: as inheriting from <code>Document</code> .</p>
                   3113: <pre class="idl">
                   3114: interface <dfn id="htmldocument">HTMLDocument</dfn> {
                   3115:   // <a href="#resource0">Resource metadata management</a>
                   3116: <del class="diff-old">  readonly attribute ;
                   3117: </del>
                   3118: <ins class=
                   3119: "diff-chg">  [PutForwards=href] readonly attribute <a href=
                   3120: "#location2">Location</a> <a href="#location0" title=
                   3121: "dom-document-location">location</a>;
                   3122: </ins>
                   3123:   readonly attribute DOMString <a href="#url" title=
                   3124: "dom-document-URL">URL</a>;
                   3125:            attribute DOMString <a href="#domain" title=
                   3126: "dom-document-domain">domain</a>;
                   3127:   readonly attribute DOMString <a href="#referrer" title=
                   3128: "dom-document-referrer">referrer</a>;
                   3129:            attribute DOMString <a href="#cookie0" title=
                   3130: "dom-document-cookie">cookie</a>;
                   3131:   readonly attribute DOMString <a href="#lastmodified" title=
                   3132: "dom-document-lastModified">lastModified</a>;
                   3133:   readonly attribute DOMString <a href="#compatmode" title=
                   3134: "dom-document-compatMode">compatMode</a>;
                   3135: <ins class="diff-new">           attribute DOMString <a href=
                   3136: "#charset0" title="dom-document-charset">charset</a>;
                   3137:   readonly attribute DOMString <a href="#characterset" title=
                   3138: "dom-document-characterSet">characterSet</a>;
                   3139:   readonly attribute DOMString <a href="#defaultcharset" title=
                   3140: "dom-document-defaultCharset">defaultCharset</a>;
                   3141:   readonly attribute DOMString <a href="#readystate" title=
                   3142: "dom-document-readyState">readyState</a>;
                   3143: </ins>
                   3144:   // <a href="#dom-tree0">DOM tree accessors</a>
                   3145:            attribute DOMString <a href="#document.title" title=
                   3146: "dom-document-title">title</a>;
                   3147:            attribute DOMString <a href="#dir1" title=
                   3148: "dom-document-dir">dir</a>;
                   3149:            attribute <a href=
                   3150: "#htmlelement">HTMLElement</a> <a href="#body" title=
                   3151: "dom-document-body">body</a>;
                   3152:   readonly attribute <a href=
                   3153: "#htmlcollection0">HTMLCollection</a> <a href="#images0" title=
                   3154: "dom-document-images">images</a>;
                   3155: <ins class="diff-chg">  readonly attribute <a href=
                   3156: "#htmlcollection0">HTMLCollection</a> <a href="#embeds" title=
                   3157: "dom-document-embeds">embeds</a>;
                   3158:   readonly attribute <a href=
                   3159: "#htmlcollection0">HTMLCollection</a> <a href="#plugins" title=
                   3160: "dom-document-plugins">plugins</a>;
                   3161: </ins>
                   3162:   readonly attribute <a href=
                   3163: "#htmlcollection0">HTMLCollection</a> <a href="#links0" title=
                   3164: "dom-document-links">links</a>;
                   3165:   readonly attribute <a href=
                   3166: "#htmlcollection0">HTMLCollection</a> <a href="#forms0" title=
                   3167: "dom-document-forms">forms</a>;
                   3168:   readonly attribute <a href=
                   3169: "#htmlcollection0">HTMLCollection</a> <a href="#anchors" title=
                   3170: "dom-document-anchors">anchors</a>;
                   3171: <ins class="diff-new">  readonly attribute <a href=
                   3172: "#htmlcollection0">HTMLCollection</a> <a href="#scripts" title=
                   3173: "dom-document-scripts">scripts</a>;
                   3174: </ins>
                   3175:   NodeList <a href="#getelementsbyname" title=
                   3176: "dom-document-getElementsByName">getElementsByName</a>(in DOMString elementName);
                   3177:   NodeList <a href="#getelementsbyclassname" title=
                   3178: "dom-document-getElementsByClassName">getElementsByClassName</a>(in DOMString classNames);
                   3179:   // <a href="#dynamic2">Dynamic markup insertion</a>
                   3180:            attribute DOMString <a href="#innerhtml" title=
                   3181: "dom-innerHTML">innerHTML</a>;
                   3182:   <a href="#htmldocument">HTMLDocument</a> <a href="#open" title=
                   3183: "dom-document-open">open</a>();
                   3184:   <a href="#htmldocument">HTMLDocument</a> <a href="#open" title=
                   3185: "dom-document-open">open</a>(in DOMString type);
                   3186:   <a href="#htmldocument">HTMLDocument</a> <a href="#open" title=
                   3187: "dom-document-open">open</a>(in DOMString type, in DOMString replace);
                   3188:   <a href="#window">Window</a> <a href="#open" title=
                   3189: "dom-document-open">open</a>(in DOMString url, in DOMString name, in DOMString features);
                   3190:   <a href="#window">Window</a> <a href="#open" title=
                   3191: "dom-document-open">open</a>(in DOMString url, in DOMString name, in DOMString features, in boolean replace);
                   3192:   void <a href="#close" title="dom-document-close">close</a>();
                   3193:   void <a href="#document.write" title=
                   3194: "dom-document-write">write</a>(in DOMString text);
                   3195:   void <a href="#document.writeln..." title=
                   3196: "dom-document-writeln">writeln</a>(in DOMString text);
                   3197:   // <a href="#interaction0">Interaction</a>
                   3198:   readonly attribute <span>Element</span> <a href="#activeelement"
                   3199: title="dom-document-activeElement">activeElement</a>;
                   3200: <del class="diff-old">  readonly attribute boolean ;
                   3201: </del>
                   3202: <ins class="diff-chg">  boolean <a href="#hasfocus" title=
                   3203: "dom-document-hasFocus">hasFocus</a>();
                   3204: </ins>
                   3205:   // <a href="#command1" title="concept-command">Commands</a>
                   3206:   readonly attribute <a href=
                   3207: "#htmlcollection0">HTMLCollection</a> <a href="#commands0" title=
                   3208: "dom-document-commands">commands</a>;
                   3209:   // <a href="#editing0">Editing</a>
                   3210:            attribute boolean <a href="#designMode" title=
                   3211: "dom-document-designMode">designMode</a>;
                   3212:   boolean <a href="#execCommand" title=
                   3213: "dom-document-execCommand">execCommand</a>(in DOMString commandId);
                   3214: <del class=
                   3215: "diff-old">  boolean (in DOMString commandId, in boolean doShowUI);
                   3216:   boolean (in DOMString commandId, in boolean doShowUI, in DOMString value);
                   3217: </del>
                   3218: <ins class="diff-chg">  boolean <a href="#execCommand" title=
                   3219: "dom-document-execCommand">execCommand</a>(in DOMString commandId, in boolean showUI);
                   3220:   boolean <a href="#execCommand" title=
                   3221: "dom-document-execCommand">execCommand</a>(in DOMString commandId, in boolean showUI, in DOMString value);
                   3222:   boolean <a href="#querycommandenabled" title=
                   3223: "dom-document-queryCommandEnabled">queryCommandEnabled</a>(in DOMString commandId);
                   3224:   boolean <a href="#querycommandindeterm" title=
                   3225: "dom-document-queryCommandIndeterm">queryCommandIndeterm</a>(in DOMString commandId);
                   3226:   boolean <a href="#querycommandstate" title=
                   3227: "dom-document-queryCommandState">queryCommandState</a>(in DOMString commandId);
                   3228:   boolean <a href="#querycommandsupported" title=
                   3229: "dom-document-queryCommandSupported">queryCommandSupported</a>(in DOMString commandId);
                   3230:   DOMString <a href="#querycommandvalue" title=
                   3231: "dom-document-queryCommandValue">queryCommandValue</a>(in DOMString commandId);
                   3232: </ins>
                   3233:   <a href="#selection1">Selection</a> <a href="#getselection0"
                   3234: title="dom-document-getSelection">getSelection</a>();
                   3235: };
                   3236: </pre>
                   3237: <p>Since the <code><a href="#htmldocument">HTMLDocument</a></code>
                   3238: interface holds methods and attributes related to a number of
                   3239: disparate features, the members of this interface are described in
                   3240: various different sections.</p>
                   3241: <h4 id="security"><span class="secno"><del class=
                   3242: "diff-old">2.1.1.</del> <ins class="diff-chg">2.1.1</ins></span>
                   3243: Security</h4>
                   3244: <p>User agents must raise a <a href="#security9">security
                   3245: exception</a> whenever any of the members of an <code><a href=
                   3246: "#htmldocument">HTMLDocument</a></code> object are accessed by
                   3247: scripts whose <a href="#effective3"><ins class="diff-chg">effective
                   3248: script</ins> origin</a> is not the <a href="#same-origin" title=
                   3249: "same origin">same</a> as the <code>Document</code> 's <del class=
                   3250: "diff-old">origin.</del> <a href="#effective3"><ins class=
                   3251: "diff-chg">effective script origin</ins></a> .</p>
                   3252: <h4 id="resource"><span class="secno"><del class=
                   3253: "diff-old">2.1.2.</del> <ins class="diff-chg">2.1.2</ins></span>
                   3254: <dfn id="resource0">Resource metadata management</dfn></h4>
                   3255: <p>The <dfn id="url" title=
                   3256: "dom-document-URL"><code>URL</code></dfn> attribute must return
                   3257: <span>the document's address</span> .</p>
                   3258: <p>The <dfn id="referrer" title=
                   3259: "dom-document-referrer"><code><del class="diff-old">domain</del>
                   3260: <ins class="diff-chg">referrer</ins></code></dfn> attribute must
                   3261: <del class="diff-old">be initialised to the document's domain , if
                   3262: it has one, and null otherwise. On getting, the attribute
                   3263: must</del> return <del class="diff-old">its current value. On
                   3264: setting, if the new value is an allowed value (as defined below),
                   3265: the attribute's value must be changed to the new value. If</del>
                   3266: <ins class="diff-chg">either</ins> the <del class="diff-old">new
                   3267: value is not an allowed value, then a security exception must be
                   3268: raised instead. A new value is an allowed value for</del>
                   3269: <ins class="diff-chg">URI of</ins> the <del class=
                   3270: "diff-old">document.domain</del> <a href="#active"><ins class=
                   3271: "diff-chg">active document</ins></a> <del class=
                   3272: "diff-old">attribute if it is equal to the attribute's current
                   3273: value, or if the new value, prefixed by a U+002E FULL STOP ("."),
                   3274: exactly matches the end</del> of the <del class="diff-old">current
                   3275: value. If the current value is null, new values other than null
                   3276: will never be allowed. If the Document object's address is
                   3277: hierarchical and uses a server-based naming authority, then its
                   3278: domain is the &lt;host&gt;/&lt;ihost&gt; part of that address.
                   3279: Otherwise, it has no domain. The domain</del> <a href=
                   3280: "#source0"><ins class="diff-chg">source browsing context</ins></a>
                   3281: <del class="diff-old">attribute is used to enable pages on
                   3282: different hosts of a domain to access each others' DOMs , though
                   3283: this is not yet defined by this specification . we should handle IP
                   3284: addresses here The referrer attribute must return either</del>
                   3285: <ins class="diff-chg">at</ins> the <del class="diff-old">URI
                   3286: of</del> <ins class="diff-chg">time the navigation was started
                   3287: (that is,</ins> the page which <a href="#navigate" title=
                   3288: "navigate">navigated</a> the <a href="#browsing1">browsing
                   3289: context</a> to the current <del class="diff-old">document (if
                   3290: any),</del> <ins class="diff-chg">document),</ins> or the empty
                   3291: string if there is no such originating page, or if the UA has been
                   3292: configured not to report <del class="diff-old">referrers,</del>
                   3293: <ins class="diff-chg">referrers in this case,</ins> or if the
                   3294: navigation was initiated for a <a href="#hyperlinks">hyperlink</a>
                   3295: with a <code title="rel-noreferrer"><a href=
                   3296: "#noreferrer">noreferrer</a></code> keyword.</p>
                   3297: <p class="note">In the case of HTTP, the <code title=
                   3298: "dom-document-referrer"><a href="#referrer">referrer</a></code> DOM
                   3299: attribute will match the <code title="">Referer</code> (sic) header
                   3300: that was sent when fetching the current page.</p>
                   3301: <p class="note"><ins class="diff-new">Typically user agents are
                   3302: configured to not report referrers in the case where the referrer
                   3303: uses an encrypted protocol and the current page does not (e.g. when
                   3304: navigating from an</ins> <code title=""><ins class=
                   3305: "diff-new">https:</ins></code> <ins class="diff-new">page to
                   3306: an</ins> <code title=""><ins class="diff-new">http:</ins></code>
                   3307: <ins class="diff-new">page).</ins></p>
                   3308: <p>The <dfn id="cookie0" title=
                   3309: "dom-document-cookie"><code>cookie</code></dfn> attribute
                   3310: <del class="diff-old">must, on</del> <ins class=
                   3311: "diff-chg">represents the cookies of the resource.</ins></p>
                   3312: <p id="sandboxCookies"><ins class="diff-chg">On</ins> getting,
                   3313: <ins class="diff-new">if the</ins> <a href=
                   3314: "#sandboxed2"><ins class="diff-new">sandboxed origin browsing
                   3315: context flag</ins></a> <ins class="diff-new">is set on the</ins>
                   3316: <a href="#browsing1"><ins class="diff-new">browsing
                   3317: context</ins></a> <ins class="diff-new">of the document, the user
                   3318: agent must raise a</ins> <a href="#security9"><ins class=
                   3319: "diff-new">security exception</ins></a> .<ins class=
                   3320: "diff-new">Otherwise, it must</ins> return the same string as the
                   3321: value of the <code title="">Cookie</code> HTTP header it would
                   3322: include if fetching the resource indicated by <span>the document's
                   3323: address</span> over HTTP, as per RFC 2109 section 4.3.4. <a href=
                   3324: "#references">[RFC2109]</a></p>
                   3325: <p>On setting, <ins class="diff-new">if</ins> the <del class=
                   3326: "diff-old">cookie</del> <a href="#sandboxed2"><ins class=
                   3327: "diff-chg">sandboxed origin browsing context flag</ins></a>
                   3328: <del class="diff-old">attribute</del> <ins class="diff-chg">is set
                   3329: on the</ins> <a href="#browsing1"><ins class="diff-chg">browsing
                   3330: context</ins></a> <ins class="diff-chg">of the document, the user
                   3331: agent</ins> must <del class="diff-old">cause</del> <ins class=
                   3332: "diff-chg">raise a</ins> <a href="#security9"><ins class=
                   3333: "diff-chg">security exception</ins></a> .<ins class=
                   3334: "diff-chg">Otherwise,</ins> the user agent <del class=
                   3335: "diff-old">to</del> <ins class="diff-chg">must</ins> act as it
                   3336: would when processing cookies if it had just attempted to fetch
                   3337: <span>the document's address</span> over HTTP, and had received a
                   3338: response with a <code>Set-Cookie</code> header whose value was the
                   3339: specified value, as per RFC 2109 sections 4.3.1, 4.3.2, and 4.3.3.
                   3340: <a href="#references">[RFC2109]</a></p>
                   3341: <p class="note">Since the <code title=
                   3342: "dom-document-cookie"><a href="#cookie0">cookie</a></code>
                   3343: attribute is accessible across frames, the path restrictions on
                   3344: cookies are only a tool to help manage which cookies are sent to
                   3345: which parts of the site, and are not in any way a security
                   3346: feature.</p>
                   3347: <p>The <dfn id="lastmodified" title=
                   3348: "dom-document-lastModified"><code>lastModified</code></dfn>
                   3349: attribute, on getting, must return the date and time of the
                   3350: <code>Document</code> 's source file's last modification, in the
                   3351: user's local timezone, in the following format:</p>
                   3352: <ol>
                   3353: <li>The month component of the date.</li>
                   3354: <li>A U+002F SOLIDUS character ('/').</li>
                   3355: <li>The day component of the date.</li>
                   3356: <li>A U+002F SOLIDUS character ('/').</li>
                   3357: <li>The year component of the date.</li>
                   3358: <li>A U+0020 SPACE character.</li>
                   3359: <li>The hours component of the time.</li>
                   3360: <li>A U+003A COLON character (':').</li>
                   3361: <li>The minutes component of the time.</li>
                   3362: <li>A U+003A COLON character (':').</li>
                   3363: <li>The seconds component of the time.</li>
                   3364: </ol>
                   3365: <p>All the numeric components above, other than the year, must be
                   3366: given as two digits in the range U+0030 DIGIT ZERO to U+0039 DIGIT
                   3367: NINE representing the number in base ten, zero-padded if
                   3368: necessary.</p>
                   3369: <p>The <code>Document</code> 's source file's last modification
                   3370: date and time must be derived from relevant features of the
                   3371: networking protocols used, e.g. from the value of the HTTP
                   3372: <code title="">Last-Modified</code> header of the document, or from
                   3373: metadata in the <del class="diff-old">filesystem</del> <ins class=
                   3374: "diff-chg">file system</ins> for local files. If the last
                   3375: modification date and time are not known, the attribute must return
                   3376: the string <code title="">01/01/1970 00:00:00</code> .</p>
                   3377: <p><ins class="diff-new">A</ins> <code><ins class=
                   3378: "diff-new">Document</ins></code> <ins class="diff-new">is always
                   3379: set to one of three modes:</ins> <dfn id="no-quirks"><ins class=
                   3380: "diff-new">no quirks mode</ins></dfn> ,<ins class="diff-new">the
                   3381: default;</ins> <dfn id="quirks"><ins class="diff-new">quirks
                   3382: mode</ins></dfn> ,<ins class="diff-new">used typically for legacy
                   3383: documents; and</ins> <dfn id="limited"><ins class=
                   3384: "diff-new">limited quirks mode</ins></dfn> ,<ins class=
                   3385: "diff-new">also known as "almost standards" mode. The mode is only
                   3386: ever changed from the default by the</ins> <a href=
                   3387: "#html-0"><ins class="diff-new">HTML parser</ins></a> ,<ins class=
                   3388: "diff-new">based on the presence, absence, or value of the DOCTYPE
                   3389: string.</ins></p>
                   3390: <p>The <dfn id="compatmode" title=
                   3391: "dom-document-compatMode"><code>compatMode</code></dfn> DOM
                   3392: attribute must return the literal string " <code title=
                   3393: "">CSS1Compat</code> " unless the document has been set to <a href=
                   3394: "#quirks">quirks mode</a> by the <a href="#html-0">HTML parser</a>
                   3395: , in which case it must instead return the literal string "
                   3396: <code title="">BackCompat</code> ". <del class="diff-old">The
                   3397: document can also be set to limited quirks mode (also known as
                   3398: "almost standards" mode). By default, the document is set to no
                   3399: quirks mode (also known as "standards mode").</del></p>
                   3400: <div class="big-issue">
                   3401: <p>As far as parsing goes, the quirks I know of are:</p>
                   3402: <ul>
                   3403: <li>Comment parsing is different.</li>
                   3404: <li><code><a href="#p">p</a></code> can contain <code><a href=
                   3405: "#table">table</a></code></li>
                   3406: <li>Safari and IE have special parsing rules for &lt;% ... %&gt;
                   3407: (even in standards mode, though clearly this should be
                   3408: quirks-only).</li>
                   3409: </ul>
                   3410: </div>
                   3411: <p><ins class="diff-new">Documents have an associated</ins>
                   3412: <dfn id="character1" title=
                   3413: "document's character encoding"><ins class="diff-new">character
                   3414: encoding</ins></dfn> .<ins class="diff-new">When a</ins>
                   3415: <code><ins class="diff-new">Document</ins></code> <ins class=
                   3416: "diff-new">object is created, the</ins> <a href=
                   3417: "#character1"><ins class="diff-new">document's character
                   3418: encoding</ins></a> <ins class="diff-new">must be initialized to
                   3419: UTF-16. Various algorithms during page loading affect this value,
                   3420: as does the</ins> <code title="dom-document-charset"><a href=
                   3421: "#charset0"><ins class="diff-new">charset</ins></a></code>
                   3422: <ins class="diff-new">setter.</ins> <a href=
                   3423: "#references"><ins class="diff-new">[IANACHARSET]</ins></a></p>
                   3424: <p><ins class="diff-new">The</ins> <dfn id="charset0" title=
                   3425: "dom-document-charset"><code><ins class=
                   3426: "diff-new">charset</ins></code></dfn> <ins class="diff-new">DOM
                   3427: attribute must, on getting, return the preferred MIME name of
                   3428: the</ins> <a href="#character1"><ins class="diff-new">document's
                   3429: character encoding</ins></a> .<ins class="diff-new">On setting, if
                   3430: the new value is an IANA-registered alias for a character encoding,
                   3431: the</ins> <a href="#character1"><ins class="diff-new">document's
                   3432: character encoding</ins></a> <ins class="diff-new">must be set to
                   3433: that character encoding. (Otherwise, nothing happens.)</ins></p>
                   3434: <p><ins class="diff-new">The</ins> <dfn id="characterset" title=
                   3435: "dom-document-characterSet"><code><ins class=
                   3436: "diff-new">characterSet</ins></code></dfn> <ins class=
                   3437: "diff-new">DOM attribute must, on getting, return the preferred
                   3438: MIME name of the</ins> <a href="#character1"><ins class=
                   3439: "diff-new">document's character encoding</ins></a> .</p>
                   3440: <p><ins class="diff-new">The</ins> <dfn id="defaultcharset" title=
                   3441: "dom-document-defaultCharset"><code><ins class=
                   3442: "diff-new">defaultCharset</ins></code></dfn> <ins class=
                   3443: "diff-new">DOM attribute must, on getting, return the preferred
                   3444: MIME name of a character encoding, possibly the user's default
                   3445: encoding, or an encoding associated with the user's current
                   3446: geographical location, or any arbitrary encoding name.</ins></p>
                   3447: <p><ins class="diff-new">Each document has a</ins> <dfn id=
                   3448: "current"><ins class="diff-new">current document
                   3449: readiness</ins></dfn> .<ins class="diff-new">When a</ins>
                   3450: <code><ins class="diff-new">Document</ins></code> <ins class=
                   3451: "diff-new">object is created, it must have its</ins> <a href=
                   3452: "#current"><ins class="diff-new">current document
                   3453: readiness</ins></a> <ins class="diff-new">set to the string
                   3454: "loading". Various algorithms during page loading affect this
                   3455: value. When the value is set, the user agent must</ins> <a href=
                   3456: "#firing2"><ins class="diff-new">fire a simple event</ins></a>
                   3457: <ins class="diff-new">called</ins> <code title=
                   3458: "event-readystatechanged"><ins class=
                   3459: "diff-new">readystatechanged</ins></code> <ins class="diff-new">at
                   3460: the</ins> <code><ins class="diff-new">Document</ins></code>
                   3461: <ins class="diff-new">object.</ins></p>
                   3462: <p><ins class="diff-new">The</ins> <dfn id="readystate" title=
                   3463: "dom-document-readyState"><code><ins class=
                   3464: "diff-new">readyState</ins></code></dfn> <ins class="diff-new">DOM
                   3465: attribute must, on getting, return the</ins> <a href=
                   3466: "#current"><ins class="diff-new">current document
                   3467: readiness</ins></a> .</p>
                   3468: <h3 id="elements"><span class="secno"><del class=
                   3469: "diff-old">2.2.</del> <ins class="diff-chg">2.2</ins></span>
                   3470: Elements</h3>
                   3471: <p>The nodes representing <a href="#html-elements">HTML
                   3472: elements</a> in the DOM must implement, and expose to scripts, the
                   3473: interfaces listed for them in the relevant sections of this
                   3474: specification. This includes <a href="#xhtml5">XHTML</a> elements
                   3475: in <a href="#xml-documents">XML documents</a> , even when those
                   3476: documents are in another context (e.g. inside an XSLT
                   3477: transform).</p>
                   3478: <p>The basic interface, from which all the <a href=
                   3479: "#html-elements">HTML elements</a> ' interfaces inherit, and which
                   3480: must be used by elements that have no additional requirements, is
                   3481: the <code><a href="#htmlelement">HTMLElement</a></code>
                   3482: interface.</p>
                   3483: <pre class="idl">
                   3484: interface <dfn id=
                   3485: "htmlelement">HTMLElement</dfn> : <span>Element</span> {
                   3486:   // <a href="#dom-tree0">DOM tree accessors</a>
                   3487:   NodeList <a href="#getelementsbyclassname0" title=
                   3488: "dom-getElementsByClassName">getElementsByClassName</a>(in DOMString classNames);
                   3489:   // <a href="#dynamic2">dynamic markup insertion</a>
                   3490:            attribute DOMString <a href="#innerhtml" title=
                   3491: "dom-innerHTML">innerHTML</a>;
                   3492:   // <span>metadata attributes</span>
                   3493:            attribute DOMString <a href="#id0" title=
                   3494: "dom-id">id</a>;
                   3495:            attribute DOMString <a href="#title0" title=
                   3496: "dom-title">title</a>;
                   3497:            attribute DOMString <a href="#lang0" title=
                   3498: "dom-lang">lang</a>;
                   3499:            attribute DOMString <a href="#dir0" title=
                   3500: "dom-dir">dir</a>;
                   3501:            attribute <span>DOMString</span> <a href="#classname"
                   3502: title="dom-className">className</a>;
                   3503:   readonly attribute <a href=
                   3504: "#domtokenlist0">DOMTokenList</a> <a href="#classlist" title=
                   3505: "dom-classList">classList</a>;
                   3506: <ins class="diff-new">  readonly attribute <a href=
                   3507: "#domstringmap0">DOMStringMap</a> <a href="#dataset" title=
                   3508: "dom-dataset">dataset</a>;
                   3509: </ins>
                   3510:   // <a href="#interaction0">interaction</a>
                   3511:            attribute boolean <a href="#irrelevant0" title=
                   3512: "dom-irrelevant">irrelevant</a>;
                   3513:            attribute long <a href="#tabindex0" title=
                   3514: "dom-tabindex">tabIndex</a>;
                   3515:   void <a href="#click" title="dom-click">click</a>();
                   3516:   void <a href="#focus0" title="dom-focus">focus</a>();
                   3517:   void <a href="#blur" title="dom-blur">blur</a>();
                   3518:   void <a href="#scrollintoview" title=
                   3519: "dom-scrollIntoView">scrollIntoView</a>();
                   3520:   void <a href="#scrollintoview" title=
                   3521: "dom-scrollIntoView">scrollIntoView</a>(in boolean top);
                   3522:   // <a href="#command1" title="concept-command">commands</a>
                   3523:            attribute <a href=
                   3524: "#htmlmenuelement">HTMLMenuElement</a> <a href="#contextmenu0"
                   3525: title="dom-contextMenu">contextMenu</a>;
                   3526:   // <a href="#editing0">editing</a>
                   3527:            attribute boolean <a href="#draggable0" title=
                   3528: "dom-draggable">draggable</a>;
                   3529:            attribute DOMString <a href="#contenteditable1" title=
                   3530: "dom-contentEditable">contentEditable</a>;
                   3531: <ins class="diff-new">  readonly attribute DOMString <a href=
                   3532: "#iscontenteditable" title=
                   3533: "dom-isContentEditable">isContentEditable</a>;
                   3534:   // <span>styling</span>
                   3535:   readonly attribute <span>CSSStyleDeclaration</span> <a href=
                   3536: "#style0" title="dom-style">style</a>;
                   3537: </ins>
                   3538:   // <span>data templates</span>
                   3539:            attribute DOMString <a href="#template0" title=
                   3540: "dom-template">template</a>;
                   3541:   readonly attribute HTMLDataTemplateElement <a href=
                   3542: "#templateelement" title="dom-templateElement">templateElement</a>;
                   3543:            attribute DOMString <a href="#ref0" title=
                   3544: "dom-ref">ref</a>;
                   3545:   readonly attribute Node <a href="#refnode" title=
                   3546: "dom-refNode">refNode</a>;
                   3547:            attribute DOMString <a href="#registrationmark0" title=
                   3548: "dom-registrationMark">registrationMark</a>;
                   3549:   readonly attribute DocumentFragment <a href="#originalcontent"
                   3550: title="dom-originalContent">originalContent</a>;
                   3551: <del class="diff-old">  // 
                   3552: </del>
                   3553: <ins class="diff-chg">  // <a href=
                   3554: "#event4">event handler DOM attributes</a>
                   3555: </ins>
                   3556:            attribute <span>EventListener</span> <a href="#onabort"
                   3557: title="handler-onabort">onabort</a>;
                   3558:            attribute <span>EventListener</span> <a href=
                   3559: "#onbeforeunload" title=
                   3560: "handler-onbeforeunload">onbeforeunload</a>;
                   3561:            attribute <span>EventListener</span> <a href="#onblur"
                   3562: title="handler-onblur">onblur</a>;
                   3563:            attribute <span>EventListener</span> <a href="#onchange"
                   3564: title="handler-onchange">onchange</a>;
                   3565:            attribute <span>EventListener</span> <a href="#onclick"
                   3566: title="handler-onclick">onclick</a>;
                   3567:            attribute <span>EventListener</span> <a href=
                   3568: "#oncontextmenu" title="handler-oncontextmenu">oncontextmenu</a>;
                   3569:            attribute <span>EventListener</span> <a href=
                   3570: "#ondblclick" title="handler-ondblclick">ondblclick</a>;
                   3571:            attribute <span>EventListener</span> <a href="#ondrag"
                   3572: title="handler-ondrag">ondrag</a>;
                   3573:            attribute <span>EventListener</span> <a href=
                   3574: "#ondragend" title="handler-ondragend">ondragend</a>;
                   3575:            attribute <span>EventListener</span> <a href=
                   3576: "#ondragenter" title="handler-ondragenter">ondragenter</a>;
                   3577:            attribute <span>EventListener</span> <a href=
                   3578: "#ondragleave" title="handler-ondragleave">ondragleave</a>;
                   3579:            attribute <span>EventListener</span> <a href=
                   3580: "#ondragover" title="handler-ondragover">ondragover</a>;
                   3581:            attribute <span>EventListener</span> <a href=
                   3582: "#ondragstart" title="handler-ondragstart">ondragstart</a>;
                   3583:            attribute <span>EventListener</span> <a href="#ondrop"
                   3584: title="handler-ondrop">ondrop</a>;
                   3585:            attribute <span>EventListener</span> <a href="#onerror"
                   3586: title="handler-onerror">onerror</a>;
                   3587:            attribute <span>EventListener</span> <a href="#onfocus"
                   3588: title="handler-onfocus">onfocus</a>;
                   3589:            attribute <span>EventListener</span> <a href=
                   3590: "#onkeydown" title="handler-onkeydown">onkeydown</a>;
                   3591:            attribute <span>EventListener</span> <a href=
                   3592: "#onkeypress" title="handler-onkeypress">onkeypress</a>;
                   3593:            attribute <span>EventListener</span> <a href="#onkeyup"
                   3594: title="handler-onkeyup">onkeyup</a>;
                   3595:            attribute <span>EventListener</span> <a href="#onload"
                   3596: title="handler-onload">onload</a>;
                   3597:            attribute <span>EventListener</span> <a href=
                   3598: "#onmessage" title="handler-onmessage">onmessage</a>;
                   3599:            attribute <span>EventListener</span> <a href=
                   3600: "#onmousedown" title="handler-onmousedown">onmousedown</a>;
                   3601:            attribute <span>EventListener</span> <a href=
                   3602: "#onmousemove" title="handler-onmousemove">onmousemove</a>;
                   3603:            attribute <span>EventListener</span> <a href=
                   3604: "#onmouseout" title="handler-onmouseout">onmouseout</a>;
                   3605:            attribute <span>EventListener</span> <a href=
                   3606: "#onmouseover" title="handler-onmouseover">onmouseover</a>;
                   3607:            attribute <span>EventListener</span> <a href=
                   3608: "#onmouseup" title="handler-onmouseup">onmouseup</a>;
                   3609:            attribute <span>EventListener</span> <a href=
                   3610: "#onmousewheel" title="handler-onmousewheel">onmousewheel</a>;
                   3611:            attribute <span>EventListener</span> <a href="#onresize"
                   3612: title="handler-onresize">onresize</a>;
                   3613:            attribute <span>EventListener</span> <a href="#onscroll"
                   3614: title="handler-onscroll">onscroll</a>;
                   3615:            attribute <span>EventListener</span> <a href="#onselect"
                   3616: title="handler-onselect">onselect</a>;
                   3617: <ins class=
                   3618: "diff-new">           attribute <span>EventListener</span> <a href=
                   3619: "#onstorage" title="handler-onstorage">onstorage</a>;
                   3620: </ins>
                   3621:            attribute <span>EventListener</span> <a href="#onsubmit"
                   3622: title="handler-onsubmit">onsubmit</a>;
                   3623:            attribute <span>EventListener</span> <a href="#onunload"
                   3624: title="handler-onunload">onunload</a>;
                   3625: };
                   3626: </pre>
                   3627: <p>As with the <code><a href=
                   3628: "#htmldocument">HTMLDocument</a></code> interface, the
                   3629: <code><a href="#htmlelement">HTMLElement</a></code> interface holds
                   3630: methods and attributes related to a number of disparate features,
                   3631: and the members of this interface are therefore described in
                   3632: various different sections of this specification.</p>
                   3633: <h4 id="reflecting"><span class="secno"><del class=
                   3634: "diff-old">2.2.1.</del> <ins class="diff-chg">2.2.1</ins></span>
                   3635: Reflecting content attributes in DOM attributes</h4>
                   3636: <p>Some <span title="DOM attribute">DOM attributes</span> are
                   3637: defined to <dfn id="reflect">reflect</dfn> a particular
                   3638: <span>content attribute</span> . This means that on getting, the
                   3639: DOM attribute returns the current value of the content attribute,
                   3640: and on setting, the DOM attribute changes the value of the content
                   3641: attribute to the given value.</p>
                   3642: <p>If a reflecting DOM attribute is a <code>DOMString</code>
                   3643: attribute whose content attribute is defined to contain a URI, then
                   3644: on getting, the DOM attribute must return the value of the content
                   3645: attribute, resolved to an absolute URI, and on setting, must set
                   3646: the content attribute to the specified literal value. If the
                   3647: content attribute is absent, the DOM attribute must return the
                   3648: default value, if the content attribute has one, or else the empty
                   3649: string.</p>
                   3650: <p>If a reflecting DOM attribute is a <code>DOMString</code>
                   3651: attribute whose content attribute is defined to contain one or more
                   3652: URIs, then on getting, the DOM attribute must <span title=
                   3653: "split the string on spaces">split the content attribute on
                   3654: spaces</span> and return the concatenation of each token URI,
                   3655: resolved to an absolute URI, with a single U+0020 SPACE character
                   3656: between each URI; <del class="diff-old">and on setting, must set
                   3657: the content attribute to the specified literal value. If</del>
                   3658: <ins class="diff-chg">if</ins> the content attribute is absent, the
                   3659: DOM attribute must return the default value, if the content
                   3660: attribute has one, or else the empty string. <ins class=
                   3661: "diff-new">On setting, the DOM attribute must set the content
                   3662: attribute to the specified literal value.</ins></p>
                   3663: <p>If a reflecting DOM attribute is a <code>DOMString</code> whose
                   3664: content attribute is an <a href="#enumerated">enumerated
                   3665: attribute</a> , and the DOM attribute is <dfn id="limited0">limited
                   3666: to only known values</dfn> , then, on getting, the DOM attribute
                   3667: must return the <ins class="diff-new">conforming</ins> value
                   3668: associated with the state the attribute is in (in its canonical
                   3669: case), or the empty string if the attribute is in a state that has
                   3670: no associated keyword value; and on setting, if the new value
                   3671: case-insensitively matches one of the keywords given for that
                   3672: attribute, then the content attribute must be set to <ins class=
                   3673: "diff-new">the conforming value associated with the state</ins>
                   3674: that <ins class="diff-new">the attribute would be in if set to the
                   3675: given new</ins> value, otherwise, if the new value is the empty
                   3676: string, then the content attribute must be removed, otherwise, the
                   3677: setter must raise a <code>SYNTAX_ERR</code> exception.</p>
                   3678: <p>If a reflecting DOM attribute is a <code>DOMString</code> but
                   3679: doesn't fall into any of the above categories, then the getting and
                   3680: setting must be done in a transparent, case-preserving manner.</p>
                   3681: <p>If a reflecting DOM attribute is a boolean attribute, then
                   3682: <ins class="diff-new">on getting</ins> the DOM attribute must
                   3683: return true if the attribute is set, and false if it is absent. On
                   3684: setting, the content attribute must be removed if the DOM attribute
                   3685: is set to false, and must be set to have the same value as its name
                   3686: if the DOM attribute is set to true. (This corresponds to the rules
                   3687: for <a href="#boolean0" title="boolean attribute">boolean content
                   3688: attributes</a> .)</p>
                   3689: <p>If a reflecting DOM attribute is a signed integer type (
                   3690: <code>long</code> ) <del class="diff-old">then</del> <ins class=
                   3691: "diff-chg">then, on getting,</ins> the content attribute must be
                   3692: parsed according to <a href="#rules0" title=
                   3693: "rules for parsing integers">the rules for parsing signed integers
                   3694: <del class="diff-old">first. If</del></a> , <ins class=
                   3695: "diff-chg">and if</ins> that <ins class="diff-new">is successful,
                   3696: the resulting value must be returned. If, on the other hand,
                   3697: it</ins> fails, or if the attribute is absent, <ins class=
                   3698: "diff-new">then</ins> the default value must be returned instead,
                   3699: or 0 if there is no default value. On setting, the given value must
                   3700: be converted to <del class="diff-old">a</del> <ins class=
                   3701: "diff-chg">the shortest possible</ins> string representing the
                   3702: number as a <a href="#valid0">valid integer</a> in base ten and
                   3703: then that string must be used as the new content attribute
                   3704: value.</p>
                   3705: <p>If a reflecting DOM attribute is an <em>unsigned</em> integer
                   3706: type ( <code>unsigned long</code> ) <del class=
                   3707: "diff-old">then</del> <ins class="diff-chg">then, on getting,</ins>
                   3708: the content attribute must be parsed according to <a href="#rules"
                   3709: title="rules for parsing non-negative integers">the rules for
                   3710: parsing unsigned integers <del class="diff-old">first. If</del></a>
                   3711: , <ins class="diff-chg">and if</ins> that <ins class="diff-new">is
                   3712: successful, the resulting value must be returned. If, on the other
                   3713: hand, it</ins> fails, or if the attribute is absent, the default
                   3714: value must be returned instead, or 0 if there is no default value.
                   3715: On setting, the given value must be converted to <del class=
                   3716: "diff-old">a</del> <ins class="diff-chg">the shortest
                   3717: possible</ins> string representing the number as a <a href=
                   3718: "#valid">valid non-negative integer</a> in base ten and then that
                   3719: string must be used as the new content attribute value.</p>
                   3720: <p>If a reflecting DOM attribute is an unsigned integer type (
                   3721: <code>unsigned long</code> ) that is <dfn id="limited1">limited to
                   3722: only positive non-zero numbers</dfn> , then the behavior is similar
                   3723: to the previous case, but zero is not allowed. On getting, the
                   3724: content attribute must first be parsed according to <a href=
                   3725: "#rules" title="rules for parsing non-negative integers">the rules
                   3726: for parsing unsigned integers</a> , and if that <ins class=
                   3727: "diff-new">is successful, the resulting value must be returned. If,
                   3728: on the other hand, it</ins> fails, or if the attribute is absent,
                   3729: the default value must be returned instead, or 1 if there is no
                   3730: default value. On setting, if the value is zero, the user agent
                   3731: must fire an <code>INDEX_SIZE_ERR</code> exception. Otherwise, the
                   3732: given value must be converted to <del class="diff-old">a</del>
                   3733: <ins class="diff-chg">the shortest possible</ins> string
                   3734: representing the number as a <a href="#valid">valid non-negative
                   3735: integer</a> in base ten and then that string must be used as the
                   3736: new content attribute value.</p>
                   3737: <p>If a reflecting DOM attribute is a floating point number type (
                   3738: <code>float</code> ) and the content attribute is defined to
                   3739: contain a time offset, <del class="diff-old">then</del> <ins class=
                   3740: "diff-chg">then, on getting,</ins> the content attribute must be
                   3741: parsed according to <a href="#rules4" title=
                   3742: "rules for parsing time offsets">the rules for parsing time
                   3743: <del class="diff-old">ofsets first.</del> <ins class=
                   3744: "diff-chg">offsets</ins></a> ,<ins class="diff-chg">and if that is
                   3745: successful, the resulting value, in seconds, must be
                   3746: returned.</ins> If that fails, or if the attribute is absent, the
                   3747: default value must be <del class="diff-old">returned instead,</del>
                   3748: <ins class="diff-chg">returned,</ins> or the not-a-number value
                   3749: (NaN) if there is no default value. On setting, the given
                   3750: <del class="diff-old">value</del> <ins class="diff-chg">value,
                   3751: interpreted as a time offset in seconds,</ins> must be converted to
                   3752: a string using the <a href="#time-offset">time offset <del class=
                   3753: "diff-old">serialisation</del> <ins class="diff-chg">serialization
                   3754: rules</ins></a> ,<ins class="diff-chg">and that string must be used
                   3755: as the new content attribute value.</ins></p>
                   3756: <p><ins class="diff-chg">If a reflecting DOM attribute is a
                   3757: floating point number type (</ins> <code><ins class=
                   3758: "diff-chg">float</ins></code> <ins class="diff-chg">) and it
                   3759: doesn't fall into one of the earlier categories, then, on getting,
                   3760: the content attribute must be parsed according to</ins> <a href=
                   3761: "#rules1" title=
                   3762: "rules for parsing floating point number values"><ins class=
                   3763: "diff-chg">the</ins> rules <ins class="diff-new">for parsing
                   3764: floating point number values</ins></a> , and <ins class=
                   3765: "diff-new">if that is successful, the resulting value must be
                   3766: returned. If, on the other hand, it fails, or if the attribute is
                   3767: absent, the default value must be returned instead, or 0.0 if there
                   3768: is no default value. On setting, the given value must be converted
                   3769: to the shortest possible string representing the number as a</ins>
                   3770: <a href="#valid1"><ins class="diff-new">valid floating point
                   3771: number</ins></a> <ins class="diff-new">in base ten and then</ins>
                   3772: that string must be used as the new content attribute value.</p>
                   3773: <p>If a reflecting DOM attribute is of the type <code><a href=
                   3774: "#domtokenlist0">DOMTokenList</a></code> , then on getting it must
                   3775: return a <code><a href="#domtokenlist0">DOMTokenList</a></code>
                   3776: object whose underlying string is the element's corresponding
                   3777: content attribute. When the <code><a href=
                   3778: "#domtokenlist0">DOMTokenList</a></code> object mutates its
                   3779: underlying string, the <ins class="diff-new">content</ins>
                   3780: attribute must itself be immediately mutated. When the attribute is
                   3781: absent, then the string represented by the <code><a href=
                   3782: "#domtokenlist0">DOMTokenList</a></code> object is the empty
                   3783: string; when the object mutates this empty string, the user agent
                   3784: must first add the corresponding content attribute, and then mutate
                   3785: that attribute instead. <code><a href=
                   3786: "#domtokenlist0">DOMTokenList</a></code> attributes are always
                   3787: read-only. The same <code><a href=
                   3788: "#domtokenlist0">DOMTokenList</a></code> object must be returned
                   3789: every time for each attribute.</p>
                   3790: <p>If a reflecting DOM attribute has the type <code><a href=
                   3791: "#htmlelement">HTMLElement</a></code> , or an interface that
                   3792: descends from <code><a href="#htmlelement">HTMLElement</a></code> ,
                   3793: then, on getting, it must run the following algorithm (stopping at
                   3794: the first point where a value is returned):</p>
                   3795: <ol>
                   3796: <li>If the corresponding content attribute is absent, then the DOM
                   3797: attribute must return null.</li>
                   3798: <li>Let <var title="">candidate</var> be the element that the
                   3799: <code title="">document.getElementById()</code> method would find
                   3800: if it was passed as its argument the current value of the
                   3801: corresponding content attribute.</li>
                   3802: <li>If <var title="">candidate</var> is null, or if it is not
                   3803: type-compatible with the DOM attribute, then the DOM attribute must
                   3804: return null.</li>
                   3805: <li>Otherwise, it must return <var title="">candidate</var> .</li>
                   3806: </ol>
                   3807: <p>On setting, if the given element has an <code title=
                   3808: "attr-id"><a href="#id">id</a></code> attribute, then the content
                   3809: attribute must be set to the value of that <code title=
                   3810: "attr-id"><a href="#id">id</a></code> attribute. Otherwise, the DOM
                   3811: attribute must be set to the empty string.</p>
                   3812: <h3 id="common0"><span class="secno"><del class=
                   3813: "diff-old">2.3.</del> <ins class="diff-chg">2.3</ins></span> Common
                   3814: DOM interfaces</h3>
                   3815: <h4 id="collections"><span class="secno"><del class=
                   3816: "diff-old">2.3.1.</del> <ins class="diff-chg">2.3.1</ins></span>
                   3817: Collections</h4>
                   3818: <p>The <code><a href="#htmlcollection0">HTMLCollection</a></code> ,
                   3819: <code><a href=
                   3820: "#htmlformcontrolscollection0">HTMLFormControlsCollection</a></code>
                   3821: , and <code><a href=
                   3822: "#htmloptionscollection0">HTMLOptionsCollection</a></code>
                   3823: interfaces represent various lists of DOM nodes. Collectively,
                   3824: objects implementing these interfaces are called <dfn id=
                   3825: "collections0">collections</dfn> .</p>
                   3826: <p>When a <a href="#collections0" title=
                   3827: "collections">collection</a> is created, a filter and a root are
                   3828: associated with the collection.</p>
                   3829: <p class="example">For example, when the <code><a href=
                   3830: "#htmlcollection0">HTMLCollection</a></code> object for the
                   3831: <code title="dom-document-images"><a href=
                   3832: "#images0">document.images</a></code> attribute is created, it is
                   3833: associated with a filter that selects only <code><a href=
                   3834: "#img">img</a></code> elements, and rooted at the root of the
                   3835: document.</p>
                   3836: <p>The <a href="#collections0" title="collections">collection</a>
                   3837: then <dfn id="represents" title=
                   3838: "represented by the collection">represents</dfn> a <a href=
                   3839: "#live">live</a> view of the subtree rooted at the collection's
                   3840: root, containing only nodes that match the given filter. The view
                   3841: is linear. In the absence of specific requirements to the contrary,
                   3842: the nodes within the collection must be sorted in <a href=
                   3843: "#tree-order">tree order</a> .</p>
                   3844: <p class="note">The <code title="dom-table-rows"><a href=
                   3845: "#rows">rows</a></code> list is not in tree order.</p>
                   3846: <p>An attribute that returns a collection must return the same
                   3847: object every time it is retrieved.</p>
                   3848: <h5 id="htmlcollection"><span class="secno">2.3.1.1.</span>
                   3849: HTMLCollection</h5>
                   3850: <p>The <code><a href="#htmlcollection0">HTMLCollection</a></code>
                   3851: interface represents a generic <a href="#collections0" title=
                   3852: "collections">collection</a> of elements.</p>
                   3853: <pre class="idl">
                   3854: interface <dfn id="htmlcollection0">HTMLCollection</dfn> {
                   3855:   readonly attribute unsigned long <a href="#length" title=
                   3856: "dom-HTMLCollection-length">length</a>;
                   3857: <del class="diff-old">  Element (in unsigned long index);
                   3858:   Element (in DOMString name);
                   3859: </del>
                   3860: <ins class="diff-chg">  [IndexGetter] Element <a href="#itemindex"
                   3861: title="dom-HTMLCollection-item">item</a>(in unsigned long index);
                   3862:   [NameGetter] Element <a href="#nameditem" title=
                   3863: "dom-HTMLCollection-namedItem">namedItem</a>(in DOMString name);
                   3864: </ins>
                   3865: };
                   3866: </pre>
                   3867: <p>The <dfn id="length" title=
                   3868: "dom-HTMLCollection-length"><code>length</code></dfn> attribute
                   3869: must return the number of nodes <a href="#represents">represented
                   3870: by the collection <del class="diff-old">.</del></a> .</p>
                   3871: <p>The <dfn id="itemindex" title=
                   3872: "dom-HTMLCollection-item"><code>item( <var title="">index</var>
                   3873: )</code></dfn> method must return the <var title="">index</var> th
                   3874: node in the collection. If there is no <var title="">index</var> th
                   3875: node in the collection, then the method must return null.</p>
                   3876: <p>The <dfn id="nameditem" title=
                   3877: "dom-HTMLCollection-namedItem"><code>namedItem( <var title=
                   3878: "">key</var> )</code></dfn> method must return the first node in
                   3879: the collection that matches the following requirements:</p>
                   3880: <ul>
                   3881: <li>It is an <code><a href="#a">a</a></code> , <code><a href=
                   3882: "#applet">applet</a></code> , <code><a href="#area">area</a></code>
                   3883: , <code>form</code> , <code><a href="#img">img</a></code> , or
                   3884: <code><a href="#object">object</a></code> element with a
                   3885: <code title="attr-name">name</code> attribute equal to <var title=
                   3886: "">key</var> , or,</li>
                   3887: <li>It is an <a href="#html-elements" title="HTML elements">HTML
                   3888: element</a> of any kind with an <code title="attr-id"><a href=
                   3889: "#id">id</a></code> attribute equal to <var title="">key</var> .
                   3890: (Non-HTML elements, even if they have IDs, are not searched for the
                   3891: purposes of <code title="dom-HTMLCollection-namedItem"><a href=
                   3892: "#nameditem">namedItem()</a></code> .)</li>
                   3893: </ul>
                   3894: <p>If no such elements are found, then the method must return null.
                   3895: <del class="diff-old">In ECMAScript implementations, objects that
                   3896: implement the HTMLCollection interface must also have a [[Get]]
                   3897: method that, when invoked with a property name that is a number,
                   3898: acts like the item() method would when invoked with that argument,
                   3899: and when invoked with a property name that is a string, acts like
                   3900: the namedItem() method would when invoked with that
                   3901: argument.</del></p>
                   3902: <h5 id="htmlformcontrolscollection"><span class=
                   3903: "secno">2.3.1.2.</span> HTMLFormControlsCollection</h5>
                   3904: <p>The <code><a href=
                   3905: "#htmlformcontrolscollection0">HTMLFormControlsCollection</a></code>
                   3906: interface represents a <a href="#collections0" title=
                   3907: "collections">collection</a> of form controls.</p>
                   3908: <pre class="idl">
                   3909: interface <dfn id=
                   3910: "htmlformcontrolscollection0">HTMLFormControlsCollection</dfn> {
                   3911:   readonly attribute unsigned long <a href="#length0" title=
                   3912: "dom-HTMLFormControlsCollection-length">length</a>;
                   3913: <del class="diff-old">  (in unsigned long index);
                   3914:   Object (in DOMString name);
                   3915: </del>
                   3916: <ins class="diff-chg">  [IndexGetter] <a href=
                   3917: "#htmlelement">HTMLElement</a> <a href="#itemindex0" title=
                   3918: "dom-HTMLFormControlsCollection-item">item</a>(in unsigned long index);
                   3919:   [NameGetter] Object <a href="#nameditem0" title=
                   3920: "dom-HTMLFormControlsCollection-namedItem">namedItem</a>(in DOMString name);
                   3921: </ins>
                   3922: };
                   3923: </pre>
                   3924: <p>The <dfn id="length0" title=
                   3925: "dom-HTMLFormControlsCollection-length"><code>length</code></dfn>
                   3926: attribute must return the number of nodes <a href=
                   3927: "#represents">represented by the collection <del class=
                   3928: "diff-old">.</del></a> .</p>
                   3929: <p>The <dfn id="itemindex0" title=
                   3930: "dom-HTMLFormControlsCollection-item"><code>item( <var title=
                   3931: "">index</var> )</code></dfn> method must return the <var title=
                   3932: "">index</var> th node in the collection. If there is no
                   3933: <var title="">index</var> th node in the collection, then the
                   3934: method must return null.</p>
                   3935: <p>The <dfn id="nameditem0" title=
                   3936: "dom-HTMLFormControlsCollection-namedItem"><code>namedItem(
                   3937: <var title="">key</var> )</code></dfn> method must act according to
                   3938: the following algorithm:</p>
                   3939: <ol>
                   3940: <li>If, at the time the method is called, there is exactly one node
                   3941: in the collection that has either an <code title="attr-id"><a href=
                   3942: "#id">id</a></code> attribute or a <code title=
                   3943: "attr-name">name</code> attribute equal to <var title="">key</var>
                   3944: , then return that node and stop the algorithm.</li>
                   3945: <li>Otherwise, if there are no nodes in the collection that have
                   3946: either an <code title="attr-id"><a href="#id">id</a></code>
                   3947: attribute or a <code title="attr-name">name</code> attribute equal
                   3948: to <var title="">key</var> , then return null and stop the
                   3949: algorithm.</li>
                   3950: <li>Otherwise, create a <code>NodeList</code> object representing a
                   3951: live view of the <code><a href=
                   3952: "#htmlformcontrolscollection0">HTMLFormControlsCollection</a></code>
                   3953: object, further filtered so that the only nodes in the
                   3954: <code>NodeList</code> object are those that have either an
                   3955: <code title="attr-id"><a href="#id">id</a></code> attribute or a
                   3956: <code title="attr-name">name</code> attribute equal to <var title=
                   3957: "">key</var> . The nodes in the <code>NodeList</code> object must
                   3958: be sorted in <a href="#tree-order">tree order</a> .</li>
                   3959: <li>Return that <code>NodeList</code> object.</li>
                   3960: </ol>
                   3961: <del class="diff-old">In the ECMAScript DOM binding, objects
                   3962: implementing the HTMLFormControlsCollection interface must support
                   3963: being dereferenced using the square bracket notation, such that
                   3964: dereferencing with an integer index is equivalent to invoking the
                   3965: item() method with that index, and such that dereferencing with a
                   3966: string index is equivalent to invoking the namedItem() method with
                   3967: that index.</del>
                   3968: <h5 id="htmloptionscollection"><span class="secno">2.3.1.3.</span>
                   3969: HTMLOptionsCollection</h5>
                   3970: <p>The <code><a href=
                   3971: "#htmloptionscollection0">HTMLOptionsCollection</a></code>
                   3972: interface represents a list of <code>option</code> elements.</p>
                   3973: <pre class="idl">
                   3974: interface <dfn id=
                   3975: "htmloptionscollection0">HTMLOptionsCollection</dfn> {
                   3976:            attribute unsigned long <a href="#length1" title=
                   3977: "dom-HTMLOptionsCollection-length">length</a>;
                   3978: <del class="diff-old">  HTMLOptionElement (in unsigned long index);
                   3979:   Object (in DOMString name);
                   3980: </del>
                   3981: <ins class="diff-chg">  [IndexGetter] HTMLOptionElement <a href=
                   3982: "#itemindex1" title=
                   3983: "dom-HTMLOptionsCollection-item">item</a>(in unsigned long index);
                   3984:   [NameGetter] Object <a href="#nameditem1" title=
                   3985: "dom-HTMLOptionsCollection-namedItem">namedItem</a>(in DOMString name);
                   3986: </ins>
                   3987: };
                   3988: </pre>
                   3989: <p>On getting, the <dfn id="length1" title=
                   3990: "dom-HTMLOptionsCollection-length"><code>length</code></dfn>
                   3991: attribute must return the number of nodes <a href=
                   3992: "#represents">represented by the collection <del class=
                   3993: "diff-old">.</del></a> .</p>
                   3994: <p>On setting, the <del class="diff-old">behaviour</del>
                   3995: <ins class="diff-chg">behavior</ins> depends on whether the new
                   3996: value is equal to, greater than, or less than the number of nodes
                   3997: <a href="#represents">represented by the collection</a> at that
                   3998: time. If the number is the same, then setting the attribute must do
                   3999: nothing. If the new value is greater, then <var title="">n</var>
                   4000: new <code>option</code> elements with no attributes and no child
                   4001: nodes must be appended to the <code>select</code> element on which
                   4002: the <code><a href=
                   4003: "#htmloptionscollection0">HTMLOptionsCollection</a></code> is
                   4004: rooted, where <var title="">n</var> is the difference between the
                   4005: two numbers (new value minus old value). If the new value is lower,
                   4006: then the last <var title="">n</var> nodes in the collection must be
                   4007: removed from their parent nodes, where <var title="">n</var> is the
                   4008: difference between the two numbers (old value minus new value).</p>
                   4009: <p class="note">Setting <code title=
                   4010: "dom-HTMLOptionsCollection-length"><a href=
                   4011: "#length1">length</a></code> never removes or adds any
                   4012: <code>optgroup</code> elements, and never adds new children to
                   4013: existing <code>optgroup</code> elements (though it can remove
                   4014: children from them).</p>
                   4015: <p>The <dfn id="itemindex1" title=
                   4016: "dom-HTMLOptionsCollection-item"><code>item( <var title=
                   4017: "">index</var> )</code></dfn> method must return the <var title=
                   4018: "">index</var> th node in the collection. If there is no
                   4019: <var title="">index</var> th node in the collection, then the
                   4020: method must return null.</p>
                   4021: <p>The <dfn id="nameditem1" title=
                   4022: "dom-HTMLOptionsCollection-namedItem"><code>namedItem( <var title=
                   4023: "">key</var> )</code></dfn> method must act according to the
                   4024: following algorithm:</p>
                   4025: <ol>
                   4026: <li>If, at the time the method is called, there is exactly one node
                   4027: in the collection that has either an <code title="attr-id"><a href=
                   4028: "#id">id</a></code> attribute or a <code title=
                   4029: "attr-name">name</code> attribute equal to <var title="">key</var>
                   4030: , then return that node and stop the algorithm.</li>
                   4031: <li>Otherwise, if there are no nodes in the collection that have
                   4032: either an <code title="attr-id"><a href="#id">id</a></code>
                   4033: attribute or a <code title="attr-name">name</code> attribute equal
                   4034: to <var title="">key</var> , then return null and stop the
                   4035: algorithm.</li>
                   4036: <li>Otherwise, create a <code>NodeList</code> object representing a
                   4037: live view of the <code><a href=
                   4038: "#htmloptionscollection0">HTMLOptionsCollection</a></code> object,
                   4039: further filtered so that the only nodes in the
                   4040: <code>NodeList</code> object are those that have either an
                   4041: <code title="attr-id"><a href="#id">id</a></code> attribute or a
                   4042: <code title="attr-option-name">name</code> attribute equal to
                   4043: <var title="">key</var> . The nodes in the <code>NodeList</code>
                   4044: object must be sorted in <a href="#tree-order">tree order</a>
                   4045: .</li>
                   4046: <li>Return that <code>NodeList</code> object.</li>
                   4047: </ol>
                   4048: <del class="diff-old">In the ECMAScript DOM binding, objects
                   4049: implementing the HTMLOptionsCollection interface must support being
                   4050: dereferenced using the square bracket notation, such that
                   4051: dereferencing with an integer index is equivalent to invoking the
                   4052: item() method with that index, and such that dereferencing with a
                   4053: string index is equivalent to invoking the namedItem() method with
                   4054: that index.</del>
                   4055: <p class="big-issue">We may want to add <code>add()</code> and
                   4056: <code>remove()</code> methods here too because IE implements
                   4057: HTMLSelectElement and HTMLOptionsCollection on the same object, and
                   4058: so people use them almost interchangeably in the wild.</p>
                   4059: <h4 id="domtokenlist"><span class="secno"><del class=
                   4060: "diff-old">2.3.2.</del> <ins class="diff-chg">2.3.2</ins></span>
                   4061: DOMTokenList</h4>
                   4062: <p>The <code><a href="#domtokenlist0">DOMTokenList</a></code>
                   4063: interface represents an interface to an underlying string that
                   4064: consists of an <a href="#unordered">unordered set of unique
                   4065: space-separated tokens</a> .</p>
                   4066: <p>Which string underlies a particular <code><a href=
                   4067: "#domtokenlist0">DOMTokenList</a></code> object is defined when the
                   4068: object is created. It might be a content attribute (e.g. the string
                   4069: that underlies the <code title="dom-classList"><a href=
                   4070: "#classlist">classList</a></code> object is the <code title=
                   4071: "attr-class"><a href="#class">class</a></code> attribute), or it
                   4072: might be an anonymous string (e.g. when a <code><a href=
                   4073: "#domtokenlist0">DOMTokenList</a></code> object is passed to an
                   4074: author-implemented callback in the <code><a href=
                   4075: "#datagrid0">datagrid</a></code> APIs). <del class=
                   4076: "diff-old">{</del></p>
                   4077: <pre>
                   4078: <ins class="diff-chg">   class=idl&gt;[<a href="#stringify" title=
                   4079: "dom-tokenlist-toString">Stringifies</a>] interface <dfn id=
                   4080: "domtokenlist0">DOMTokenList</dfn> {
                   4081: </ins>
                   4082:   readonly attribute unsigned long <a href="#length2" title=
                   4083: "dom-tokenlist-length">length</a>;
                   4084: <del class="diff-old">  DOMString (in unsigned long index);
                   4085: </del>
                   4086: <ins class="diff-chg">  [IndexGetter] DOMString <a href=
                   4087: "#itemindex2" title=
                   4088: "dom-tokenlist-item">item</a>(in unsigned long index);
                   4089: </ins>
                   4090:   boolean <a href="#hastoken" title=
                   4091: "dom-tokenlist-has">has</a>(in DOMString token);
                   4092:   void <a href="#addtoken" title=
                   4093: "dom-tokenlist-add">add</a>(in DOMString token);
                   4094:   void <a href="#remove" title=
                   4095: "dom-tokenlist-remove">remove</a>(in DOMString token);
                   4096:   boolean <a href="#toggle" title=
                   4097: "dom-tokenlist-toggle">toggle</a>(in DOMString token);
                   4098: };
                   4099: </pre>
                   4100: <p>The <dfn id="length2" title=
                   4101: "dom-tokenlist-length"><code>length</code></dfn> attribute must
                   4102: return the number of <em>unique</em> tokens that result from
                   4103: <a href="#split" title="split a string on spaces">splitting the
                   4104: underlying string on spaces</a> .</p>
                   4105: <p>The <dfn id="itemindex2" title="dom-tokenlist-item"><code>item(
                   4106: <var title="">index</var> )</code></dfn> method must <a href=
                   4107: "#split" title="split a string on spaces">split the underlying
                   4108: string on spaces</a> , sort the resulting list of tokens by Unicode
                   4109: codepoint , remove exact duplicates, and then return the
                   4110: <var title="">index</var> th item in this list. If <var title=
                   4111: "">index</var> is equal to or greater than the number of tokens,
                   4112: then the method must return null.</p>
                   4113: <p><del class="diff-old">In ECMAScript implementations, objects
                   4114: that implement the DOMTokenList interface must also have a [[Get]]
                   4115: method that, when invoked with a property name that is a number,
                   4116: acts like the item() method would when invoked with that
                   4117: argument.</del> The <dfn id="hastoken" title=
                   4118: "dom-tokenlist-has"><code>has( <var title="">token</var>
                   4119: )</code></dfn> method must run the following algorithm:</p>
                   4120: <ol>
                   4121: <li>If the <var title="">token</var> argument contains any spaces,
                   4122: then raise an <code>INVALID_CHARACTER_ERR</code> exception and stop
                   4123: the algorithm.</li>
                   4124: <li>Otherwise, <a href="#split" title=
                   4125: "split a string on spaces">split the underlying string on
                   4126: spaces</a> to get the list of tokens in the object's underlying
                   4127: string.</li>
                   4128: <li>If the token indicated by <var title="">token</var> is one of
                   4129: the tokens in the object's underlying string then return true and
                   4130: stop this algorithm.</li>
                   4131: <li>Otherwise, return false.</li>
                   4132: </ol>
                   4133: <p>The <dfn id="addtoken" title="dom-tokenlist-add"><code>add(
                   4134: <var title="">token</var> )</code></dfn> method must run the
                   4135: following algorithm:</p>
                   4136: <ol>
                   4137: <li>If the <var title="">token</var> argument contains any spaces,
                   4138: then raise an <code>INVALID_CHARACTER_ERR</code> exception and stop
                   4139: the algorithm.</li>
                   4140: <li>Otherwise, <a href="#split" title=
                   4141: "split a string on spaces">split the underlying string on
                   4142: spaces</a> to get the list of tokens in the object's underlying
                   4143: string.</li>
                   4144: <li>If the given <var title="">token</var> is already one of the
                   4145: tokens in the <code><a href=
                   4146: "#domtokenlist0">DOMTokenList</a></code> object's underlying string
                   4147: then stop the algorithm.</li>
                   4148: <li>Otherwise, if the <del class="diff-old">last character of
                   4149: the</del> <code><a href="#domtokenlist0">DOMTokenList</a></code>
                   4150: object's underlying string is not <ins class="diff-new">the empty
                   4151: string and the last character of that string is not</ins> a
                   4152: <a href="#space">space character</a> , then append a U+0020 SPACE
                   4153: character to the end of that string.</li>
                   4154: <li>Append the value of <var title="">token</var> to the end of the
                   4155: <code><a href="#domtokenlist0">DOMTokenList</a></code> object's
                   4156: underlying string.</li>
                   4157: </ol>
                   4158: <p>The <dfn id="remove" title="dom-tokenlist-remove"><code>remove(
                   4159: <var title="">token</var> )</code></dfn> method must run the
                   4160: following algorithm:</p>
                   4161: <ol>
                   4162: <li>If the <var title="">token</var> argument contains any <a href=
                   4163: "#space" title="space character">spaces</a> , then raise an
                   4164: <code>INVALID_CHARACTER_ERR</code> exception and stop the
                   4165: algorithm.</li>
                   4166: <li>Otherwise, <a href="#remove0" title=
                   4167: "remove a token from a string">remove the given <var title=
                   4168: "">token</var> from the underlying string</a> .</li>
                   4169: </ol>
                   4170: <p>The <dfn id="toggle" title="dom-tokenlist-toggle"><code>toggle(
                   4171: <var title="">token</var> )</code></dfn> method must run the
                   4172: following algorithm:</p>
                   4173: <ol>
                   4174: <li>If the <var title="">token</var> argument contains any spaces,
                   4175: then raise an <code>INVALID_CHARACTER_ERR</code> exception and stop
                   4176: the algorithm.</li>
                   4177: <li>Otherwise, <a href="#split" title=
                   4178: "split a string on spaces">split the underlying string on
                   4179: spaces</a> to get the list of tokens in the object's underlying
                   4180: string.</li>
                   4181: <li>If the given <var title="">token</var> is already one of the
                   4182: tokens in the <code><a href=
                   4183: "#domtokenlist0">DOMTokenList</a></code> object's underlying string
                   4184: then <a href="#remove0" title="remove a token from a string">remove
                   4185: the given <var title="">token</var> from the underlying string</a>
                   4186: , and stop the algorithm, returning false.</li>
                   4187: <li>Otherwise, if the <del class="diff-old">last character of
                   4188: the</del> <code><a href="#domtokenlist0">DOMTokenList</a></code>
                   4189: object's underlying string is not <ins class="diff-new">the empty
                   4190: string and the last character of that string is not</ins> a
                   4191: <a href="#space">space character</a> , then append a U+0020 SPACE
                   4192: character to the end of that string.</li>
                   4193: <li>Append the value of <var title="">token</var> to the end of the
                   4194: <code><a href="#domtokenlist0">DOMTokenList</a></code> object's
                   4195: underlying string.</li>
                   4196: <li>Return true.</li>
                   4197: </ol>
                   4198: <p><del class="diff-old">In the ECMAScript DOM binding,
                   4199: objects</del> <ins class="diff-chg">Objects</ins> implementing the
                   4200: <code><a href="#domtokenlist0">DOMTokenList</a></code> interface
                   4201: must <dfn id="stringify" title=
                   4202: "dom-tokenlist-toString">stringify</dfn> to the object's underlying
                   4203: string representation.</p>
                   4204: <h4 id="domstringmap"><span class="secno"><ins class=
                   4205: "diff-new">2.3.3</ins></span> <ins class=
                   4206: "diff-new">DOMStringMap</ins></h4>
                   4207: <p><ins class="diff-new">The</ins> <code><a href=
                   4208: "#domstringmap0"><ins class=
                   4209: "diff-new">DOMStringMap</ins></a></code> <ins class=
                   4210: "diff-new">interface represents a set of name-value pairs. When
                   4211: a</ins> <code><a href="#domstringmap0"><ins class=
                   4212: "diff-new">DOMStringMap</ins></a></code> <ins class=
                   4213: "diff-new">object is instanced, it is associated with three
                   4214: algorithms, one for getting values from names, one for setting
                   4215: names to certain values, and one for deleting names.</ins></p>
                   4216: <p class="big-issue"><ins class="diff-new">The names of the methods
                   4217: on this interface are temporary and will be fixed when the Web IDL
                   4218: / "Language Bindings for DOM Specifications" spec is ready to
                   4219: handle this case.</ins></p>
                   4220: <pre class="idl">
                   4221: interface <dfn id="domstringmap0">DOMStringMap</dfn> {<ins class=
                   4222: "diff-new">
                   4223:   [NameGetter] DOMString <a href="#xxx1name" title=
                   4224: "dom-stringmap-XXX1">XXX1</a>(in DOMString name); 
                   4225:   [NameSetter] void <a href="#xxx2name" title=
                   4226: "dom-stringmap-XXX2">XXX2</a>(in DOMString name, in DOMString value); 
                   4227:   [XXX] boolean <a href="#xxx3name" title=
                   4228: "dom-stringmap-XXX3">XXX3</a>(in DOMString name); 
                   4229: };
                   4230: </ins>
                   4231: </pre>
                   4232: <p><ins class="diff-new">The</ins> <dfn id="xxx1name" title=
                   4233: "dom-stringmap-XXX1"><code><ins class="diff-new">XXX1(</ins>
                   4234: <var title=""><ins class="diff-new">name</ins></var> <ins class=
                   4235: "diff-new">)</ins></code></dfn> <ins class="diff-new">method must
                   4236: call the algorithm for getting values from names, passing</ins>
                   4237: <var title=""><ins class="diff-new">name</ins></var> <ins class=
                   4238: "diff-new">as the name, and must return the corresponding value, or
                   4239: null if</ins> <var title=""><ins class="diff-new">name</ins></var>
                   4240: <ins class="diff-new">has no corresponding value.</ins></p>
                   4241: <p><ins class="diff-new">The</ins> <dfn id="xxx2name" title=
                   4242: "dom-stringmap-XXX2"><code><ins class="diff-new">XXX2(</ins>
                   4243: <var title=""><ins class="diff-new">name</ins></var> ,<var title=
                   4244: ""><ins class="diff-new">value</ins></var> <ins class=
                   4245: "diff-new">)</ins></code></dfn> <ins class="diff-new">method must
                   4246: call the algorithm for setting names to certain values,
                   4247: passing</ins> <var title=""><ins class="diff-new">name</ins></var>
                   4248: <ins class="diff-new">as the name and</ins> <var title=
                   4249: ""><ins class="diff-new">value</ins></var> <ins class="diff-new">as
                   4250: the value.</ins></p>
                   4251: <p><ins class="diff-new">The</ins> <dfn id="xxx3name" title=
                   4252: "dom-stringmap-XXX3"><code><ins class="diff-new">XXX3(</ins>
                   4253: <var title=""><ins class="diff-new">name</ins></var> <ins class=
                   4254: "diff-new">)</ins></code></dfn> <ins class="diff-new">method must
                   4255: call the algorithm for deleting names, passing</ins> <var title=
                   4256: ""><ins class="diff-new">name</ins></var> <ins class="diff-new">as
                   4257: the name, and must return true.</ins></p>
                   4258: <h4 id="dom-feature"><span class="secno"><del class=
                   4259: "diff-old">2.3.3.</del> <ins class="diff-chg">2.3.4</ins></span>
                   4260: DOM feature strings</h4>
                   4261: <p>DOM3 Core defines mechanisms for checking for interface support,
                   4262: and for obtaining implementations of interfaces, using <a href=
                   4263: "http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMFeatures">feature
                   4264: strings</a> . <a href="#references">[DOM3CORE]</a></p>
                   4265: <p>A DOM application can use the <dfn id="hasfeature" title=
                   4266: "hasFeature"><code>hasFeature( <var title="">feature</var> ,
                   4267: <var title="">version</var> )</code></dfn> method of the
                   4268: <code>DOMImplementation</code> interface with parameter values "
                   4269: <code title="">HTML</code> " and " <code>5.0</code> "
                   4270: (respectively) to determine whether or not this module is supported
                   4271: by the implementation. In addition to the feature string "
                   4272: <code title="">HTML</code> ", the feature string " <code title=
                   4273: "">XHTML</code> " (with version string " <code>5.0</code> ") can be
                   4274: used to check if the implementation supports XHTML. User agents
                   4275: should respond with a true value when the <code><a href=
                   4276: "#hasfeature">hasFeature</a></code> method is queried with these
                   4277: values. Authors are cautioned, however, that UAs returning true
                   4278: might not be perfectly compliant, and that UAs returning false
                   4279: might well have support for features in this specification; in
                   4280: general, therefore, use of this method is discouraged.</p>
                   4281: <p>The values " <code title="">HTML</code> " and " <code title=
                   4282: "">XHTML</code> " (both with version " <code>5.0</code> ") should
                   4283: also be supported in the context of the <code>getFeature()</code>
                   4284: and <code>isSupported()</code> methods, as defined by DOM3
                   4285: Core.</p>
                   4286: <p class="note">The interfaces defined in this specification are
                   4287: not always supersets of the interfaces defined in DOM2 HTML; some
                   4288: features that were formerly deprecated, poorly supported, rarely
                   4289: used or considered unnecessary have been removed. Therefore it is
                   4290: not <del class="diff-old">guarenteed</del> <ins class=
                   4291: "diff-chg">guaranteed</ins> that an implementation that supports "
                   4292: <code title="">HTML</code> " " <code>5.0</code> " also supports "
                   4293: <code title="">HTML</code> " " <code>2.0</code> ".</p>
                   4294: <h3 id="dom-tree"><span class="secno"><del class=
                   4295: "diff-old">2.4.</del> <ins class="diff-chg">2.4</ins></span>
                   4296: <dfn id="dom-tree0">DOM tree accessors</dfn></h3>
                   4297: <p><dfn id="the-html0">The <code>html</code> element</dfn> of a
                   4298: document is the document's root element, if there is one and it's
                   4299: an <code><a href="#html">html</a></code> element, or null
                   4300: otherwise.</p>
                   4301: <p><dfn id="the-head0">The <code>head</code> element</dfn> of a
                   4302: document is the first <code><a href="#head">head</a></code> element
                   4303: that is a child of <a href="#the-html0">the <code>html</code>
                   4304: element</a> , if there is one, or null otherwise.</p>
                   4305: <p><dfn id="the-title1">The <code>title</code> element</dfn> of a
                   4306: document is the first <code><a href="#title1">title</a></code>
                   4307: element <del class="diff-old">that is a child of</del> <ins class=
                   4308: "diff-chg">in</ins> the <del class="diff-old">head element ,</del>
                   4309: <ins class="diff-chg">document (in tree order),</ins> if there is
                   4310: one, or null otherwise.</p>
                   4311: <p>The <dfn id="document.title" title=
                   4312: "dom-document-title"><code>title</code></dfn> attribute must, on
                   4313: getting, run the following algorithm:</p>
                   4314: <ol>
                   4315: <li>
                   4316: <p>If the <a href="#root-element">root element</a> is an
                   4317: <code>svg</code> element in the " <code title=
                   4318: "">http://www.w3.org/2000/svg</code> " namespace, and the user
                   4319: agent supports SVG, then the getter must return the value that
                   4320: would have been returned by the DOM attribute of the same name on
                   4321: the <code>SVGDocument</code> interface.</p>
                   4322: </li>
                   4323: <li>
                   4324: <p>Otherwise, it must return a concatenation of the data of all the
                   4325: child <a href="#text-node" title="text node">text nodes</a> of
                   4326: <a href="#the-title1">the <code>title</code> element</a> , in tree
                   4327: order, or the empty string if <a href="#the-title1">the
                   4328: <code>title</code> element</a> is null.</p>
                   4329: </li>
                   4330: </ol>
                   4331: <p>On setting, the following algorithm must be run:</p>
                   4332: <ol>
                   4333: <li>
                   4334: <p>If the <a href="#root-element">root element</a> is an
                   4335: <code>svg</code> element in the " <code title=
                   4336: "">http://www.w3.org/2000/svg</code> " namespace, and the user
                   4337: agent supports SVG, then the setter must defer to the setter for
                   4338: the DOM attribute of the same name on the <code>SVGDocument</code>
                   4339: interface. Stop the algorithm here.</p>
                   4340: </li>
                   4341: <li>If <a href="#the-title1"><ins class="diff-new">the</ins>
                   4342: <code><ins class="diff-new">title</ins></code> <ins class=
                   4343: "diff-new">element</ins></a> <ins class="diff-new">is null
                   4344: and</ins> <a href="#the-head0">the <code>head</code> element</a> is
                   4345: null, then the attribute must do nothing. Stop the algorithm
                   4346: here.</li>
                   4347: <li>If <a href="#the-title1">the <code>title</code> element</a> is
                   4348: null, then a new <code><a href="#title1">title</a></code> element
                   4349: must be created and appended to <a href="#the-head0">the
                   4350: <code>head</code> element</a> .</li>
                   4351: <li>The children of <a href="#the-title1">the <code>title</code>
                   4352: element</a> (if any) must all be removed.</li>
                   4353: <li>A single <code>Text</code> node whose data is the new value
                   4354: being assigned must be appended to <a href="#the-title1">the
                   4355: <code>title</code> element</a> .</li>
                   4356: </ol>
                   4357: <p>The <code title="dom-document-title"><a href=
                   4358: "#document.title">title</a></code> attribute on the <code><a href=
                   4359: "#htmldocument">HTMLDocument</a></code> interface should shadow the
                   4360: attribute of the same name on the <code>SVGDocument</code>
                   4361: interface when the user agent supports both HTML and SVG.</p>
                   4362: <p><dfn id="the-body1">The body element</dfn> of a document is the
                   4363: first child of <a href="#the-html0">the <code>html</code>
                   4364: element</a> that is either a <code><a href="#body0">body</a></code>
                   4365: element or a <code>frameset</code> element. If there is no such
                   4366: element, it is null. If the body element is null, then when the
                   4367: specification requires that events be fired at "the body element",
                   4368: they must instead be fired at the <code>Document</code> object.</p>
                   4369: <p>The <dfn id="body" title=
                   4370: "dom-document-body"><code>body</code></dfn> attribute, on getting,
                   4371: must return <a href="#the-body1">the body element</a> of the
                   4372: document (either a <code><a href="#body0">body</a></code> element,
                   4373: a <code>frameset</code> element, or null). On setting, the
                   4374: following algorithm must be run:</p>
                   4375: <ol>
                   4376: <li>If the new value is not a <code><a href=
                   4377: "#body0">body</a></code> or <code>frameset</code> element, then
                   4378: raise a <code>HIERARCHY_REQUEST_ERR</code> exception and abort
                   4379: these steps.</li>
                   4380: <li>Otherwise, if the new value is the same as <a href=
                   4381: "#the-body1">the body element</a> , do nothing. Abort these
                   4382: steps.</li>
                   4383: <li>Otherwise, if <a href="#the-body1">the body element</a> is not
                   4384: null, then replace that element with the new value in the DOM, as
                   4385: if the root element's <code title="">replaceChild()</code> method
                   4386: had been called with the new value and <a href="#the-body1" title=
                   4387: "the body element">the incumbent body element</a> as its two
                   4388: arguments respectively, then abort these steps.</li>
                   4389: <li>Otherwise, the <a href="#the-body1">the body element</a> is
                   4390: null. Append the new value to the root element.</li>
                   4391: </ol>
                   4392: <p>The <dfn id="images0" title=
                   4393: "dom-document-images"><code>images</code></dfn> attribute must
                   4394: return an <code><a href=
                   4395: "#htmlcollection0">HTMLCollection</a></code> rooted at the
                   4396: <code>Document</code> node, whose filter matches only
                   4397: <code><a href="#img">img</a></code> elements.</p>
                   4398: <p>The <dfn id="embeds" title=
                   4399: "dom-document-embeds"><code><ins class=
                   4400: "diff-new">embeds</ins></code></dfn> <ins class=
                   4401: "diff-new">attribute must return an</ins> <code><a href=
                   4402: "#htmlcollection0"><ins class=
                   4403: "diff-new">HTMLCollection</ins></a></code> <ins class=
                   4404: "diff-new">rooted at the</ins> <code><ins class=
                   4405: "diff-new">Document</ins></code> <ins class="diff-new">node, whose
                   4406: filter matches only</ins> <code><a href="#embed"><ins class=
                   4407: "diff-new">embed</ins></a></code> <ins class=
                   4408: "diff-new">elements.</ins></p>
                   4409: <p><ins class="diff-new">The</ins> <dfn id="plugins" title=
                   4410: "dom-document-plugins"><code><ins class=
                   4411: "diff-new">plugins</ins></code></dfn> <ins class=
                   4412: "diff-new">attribute must return the same object as that returned
                   4413: by the</ins> <code title="dom-document-embeds"><a href=
                   4414: "#embeds"><ins class="diff-new">embeds</ins></a></code> <ins class=
                   4415: "diff-new">attribute.</ins></p>
                   4416: <p><ins class="diff-new">The</ins> <dfn id="links0" title=
                   4417: "dom-document-links"><code>links</code></dfn> attribute must return
                   4418: an <code><a href="#htmlcollection0">HTMLCollection</a></code>
                   4419: rooted at the <code>Document</code> node, whose filter matches only
                   4420: <code><a href="#a">a</a></code> elements with <code title=
                   4421: "attr-hyperlink-href"><a href="#href6">href</a></code> attributes
                   4422: and <code><a href="#area">area</a></code> elements with
                   4423: <code title="attr-hyperlink-href"><a href="#href6">href</a></code>
                   4424: attributes.</p>
                   4425: <p>The <dfn id="forms0" title=
                   4426: "dom-document-forms"><code>forms</code></dfn> attribute must return
                   4427: an <code><a href="#htmlcollection0">HTMLCollection</a></code>
                   4428: rooted at the <code>Document</code> node, whose filter matches only
                   4429: <code>form</code> elements.</p>
                   4430: <p>The <dfn id="anchors" title=
                   4431: "dom-document-anchors"><code>anchors</code></dfn> attribute must
                   4432: return an <code><a href=
                   4433: "#htmlcollection0">HTMLCollection</a></code> rooted at the
                   4434: <code>Document</code> node, whose filter matches only
                   4435: <code><a href="#a">a</a></code> elements with <code title=
                   4436: "attr-a-name">name</code> attributes.</p>
                   4437: <p>The <dfn id="scripts" title=
                   4438: "dom-document-scripts"><code><ins class=
                   4439: "diff-new">scripts</ins></code></dfn> <ins class=
                   4440: "diff-new">attribute must return an</ins> <code><a href=
                   4441: "#htmlcollection0"><ins class=
                   4442: "diff-new">HTMLCollection</ins></a></code> <ins class=
                   4443: "diff-new">rooted at the</ins> <code><ins class=
                   4444: "diff-new">Document</ins></code> <ins class="diff-new">node, whose
                   4445: filter matches only</ins> <code><a href="#script1"><ins class=
                   4446: "diff-new">script</ins></a></code> <ins class=
                   4447: "diff-new">elements.</ins></p>
                   4448: <p><ins class="diff-new">The</ins> <dfn id="getelementsbyname"
                   4449: title="dom-document-getElementsByName"><code>getElementsByName(
                   4450: <var title="">name</var> )</code></dfn> method a string <var title=
                   4451: "">name</var> , and must return a live <code>NodeList</code>
                   4452: containing all the <code><a href="#a">a</a></code> , <code><a href=
                   4453: "#applet">applet</a></code> , <code>button</code> ,
                   4454: <code>form</code> , <code><a href="#iframe">iframe</a></code> ,
                   4455: <code><a href="#img">img</a></code> , <code>input</code> ,
                   4456: <code><a href="#map">map</a></code> , <code><a href=
                   4457: "#meta0">meta</a></code> , <code><a href=
                   4458: "#object">object</a></code> , <code>select</code> , and
                   4459: <code>textarea</code> elements in that document that have a
                   4460: <code title="">name</code> attribute whose value is equal to the
                   4461: <var title="">name</var> argument.</p>
                   4462: <p>The <dfn id="getelementsbyclassname" title=
                   4463: "dom-document-getElementsByClassName"><code>getElementsByClassName(
                   4464: <var title="">classNames</var> )</code></dfn> method takes a string
                   4465: that contains an <a href="#unordered">unordered set of unique
                   4466: space-separated tokens</a> representing classes. When called, the
                   4467: method must return a live <code>NodeList</code> object containing
                   4468: all the elements in the document that have all the classes
                   4469: specified in that argument, having obtained the classes by <a href=
                   4470: "#split" title="split a string on spaces">splitting a string on
                   4471: spaces</a> . If there are no tokens specified in the argument, then
                   4472: the method must return an empty <code>NodeList</code> .</p>
                   4473: <p>The <dfn id="getelementsbyclassname0" title=
                   4474: "dom-getElementsByClassName"><code>getElementsByClassName()</code></dfn>
                   4475: method on the <code><a href="#htmlelement">HTMLElement</a></code>
                   4476: interface must return a live <code>NodeList</code> with the nodes
                   4477: that the <code><a href="#htmldocument">HTMLDocument</a></code>
                   4478: <code title="dom-document-getElementsByClassName"><a href=
                   4479: "#getelementsbyclassname">getElementsByClassName()</a></code>
                   4480: method would return when passed the same argument(s), excluding any
                   4481: elements that are not descendants of the <code><a href=
                   4482: "#htmlelement">HTMLElement</a></code> object on which the method
                   4483: was invoked.</p>
                   4484: <p>HTML, SVG, and MathML elements define which classes they are in
                   4485: by having an attribute in the per-element partition with the name
                   4486: <code title="">class</code> containing a space-separated list of
                   4487: classes to which the element belongs. Other specifications may also
                   4488: allow elements in their namespaces to be <del class=
                   4489: "diff-old">labelled</del> <ins class="diff-chg">labeled</ins> as
                   4490: being in specific classes. UAs must not assume that all attributes
                   4491: of the name <code title="">class</code> for elements in any
                   4492: namespace work in this way, however, and must not assume that such
                   4493: attributes, when used as global attributes, label other elements as
                   4494: being in specific classes.</p>
                   4495: <div class="example">
                   4496: <p>Given the following XHTML fragment:</p>
                   4497: <pre>
                   4498: &lt;div id="example"&gt;
                   4499:  &lt;p id="p1" class="aaa bbb"/&gt;
                   4500:  &lt;p id="p2" class="aaa ccc"/&gt;
                   4501:  &lt;p id="p3" class="bbb ccc"/&gt;
                   4502: &lt;/div&gt;
                   4503: </pre>
                   4504: <p>A call to
                   4505: <code>document.getElementById('example').getElementsByClassName('aaa')</code>
                   4506: would return a <code>NodeList</code> with the two paragraphs
                   4507: <code>p1</code> and <code>p2</code> in it.</p>
                   4508: <p>A call to <code>getElementsByClassName('ccc&nbsp;bbb')</code>
                   4509: would only return one node, however, namely <code>p3</code> . A
                   4510: call to
                   4511: <code>document.getElementById('example').getElementsByClassName('bbb&nbsp;&nbsp;ccc&nbsp;')</code>
                   4512: would return the same thing.</p>
                   4513: <p>A call to <code>getElementsByClassName('aaa,bbb')</code> would
                   4514: return no nodes; none of the elements above are in the "aaa,bbb"
                   4515: class.</p>
                   4516: </div>
                   4517: <p class="note">The <code title="dom-document-dir"><a href=
                   4518: "#dir1">dir</a></code> attribute on the <code><a href=
                   4519: "#htmldocument">HTMLDocument</a></code> interface is defined along
                   4520: with the <code title="attr-dir"><a href="#dir">dir</a></code>
                   4521: content attribute.</p>
                   4522: <h3 id="dynamic"><span class="secno"><del class=
                   4523: "diff-old">2.5.</del> <ins class="diff-chg">2.5</ins></span>
                   4524: <dfn id="dynamic2">Dynamic markup insertion</dfn></h3>
                   4525: <p>The <code title="dom-document-write"><a href=
                   4526: "#document.write">document.write()</a></code> family of methods and
                   4527: the <code title="dom-innerHTML"><a href=
                   4528: "#innerhtml">innerHTML</a></code> family of DOM attributes enable
                   4529: script authors to dynamically insert markup into the document.</p>
                   4530: <p class="issue">bz argues that innerHTML should be called
                   4531: something else on XML documents and XML elements. Is the sanity
                   4532: worth the migration pain?</p>
                   4533: <p>Because these APIs interact with the parser, their <del class=
                   4534: "diff-old">behaviour</del> <ins class="diff-chg">behavior</ins>
                   4535: varies depending on whether they are used with <a href=
                   4536: "#html-">HTML documents</a> (and the <a href="#html-0">HTML
                   4537: parser</a> ) or XHTML in <a href="#xml-documents">XML documents</a>
                   4538: (and the <span>XML parser</span> ). The following table
                   4539: cross-references the various versions of these APIs.</p>
                   4540: <table>
                   4541: <thead>
                   4542: <tr>
                   4543: <td></td>
                   4544: <th><dfn id="document.write" title=
                   4545: "dom-document-write"><code>document.write()</code></dfn></th>
                   4546: <th><dfn id="innerhtml" title=
                   4547: "dom-innerHTML"><code>innerHTML</code></dfn></th>
                   4548: </tr>
                   4549: </thead>
                   4550: <tbody>
                   4551: <tr>
                   4552: <th>For documents that are <a href="#html-">HTML documents</a></th>
                   4553: <td><a href="#document.write..." title=
                   4554: "dom-document-write-HTML"><code>document.write()</code> in
                   4555: HTML</a></td>
                   4556: <td><a href="#innerhtml0" title=
                   4557: "dom-innerHTML-HTML"><code>innerHTML</code> in HTML</a></td>
                   4558: </tr>
                   4559: <tr>
                   4560: <th>For documents that are <a href="#xml-documents">XML
                   4561: documents</a></th>
                   4562: <td><a href="#document.write0" title=
                   4563: "dom-document-write-XML"><code>document.write()</code> in
                   4564: XML</a></td>
                   4565: <td><a href="#innerhtml1" title=
                   4566: "dom-innerHTML-XML"><code>innerHTML</code> in XML</a></td>
                   4567: </tr>
                   4568: </tbody>
                   4569: </table>
                   4570: <p>Regardless of the parsing mode, the <dfn id=
                   4571: "document.writeln..." title=
                   4572: "dom-document-writeln"><code>document.writeln(...)</code></dfn>
                   4573: method must call the <code title="dom-document-write"><a href=
                   4574: "#document.write">document.write()</a></code> method with the same
                   4575: argument(s), and then call the <code title=
                   4576: "dom-document-write"><a href=
                   4577: "#document.write">document.write()</a></code> method with, as its
                   4578: argument, a string consisting of a single line feed character
                   4579: (U+000A).</p>
                   4580: <h4 id="controlling"><span class="secno"><del class=
                   4581: "diff-old">2.5.1.</del> <ins class="diff-chg">2.5.1</ins></span>
                   4582: Controlling the input stream</h4>
                   4583: <p>The <dfn id="open" title=
                   4584: "dom-document-open"><code>open()</code></dfn> method comes in
                   4585: several variants with different numbers of arguments.</p>
                   4586: <p>When called with two or fewer arguments, the method must act as
                   4587: follows:</p>
                   4588: <ol>
                   4589: <li>
                   4590: <p>Let <var title="">type</var> be the value of the first argument,
                   4591: if there is one, or " <code>text/html</code> " otherwise.</p>
                   4592: </li>
                   4593: <li>
                   4594: <p>Let <var title="">replace</var> be true if there is a second
                   4595: argument and it has the value "replace" , and false otherwise.</p>
                   4596: </li>
                   4597: <li>
                   4598: <p>If the document has an <span>active parser</span> that isn't a
                   4599: <a href="#script-created">script-created parser</a> , and the
                   4600: <a href="#insertion">insertion point</a> associated with that
                   4601: parser's <a href="#input0">input stream</a> is not undefined (that
                   4602: is, it <em>does</em> point to somewhere in the input stream), then
                   4603: the method does nothing. Abort these steps and return the
                   4604: <code>Document</code> object on which the method was invoked.</p>
                   4605: <p class="note">This basically causes <code title=
                   4606: "dom-document-open"><a href="#open">document.open()</a></code> to
                   4607: be ignored when it's called in an inline script found during the
                   4608: parsing of data sent over the network, while still letting it have
                   4609: an effect when called asynchronously or on a document that is
                   4610: itself being spoon-fed using these APIs.</p>
                   4611: </li>
                   4612: <li>
                   4613: <p class="big-issue">onbeforeunload, <del class=
                   4614: "diff-old">onunload</del> <ins class="diff-chg">onunload, reset
                   4615: timers, empty event queue, kill any pending transactions,
                   4616: XMLHttpRequests, etc</ins></p>
                   4617: </li>
                   4618: <li>
                   4619: <p>If the document has an <span>active parser</span> , then stop
                   4620: that parser, and throw away any pending content in the input
                   4621: stream. <span class="big-issue">what about if it doesn't, because
                   4622: it's either like a text/plain, or Atom, or PDF, or XHTML, or image
                   4623: document, or something?</span></p>
                   4624: </li>
                   4625: <li>
                   4626: <p>Remove all child nodes of the document.</p>
                   4627: </li>
                   4628: <li>
                   4629: <p><ins class="diff-new">Change the</ins> <a href=
                   4630: "#character1"><ins class="diff-new">document's character
                   4631: encoding</ins></a> <ins class="diff-new">to UTF-16.</ins></p>
                   4632: </li>
                   4633: <li>
                   4634: <p>Create a new <a href="#html-0">HTML parser</a> and associate it
                   4635: with the document. This is a <dfn id=
                   4636: "script-created">script-created parser</dfn> (meaning that it can
                   4637: be closed by the <code title="dom-document-open"><a href=
                   4638: "#open">document.open()</a></code> and <code title=
                   4639: "dom-document-close"><a href="#close">document.close()</a></code>
                   4640: methods, and that the tokeniser will wait for an explicit call to
                   4641: <code title="dom-document-close"><a href=
                   4642: "#close">document.close()</a></code> before emitting an end-of-file
                   4643: token).</p>
                   4644: </li>
                   4645: <li>Mark the document as being an <a href="#html-" title=
                   4646: "HTML documents">HTML document</a> (it might already be
                   4647: so-marked).</li>
                   4648: <li>
                   4649: <p>If <var title="">type</var> does not have the value "
                   4650: <code>text/html</code> " , then act as if the tokeniser had emitted
                   4651: a <code><a href="#pre">pre</a></code> element start tag, then set
                   4652: the <a href="#html-0">HTML parser</a> 's <a href=
                   4653: "#tokenisation0">tokenisation</a> stage's <a href=
                   4654: "#content2">content model flag</a> to <em>PLAINTEXT</em> .</p>
                   4655: </li>
                   4656: <li>
                   4657: <p>If <var title="">replace</var> is false, then:</p>
                   4658: <ol>
                   4659: <li>Remove all the entries in the <a href="#browsing1">browsing
                   4660: context</a> 's <a href="#session">session history</a> after the
                   4661: <a href="#current1">current entry</a> in its <code>Document</code>
                   4662: 's <code><a href="#history2">History</a></code> object</li>
                   4663: <li>Remove any earlier entries that share the same
                   4664: <code>Document</code></li>
                   4665: <li>Add a new entry just before the last entry that is associated
                   4666: with the text that was parsed by the previous parser associated
                   4667: with the <code>Document</code> object, as well as the state of the
                   4668: document at the start of these steps. (This allows the user to step
                   4669: backwards in the session history to see the page before it was
                   4670: blown away by the <code title="dom-document-open"><a href=
                   4671: "#open">document.open()</a></code> call.)</li>
                   4672: </ol>
                   4673: </li>
                   4674: <li>
                   4675: <p>Finally, set the <a href="#insertion">insertion point</a> to
                   4676: point at just before the end of the <a href="#input0">input
                   4677: stream</a> (which at this point will be empty).</p>
                   4678: </li>
                   4679: <li>
                   4680: <p>Return the <code>Document</code> on which the method was
                   4681: invoked.</p>
                   4682: </li>
                   4683: </ol>
                   4684: <p class="big-issue">We shouldn't hard-code <code>text/plain</code>
                   4685: there. We should do it some other way, e.g. hand off to the section
                   4686: on content-sniffing and handling of incoming data streams, the part
                   4687: that defines how this all works when stuff comes over the
                   4688: network.</p>
                   4689: <p>When called with three or more arguments, the <code title=
                   4690: "dom-document-open"><a href="#open">open()</a></code> method on the
                   4691: <code><a href="#htmldocument">HTMLDocument</a></code> object must
                   4692: call the <code title="dom-open"><a href="#open2">open()</a></code>
                   4693: method on the <code><a href="#window">Window</a></code> interface
                   4694: of the object returned by the <code title=
                   4695: "dom-document-defaultView">defaultView</code> attribute of the
                   4696: <code>DocumentView</code> interface of the <code><a href=
                   4697: "#htmldocument">HTMLDocument</a></code> object, with the same
                   4698: arguments as the original call to the <code title=
                   4699: "dom-document-open"><a href="#open">open()</a></code> method, and
                   4700: return whatever that method returned. If the <code title=
                   4701: "dom-document-defaultView">defaultView</code> attribute of the
                   4702: <code>DocumentView</code> interface of the <code><a href=
                   4703: "#htmldocument">HTMLDocument</a></code> object is null, then the
                   4704: method must raise an <code>INVALID_ACCESS_ERR</code> exception.</p>
                   4705: <p>The <dfn id="close" title=
                   4706: "dom-document-close"><code>close()</code></dfn> method must do
                   4707: nothing if there is no <a href="#script-created">script-created
                   4708: parser</a> associated with the document. If there is such a parser,
                   4709: then, when the method is called, the user agent must insert an
                   4710: <a href="#explicit0">explicit "EOF" character</a> at the <a href=
                   4711: "#insertion">insertion point</a> of the parser's <a href=
                   4712: "#input0">input stream</a> .</p>
                   4713: <h4 id="dynamic0"><span class="secno"><del class=
                   4714: "diff-old">2.5.2.</del> <ins class="diff-chg">2.5.2</ins></span>
                   4715: Dynamic markup insertion in HTML</h4>
                   4716: <p>In HTML, the <dfn id="document.write..." title=
                   4717: "dom-document-write-HTML"><code>document.write(...)</code></dfn>
                   4718: method must act as follows:</p>
                   4719: <ol>
                   4720: <li>
                   4721: <p>If the <a href="#insertion">insertion point</a> is undefined,
                   4722: the <code title="dom-document-open"><a href=
                   4723: "#open">open()</a></code> method must be called (with no arguments)
                   4724: on the <code title="Document">document</code> object. The <a href=
                   4725: "#insertion">insertion point</a> will point at just before the end
                   4726: of the (empty) <a href="#input0">input stream</a> .</p>
                   4727: </li>
                   4728: <li>
                   4729: <p>The string consisting of the concatenation of all the arguments
                   4730: to the method must be inserted into the <a href="#input0">input
                   4731: stream</a> just before the <a href="#insertion">insertion point</a>
                   4732: .</p>
                   4733: </li>
                   4734: <li>
                   4735: <p>If there is <a href="#the-script" title=
                   4736: "the script that will execute as soon as the parser resumes">a
                   4737: script that will execute as soon as the parser resumes</a> , then
                   4738: the method must now return without further processing of the
                   4739: <a href="#input0">input stream</a> .</p>
                   4740: </li>
                   4741: <li>
                   4742: <p>Otherwise, the tokeniser must process the characters that were
                   4743: inserted, one at a time, processing resulting tokens as they are
                   4744: emitted, and stopping when the tokeniser reaches the insertion
                   4745: point or when the processing of the tokeniser is aborted by the
                   4746: tree construction stage (this can happen if a <code><a href=
                   4747: "#script1">script</a></code> start tag token is emitted by the
                   4748: tokeniser).</p>
                   4749: <p class="note">If the <code title=
                   4750: "dom-document-write-HTML"><a href=
                   4751: "#document.write...">document.write()</a></code> method was called
                   4752: from script executing inline (i.e. executing because the parser
                   4753: parsed a set of <code><a href="#script1">script</a></code> tags),
                   4754: then this is a <a href="#nestedParsing">reentrant invocation of the
                   4755: parser</a> .</p>
                   4756: </li>
                   4757: <li>
                   4758: <p>Finally, the method must return.</p>
                   4759: </li>
                   4760: </ol>
                   4761: <p>In HTML, the <dfn id="innerhtml0" title=
                   4762: "dom-innerHTML-HTML"><code>innerHTML</code></dfn> DOM attribute of
                   4763: all <code><a href="#htmlelement">HTMLElement</a></code> and
                   4764: <code><a href="#htmldocument">HTMLDocument</a></code> nodes returns
                   4765: a <del class="diff-old">serialisation</del> <ins class=
                   4766: "diff-chg">serialization</ins> of the node's children using the
                   4767: <span>HTML syntax</span> . On setting, it replaces the node's
                   4768: children with new nodes that result from parsing the given value.
                   4769: The formal definitions follow.</p>
                   4770: <p>On getting, the <code title="dom-innerHTML-HTML"><a href=
                   4771: "#innerhtml0">innerHTML</a></code> DOM attribute must return the
                   4772: result of running the <a href="#html-fragment">HTML fragment
                   4773: <del class="diff-old">serialisation</del> <ins class=
                   4774: "diff-chg">serialization</ins> algorithm</a> on the node.</p>
                   4775: <p>On setting, if the node is a document, the <code title=
                   4776: "dom-innerHTML-HTML"><a href="#innerhtml0">innerHTML</a></code> DOM
                   4777: attribute must run the following algorithm:</p>
                   4778: <ol>
                   4779: <li>
                   4780: <p>If the document has an <span>active parser</span> , then stop
                   4781: that parser, and throw away any pending content in the input
                   4782: stream. <span class="big-issue">what about if it doesn't, because
                   4783: it's either like a text/plain, or Atom, or PDF, or XHTML, or image
                   4784: document, or something?</span></p>
                   4785: </li>
                   4786: <li>
                   4787: <p>Remove the children nodes of the <code>Document</code> whose
                   4788: <code title="dom-innerHTML-HTML"><a href=
                   4789: "#innerhtml0">innerHTML</a></code> attribute is being set.</p>
                   4790: </li>
                   4791: <li>
                   4792: <p>Create a new <a href="#html-0">HTML parser</a> , in its initial
                   4793: state, and associate it with the <code>Document</code> node.</p>
                   4794: </li>
                   4795: <li>
                   4796: <p>Place into the <a href="#input0">input stream</a> for the
                   4797: <a href="#html-0">HTML parser</a> just created the string being
                   4798: assigned into the <code title="dom-innerHTML-HTML"><a href=
                   4799: "#innerhtml0">innerHTML</a></code> attribute.</p>
                   4800: </li>
                   4801: <li>
                   4802: <p>Start the parser and let it run until it has consumed all the
                   4803: characters just inserted into the input stream. (The
                   4804: <code>Document</code> node will have been populated with elements
                   4805: and a <code title="event-load"><a href="#load0">load</a></code>
                   4806: event will have fired on <a href="#the-body1" title=
                   4807: "the body element">its body element</a> .)</p>
                   4808: </li>
                   4809: </ol>
                   4810: <p>Otherwise, if the node is an element, then setting the
                   4811: <code title="dom-innerHTML-HTML"><a href=
                   4812: "#innerhtml0">innerHTML</a></code> DOM attribute must cause the
                   4813: following algorithm to run instead:</p>
                   4814: <ol>
                   4815: <li>
                   4816: <p>Invoke the <a href="#html-fragment0">HTML fragment parsing
                   4817: algorithm</a> , with the element whose <code title=
                   4818: "dom-innerHTML-HTML"><a href="#innerhtml0">innerHTML</a></code>
                   4819: attribute is being set as the <var title="">context</var>
                   4820: <ins class="diff-new">element,</ins> and the string being assigned
                   4821: into the <code title="dom-innerHTML-HTML"><a href=
                   4822: "#innerhtml0">innerHTML</a></code> attribute as the <var title=
                   4823: "">input</var> . Let <var title="">new children</var> be the result
                   4824: of this algorithm.</p>
                   4825: </li>
                   4826: <li>
                   4827: <p>Remove the children of the element whose <code title=
                   4828: "dom-innerHTML-HTML"><a href="#innerhtml0">innerHTML</a></code>
                   4829: attribute is being set.</p>
                   4830: </li>
                   4831: <li>
                   4832: <p>Let <var title="">target document</var> be the <code title=
                   4833: "">ownerDocument</code> of the <code>Element</code> node whose
                   4834: <code title="dom-innerHTML-HTML"><a href=
                   4835: "#innerhtml0">innerHTML</a></code> attribute is being set.</p>
                   4836: </li>
                   4837: <li>
                   4838: <p>Set the <code title="">ownerDocument</code> of all the nodes in
                   4839: <var title="">new children</var> to the <var title="">target
                   4840: document</var> .</p>
                   4841: </li>
                   4842: <li>
                   4843: <p>Append all the <var title="">new children</var> nodes to the
                   4844: node whose <code title="dom-innerHTML-HTML"><a href=
                   4845: "#innerhtml0">innerHTML</a></code> attribute is being set,
                   4846: preserving their order.</p>
                   4847: </li>
                   4848: </ol>
                   4849: <p class="note"><code><a href="#script1">script</a></code> elements
                   4850: inserted using <code title="dom-innerHTML-HTML"><a href=
                   4851: "#innerhtml0">innerHTML</a></code> do not execute when they are
                   4852: inserted.</p>
                   4853: <h4 id="dynamic1"><span class="secno"><del class=
                   4854: "diff-old">2.5.3.</del> <ins class="diff-chg">2.5.3</ins></span>
                   4855: Dynamic markup insertion in XML</h4>
                   4856: <p>In an XML context, the <dfn id="document.write0" title=
                   4857: "dom-document-write-XML"><code>document.write()</code></dfn> method
                   4858: must raise an <code>INVALID_ACCESS_ERR</code> exception.</p>
                   4859: <p>On the other hand, however, the <dfn id="innerhtml1" title=
                   4860: "dom-innerHTML-XML"><code>innerHTML</code></dfn> attribute is
                   4861: indeed usable in an XML context.</p>
                   4862: <p>In an XML context, the <code title="dom-innerHTML-XML"><a href=
                   4863: "#innerhtml1">innerHTML</a></code> DOM attribute on <code><a href=
                   4864: "#htmlelement">HTMLElement</a></code> s <ins class="diff-new">must
                   4865: return a string in the form of an</ins> <a href=
                   4866: "http://www.w3.org/TR/xml/#wf-entities"><ins class=
                   4867: "diff-new">internal general parsed entity</ins></a> , and
                   4868: <ins class="diff-new">on</ins> <code><a href=
                   4869: "#htmldocument">HTMLDocument</a></code> <del class="diff-old">s, on
                   4870: getting,</del> <ins class="diff-chg">s</ins> must return a string
                   4871: in the form of <del class="diff-old">an internal general
                   4872: parsed</del> <ins class="diff-chg">a</ins> <a href=
                   4873: "http://www.w3.org/TR/xml/#sec-well-formed"><ins class=
                   4874: "diff-chg">document</ins> entity <del class="diff-old">that is XML
                   4875: namespace-well-formed, the</del></a> . <ins class=
                   4876: "diff-chg">The</ins> string <del class="diff-old">being</del>
                   4877: <ins class="diff-chg">returned must be XML namespace-well-formed
                   4878: and must be</ins> an isomorphic <del class=
                   4879: "diff-old">serialisation</del> <ins class=
                   4880: "diff-chg">serialization</ins> of all of that node's child nodes,
                   4881: in document order. User agents may adjust prefixes and namespace
                   4882: declarations in the <del class="diff-old">serialisation</del>
                   4883: <ins class="diff-chg">serialization</ins> (and indeed might be
                   4884: forced to do so in some cases to obtain namespace-well-formed XML).
                   4885: <ins class="diff-new">If any of the elements in the serialization
                   4886: are in no namespace, the default namespace in scope for those
                   4887: elements must be explicitly declared as the empty string.</ins>
                   4888: <a href="#references">[XML]</a> <a href=
                   4889: "#references">[XMLNS]</a></p>
                   4890: <p>If any of the following cases are found in the DOM being
                   4891: <del class="diff-old">serialised,</del> <ins class=
                   4892: "diff-chg">serialized,</ins> the user agent must raise an
                   4893: <code>INVALID_STATE_ERR</code> exception:</p>
                   4894: <ul>
                   4895: <li>A <code><ins class="diff-new">Document</ins></code> <ins class=
                   4896: "diff-new">node with no child element nodes.</ins></li>
                   4897: <li><ins class="diff-new">A</ins> <code>DocumentType</code> node
                   4898: that has an external subset public identifier or an external subset
                   4899: system identifier that contains both a U+0022 QUOTATION MARK ('"')
                   4900: and a U+0027 APOSTROPHE ("'").</li>
                   4901: <li>A node with a prefix or local name containing a U+003A COLON
                   4902: (":").</li>
                   4903: <li><del class="diff-old">A</del> <ins class="diff-chg">An</ins>
                   4904: <code><ins class="diff-chg">Attr</ins></code> <ins class=
                   4905: "diff-chg">node,</ins> <code>Text</code> <ins class=
                   4906: "diff-new">node,</ins> <code><ins class=
                   4907: "diff-new">CDATASection</ins></code> <ins class=
                   4908: "diff-new">node,</ins> <code><ins class=
                   4909: "diff-new">Comment</ins></code> <ins class="diff-new">node,
                   4910: or</ins> <code><ins class=
                   4911: "diff-new">ProcessingInstruction</ins></code> node whose data
                   4912: contains characters that are not matched by the XML <code title=
                   4913: "">Char</code> production. <a href="#references">[XML]</a></li>
                   4914: <li>A <code>CDATASection</code> node whose data contains the string
                   4915: " <code title="">]]&gt;</code> ".</li>
                   4916: <li>A <code>Comment</code> node whose data contains two adjacent
                   4917: U+002D HYPHEN-MINUS (-) characters or ends with such a
                   4918: character.</li>
                   4919: <li>A <code>ProcessingInstruction</code> node whose target name is
                   4920: the string " <code title="">xml</code> " (case insensitively)
                   4921: .</li>
                   4922: <li>A <code>ProcessingInstruction</code> node whose target name
                   4923: contains a U+003A COLON (":").</li>
                   4924: <li>A <code>ProcessingInstruction</code> node whose data contains
                   4925: the string " <code title="">?&gt;</code> ".</li>
                   4926: </ul>
                   4927: <p class="note">These are the only ways to make a DOM <del class=
                   4928: "diff-old">unserialisable.</del> <ins class=
                   4929: "diff-chg">unserializable.</ins> The DOM enforces all the other XML
                   4930: constraints; for example, trying to set an attribute with a name
                   4931: that contains an equals sign (=) will raised an
                   4932: <code>INVALID_CHARACTER_ERR</code> exception.</p>
                   4933: <p>On setting, in an XML context, the <code title=
                   4934: "dom-innerHTML-XML"><a href="#innerhtml1">innerHTML</a></code> DOM
                   4935: attribute on <code><a href="#htmlelement">HTMLElement</a></code> s
                   4936: and <code><a href="#htmldocument">HTMLDocument</a></code> s must
                   4937: run the following algorithm:</p>
                   4938: <ol>
                   4939: <li>
                   4940: <p>The user agent must create a new <span>XML parser</span> .</p>
                   4941: </li>
                   4942: <li>
                   4943: <p>If the <code title="dom-innerHTML-XML"><a href=
                   4944: "#innerhtml1">innerHTML</a></code> attribute is being set on an
                   4945: element, the user agent must <span>feed the parser</span> just
                   4946: created the string corresponding to the start tag of that element,
                   4947: declaring all the namespace prefixes that are in scope on that
                   4948: element in the DOM, as well as declaring the default namespace (if
                   4949: any) that is in scope on that element in the DOM.</p>
                   4950: </li>
                   4951: <li>
                   4952: <p>The user agent must <span>feed the parser</span> just created
                   4953: the string being assigned into the <code title=
                   4954: "dom-innerHTML-XML"><a href="#innerhtml1">innerHTML</a></code>
                   4955: attribute.</p>
                   4956: </li>
                   4957: <li>
                   4958: <p>If the <code title="dom-innerHTML-XML"><a href=
                   4959: "#innerhtml1">innerHTML</a></code> attribute is being set on an
                   4960: element, the user agent must <span>feed the parser</span> the
                   4961: string corresponding to the end tag of that element.</p>
                   4962: </li>
                   4963: <li>
                   4964: <p>If the parser found a well-formedness error, the attribute's
                   4965: setter must raise a <code>SYNTAX_ERR</code> exception and abort
                   4966: these steps.</p>
                   4967: </li>
                   4968: <li>
                   4969: <p>The user agent must remove the children nodes of the node whose
                   4970: <code title="dom-innerHTML-XML"><a href=
                   4971: "#innerhtml1">innerHTML</a></code> attribute is being set.</p>
                   4972: </li>
                   4973: <li>
                   4974: <p>If the attribute is being set on a <code>Document</code> node,
                   4975: let <var title="">new children</var> be the children of the
                   4976: document, preserving their order. Otherwise, the attribute is being
                   4977: set on an <code>Element</code> node; let <var title="">new
                   4978: children</var> be the children of the <del class=
                   4979: "diff-old">the</del> document's root element, preserving their
                   4980: order.</p>
                   4981: </li>
                   4982: <li>
                   4983: <p>If the attribute is being set on a <code>Document</code> node,
                   4984: let <var title="">target document</var> be that
                   4985: <code>Document</code> node. Otherwise, the attribute is being set
                   4986: on an <code>Element</code> node; let <var title="">target
                   4987: document</var> be the <code title="">ownerDocument</code> of that
                   4988: <code>Element</code> .</p>
                   4989: </li>
                   4990: <li>
                   4991: <p>Set the <code title="">ownerDocument</code> of all the nodes in
                   4992: <var title="">new children</var> to the <var title="">target
                   4993: document</var> .</p>
                   4994: </li>
                   4995: <li>
                   4996: <p>Append all the <var title="">new children</var> nodes to the
                   4997: node whose <code title="dom-innerHTML-XML"><a href=
                   4998: "#innerhtml1">innerHTML</a></code> attribute is being set,
                   4999: preserving their order.</p>
                   5000: </li>
                   5001: </ol>
                   5002: <p class="note"><code><a href="#script1">script</a></code> elements
                   5003: inserted using <code title="dom-innerHTML-XML"><a href=
                   5004: "#innerhtml1">innerHTML</a></code> do not execute when they are
                   5005: inserted.</p>
                   5006: <h3 id="apis-in"><span class="secno"><del class=
                   5007: "diff-old">2.6.</del> <ins class="diff-chg">2.6</ins></span> APIs
                   5008: in HTML documents</h3>
                   5009: <p>For <a href="#html-">HTML documents</a> , and for <a href=
                   5010: "#html-elements">HTML elements</a> in <a href="#html-">HTML
                   5011: documents</a> , certain APIs defined in DOM3 Core become
                   5012: case-insensitive or case-changing, as sometimes defined in DOM3
                   5013: Core, and as <del class="diff-old">summarised</del> <ins class=
                   5014: "diff-chg">summarized</ins> or required below. <a href=
                   5015: "#references">[DOM3CORE]</a> .</p>
                   5016: <p>This does not apply to <a href="#xml-documents">XML
                   5017: documents</a> or to elements that are not in the <a href=
                   5018: "#html-namespace0">HTML namespace</a> despite being in <a href=
                   5019: "#html-">HTML documents</a> .</p>
                   5020: <dl>
                   5021: <dt><code title="">Element.tagName</code> , <code title=
                   5022: "">Node.nodeName</code> , and <code title=
                   5023: "">Node.localName</code></dt>
                   5024: <dd>
                   5025: <p>These attributes return tag names in all uppercase and attribute
                   5026: names in all lowercase, regardless of the case with which they were
                   5027: created.</p>
                   5028: </dd>
                   5029: <dt><code title="">Document.createElement()</code></dt>
                   5030: <dd>
                   5031: <p>The canonical form of HTML markup is all-lowercase; thus, this
                   5032: method will lowercase the argument before creating the requisite
                   5033: element. Also, the element created must be in the <a href=
                   5034: "#html-namespace0">HTML namespace</a> .</p>
                   5035: <p class="note">This doesn't apply to <code title=
                   5036: "">Document.createElementNS()</code> . Thus, it is possible, by
                   5037: passing this last method a tag name in the wrong case, to create an
                   5038: element that claims to have the tag name of an element defined in
                   5039: this specification, but doesn't support its interfaces, because it
                   5040: really has another tag name not accessible from the DOM APIs.</p>
                   5041: </dd>
                   5042: <dt><code title="">Element.setAttributeNode()</code></dt>
                   5043: <dd>
                   5044: <p>When an <code>Attr</code> node is set on an <a href=
                   5045: "#html-elements" title="HTML elements">HTML element</a> , it must
                   5046: have its name lowercased before the element is affected.</p>
                   5047: <p class="note">This doesn't apply to <code title=
                   5048: "">Document.setAttributeNodeNS()</code> .</p>
                   5049: </dd>
                   5050: <dt><code title="">Element.setAttribute()</code></dt>
                   5051: <dd>
                   5052: <p>When an attribute is set on an <a href="#html-elements" title=
                   5053: "HTML elements">HTML element</a> , the name argument must be
                   5054: lowercased before the element is affected.</p>
                   5055: <p class="note">This doesn't apply to <code title=
                   5056: "">Document.setAttributeNS()</code> .</p>
                   5057: </dd>
                   5058: <dt><code title="">Document.getElementsByTagName()</code> and
                   5059: <code title="">Element.getElementsByTagName()</code></dt>
                   5060: <dd>
                   5061: <p>These methods (but not their namespaced counterparts) must
                   5062: compare the given argument case-insensitively when looking at
                   5063: <a href="#html-elements" title="HTML elements">HTML elements</a> ,
                   5064: and case-sensitively otherwise.</p>
                   5065: <p class="note">Thus, in an <a href="#html-" title=
                   5066: "HTML documents">HTML document</a> with nodes in multiple
                   5067: namespaces, these methods will be both case-sensitive and
                   5068: case-insensitive at the same time.</p>
                   5069: </dd>
                   5070: <dt><code title="">Document.renameNode()</code></dt>
                   5071: <dd>
                   5072: <p>If the new namespace is the <a href="#html-namespace0">HTML
                   5073: namespace</a> , then the new qualified name must be lowercased
                   5074: before the rename takes place.</p>
                   5075: </dd>
                   5076: </dl>
                   5077: <h2 id="semantics"><span class="secno">3.</span> Semantics and
                   5078: structure of HTML elements</h2>
                   5079: <h3 id="semantics-intro"><span class="secno"><del class=
                   5080: "diff-old">3.1.</del> <ins class="diff-chg">3.1</ins></span>
                   5081: Introduction</h3>
                   5082: <p><em>This section is non-normative.</em></p>
                   5083: <p class="big-issue">An introduction to marking up a document.</p>
                   5084: <h3 id="common1"><span class="secno"><del class=
                   5085: "diff-old">3.2.</del> <ins class="diff-chg">3.2</ins></span> Common
                   5086: microsyntaxes</h3>
                   5087: <p>There are various places in HTML that accept particular data
                   5088: types, such as dates or numbers. This section describes what the
                   5089: conformance criteria for content in those formats is, and how to
                   5090: parse them.</p>
                   5091: <p class="big-issue">Need to go through the whole spec and make
                   5092: sure all the attribute values are clearly defined either in terms
                   5093: of microsyntaxes or in terms of other specs, or as "Text" or some
                   5094: such.</p>
                   5095: <h4 id="common2"><span class="secno"><del class=
                   5096: "diff-old">3.2.1.</del> <ins class="diff-chg">3.2.1</ins></span>
                   5097: Common parser idioms</h4>
                   5098: <p>The <dfn id="space" title="space character">space
                   5099: characters</dfn> , for the purposes of this specification, are
                   5100: U+0020 SPACE, U+0009 CHARACTER TABULATION (tab), U+000A LINE FEED
                   5101: (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), and U+000D
                   5102: CARRIAGE RETURN (CR).</p>
                   5103: <p>Some of the micro-parsers described below follow the pattern of
                   5104: having an <var title="">input</var> variable that holds the string
                   5105: being parsed, and having a <var title="">position</var> variable
                   5106: pointing at the next character to parse in <var title=
                   5107: "">input</var> .</p>
                   5108: <p>For parsers based on this pattern, a step that requires the user
                   5109: agent to <dfn id="collect">collect a sequence of characters</dfn>
                   5110: means that the following algorithm must be run, with <var title=
                   5111: "">characters</var> being the set of characters that can be
                   5112: collected:</p>
                   5113: <ol>
                   5114: <li>
                   5115: <p>Let <var title="">input</var> and <var title="">position</var>
                   5116: be the same variables as those of the same name in the algorithm
                   5117: that invoked these steps.</p>
                   5118: </li>
                   5119: <li>
                   5120: <p>Let <var title="">result</var> be the empty string.</p>
                   5121: </li>
                   5122: <li>
                   5123: <p>While <var title="">position</var> doesn't point past the end of
                   5124: <var title="">input</var> and the character at <var title=
                   5125: "">position</var> is one of the <var title="">characters</var> ,
                   5126: append that character to the end of <var title="">result</var> and
                   5127: advance <var title="">position</var> to the next character in
                   5128: <var title="">input</var> .</p>
                   5129: </li>
                   5130: <li>
                   5131: <p>Return <var title="">result</var> .</p>
                   5132: </li>
                   5133: </ol>
                   5134: <p>The step <dfn id="skip-whitespace">skip whitespace</dfn> means
                   5135: that the user agent must <a href="#collect">collect a sequence of
                   5136: characters</a> that are <a href="#space" title=
                   5137: "space character">space characters</a> . The step <dfn id=
                   5138: "skip-">skip Zs characters</dfn> means that the user agent must
                   5139: <a href="#collect">collect a sequence of characters</a> that are in
                   5140: the Unicode character class Zs. In both cases, the collected
                   5141: characters are not used. <a href="#references">[UNICODE]</a></p>
                   5142: <h4 id="boolean"><span class="secno"><del class=
                   5143: "diff-old">3.2.2.</del> <ins class="diff-chg">3.2.2</ins></span>
                   5144: Boolean attributes</h4>
                   5145: <p>A number of attributes in HTML5 are <dfn id="boolean0" title=
                   5146: "boolean attribute">boolean attributes</dfn> . The presence of a
                   5147: boolean attribute on an element represents the true value, and the
                   5148: absence of the attribute represents the false value.</p>
                   5149: <p>If the attribute is present, its value must either be the empty
                   5150: string or <ins class="diff-new">a value that is a case-insensitive
                   5151: match for</ins> the attribute's canonical name, <del class=
                   5152: "diff-old">exactly,</del> with no leading or trailing <del class=
                   5153: "diff-old">whitespace, and in lowercase.</del> <ins class=
                   5154: "diff-chg">whitespace.</ins></p>
                   5155: <h4 id="numbers"><span class="secno"><del class=
                   5156: "diff-old">3.2.3.</del> <ins class="diff-chg">3.2.3</ins></span>
                   5157: Numbers</h4>
                   5158: <h5 id="unsigned"><span class="secno">3.2.3.1.</span> Unsigned
                   5159: integers</h5>
                   5160: <p>A string is a <dfn id="valid">valid non-negative integer</dfn>
                   5161: if it consists of one of more characters in the range U+0030 DIGIT
                   5162: ZERO (0) to U+0039 DIGIT NINE (9).</p>
                   5163: <p>The <dfn id="rules">rules for parsing non-negative
                   5164: integers</dfn> are as given in the following algorithm. When
                   5165: invoked, the steps must be followed in the order given, aborting at
                   5166: the first step that returns a value. This algorithm will either
                   5167: return zero, a positive integer, or an error. Leading spaces are
                   5168: ignored. Trailing spaces and indeed any trailing garbage characters
                   5169: are ignored.</p>
                   5170: <ol>
                   5171: <li>
                   5172: <p>Let <var title="">input</var> be the string being parsed.</p>
                   5173: </li>
                   5174: <li>
                   5175: <p>Let <var title="">position</var> be a pointer into <var title=
                   5176: "">input</var> , initially pointing at the start of the string.</p>
                   5177: </li>
                   5178: <li>
                   5179: <p>Let <var title="">value</var> have the value 0.</p>
                   5180: </li>
                   5181: <li>
                   5182: <p><a href="#skip-whitespace">Skip whitespace.</a></p>
                   5183: </li>
                   5184: <li>
                   5185: <p>If <var title="">position</var> is past the end of <var title=
                   5186: "">input</var> , return an error.</p>
                   5187: </li>
                   5188: <li>
                   5189: <p>If the next character is not one of U+0030 DIGIT ZERO (0) ..
                   5190: U+0039 DIGIT NINE (9), then return an error.</p>
                   5191: </li>
                   5192: <li>
                   5193: <p>If the next character is one of U+0030 DIGIT ZERO (0) .. U+0039
                   5194: DIGIT NINE (9):</p>
                   5195: <ol>
                   5196: <li>Multiply <var title="">value</var> by ten.</li>
                   5197: <li>Add the value of the current character (0..9) to <var title=
                   5198: "">value</var> .</li>
                   5199: <li>Advance <var title="">position</var> to the next
                   5200: character.</li>
                   5201: <li>If <var title="">position</var> is not past the end of
                   5202: <var title="">input</var> , return to the top of step 7 in the
                   5203: overall algorithm (that's the step within which these substeps find
                   5204: themselves).</li>
                   5205: </ol>
                   5206: </li>
                   5207: <li>
                   5208: <p>Return <var title="">value</var> .</p>
                   5209: </li>
                   5210: </ol>
                   5211: <h5 id="signed"><span class="secno">3.2.3.2.</span> Signed
                   5212: integers</h5>
                   5213: <p>A string is a <dfn id="valid0">valid integer</dfn> if it
                   5214: consists of one of more characters in the range U+0030 DIGIT ZERO
                   5215: (0) to U+0039 DIGIT NINE (9), optionally prefixed with a U+002D
                   5216: HYPHEN-MINUS ("-") character.</p>
                   5217: <p>The <dfn id="rules0">rules for parsing integers</dfn> are
                   5218: similar to the rules for non-negative integers, and are as given in
                   5219: the following algorithm. When invoked, the steps must be followed
                   5220: in the order given, aborting at the first step that returns a
                   5221: value. This algorithm will either return an integer or an error.
                   5222: Leading spaces are ignored. Trailing spaces and trailing garbage
                   5223: characters are ignored.</p>
                   5224: <ol>
                   5225: <li>
                   5226: <p>Let <var title="">input</var> be the string being parsed.</p>
                   5227: </li>
                   5228: <li>
                   5229: <p>Let <var title="">position</var> be a pointer into <var title=
                   5230: "">input</var> , initially pointing at the start of the string.</p>
                   5231: </li>
                   5232: <li>
                   5233: <p>Let <var title="">value</var> have the value 0.</p>
                   5234: </li>
                   5235: <li>
                   5236: <p>Let <var title="">sign</var> have the value "positive".</p>
                   5237: </li>
                   5238: <li>
                   5239: <p><a href="#skip-whitespace">Skip whitespace.</a></p>
                   5240: </li>
                   5241: <li>
                   5242: <p>If <var title="">position</var> is past the end of <var title=
                   5243: "">input</var> , return an error.</p>
                   5244: </li>
                   5245: <li>
                   5246: <p>If the character indicated by <var title="">position</var> (the
                   5247: first character) is a U+002D HYPHEN-MINUS ("-") character:</p>
                   5248: <ol>
                   5249: <li>Let <var title="">sign</var> be "negative".</li>
                   5250: <li>Advance <var title="">position</var> to the next
                   5251: character.</li>
                   5252: <li>If <var title="">position</var> is past the end of <var title=
                   5253: "">input</var> , return an error.</li>
                   5254: </ol>
                   5255: </li>
                   5256: <li>
                   5257: <p>If the next character is not one of U+0030 DIGIT ZERO (0) ..
                   5258: U+0039 DIGIT NINE (9), then return an error.</p>
                   5259: </li>
                   5260: <li>
                   5261: <p>If the next character is one of U+0030 DIGIT ZERO (0) .. U+0039
                   5262: DIGIT NINE (9):</p>
                   5263: <ol>
                   5264: <li>Multiply <var title="">value</var> by ten.</li>
                   5265: <li>Add the value of the current character (0..9) to <var title=
                   5266: "">value</var> .</li>
                   5267: <li>Advance <var title="">position</var> to the next
                   5268: character.</li>
                   5269: <li>If <var title="">position</var> is not past the end of
                   5270: <var title="">input</var> , return to the top of step 9 in the
                   5271: overall algorithm (that's the step within which these substeps find
                   5272: themselves).</li>
                   5273: </ol>
                   5274: </li>
                   5275: <li>
                   5276: <p>If <var title="">sign</var> is "positive", return <var title=
                   5277: "">value</var> , otherwise return 0- <var title="">value</var>
                   5278: .</p>
                   5279: </li>
                   5280: </ol>
                   5281: <h5 id="real-numbers"><span class="secno">3.2.3.3.</span> Real
                   5282: numbers</h5>
                   5283: <p>A string is a <dfn id="valid1">valid floating point number</dfn>
                   5284: if it consists of one of more characters in the range U+0030 DIGIT
                   5285: ZERO (0) to U+0039 DIGIT NINE (9), optionally with a single U+002E
                   5286: FULL STOP (".") character somewhere (either before these numbers,
                   5287: in between two numbers, or after the numbers), all optionally
                   5288: prefixed with a U+002D HYPHEN-MINUS ("-") character.</p>
                   5289: <p>The <dfn id="rules1">rules for parsing floating point number
                   5290: values</dfn> are as given in the following algorithm. As with the
                   5291: previous algorithms, when this one is invoked, the steps must be
                   5292: followed in the order given, aborting at the first step that
                   5293: returns a value. This algorithm will either return a number or an
                   5294: error. Leading spaces are ignored. Trailing spaces and garbage
                   5295: characters are ignored.</p>
                   5296: <ol>
                   5297: <li>
                   5298: <p>Let <var title="">input</var> be the string being parsed.</p>
                   5299: </li>
                   5300: <li>
                   5301: <p>Let <var title="">position</var> be a pointer into <var title=
                   5302: "">input</var> , initially pointing at the start of the string.</p>
                   5303: </li>
                   5304: <li>
                   5305: <p>Let <var title="">value</var> have the value 0.</p>
                   5306: </li>
                   5307: <li>
                   5308: <p>Let <var title="">sign</var> have the value "positive".</p>
                   5309: </li>
                   5310: <li>
                   5311: <p><a href="#skip-whitespace">Skip whitespace.</a></p>
                   5312: </li>
                   5313: <li>
                   5314: <p>If <var title="">position</var> is past the end of <var title=
                   5315: "">input</var> , return an error.</p>
                   5316: </li>
                   5317: <li>
                   5318: <p>If the character indicated by <var title="">position</var> (the
                   5319: first character) is a U+002D HYPHEN-MINUS ("-") character:</p>
                   5320: <ol>
                   5321: <li>Let <var title="">sign</var> be "negative".</li>
                   5322: <li>Advance <var title="">position</var> to the next
                   5323: character.</li>
                   5324: <li>If <var title="">position</var> is past the end of <var title=
                   5325: "">input</var> , return an error.</li>
                   5326: </ol>
                   5327: </li>
                   5328: <li>
                   5329: <p>If the next character is not one of U+0030 DIGIT ZERO (0) ..
                   5330: U+0039 DIGIT NINE (9) or U+002E FULL STOP ("."), then return an
                   5331: error.</p>
                   5332: </li>
                   5333: <li>
                   5334: <p>If the next character is U+002E FULL STOP ("."), but either that
                   5335: is the last character or the character after that one is not one of
                   5336: U+0030 DIGIT ZERO (0) .. U+0039 DIGIT NINE (9), then return an
                   5337: error.</p>
                   5338: </li>
                   5339: <li>
                   5340: <p>If the next character is one of U+0030 DIGIT ZERO (0) .. U+0039
                   5341: DIGIT NINE (9):</p>
                   5342: <ol>
                   5343: <li>Multiply <var title="">value</var> by ten.</li>
                   5344: <li>Add the value of the current character (0..9) to <var title=
                   5345: "">value</var> .</li>
                   5346: <li>Advance <var title="">position</var> to the next
                   5347: character.</li>
                   5348: <li>If <var title="">position</var> is past the end of <var title=
                   5349: "">input</var> , then if <var title="">sign</var> is "positive",
                   5350: return <var title="">value</var> , otherwise return 0- <var title=
                   5351: "">value</var> .</li>
                   5352: <li>Otherwise return to the top of step 10 in the overall algorithm
                   5353: (that's the step within which these substeps find themselves).</li>
                   5354: </ol>
                   5355: </li>
                   5356: <li>
                   5357: <p>Otherwise, if the next character is not a U+002E FULL STOP
                   5358: ("."), then if <var title="">sign</var> is "positive", return
                   5359: <var title="">value</var> , otherwise return 0- <var title=
                   5360: "">value</var> .</p>
                   5361: </li>
                   5362: <li>
                   5363: <p>The next character is a U+002E FULL STOP ("."). Advance
                   5364: <var title="">position</var> to the character after that.</p>
                   5365: </li>
                   5366: <li>
                   5367: <p>Let <var title="">divisor</var> be 1.</p>
                   5368: </li>
                   5369: <li>
                   5370: <p>If the next character is one of U+0030 DIGIT ZERO (0) .. U+0039
                   5371: DIGIT NINE (9):</p>
                   5372: <ol>
                   5373: <li>Multiply <var title="">divisor</var> by ten.</li>
                   5374: <li>Add the value of the current character (0..9) divided by
                   5375: <var title="">divisor</var> , to <var title="">value</var> .</li>
                   5376: <li>Advance <var title="">position</var> to the next
                   5377: character.</li>
                   5378: <li>If <var title="">position</var> is past the end of <var title=
                   5379: "">input</var> , then if <var title="">sign</var> is "positive",
                   5380: return <var title="">value</var> , otherwise return 0- <var title=
                   5381: "">value</var> .</li>
                   5382: <li>Otherwise return to the top of step 14 in the overall algorithm
                   5383: (that's the step within which these substeps find themselves).</li>
                   5384: </ol>
                   5385: </li>
                   5386: <li>
                   5387: <p>Otherwise, if <var title="">sign</var> is "positive", return
                   5388: <var title="">value</var> , otherwise return 0- <var title=
                   5389: "">value</var> .</p>
                   5390: </li>
                   5391: </ol>
                   5392: <h5 id="ratios"><span class="secno">3.2.3.4.</span> Ratios</h5>
                   5393: <p class="note">The algorithms described in this section are used
                   5394: by the <code><a href="#progress">progress</a></code> and
                   5395: <code><a href="#meter">meter</a></code> elements.</p>
                   5396: <p>A <dfn id="valid2">valid denominator punctuation character</dfn>
                   5397: is one of the characters from the table below. There is <dfn id=
                   5398: "a-value" title=
                   5399: "values associated with denominator punctuation characters">a value
                   5400: associated with each denominator punctuation character</dfn> , as
                   5401: shown in the table below.</p>
                   5402: <table>
                   5403: <thead>
                   5404: <tr>
                   5405: <th colspan="2">Denominator Punctuation Character</th>
                   5406: <th>Value</th>
                   5407: </tr>
                   5408: </thead>
                   5409: <tbody>
                   5410: <tr>
                   5411: <td>U+0025 PERCENT SIGN</td>
                   5412: <td>%</td>
                   5413: <td>100</td>
                   5414: </tr>
                   5415: <tr>
                   5416: <td>U+066A ARABIC PERCENT SIGN</td>
                   5417: <td>٪</td>
                   5418: <td>100</td>
                   5419: </tr>
                   5420: <tr>
                   5421: <td>U+FE6A SMALL PERCENT SIGN</td>
                   5422: <td>﹪</td>
                   5423: <td>100</td>
                   5424: </tr>
                   5425: <tr>
                   5426: <td>U+FF05 FULLWIDTH PERCENT SIGN</td>
                   5427: <td>%</td>
                   5428: <td>100</td>
                   5429: </tr>
                   5430: <tr>
                   5431: <td>U+2030 PER MILLE SIGN</td>
                   5432: <td>‰</td>
                   5433: <td>1000</td>
                   5434: </tr>
                   5435: <tr>
                   5436: <td>U+2031 PER TEN THOUSAND SIGN</td>
                   5437: <td>‱</td>
                   5438: <td>10000</td>
                   5439: </tr>
                   5440: </tbody>
                   5441: </table>
                   5442: <p>The <dfn id="steps">steps for finding one or two numbers of a
                   5443: ratio in a string</dfn> are as follows:</p>
                   5444: <ol>
                   5445: <li>If the string is empty, then return nothing and abort these
                   5446: steps.</li>
                   5447: <li><a href="#find-a">Find a number</a> in the string according to
                   5448: the algorithm below, starting at the start of the string.</li>
                   5449: <li>If the sub-algorithm in step 2 returned nothing or returned an
                   5450: error condition, return nothing and abort these steps.</li>
                   5451: <li>Set <var title="">number1</var> to the number returned by the
                   5452: sub-algorithm in step 2.</li>
                   5453: <li>Starting with the character immediately after the last one
                   5454: examined by the sub-algorithm in step 2, skip any characters in the
                   5455: string that are in the Unicode character class Zs (this might match
                   5456: zero characters). <a href="#references">[UNICODE]</a></li>
                   5457: <li>If there are still further characters in the string, and the
                   5458: next character in the string is a <a href="#valid2">valid
                   5459: denominator punctuation character</a> , set <var title=
                   5460: "">denominator</var> to that character.</li>
                   5461: <li>If the string contains any other characters in the range U+0030
                   5462: DIGIT ZERO to U+0039 DIGIT NINE, but <var title=
                   5463: "">denominator</var> was given a value in the step 6, return
                   5464: nothing and abort these steps.</li>
                   5465: <li>Otherwise, if <var title="">denominator</var> was given a value
                   5466: in step 6, return <var title="">number1</var> and <var title=
                   5467: "">denominator</var> and abort these steps.</li>
                   5468: <li><a href="#find-a">Find a number</a> in the string again,
                   5469: starting immediately after the last character that was examined by
                   5470: the sub-algorithm in step 2.</li>
                   5471: <li>If the sub-algorithm in step 9 returned nothing or an error
                   5472: condition, return nothing and abort these steps.</li>
                   5473: <li>Set <var title="">number2</var> to the number returned by the
                   5474: sub-algorithm in step 9.</li>
                   5475: <li>If there are still further characters in the string, and the
                   5476: next character in the string is a <a href="#valid2">valid
                   5477: denominator punctuation character</a> , return nothing and abort
                   5478: these steps.</li>
                   5479: <li>If the string contains any other characters in the range U+0030
                   5480: DIGIT ZERO to U+0039 DIGIT NINE, return nothing and abort these
                   5481: steps.</li>
                   5482: <li>Otherwise, return <var title="">number1</var> and <var title=
                   5483: "">number2</var> .</li>
                   5484: </ol>
                   5485: <p>The algorithm to <dfn id="find-a">find a number</dfn> is as
                   5486: follows. It is given a string and a starting position, and returns
                   5487: either nothing, a number, or an error condition.</p>
                   5488: <ol>
                   5489: <li>Starting at the given starting position, ignore all characters
                   5490: in the given string until the first character that is either a
                   5491: U+002E FULL STOP or one of the ten characters in the range U+0030
                   5492: DIGIT ZERO to U+0039 DIGIT NINE.</li>
                   5493: <li>If there are no such characters, return nothing and abort these
                   5494: steps.</li>
                   5495: <li>Starting with the character matched in step 1, collect all the
                   5496: consecutive characters that are either a U+002E FULL STOP or one of
                   5497: the ten characters in the range U+0030 DIGIT ZERO to U+0039 DIGIT
                   5498: NINE, and assign this string of one or more characters to
                   5499: <var title="">string</var> .</li>
                   5500: <li>If <var title="">string</var> contains more than one U+002E
                   5501: FULL STOP character then return an error condition and abort these
                   5502: steps.</li>
                   5503: <li>Parse <var title="">string</var> according to the <a href=
                   5504: "#rules1">rules for parsing floating point number values</a> , to
                   5505: obtain <var title="">number</var> . This step cannot fail (
                   5506: <var title="">string</var> is <del class=
                   5507: "diff-old">guarenteed</del> <ins class="diff-chg">guaranteed</ins>
                   5508: to be a <a href="#valid1">valid floating point number</a> ).</li>
                   5509: <li>Return <var title="">number</var> .</li>
                   5510: </ol>
                   5511: <h5 id="percentages-and-dimensions"><span class=
                   5512: "secno">3.2.3.5.</span> Percentages and dimensions</h5>
                   5513: <p class="big-issue"><dfn id="valid3">valid positive non-zero
                   5514: integers</dfn> <dfn id="rules2">rules for parsing dimension
                   5515: values</dfn> (only used by height/width on img, embed, object —
                   5516: lengths in css pixels or percentages)</p>
                   5517: <h5 id="lists"><span class="secno">3.2.3.6.</span> Lists of
                   5518: integers</h5>
                   5519: <p>A <dfn id="valid4">valid list of integers</dfn> is a number of
                   5520: <a href="#valid0" title="valid integer">valid integers</a>
                   5521: separated by U+002C COMMA characters, with no other characters
                   5522: (e.g. no <a href="#space" title="space character">space
                   5523: characters</a> ). In addition, there might be restrictions on the
                   5524: number of integers that can be given, or on the range of values
                   5525: allowed.</p>
                   5526: <p>The <dfn id="rules3">rules for parsing a list of integers</dfn>
                   5527: are as follows:</p>
                   5528: <ol>
                   5529: <li>
                   5530: <p>Let <var title="">input</var> be the string being parsed.</p>
                   5531: </li>
                   5532: <li>
                   5533: <p>Let <var title="">position</var> be a pointer into <var title=
                   5534: "">input</var> , initially pointing at the start of the string.</p>
                   5535: </li>
                   5536: <li>
                   5537: <p>Let <var title="">numbers</var> be an initially empty list of
                   5538: integers. This list will be the result of this algorithm.</p>
                   5539: </li>
                   5540: <li>
                   5541: <p>If there is a character in the string <var title="">input</var>
                   5542: at position <var title="">position</var> , and it is either
                   5543: <del class="diff-old">U+002C COMMA character or</del> a U+0020
                   5544: <del class="diff-old">SPACE</del> <ins class="diff-chg">SPACE,
                   5545: U+002C COMMA, or U+003B SEMICOLON</ins> character, then advance
                   5546: <var title="">position</var> to the next character in <var title=
                   5547: "">input</var> , or to beyond the end of the string if there are no
                   5548: more characters.</p>
                   5549: </li>
                   5550: <li>
                   5551: <p>If <var title="">position</var> points to beyond the end of
                   5552: <var title="">input</var> , return <var title="">numbers</var> and
                   5553: abort.</p>
                   5554: </li>
                   5555: <li>
                   5556: <p>If the character in the string <var title="">input</var> at
                   5557: position <var title="">position</var> is a <ins class=
                   5558: "diff-new">U+0020 SPACE,</ins> U+002C <del class="diff-old">COMMA
                   5559: character</del> <ins class="diff-chg">COMMA,</ins> or <del class=
                   5560: "diff-old">a U+0020 SPACE</del> <ins class="diff-chg">U+003B
                   5561: SEMICOLON</ins> character, <ins class="diff-new">then</ins> return
                   5562: to step 4.</p>
                   5563: </li>
                   5564: <li>
                   5565: <p>Let <var title="">negated</var> be false.</p>
                   5566: </li>
                   5567: <li>
                   5568: <p>Let <var title="">value</var> be 0.</p>
                   5569: </li>
                   5570: <li>
                   5571: <p>Let <var title=""><del class="diff-old">multiple</del>
                   5572: <ins class="diff-chg">started</ins></var> be <del class=
                   5573: "diff-old">1.</del> <ins class="diff-chg">false. This variable is
                   5574: set to true when the parser sees a number or a "</ins> <code title=
                   5575: ""><ins class="diff-chg">-</ins></code> <ins class="diff-chg">"
                   5576: character.</ins></p>
                   5577: </li>
                   5578: <li>
                   5579: <p>Let <var title=""><del class="diff-old">started</del>
                   5580: <ins class="diff-chg">got number</ins></var> be false. <ins class=
                   5581: "diff-new">This variable is set to true when the parser sees a
                   5582: number.</ins></p>
                   5583: </li>
                   5584: <li>
                   5585: <p>Let <var title="">finished</var> be false. <ins class=
                   5586: "diff-new">This variable is set to true to switch parser into a
                   5587: mode where it ignores characters until the next
                   5588: separator.</ins></p>
                   5589: </li>
                   5590: <li>
                   5591: <p>Let <var title="">bogus</var> be false.</p>
                   5592: </li>
                   5593: <li>
                   5594: <p><em>Parser:</em> If the character in the string <var title=
                   5595: "">input</var> at position <var title="">position</var> is:</p>
                   5596: <dl class="switch">
                   5597: <dt>A U+002D HYPHEN-MINUS character</dt>
                   5598: <dd>
                   5599: <p>Follow these substeps:</p>
                   5600: <ol>
                   5601: <li>If <var title=""><ins class="diff-new">got number</ins></var>
                   5602: <ins class="diff-new">is true, let</ins> <var title=""><ins class=
                   5603: "diff-new">finished</ins></var> <ins class="diff-new">be
                   5604: true.</ins></li>
                   5605: <li><ins class="diff-new">If</ins> <var title="">finished</var> is
                   5606: true, skip to the next step in the overall set of steps.</li>
                   5607: <li>If <var title="">started</var> is <del class="diff-old">true or
                   5608: if bogus is</del> true, let <var title="">negated</var> be
                   5609: false.</li>
                   5610: <li>Otherwise, if <var title="">started</var> is false and if
                   5611: <var title="">bogus</var> is false, let <var title="">negated</var>
                   5612: be true.</li>
                   5613: <li>Let <var title="">started</var> be true.</li>
                   5614: </ol>
                   5615: </dd>
                   5616: <dt>A character in the range U+0030 DIGIT ZERO .. U+0039 DIGIT
                   5617: NINE</dt>
                   5618: <dd>
                   5619: <p>Follow these substeps:</p>
                   5620: <ol>
                   5621: <li>If <var title="">finished</var> is true, skip to the next step
                   5622: in the overall set of steps.</li>
                   5623: <li><del class="diff-old">Let</del> <ins class=
                   5624: "diff-chg">Multiply</ins> <var title=""><del class=
                   5625: "diff-old">n</del> <ins class="diff-chg">value</ins></var>
                   5626: <del class="diff-old">be</del> <ins class="diff-chg">by
                   5627: ten.</ins></li>
                   5628: <li><ins class="diff-chg">Add</ins> the value of the digit,
                   5629: interpreted in base ten, <del class="diff-old">multiplied by
                   5630: multiple . Add n</del> to <var title="">value</var> .</li>
                   5631: <li><del class="diff-old">If value is greater than zero,
                   5632: multiply</del> <ins class="diff-chg">Let</ins> <var title=
                   5633: ""><del class="diff-old">multiple</del> <ins class=
                   5634: "diff-chg">started</ins></var> <del class="diff-old">by ten.</del>
                   5635: <ins class="diff-chg">be true.</ins></li>
                   5636: <li>Let <var title=""><del class="diff-old">started</del>
                   5637: <ins class="diff-chg">got number</ins></var> be true.</li>
                   5638: </ol>
                   5639: </dd>
                   5640: <dt>A <ins class="diff-new">U+0020 SPACE character</ins></dt>
                   5641: <dt><ins class="diff-new">A</ins> U+002C COMMA character</dt>
                   5642: <dt>A <del class="diff-old">U+0020 SPACE</del> <ins class=
                   5643: "diff-chg">U+003B SEMICOLON</ins> character</dt>
                   5644: <dd>
                   5645: <p>Follow these substeps:</p>
                   5646: <ol>
                   5647: <li>If <var title=""><del class="diff-old">started</del>
                   5648: <ins class="diff-chg">got number</ins></var> is false, return the
                   5649: <var title="">numbers</var> list and abort. <ins class=
                   5650: "diff-new">This happens if an entry in the list has no digits, as
                   5651: in "</ins> <code title=""><ins class=
                   5652: "diff-new">1,2,x,4</ins></code> <ins class="diff-new">".</ins></li>
                   5653: <li>If <var title="">negated</var> is true, then negate <var title=
                   5654: "">value</var> .</li>
                   5655: <li>Append <var title="">value</var> to the <var title=
                   5656: "">numbers</var> list.</li>
                   5657: <li>Jump to step 4 in the overall set of steps.</li>
                   5658: </ol>
                   5659: </dd>
                   5660: <dt>A U+002E FULL STOP character</dt>
                   5661: <dd>
                   5662: <p>Follow these substeps:</p>
                   5663: <ol>
                   5664: <li><del class="diff-old">Let</del> <ins class="diff-chg">If</ins>
                   5665: <var title=""><ins class="diff-chg">got number</ins></var>
                   5666: <ins class="diff-chg">is true, let</ins> <var title=
                   5667: "">finished</var> be true.</li>
                   5668: <li><ins class="diff-new">If</ins> <var title=""><ins class=
                   5669: "diff-new">finished</ins></var> <ins class="diff-new">is true, skip
                   5670: to the next step in the overall set of steps.</ins></li>
                   5671: <li><ins class="diff-new">Let</ins> <var title=""><ins class=
                   5672: "diff-new">negated</ins></var> <ins class="diff-new">be
                   5673: false.</ins></li>
                   5674: </ol>
                   5675: </dd>
                   5676: <dt>Any other character</dt>
                   5677: <dd>
                   5678: <p>Follow these substeps:</p>
                   5679: <ol>
                   5680: <li>If <var title="">finished</var> is true, skip to the next step
                   5681: in the overall set of steps.</li>
                   5682: <li>Let <var title="">negated</var> be false.</li>
                   5683: <li>Let <var title="">bogus</var> be true.</li>
                   5684: <li>If <var title="">started</var> is true, then return the
                   5685: <var title="">numbers</var> list, and abort. (The value in
                   5686: <var title="">value</var> is not appended to the list first; it is
                   5687: dropped.)</li>
                   5688: </ol>
                   5689: </dd>
                   5690: </dl>
                   5691: </li>
                   5692: <li>
                   5693: <p>Advance <var title="">position</var> to the next character in
                   5694: <var title="">input</var> , or to beyond the end of the string if
                   5695: there are no more characters.</p>
                   5696: </li>
                   5697: <li>
                   5698: <p>If <var title="">position</var> points to a character (and not
                   5699: to beyond the end of <var title="">input</var> ), jump to the big
                   5700: <em>Parser</em> step above.</p>
                   5701: </li>
                   5702: <li>
                   5703: <p>If <var title="">negated</var> is true, then negate <var title=
                   5704: "">value</var> .</p>
                   5705: </li>
                   5706: <li>
                   5707: <p>If <var title=""><del class="diff-old">started</del> <ins class=
                   5708: "diff-chg">got number</ins></var> is true, then append <var title=
                   5709: "">value</var> to the <var title="">numbers</var> <del class=
                   5710: "diff-old">list, return that list, and abort.</del> <ins class=
                   5711: "diff-chg">list.</ins></p>
                   5712: </li>
                   5713: <li>
                   5714: <p>Return the <var title="">numbers</var> list and abort.</p>
                   5715: </li>
                   5716: </ol>
                   5717: <h4 id="dates"><span class="secno"><del class=
                   5718: "diff-old">3.2.4.</del> <ins class="diff-chg">3.2.4</ins></span>
                   5719: Dates and times</h4>
                   5720: <p>In the algorithms below, the <dfn id="number">number of days in
                   5721: month <var title="">month</var> of year <var title=
                   5722: "">year</var></dfn> is: <em>31</em> if <var title="">month</var> is
                   5723: 1, 3, 5, 7, 8, 10, or 12; <em>30</em> if <var title="">month</var>
                   5724: is 4, 6, 9, or 11; <em>29</em> if <var title="">month</var> is 2
                   5725: and <var title="">year</var> is a number divisible by 400, or if
                   5726: <var title="">year</var> is a number divisible by 4 but not by 100;
                   5727: and <em>28</em> otherwise. This takes into account leap years in
                   5728: the Gregorian calendar. <a href="#references">[GREGORIAN]</a></p>
                   5729: <h5 id="specific"><span class="secno">3.2.4.1.</span> Specific
                   5730: moments in time</h5>
                   5731: <p>A string is a <dfn id="valid5">valid datetime</dfn> if it has
                   5732: four digits (representing the year), a literal hyphen, two digits
                   5733: (representing the month), a literal hyphen, two digits
                   5734: (representing the day), optionally some spaces, either a literal T
                   5735: or a space, optionally some more spaces, two digits (for the hour),
                   5736: a colon, two digits (the minutes), optionally the seconds (which,
                   5737: if included, must consist of another colon, two digits (the integer
                   5738: part of the seconds), and optionally a decimal point followed by
                   5739: one or more digits (for the fractional part of the seconds)),
                   5740: optionally some spaces, and finally either a literal Z (indicating
                   5741: the time zone is UTC), or, a plus sign or a minus sign followed by
                   5742: two digits, a colon, and two digits (for the sign, the hours and
                   5743: minutes of the timezone offset respectively); with the month-day
                   5744: combination being a valid date in the given year according to the
                   5745: Gregorian calendar, the hour values ( <var title="">h</var> ) being
                   5746: in the range 0&nbsp;≤&nbsp; <var title="">h</var> &nbsp;≤&nbsp;23,
                   5747: the minute values ( <var title="">m</var> ) in the range
                   5748: 0&nbsp;≤&nbsp; <var title="">m</var> &nbsp;≤&nbsp;59, and the
                   5749: second value ( <var title="">s</var> ) being in the range
                   5750: 0&nbsp;≤&nbsp; <var title="">h</var> &nbsp;&lt;&nbsp;60. <a href=
                   5751: "#references">[GREGORIAN]</a></p>
                   5752: <p>The digits must be characters in the range U+0030 DIGIT ZERO (0)
                   5753: to U+0039 DIGIT NINE (9), the hyphens must be a U+002D HYPHEN-MINUS
                   5754: characters, the T must be a U+0054 LATIN CAPITAL LETTER T, the
                   5755: colons must be U+003A COLON characters, the decimal point must be a
                   5756: U+002E FULL STOP, the Z must be a U+005A LATIN CAPITAL LETTER Z,
                   5757: the plus sign must be a U+002B PLUS SIGN, and the minus U+002D
                   5758: (same as the hyphen).</p>
                   5759: <div class="example">
                   5760: <p>The following are some examples of dates written as <a href=
                   5761: "#valid5" title="valid datetime">valid datetimes</a> .</p>
                   5762: <dl>
                   5763: <dt>" <code>0037-12-13 00:00 Z</code> "</dt>
                   5764: <dd>Midnight UTC on the birthday of Nero (the Roman Emperor).</dd>
                   5765: <dt>" <code>1979-10-14T12:00:00.001-04:00</code> "</dt>
                   5766: <dd>One millisecond after noon on October 14th 1979, in the time
                   5767: zone in use on the east coast of North America during daylight
                   5768: saving time.</dd>
                   5769: <dt>" <code>8592-01-01 T 02:09 +02:09</code> "</dt>
                   5770: <dd>Midnight UTC on the 1st of January, 8592. The time zone
                   5771: associated with that time is two hours and nine minutes ahead of
                   5772: UTC.</dd>
                   5773: </dl>
                   5774: <p>Several things are notable about these dates:</p>
                   5775: <ul>
                   5776: <li>Years with fewer than four digits have to be zero-padded. The
                   5777: date "37-12-13" would not be a valid date.</li>
                   5778: <li>To unambiguously identify a moment in time prior to the
                   5779: introduction of the Gregorian calendar, the date has to be first
                   5780: converted to the Gregorian calendar from the calendar in use at the
                   5781: time (e.g. from the Julian calendar). The date of Nero's birth is
                   5782: the 15th of December 37, in the Julian Calendar, which is the 13th
                   5783: of December 37 in the Gregorian Calendar.</li>
                   5784: <li>The time and timezone components are not optional.</li>
                   5785: <li>Dates before the year 0 or after the year 9999 can't be
                   5786: represented as a datetime in this version of HTML.</li>
                   5787: <li>Time zones differ based on daylight savings time.</li>
                   5788: </ul>
                   5789: </div>
                   5790: <p class="note">Conformance checkers can use the algorithm below to
                   5791: determine if a datetime is a valid datetime or not.</p>
                   5792: <p>To <dfn id="datetime-parser">parse a string as a datetime
                   5793: value</dfn> , a user agent must apply the following algorithm to
                   5794: the string. This will either return a time in UTC, with associated
                   5795: timezone information for round tripping or display purposes, or
                   5796: nothing, indicating the value is not a <a href="#valid5">valid
                   5797: datetime</a> . If at any point the algorithm says that it "fails",
                   5798: this means that it returns nothing.</p>
                   5799: <ol>
                   5800: <li>
                   5801: <p>Let <var title="">input</var> be the string being parsed.</p>
                   5802: </li>
                   5803: <li>
                   5804: <p>Let <var title="">position</var> be a pointer into <var title=
                   5805: "">input</var> , initially pointing at the start of the string.</p>
                   5806: </li>
                   5807: <li>
                   5808: <p><a href="#collect">Collect a sequence of characters</a> in the
                   5809: range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the
                   5810: collected sequence is not exactly four characters long, then fail.
                   5811: Otherwise, interpret the resulting sequence as a <del class=
                   5812: "diff-old">base ten</del> <ins class="diff-chg">base-ten</ins>
                   5813: integer. Let that number be the <var title="">year</var> .</p>
                   5814: </li>
                   5815: <li>
                   5816: <p>If <var title="">position</var> is beyond the end of <var title=
                   5817: "">input</var> or if the character at <var title="">position</var>
                   5818: is not a U+002D HYPHEN-MINUS character, then fail. Otherwise, move
                   5819: <var title="">position</var> forwards one character.</p>
                   5820: </li>
                   5821: <li>
                   5822: <p><a href="#collect">Collect a sequence of characters</a> in the
                   5823: range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the
                   5824: collected sequence is not exactly two characters long, then fail.
                   5825: Otherwise, interpret the resulting sequence as a <del class=
                   5826: "diff-old">base ten</del> <ins class="diff-chg">base-ten</ins>
                   5827: integer. Let that number be the <var title="">month</var> .</p>
                   5828: </li>
                   5829: <li>If <var title="">month</var> is not a number in the range
                   5830: 1&nbsp;≤&nbsp; <var title="">month</var> &nbsp;≤&nbsp;12, then
                   5831: fail.</li>
                   5832: <li>
                   5833: <p>Let <var title="">maxday</var> be the <a href="#number">number
                   5834: of days in month <var title="">month</var> of year <var title=
                   5835: "">year</var></a> .</p>
                   5836: </li>
                   5837: <li>
                   5838: <p>If <var title="">position</var> is beyond the end of <var title=
                   5839: "">input</var> or if the character at <var title="">position</var>
                   5840: is not a U+002D HYPHEN-MINUS character, then fail. Otherwise, move
                   5841: <var title="">position</var> forwards one character.</p>
                   5842: </li>
                   5843: <li>
                   5844: <p><a href="#collect">Collect a sequence of characters</a> in the
                   5845: range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the
                   5846: collected sequence is not exactly two characters long, then fail.
                   5847: Otherwise, interpret the resulting sequence as a <del class=
                   5848: "diff-old">base ten</del> <ins class="diff-chg">base-ten</ins>
                   5849: integer. Let that number be the <var title="">day</var> .</p>
                   5850: </li>
                   5851: <li>
                   5852: <p>If <var title="">day</var> is not a number in the range
                   5853: 1&nbsp;≤&nbsp; <var title="">month</var> &nbsp;≤&nbsp; <var title=
                   5854: "">maxday</var> , then fail.</p>
                   5855: </li>
                   5856: <li>
                   5857: <p><a href="#collect">Collect a sequence of characters</a> that are
                   5858: either U+0054 LATIN CAPITAL LETTER T characters or <a href="#space"
                   5859: title="space character">space characters</a> . If the collected
                   5860: sequence is zero characters long, or if it contains more than one
                   5861: U+0054 LATIN CAPITAL LETTER T character, then fail.</p>
                   5862: </li>
                   5863: <li>
                   5864: <p><a href="#collect">Collect a sequence of characters</a> in the
                   5865: range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the
                   5866: collected sequence is not exactly two characters long, then fail.
                   5867: Otherwise, interpret the resulting sequence as a <del class=
                   5868: "diff-old">base ten</del> <ins class="diff-chg">base-ten</ins>
                   5869: integer. Let that number be the <var title="">hour</var> .</p>
                   5870: </li>
                   5871: <li>If <var title="">hour</var> is not a number in the range
                   5872: 0&nbsp;≤&nbsp; <var title="">hour</var> &nbsp;≤&nbsp;23, then
                   5873: fail.</li>
                   5874: <li>
                   5875: <p>If <var title="">position</var> is beyond the end of <var title=
                   5876: "">input</var> or if the character at <var title="">position</var>
                   5877: is not a U+003A COLON character, then fail. Otherwise, move
                   5878: <var title="">position</var> forwards one character.</p>
                   5879: </li>
                   5880: <li>
                   5881: <p><a href="#collect">Collect a sequence of characters</a> in the
                   5882: range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the
                   5883: collected sequence is not exactly two characters long, then fail.
                   5884: Otherwise, interpret the resulting sequence as a <del class=
                   5885: "diff-old">base ten</del> <ins class="diff-chg">base-ten</ins>
                   5886: integer. Let that number be the <var title="">minute</var> .</p>
                   5887: </li>
                   5888: <li>If <var title="">minute</var> is not a number in the range
                   5889: 0&nbsp;≤&nbsp; <var title="">minute</var> &nbsp;≤&nbsp;59, then
                   5890: fail.</li>
                   5891: <li>
                   5892: <p>Let <var title="">second</var> be a string with the value
                   5893: "0".</p>
                   5894: </li>
                   5895: <li>
                   5896: <p>If <var title="">position</var> is beyond the end of <var title=
                   5897: "">input</var> , then fail.</p>
                   5898: </li>
                   5899: <li>
                   5900: <p>If the character at <var title="">position</var> is a U+003A
                   5901: COLON, then:</p>
                   5902: <ol>
                   5903: <li>
                   5904: <p>Advance <var title="">position</var> to the next character in
                   5905: <var title="">input</var> .</p>
                   5906: </li>
                   5907: <li>
                   5908: <p>If <var title="">position</var> is beyond the end of <var title=
                   5909: "">input</var> , or at the last character in <var title=
                   5910: "">input</var> , or if the next <em>two</em> characters in
                   5911: <var title="">input</var> starting at <var title="">position</var>
                   5912: are not two characters both in the range U+0030 DIGIT ZERO (0) to
                   5913: U+0039 DIGIT NINE (9), then fail.</p>
                   5914: </li>
                   5915: <li>
                   5916: <p><a href="#collect">Collect a sequence of characters</a> that are
                   5917: either characters in the range U+0030 DIGIT ZERO (0) to U+0039
                   5918: DIGIT NINE (9) or U+002E FULL STOP characters. If the collected
                   5919: sequence has more than one U+002E FULL STOP characters, or if the
                   5920: last character in the sequence is a U+002E FULL STOP character,
                   5921: then fail. Otherwise, let the collected string be <var title=
                   5922: "">second</var> instead of its previous value.</p>
                   5923: </li>
                   5924: </ol>
                   5925: </li>
                   5926: <li>
                   5927: <p>Interpret <var title="">second</var> as a <del class=
                   5928: "diff-old">base ten</del> <ins class="diff-chg">base-ten</ins>
                   5929: number (possibly with a fractional part). Let that number be
                   5930: <var title="">second</var> instead of the string version.</p>
                   5931: </li>
                   5932: <li>If <var title="">second</var> is not a number in the range
                   5933: 0&nbsp;≤&nbsp; <var title="">hour</var> &nbsp;&lt;&nbsp;60, then
                   5934: fail. (The values 60 and 61 are not allowed: leap seconds cannot be
                   5935: represented by datetime values.)</li>
                   5936: <li>
                   5937: <p>If <var title="">position</var> is beyond the end of <var title=
                   5938: "">input</var> , then fail.</p>
                   5939: </li>
                   5940: <li>
                   5941: <p><a href="#skip-whitespace">Skip whitespace.</a></p>
                   5942: </li>
                   5943: <li>
                   5944: <p>If the character at <var title="">position</var> is a U+005A
                   5945: LATIN CAPITAL LETTER Z, then:</p>
                   5946: <ol>
                   5947: <li>
                   5948: <p>Let <var title="">timezone <sub title="">hours</sub></var> be
                   5949: 0.</p>
                   5950: </li>
                   5951: <li>
                   5952: <p>Let <var title="">timezone <sub title="">minutes</sub></var> be
                   5953: 0.</p>
                   5954: </li>
                   5955: <li>
                   5956: <p>Advance <var title="">position</var> to the next character in
                   5957: <var title="">input</var> .</p>
                   5958: </li>
                   5959: </ol>
                   5960: </li>
                   5961: <li>
                   5962: <p>Otherwise, if the character at <var title="">position</var> is
                   5963: either a U+002B PLUS SIGN ("+") or a U+002D HYPHEN-MINUS ("-"),
                   5964: then:</p>
                   5965: <ol>
                   5966: <li>
                   5967: <p>If the character at <var title="">position</var> is a U+002B
                   5968: PLUS SIGN ("+"), let <var title="">sign</var> be "positive".
                   5969: Otherwise, it's a U+002D HYPHEN-MINUS ("-"); let <var title=
                   5970: "">sign</var> be "negative".</p>
                   5971: </li>
                   5972: <li>
                   5973: <p>Advance <var title="">position</var> to the next character in
                   5974: <var title="">input</var> .</p>
                   5975: </li>
                   5976: <li>
                   5977: <p><a href="#collect">Collect a sequence of characters</a> in the
                   5978: range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the
                   5979: collected sequence is not exactly two characters long, then fail.
                   5980: Otherwise, interpret the resulting sequence as a <del class=
                   5981: "diff-old">base ten</del> <ins class="diff-chg">base-ten</ins>
                   5982: integer. Let that number be the <var title="">timezone <sub title=
                   5983: "">hours</sub></var> .</p>
                   5984: </li>
                   5985: <li>If <var title="">timezone <sub title="">hours</sub></var> is
                   5986: not a number in the range 0&nbsp;≤&nbsp; <var title="">timezone
                   5987: <sub title="">hours</sub></var> &nbsp;≤&nbsp;23, then fail.</li>
                   5988: <li>If <var title="">sign</var> is "negative", then negate
                   5989: <var title="">timezone <sub title="">hours</sub></var> .</li>
                   5990: <li>
                   5991: <p>If <var title="">position</var> is beyond the end of <var title=
                   5992: "">input</var> or if the character at <var title="">position</var>
                   5993: is not a U+003A COLON character, then fail. Otherwise, move
                   5994: <var title="">position</var> forwards one character.</p>
                   5995: </li>
                   5996: <li>
                   5997: <p><a href="#collect">Collect a sequence of characters</a> in the
                   5998: range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the
                   5999: collected sequence is not exactly two characters long, then fail.
                   6000: Otherwise, interpret the resulting sequence as a <del class=
                   6001: "diff-old">base ten</del> <ins class="diff-chg">base-ten</ins>
                   6002: integer. Let that number be the <var title="">timezone <sub title=
                   6003: "">minutes</sub></var> .</p>
                   6004: </li>
                   6005: <li>If <var title="">timezone <sub title="">minutes</sub></var> is
                   6006: not a number in the range 0&nbsp;≤&nbsp; <var title="">timezone
                   6007: <sub title="">minutes</sub></var> &nbsp;≤&nbsp;59, then fail.</li>
                   6008: <li>If <var title="">sign</var> is "negative", then negate
                   6009: <var title="">timezone <sub title="">minutes</sub></var> .</li>
                   6010: </ol>
                   6011: </li>
                   6012: <li>
                   6013: <p>If <var title="">position</var> is <em>not</em> beyond the end
                   6014: of <var title="">input</var> , then fail.</p>
                   6015: </li>
                   6016: <li>
                   6017: <p>Let <var title="">time</var> be the moment in time at year
                   6018: <var title="">year</var> , month <var title="">month</var> , day
                   6019: <var title="">day</var> , hours <var title="">hour</var> , minute
                   6020: <var title="">minute</var> , second <var title="">second</var> ,
                   6021: subtracting <var title="">timezone <sub title="">hours</sub></var>
                   6022: hours and <var title="">timezone <sub title="">minutes</sub></var>
                   6023: minutes. That moment in time is a moment in the UTC timezone.</p>
                   6024: </li>
                   6025: <li>
                   6026: <p>Let <var title="">timezone</var> be <var title="">timezone
                   6027: <sub title="">hours</sub></var> hours and <var title="">timezone
                   6028: <sub title="">minutes</sub></var> minutes from UTC.</p>
                   6029: </li>
                   6030: <li>
                   6031: <p>Return <var title="">time</var> and <var title="">timezone</var>
                   6032: .</p>
                   6033: </li>
                   6034: </ol>
                   6035: <h5 id="vaguer"><span class="secno">3.2.4.2.</span> Vaguer moments
                   6036: in time</h5>
                   6037: <p>This section defines <dfn id="date-or" title=
                   6038: "date or time string">date or time strings</dfn> . There are two
                   6039: kinds, <dfn id="date-or0" title=
                   6040: "date or time string in content">date or time strings in
                   6041: content</dfn> , and <dfn id="date-or1" title=
                   6042: "date or time string in attributes">date or time strings in
                   6043: attributes</dfn> . The only difference is in the handling of
                   6044: whitespace characters.</p>
                   6045: <p>To parse a <a href="#date-or">date or time string</a> , user
                   6046: agents must use the following algorithm. A <a href="#date-or">date
                   6047: or time string</a> is a <em>valid</em> date or time string if the
                   6048: following algorithm, when run on the string, doesn't say the string
                   6049: is invalid.</p>
                   6050: <p>The algorithm may return nothing (in which case the string will
                   6051: be invalid), or it may return a date, a time, a date and a time, or
                   6052: a date and a time and <del class="diff-old">and</del> a timezone.
                   6053: Even if the algorithm returns one or more values, the string can
                   6054: still be invalid.</p>
                   6055: <ol>
                   6056: <li>
                   6057: <p>Let <var title="">input</var> be the string being parsed.</p>
                   6058: </li>
                   6059: <li>
                   6060: <p>Let <var title="">position</var> be a pointer into <var title=
                   6061: "">input</var> , initially pointing at the start of the string.</p>
                   6062: </li>
                   6063: <li>
                   6064: <p>Let <var title="">results</var> be the collection of results
                   6065: that are to be returned (one or more of a date, a time, and a
                   6066: timezone), initially empty. If the algorithm aborts at any point,
                   6067: then whatever is currently in <var title="">results</var> must be
                   6068: returned as the result of the algorithm.</p>
                   6069: </li>
                   6070: <li>
                   6071: <p>For the "in content" variant: <a href="#skip-">skip Zs
                   6072: characters</a> ; for the "in attributes" variant: <a href=
                   6073: "#skip-whitespace">skip whitespace</a> .</p>
                   6074: </li>
                   6075: <li>
                   6076: <p><a href="#collect">Collect a sequence of characters</a> in the
                   6077: range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the
                   6078: collected sequence is empty, then the string is invalid; abort
                   6079: these steps.</p>
                   6080: </li>
                   6081: <li>
                   6082: <p>Let the sequence of characters collected in the last step be
                   6083: <var title="">s</var> .</p>
                   6084: </li>
                   6085: <li>
                   6086: <p>If <var title="">position</var> is past the end of <var title=
                   6087: "">input</var> , the string is invalid; abort these steps.</p>
                   6088: </li>
                   6089: <li>
                   6090: <p>If the character at <var title="">position</var> is <em>not</em>
                   6091: a U+003A COLON character, then:</p>
                   6092: <ol>
                   6093: <li>
                   6094: <p>If the character at <var title="">position</var> is not a U+002D
                   6095: HYPHEN-MINUS ("-") character either, then the string is invalid,
                   6096: abort these steps.</p>
                   6097: </li>
                   6098: <li>
                   6099: <p>If the sequence <var title="">s</var> is not exactly four digits
                   6100: long, then the string is invalid. (This does not stop the
                   6101: algorithm, however.)</p>
                   6102: </li>
                   6103: <li>
                   6104: <p>Interpret the sequence of characters collected in step 5 as a
                   6105: <del class="diff-old">base ten</del> <ins class=
                   6106: "diff-chg">base-ten</ins> integer, and let that number be
                   6107: <var title="">year</var> .</p>
                   6108: </li>
                   6109: <li>
                   6110: <p>Advance <var title="">position</var> past the U+002D
                   6111: HYPHEN-MINUS ("-") character.</p>
                   6112: </li>
                   6113: <li>
                   6114: <p><a href="#collect">Collect a sequence of characters</a> in the
                   6115: range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the
                   6116: collected sequence is empty, then the string is invalid; abort
                   6117: these steps.</p>
                   6118: </li>
                   6119: <li>
                   6120: <p>If the sequence collected in the last step is not exactly two
                   6121: digits long, then the string is invalid.</p>
                   6122: </li>
                   6123: <li>
                   6124: <p>Interpret the sequence of characters collected two steps ago as
                   6125: a <del class="diff-old">base ten</del> <ins class=
                   6126: "diff-chg">base-ten</ins> integer, and let that number be
                   6127: <var title="">month</var> .</p>
                   6128: </li>
                   6129: <li>If <var title="">month</var> is not a number in the range
                   6130: 1&nbsp;≤&nbsp; <var title="">month</var> &nbsp;≤&nbsp;12, then the
                   6131: string is invalid, abort these steps.</li>
                   6132: <li>
                   6133: <p>Let <var title="">maxday</var> be the <a href="#number">number
                   6134: of days in month <var title="">month</var> of year <var title=
                   6135: "">year</var></a> .</p>
                   6136: </li>
                   6137: <li>
                   6138: <p>If <var title="">position</var> is past the end of <var title=
                   6139: "">input</var> , or if the character at <var title=
                   6140: "">position</var> is <em>not</em> a U+002D HYPHEN-MINUS ("-")
                   6141: character, then the string is invalid, abort these steps.
                   6142: Otherwise, advance <var title="">position</var> to the next
                   6143: character.</p>
                   6144: </li>
                   6145: <li>
                   6146: <p><a href="#collect">Collect a sequence of characters</a> in the
                   6147: range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the
                   6148: collected sequence is empty, then the string is invalid; abort
                   6149: these steps.</p>
                   6150: </li>
                   6151: <li>
                   6152: <p>If the sequence collected in the last step is not exactly two
                   6153: digits long, then the string is invalid.</p>
                   6154: </li>
                   6155: <li>
                   6156: <p>Interpret the sequence of characters collected two steps ago as
                   6157: a <del class="diff-old">base ten</del> <ins class=
                   6158: "diff-chg">base-ten</ins> integer, and let that number be
                   6159: <var title="">day</var> .</p>
                   6160: </li>
                   6161: <li>
                   6162: <p>If <var title="">day</var> is not a number in the range
                   6163: 1&nbsp;≤&nbsp; <var title="">day</var> &nbsp;≤&nbsp; <var title=
                   6164: "">maxday</var> , then the string is invalid, abort these
                   6165: steps.</p>
                   6166: </li>
                   6167: <li>
                   6168: <p>Add the date represented by <var title="">year</var> ,
                   6169: <var title="">month</var> , and <var title="">day</var> to the
                   6170: <var title="">results</var> .</p>
                   6171: </li>
                   6172: <li>
                   6173: <p>For the "in content" variant: <a href="#skip-">skip Zs
                   6174: characters</a> ; for the "in attributes" variant: <a href=
                   6175: "#skip-whitespace">skip whitespace</a> .</p>
                   6176: </li>
                   6177: <li>
                   6178: <p>If the character at <var title="">position</var> is a U+0054
                   6179: LATIN CAPITAL LETTER T, then move <var title="">position</var>
                   6180: forwards one character.</p>
                   6181: </li>
                   6182: <li>
                   6183: <p>For the "in content" variant: <a href="#skip-">skip Zs
                   6184: characters</a> ; for the "in attributes" variant: <a href=
                   6185: "#skip-whitespace">skip whitespace</a> .</p>
                   6186: </li>
                   6187: <li>
                   6188: <p><a href="#collect">Collect a sequence of characters</a> in the
                   6189: range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the
                   6190: collected sequence is empty, then the string is invalid; abort
                   6191: these steps.</p>
                   6192: </li>
                   6193: <li>
                   6194: <p>Let <var title="">s</var> be the sequence of characters
                   6195: collected in the last step.</p>
                   6196: </li>
                   6197: </ol>
                   6198: </li>
                   6199: <li>
                   6200: <p>If <var title="">s</var> is not exactly two digits long, then
                   6201: the string is invalid.</p>
                   6202: </li>
                   6203: <li>
                   6204: <p>Interpret the sequence of characters collected two steps ago as
                   6205: a <del class="diff-old">base ten</del> <ins class=
                   6206: "diff-chg">base-ten</ins> integer, and let that number be
                   6207: <var title="">hour</var> .</p>
                   6208: </li>
                   6209: <li>
                   6210: <p>If <var title="">hour</var> is not a number in the range
                   6211: 0&nbsp;≤&nbsp; <var title="">hour</var> &nbsp;≤&nbsp;23, then the
                   6212: string is invalid, abort these steps.</p>
                   6213: </li>
                   6214: <li>
                   6215: <p>If <var title="">position</var> is past the end of <var title=
                   6216: "">input</var> , or if the character at <var title=
                   6217: "">position</var> is <em>not</em> a U+003A COLON character, then
                   6218: the string is invalid, abort these steps. Otherwise, advance
                   6219: <var title="">position</var> to the next character.</p>
                   6220: </li>
                   6221: <li>
                   6222: <p><a href="#collect">Collect a sequence of characters</a> in the
                   6223: range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the
                   6224: collected sequence is empty, then the string is invalid; abort
                   6225: these steps.</p>
                   6226: </li>
                   6227: <li>
                   6228: <p>If the sequence collected in the last step is not exactly two
                   6229: digits long, then the string is invalid.</p>
                   6230: </li>
                   6231: <li>
                   6232: <p>Interpret the sequence of characters collected two steps ago as
                   6233: a <del class="diff-old">base ten</del> <ins class=
                   6234: "diff-chg">base-ten</ins> integer, and let that number be
                   6235: <var title="">minute</var> .</p>
                   6236: </li>
                   6237: <li>
                   6238: <p>If <var title="">minute</var> is not a number in the range
                   6239: 0&nbsp;≤&nbsp; <var title="">minute</var> &nbsp;≤&nbsp;59, then the
                   6240: string is invalid, abort these steps.</p>
                   6241: </li>
                   6242: <li>
                   6243: <p>Let <var title="">second</var> be 0. It may be changed to
                   6244: another value in the next step.</p>
                   6245: </li>
                   6246: <li>
                   6247: <p>If <var title="">position</var> is not past the end of
                   6248: <var title="">input</var> and the character at <var title=
                   6249: "">position</var> is a U+003A COLON character, then:</p>
                   6250: <ol>
                   6251: <li>
                   6252: <p><a href="#collect">Collect a sequence of characters</a> that are
                   6253: either characters in the range U+0030 DIGIT ZERO (0) to U+0039
                   6254: DIGIT NINE (9) or are U+002E FULL STOP. If the collected sequence
                   6255: is empty, or contains more than one U+002E FULL STOP character,
                   6256: then the string is invalid; abort these steps.</p>
                   6257: </li>
                   6258: <li>
                   6259: <p>If the first character in the sequence collected in the last
                   6260: step is not in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE
                   6261: (9), then the string is invalid.</p>
                   6262: </li>
                   6263: <li>
                   6264: <p>Interpret the sequence of characters collected two steps ago as
                   6265: a <del class="diff-old">base ten</del> <ins class=
                   6266: "diff-chg">base-ten</ins> number (possibly with a fractional part),
                   6267: and let that number be <var title="">second</var> .</p>
                   6268: </li>
                   6269: <li>
                   6270: <p>If <var title="">second</var> is not a number in the range
                   6271: 0&nbsp;≤&nbsp; <var title="">minute</var> &nbsp;&lt;&nbsp;60, then
                   6272: the string is invalid, abort these steps.</p>
                   6273: </li>
                   6274: </ol>
                   6275: </li>
                   6276: <li>
                   6277: <p>Add the time represented by <var title="">hour</var> ,
                   6278: <var title="">minute</var> , and <var title="">second</var> to the
                   6279: <var title="">results</var> .</p>
                   6280: </li>
                   6281: <li>
                   6282: <p>If <var title="">results</var> has both a date and a time,
                   6283: then:</p>
                   6284: <ol>
                   6285: <li>
                   6286: <p>For the "in content" variant: <a href="#skip-">skip Zs
                   6287: characters</a> ; for the "in attributes" variant: <a href=
                   6288: "#skip-whitespace">skip whitespace</a> .</p>
                   6289: </li>
                   6290: <li>
                   6291: <p>If <var title="">position</var> is past the end of <var title=
                   6292: "">input</var> , then skip to the next step in the overall set of
                   6293: steps.</p>
                   6294: </li>
                   6295: <li>
                   6296: <p>Otherwise, if the character at <var title="">position</var> is a
                   6297: U+005A LATIN CAPITAL LETTER Z, then:</p>
                   6298: <ol>
                   6299: <li>
                   6300: <p>Add the timezone corresponding to UTC (zero offset) to the
                   6301: <var title="">results</var> .</p>
                   6302: </li>
                   6303: <li>
                   6304: <p>Advance <var title="">position</var> to the next character in
                   6305: <var title="">input</var> .</p>
                   6306: </li>
                   6307: <li>
                   6308: <p>Skip to the next step in the overall set of steps.</p>
                   6309: </li>
                   6310: </ol>
                   6311: </li>
                   6312: <li>
                   6313: <p>Otherwise, if the character at <var title="">position</var> is
                   6314: either a U+002B PLUS SIGN ("+") or a U+002D HYPHEN-MINUS ("-"),
                   6315: then:</p>
                   6316: <ol>
                   6317: <li>
                   6318: <p>If the character at <var title="">position</var> is a U+002B
                   6319: PLUS SIGN ("+"), let <var title="">sign</var> be "positive".
                   6320: Otherwise, it's a U+002D HYPHEN-MINUS ("-"); let <var title=
                   6321: "">sign</var> be "negative".</p>
                   6322: </li>
                   6323: <li>
                   6324: <p>Advance <var title="">position</var> to the next character in
                   6325: <var title="">input</var> .</p>
                   6326: </li>
                   6327: <li>
                   6328: <p><a href="#collect">Collect a sequence of characters</a> in the
                   6329: range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the
                   6330: collected sequence is not exactly two characters long, then the
                   6331: string is invalid.</p>
                   6332: </li>
                   6333: <li>
                   6334: <p>Interpret the sequence collected in the last step as a
                   6335: <del class="diff-old">base ten</del> <ins class=
                   6336: "diff-chg">base-ten</ins> number, and let that number be
                   6337: <var title="">timezone <sub title="">hours</sub></var> .</p>
                   6338: </li>
                   6339: <li>If <var title="">timezone <sub title="">hours</sub></var> is
                   6340: not a number in the range 0&nbsp;≤&nbsp; <var title="">timezone
                   6341: <sub title="">hours</sub></var> &nbsp;≤&nbsp;23, then the string is
                   6342: invalid; abort these steps.</li>
                   6343: <li>If <var title="">sign</var> is "negative", then negate
                   6344: <var title="">timezone <sub title="">hours</sub></var> .</li>
                   6345: <li>
                   6346: <p>If <var title="">position</var> is beyond the end of <var title=
                   6347: "">input</var> or if the character at <var title="">position</var>
                   6348: is not a U+003A COLON character, then the string is invalid; abort
                   6349: these steps. Otherwise, move <var title="">position</var> forwards
                   6350: one character.</p>
                   6351: </li>
                   6352: <li>
                   6353: <p><a href="#collect">Collect a sequence of characters</a> in the
                   6354: range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the
                   6355: collected sequence is not exactly two characters long, then the
                   6356: string is invalid.</p>
                   6357: </li>
                   6358: <li>
                   6359: <p>Interpret the sequence collected in the last step as a
                   6360: <del class="diff-old">base ten</del> <ins class=
                   6361: "diff-chg">base-ten</ins> number, and let that number be
                   6362: <var title="">timezone <sub title="">minutes</sub></var> .</p>
                   6363: </li>
                   6364: <li>If <var title="">timezone <sub title="">minutes</sub></var> is
                   6365: not a number in the range 0&nbsp;≤&nbsp; <var title="">timezone
                   6366: <sub title="">minutes</sub></var> &nbsp;≤&nbsp;59, then the string
                   6367: is invalid; abort these steps.</li>
                   6368: <li>
                   6369: <p>Add the timezone corresponding to an offset of <var title=
                   6370: "">timezone <sub title="">hours</sub></var> hours and <var title=
                   6371: "">timezone <sub title="">minutes</sub></var> minutes to the
                   6372: <var title="">results</var> .</p>
                   6373: </li>
                   6374: <li>
                   6375: <p>Skip to the next step in the overall set of steps.</p>
                   6376: </li>
                   6377: </ol>
                   6378: </li>
                   6379: <li>
                   6380: <p>Otherwise, the string is invalid; abort these steps.</p>
                   6381: </li>
                   6382: </ol>
                   6383: </li>
                   6384: <li>
                   6385: <p>For the "in content" variant: <a href="#skip-">skip Zs
                   6386: characters</a> ; for the "in attributes" variant: <a href=
                   6387: "#skip-whitespace">skip whitespace</a> .</p>
                   6388: </li>
                   6389: <li>
                   6390: <p>If <var title="">position</var> is <em>not</em> past the end of
                   6391: <var title="">input</var> , then the string is invalid.</p>
                   6392: </li>
                   6393: <li>
                   6394: <p>Abort these steps (the string is parsed).</p>
                   6395: </li>
                   6396: </ol>
                   6397: <h4 id="time-offsets"><span class="secno"><del class=
                   6398: "diff-old">3.2.5.</del> <ins class="diff-chg">3.2.5</ins></span>
                   6399: Time offsets</h4>
                   6400: <p class="big-issue"><dfn id="valid6">valid time offset</dfn> ,
                   6401: <dfn id="rules4">rules for parsing time offsets</dfn> , <dfn id=
                   6402: "time-offset">time offset <del class="diff-old">serialisation</del>
                   6403: <ins class="diff-chg">serialization</ins> rules</dfn> ; in the
                   6404: format "5d4h3m2s1ms" or "3m 9.2s" or "00:00:00.00" or similar.</p>
                   6405: <h4 id="tokens"><span class="secno"><del class=
                   6406: "diff-old">3.2.6.</del> <ins class="diff-chg">3.2.6</ins></span>
                   6407: Tokens</h4>
                   6408: <p>A <dfn id="set-of">set of space-separated tokens</dfn> is a set
                   6409: of zero or more words separated by one or more <a href="#space"
                   6410: title="space character">space characters</a> , where words consist
                   6411: of any string of one or more characters, none of which are <a href=
                   6412: "#space" title="space character">space characters</a> .</p>
                   6413: <p>A string containing a <a href="#set-of">set of space-separated
                   6414: tokens</a> may have leading or trailing <a href="#space" title=
                   6415: "space character">space characters</a> .</p>
                   6416: <p>An <dfn id="unordered">unordered set of unique space-separated
                   6417: tokens</dfn> is a <a href="#set-of">set of space-separated
                   6418: tokens</a> where none of the words are duplicated.</p>
                   6419: <p>An <dfn id="ordered">ordered set of unique space-separated
                   6420: tokens</dfn> is a <a href="#set-of">set of space-separated
                   6421: tokens</a> where none of the words are duplicated but where the
                   6422: order of the tokens is meaningful.</p>
                   6423: <p><a href="#set-of" title=
                   6424: "set of space-separated tokens"><ins class="diff-new">Sets of
                   6425: space-separated tokens</ins></a> <ins class="diff-new">sometimes
                   6426: have a defined set of allowed values. When a set of allowed values
                   6427: is defined, the tokens must all be from that list of allowed
                   6428: values; other values are non-conforming. If no such set of allowed
                   6429: values is provided, then all values are conforming.</ins></p>
                   6430: <p>When a user agent has to <dfn id="split">split a string on
                   6431: spaces</dfn> , it must use the following algorithm:</p>
                   6432: <ol>
                   6433: <li>
                   6434: <p>Let <var title="">input</var> be the string being parsed.</p>
                   6435: </li>
                   6436: <li>
                   6437: <p>Let <var title="">position</var> be a pointer into <var title=
                   6438: "">input</var> , initially pointing at the start of the string.</p>
                   6439: </li>
                   6440: <li>
                   6441: <p>Let <var title="">tokens</var> be a list of tokens, initially
                   6442: empty.</p>
                   6443: </li>
                   6444: <li>
                   6445: <p><a href="#skip-whitespace">Skip whitespace</a></p>
                   6446: </li>
                   6447: <li>
                   6448: <p>While <var title="">position</var> is not past the end of
                   6449: <var title="">input</var> :</p>
                   6450: <ol>
                   6451: <li>
                   6452: <p><a href="#collect">Collect a sequence of characters</a> that are
                   6453: not <a href="#space" title="space character">space characters</a>
                   6454: .</p>
                   6455: </li>
                   6456: <li>
                   6457: <p>Add the string collected in the previous step to <var title=
                   6458: "">tokens</var> .</p>
                   6459: </li>
                   6460: <li>
                   6461: <p><a href="#skip-whitespace">Skip whitespace</a></p>
                   6462: </li>
                   6463: </ol>
                   6464: </li>
                   6465: <li>
                   6466: <p>Return <var title="">tokens</var> .</p>
                   6467: </li>
                   6468: </ol>
                   6469: <p>When a user agent has to <dfn id="remove0">remove a token from a
                   6470: string</dfn> , it must use the following algorithm:</p>
                   6471: <ol>
                   6472: <li>
                   6473: <p>Let <var title="">input</var> be the string being modified.</p>
                   6474: </li>
                   6475: <li>
                   6476: <p>Let <var title="">token</var> be the token being removed. It
                   6477: will not contain any <a href="#space" title="space character">space
                   6478: characters</a> .</p>
                   6479: </li>
                   6480: <li>
                   6481: <p>Let <var title="">output</var> be the output string, initially
                   6482: empty.</p>
                   6483: </li>
                   6484: <li>
                   6485: <p>Let <var title="">position</var> be a pointer into <var title=
                   6486: "">input</var> , initially pointing at the start of the string.</p>
                   6487: </li>
                   6488: <li>
                   6489: <p>If <var title="">position</var> is beyond the end of <var title=
                   6490: "">input</var> , set the string being modified to <var title=
                   6491: "">output</var> , and abort these steps.</p>
                   6492: </li>
                   6493: <li>
                   6494: <p>If the character at <var title="">position</var> is a <a href=
                   6495: "#space">space character</a> :</p>
                   6496: <ol>
                   6497: <li>
                   6498: <p>Append the character at <var title="">position</var> to the end
                   6499: of <var title="">output</var> .</p>
                   6500: </li>
                   6501: <li>
                   6502: <p>Increment <var title="">position</var> so it points at the next
                   6503: character in <var title="">input</var> .</p>
                   6504: </li>
                   6505: <li>
                   6506: <p>Return to step 5 in the overall set of steps.</p>
                   6507: </li>
                   6508: </ol>
                   6509: </li>
                   6510: <li>
                   6511: <p>Otherwise, the character at <var title="">position</var> is the
                   6512: first character of a token. <a href="#collect">Collect a sequence
                   6513: of characters</a> that are not <a href="#space" title=
                   6514: "space character">space characters</a> , and let that be
                   6515: <var title="">s</var> .</p>
                   6516: </li>
                   6517: <li>
                   6518: <p>If <var title="">s</var> is exactly equal to <var title=
                   6519: "">token</var> , then:</p>
                   6520: <ol>
                   6521: <li>
                   6522: <p><a href="#skip-whitespace">Skip whitespace</a> (in <var title=
                   6523: "">input</var> ).</p>
                   6524: </li>
                   6525: <li>
                   6526: <p>Remove any <a href="#space" title="space character">space
                   6527: characters</a> currently at the end of <var title="">output</var>
                   6528: .</p>
                   6529: </li>
                   6530: <li>
                   6531: <p>If <var title="">position</var> is not past the end of
                   6532: <var title="">input</var> , and <var title="">output</var> is not
                   6533: the empty string, append a single U+0020 SPACE character at the end
                   6534: of <var title="">output</var> .</p>
                   6535: </li>
                   6536: </ol>
                   6537: </li>
                   6538: <li>
                   6539: <p>Otherwise, append <var title="">s</var> to the end of
                   6540: <var title="">output</var> .</p>
                   6541: </li>
                   6542: <li>
                   6543: <p>Return to step 6 in the overall set of steps.</p>
                   6544: </li>
                   6545: </ol>
                   6546: <p class="note">This causes any occurrences of the token to be
                   6547: removed from the string, and any spaces that were surrounding the
                   6548: token to be collapsed to a single space, except at the start and
                   6549: end of the string, where such spaces are removed.</p>
                   6550: <h4 id="keywords"><span class="secno"><del class=
                   6551: "diff-old">3.2.7.</del> <ins class="diff-chg">3.2.7</ins></span>
                   6552: Keywords and enumerated attributes</h4>
                   6553: <p>Some attributes are defined as taking one of a finite set of
                   6554: keywords. Such attributes are called <dfn id="enumerated" title=
                   6555: "enumerated attribute">enumerated attributes</dfn> . The keywords
                   6556: are each defined to map to a particular <em>state</em> (several
                   6557: keywords might map to the same state, in which case some of the
                   6558: keywords are synonyms of each other; additionally, some of the
                   6559: keywords can be said to be non-conforming, and are only in the
                   6560: specification for historical reasons). In addition, two default
                   6561: states can be given. The first is the <em>invalid value
                   6562: default</em> , the second is the <em>missing value default</em>
                   6563: .</p>
                   6564: <p>If an enumerated attribute is specified, the attribute's value
                   6565: must be one of the given keywords that are not said to be
                   6566: non-conforming, with no leading or trailing whitespace. The keyword
                   6567: may use any mix of uppercase and lowercase letters.</p>
                   6568: <p>When the attribute is specified, if its value
                   6569: <span>case-insensitively</span> matches one of the given keywords
                   6570: then that keyword's state is the state that the attribute
                   6571: represents. If the attribute value matches none of the given
                   6572: keywords, but the attribute has an <em>invalid value default</em> ,
                   6573: then the attribute represents that state. Otherwise, if the
                   6574: attribute value matches none of the keywords but there is a
                   6575: <em>missing value default</em> state defined, then <em>that</em> is
                   6576: the state represented by the attribute. Otherwise, there is no
                   6577: default, and invalid values must <del class="diff-old">simply</del>
                   6578: be ignored.</p>
                   6579: <p>When the attribute is <em>not</em> specified, if there is a
                   6580: <em>missing value default</em> state defined, then that is the
                   6581: state represented by the (missing) attribute. Otherwise, the
                   6582: absence of the attribute means that there is no state
                   6583: represented.</p>
                   6584: <p class="note">The empty string can be one of the keywords in some
                   6585: cases. For example the <code title="attr-contenteditable"><a href=
                   6586: "#contenteditable0">contenteditable</a></code> attribute has two
                   6587: states: <em>true</em> , matching the <code title="">true</code>
                   6588: keyword and the empty string, <em>false</em> , matching
                   6589: <code title="">false</code> and all other keywords (it's the
                   6590: <em>invalid value default</em> ). It could further be thought of as
                   6591: having a third state <em>inherit</em> , which would be the default
                   6592: when the attribute is not specified at all (the <em>missing value
                   6593: default</em> ), but for various reasons that isn't the way this
                   6594: specification actually defines it.</p>
                   6595: <h4 id="syntax-references"><span class="secno"><del class=
                   6596: "diff-old">3.2.8.</del> <ins class="diff-chg">3.2.8</ins></span>
                   6597: References</h4>
                   6598: <p>A <dfn id="valid7">valid <del class="diff-old">hashed ID</del>
                   6599: <ins class="diff-chg">hash-name</ins> reference</dfn> to an element
                   6600: of type <var title="">type</var> is a string consisting of a U+0023
                   6601: NUMBER SIGN ( <code title="">#</code> ) character followed by a
                   6602: string which exactly matches the value of the <del class=
                   6603: "diff-old">id</del> <code title=""><ins class=
                   6604: "diff-chg">name</ins></code> attribute of an element in the
                   6605: document with type <var title="">type</var> .</p>
                   6606: <p>The <dfn id="rules5">rules for parsing a <del class=
                   6607: "diff-old">hashed ID</del> <ins class="diff-chg">hash-name</ins>
                   6608: reference</dfn> to an element of type <var title="">type</var> are
                   6609: as follows:</p>
                   6610: <ol>
                   6611: <li>
                   6612: <p>If the string being parsed does not contain a U+0023 NUMBER SIGN
                   6613: character, or if the first such character in the string is the last
                   6614: character in the string, then return null and abort these
                   6615: steps.</p>
                   6616: </li>
                   6617: <li>
                   6618: <p>Let <var title="">s</var> be the string from the character
                   6619: immediately after the first U+0023 NUMBER SIGN character in the
                   6620: string being parsed up to the end of that string.</p>
                   6621: </li>
                   6622: <li>
                   6623: <p>Return the first element of type <var title="">type</var> that
                   6624: has an <code title="attr-id"><a href="#id">id</a></code> or
                   6625: <code title="">name</code> attribute whose value case-insensitively
                   6626: matches <var title="">s</var> .</p>
                   6627: </li>
                   6628: </ol>
                   6629: <h4 id="urls"><span class="secno"><ins class=
                   6630: "diff-new">3.2.9</ins></span> <ins class="diff-new">URLs</ins></h4>
                   6631: <div class="big-issue">
                   6632: <p><ins class="diff-new">This section will do the
                   6633: following:</ins></p>
                   6634: <ul>
                   6635: <li><ins class="diff-new">define how to resolve relative URLs in
                   6636: markup attributes (using XMLBase as defined elsewhere right
                   6637: now)</ins></li>
                   6638: <li><ins class="diff-new">define how to resolve relative URLs in
                   6639: APIs, using the</ins> <dfn id="scripts0"><ins class=
                   6640: "diff-new">script's base URI</ins></dfn> <ins class=
                   6641: "diff-new">maybe</ins></li>
                   6642: <li><ins class="diff-new">define what it means to resolve a
                   6643: relative URL when the base URL doesn't have a path hierarchy (e.g.
                   6644: data:, javascript:, about:blank URLs)</ins></li>
                   6645: <li><ins class="diff-new">define how to handle URIs that contain
                   6646: non-ascii characters (and it's not the same as handling as IRIs,
                   6647: especially if the character encoding of the document isn't
                   6648: UTF-8)</ins></li>
                   6649: <li><ins class="diff-new">define URL as IRI and replace all uses of
                   6650: URIs and IRIs in the rest of the spec with URL</ins></li>
                   6651: <li><ins class="diff-new">define "valid URL" in terms of valid URIs
                   6652: and IRIs and replace that concept through the spec to a pointer
                   6653: here, getting rid of references to</ins> <a href=
                   6654: "#references"><ins class="diff-new">[RFC3986]</ins></a> <a href=
                   6655: "#references"><ins class="diff-new">[RFC3987]</ins></a></li>
                   6656: <li><ins class="diff-new">define "valid URL reference" in terms of
                   6657: valid URI references and IRI references and replace that concept
                   6658: through the spec to a pointer here, getting rid of references
                   6659: to</ins> <a href="#references"><ins class=
                   6660: "diff-new">[RFC3986]</ins></a> <a href="#references"><ins class=
                   6661: "diff-new">[RFC3987]</ins></a></li>
                   6662: <li><ins class="diff-new">define how to parse URLs (maybe by
                   6663: deferring to RFCs)</ins></li>
                   6664: <li><ins class="diff-new">define "an</ins> <dfn id=
                   6665: "elements2"><ins class="diff-new">element's base URI</ins></dfn>
                   6666: <ins class="diff-new">" and make the various places that talk about
                   6667: a base URI in the context of an element use that
                   6668: definition</ins></li>
                   6669: <li><ins class="diff-new">make the language used to refer to
                   6670: resolving a base URI consistent throughout, maybe make it hyperlink
                   6671: to a definition each time</ins></li>
1.2     ! mike     6672: <li><ins class="diff-new">define a cheap, interoperable mechanism
        !          6673: for URL attributes and anything else that relies on xml:base and
        !          6674: the base element to handle dynamic changes to those attributes and
        !          6675: elements, possibly by defining some mechanism which causes changes
        !          6676: to be ignored in some reliable way.</ins></li>
1.1       mike     6677: </ul>
                   6678: </div>
                   6679: <h3 id="documents0"><span class="secno"><del class=
                   6680: "diff-old">3.3.</del> <ins class="diff-chg">3.3</ins></span>
                   6681: Documents and document fragments</h3>
                   6682: <h4 id="semantics0"><span class="secno"><del class=
                   6683: "diff-old">3.3.1.</del> <ins class="diff-chg">3.3.1</ins></span>
                   6684: Semantics</h4>
                   6685: <p>Elements, attributes, and attribute values in HTML are defined
                   6686: (by this specification) to have certain meanings (semantics). For
                   6687: example, the <code><a href="#ol">ol</a></code> element represents
                   6688: an ordered list, and the <code title="lang">lang</code> attribute
                   6689: represents the language of the content.</p>
                   6690: <p>Authors must <del class="diff-old">only</del> <ins class=
                   6691: "diff-chg">not</ins> use elements, attributes, and attribute values
                   6692: for <ins class="diff-new">purposes other than</ins> their
                   6693: appropriate <ins class="diff-new">intended</ins> semantic
                   6694: <del class="diff-old">purposes.</del> <ins class=
                   6695: "diff-chg">purpose.</ins></p>
                   6696: <div class="example">
                   6697: <p>For example, the following document is non-conforming, despite
                   6698: being syntactically correct:</p>
                   6699: <pre>
                   6700: &lt;!DOCTYPE html&gt;
                   6701: &lt;html lang="en-GB"&gt;
                   6702:  &lt;head&gt; &lt;title&gt; Demonstration &lt;/title&gt; &lt;/head&gt;
                   6703:  &lt;body&gt;
                   6704:   &lt;table&gt;
                   6705:    &lt;tr&gt; &lt;td&gt; My favourite animal is the cat. &lt;/td&gt; &lt;/tr&gt;
                   6706:    &lt;tr&gt;
                   6707:     &lt;td&gt;
                   6708:      —&lt;a href="http://example.org/~ernest/"&gt;&lt;cite&gt;Ernest&lt;/cite&gt;&lt;/a&gt;,
                   6709:      in an essay from 1992
                   6710:     &lt;/td&gt;
                   6711:    &lt;/tr&gt;
                   6712:   &lt;/table&gt;
                   6713:  &lt;/body&gt;
                   6714: &lt;/html&gt;
                   6715: </pre>
                   6716: <p>...because the data placed in the cells is clearly not tabular
                   6717: <del class="diff-old">data.</del> <ins class="diff-chg">data (and
                   6718: the</ins> <code><a href="#cite2"><ins class=
                   6719: "diff-chg">cite</ins></a></code> <ins class="diff-chg">element
                   6720: mis-used).</ins> A corrected version of this document might be:</p>
                   6721: <pre>
                   6722: &lt;!DOCTYPE html&gt;
                   6723: &lt;html lang="en-GB"&gt;
                   6724:  &lt;head&gt; &lt;title&gt; Demonstration &lt;/title&gt; &lt;/head&gt;
                   6725:  &lt;body&gt;
                   6726:   &lt;blockquote&gt;
                   6727:    &lt;p&gt; My favourite animal is the cat. &lt;/p&gt;
                   6728:   &lt;/blockquote&gt;
                   6729:   &lt;p&gt;
                   6730: <del class=
                   6731: "diff-old">   —&lt;a href="http://example.org/~ernest/"&gt;&lt;cite&gt;Ernest&lt;/cite&gt;&lt;/a&gt;,
                   6732: </del>
                   6733: <ins class=
                   6734: "diff-chg">   —&lt;a href="http://example.org/~ernest/"&gt;Ernest&lt;/a&gt;,
                   6735: </ins>
                   6736:    in an essay from 1992
                   6737:   &lt;/p&gt;
                   6738:  &lt;/body&gt;
                   6739: &lt;/html&gt;
                   6740: </pre>
                   6741: <p>This next document fragment, intended to represent the heading
                   6742: of a corporate site, is similarly non-conforming because the second
                   6743: line is not intended to be a heading of a subsection, but merely a
                   6744: subheading or subtitle (a subordinate heading for the same
                   6745: section).</p>
                   6746: <pre>
                   6747: &lt;body&gt;
                   6748:  &lt;h1&gt;ABC Company&lt;/h1&gt;
                   6749:  &lt;h2&gt;Leading the way in widget design since 1432&lt;/h2&gt;
                   6750: ...
                   6751: </pre>
                   6752: <p>The <code><a href="#header">header</a></code> element should be
                   6753: used in these kinds of situations:</p>
                   6754: <pre>
                   6755: &lt;body&gt;
                   6756:  &lt;header&gt;
                   6757:   &lt;h1&gt;ABC Company&lt;/h1&gt;
                   6758:   &lt;h2&gt;Leading the way in widget design since 1432&lt;/h2&gt;
                   6759:  &lt;/header&gt;
                   6760: ...
                   6761: </pre></div>
                   6762: <p>Through scripting and using other mechanisms, the values of
                   6763: attributes, text, and indeed the entire structure of the document
                   6764: may change dynamically while a user agent is processing it. The
                   6765: semantics of a document at an instant in time are those represented
                   6766: by the state of the document at that instant in time, and the
                   6767: semantics of a document can therefore change over time. User agents
                   6768: must update their presentation of the document as this occurs.</p>
                   6769: <p class="example">HTML has a <code><a href=
                   6770: "#progress">progress</a></code> element that describes a progress
                   6771: bar. If its "value" attribute is dynamically updated by a script,
                   6772: the UA would update the rendering to show the progress
                   6773: changing.</p>
                   6774: <h4 id="structure0"><span class="secno"><del class=
                   6775: "diff-old">3.3.2.</del> <ins class="diff-chg">3.3.2</ins></span>
                   6776: Structure</h4>
                   6777: <p>All the elements in this specification have a defined content
                   6778: model, which describes what nodes are allowed inside the elements,
                   6779: and thus what the structure of an HTML document or fragment must
                   6780: look like. <del class="diff-old">Authors must only put elements
                   6781: inside an element if that element allows them to be there according
                   6782: to its content model.</del></p>
                   6783: <p class="note">As noted in the conformance and terminology
                   6784: sections, for the purposes of determining if an element matches its
                   6785: content model or not, <a href="#text-node" title=
                   6786: "text node"><code>CDATASection</code> nodes in the DOM are treated
                   6787: as equivalent to <code>Text</code> nodes</a> , and <a href=
                   6788: "#entity-references">entity reference nodes are treated as if they
                   6789: were expanded in place</a> .</p>
                   6790: <p>The <a href="#space" title="space character">space
                   6791: characters</a> are always allowed between elements. User agents
                   6792: represent these characters between elements in the source markup as
                   6793: text nodes in the DOM. Empty <a href="#text-node" title=
                   6794: "text node">text nodes</a> and <a href="#text-node" title=
                   6795: "text node">text nodes</a> consisting of just sequences of those
                   6796: characters are considered <dfn id="inter-element">inter-element
                   6797: whitespace</dfn> .</p>
                   6798: <p><a href="#inter-element">Inter-element whitespace</a> , comment
                   6799: nodes, and processing instruction nodes must be ignored when
                   6800: establishing whether an element matches its content model or not,
                   6801: and must be ignored when following algorithms that define document
                   6802: and element semantics.</p>
                   6803: <p>An element <var title="">A</var> is said to be <dfn id=
                   6804: "preceded">preceded or followed</dfn> by a second element
                   6805: <var title="">B</var> if <var title="">A</var> and <var title=
                   6806: "">B</var> have the same parent node and there are no other element
                   6807: nodes or text nodes (other than <a href=
                   6808: "#inter-element">inter-element whitespace</a> ) between them.</p>
                   6809: <p>Authors must <del class="diff-old">only</del> <ins class=
                   6810: "diff-chg">not</ins> use <a href="#elements1">elements in the HTML
                   6811: namespace</a> <del class="diff-old">in the contexts</del>
                   6812: <ins class="diff-chg">anywhere except</ins> where they are
                   6813: <ins class="diff-new">explicitly</ins> allowed, as defined for each
                   6814: <del class="diff-old">element.</del> <ins class="diff-chg">element,
                   6815: or as explicitly required by other specifications.</ins> For XML
                   6816: compound documents, these contexts could be inside elements from
                   6817: other namespaces, if those elements are defined as providing the
                   6818: relevant contexts.</p>
                   6819: <div class="example">
                   6820: <p>The SVG specification defines the SVG <code>foreignObject</code>
                   6821: element as allowing foreign namespaces to be included, thus
                   6822: allowing compound documents to be created by inserting subdocument
                   6823: content under that element. <em>This</em> specification defines the
                   6824: XHTML <code><a href="#html">html</a></code> element as being
                   6825: allowed where subdocument fragments are allowed in a compound
                   6826: document. Together, these two definitions mean that placing an
                   6827: XHTML <code><a href="#html">html</a></code> element as a child of
                   6828: an SVG <code>foreignObject</code> element is conforming. <a href=
                   6829: "#references"><ins class="diff-new">[SVG]</ins></a></p>
                   6830: </div>
                   6831: <div class="example">
                   6832: <p><ins class="diff-new">The Atom specification defines the
                   6833: Atom</ins> <code title=""><ins class=
                   6834: "diff-new">content</ins></code> <ins class="diff-new">element, when
                   6835: its</ins> <code title=""><ins class="diff-new">type</ins></code>
                   6836: <ins class="diff-new">attribute has the value</ins> <code title=
                   6837: ""><ins class="diff-new">xhtml</ins></code> ,<ins class=
                   6838: "diff-new">as requiring that it contains a single HTML</ins>
                   6839: <code><a href="#div"><ins class="diff-new">div</ins></a></code>
                   6840: <ins class="diff-new">element. Thus, a</ins> <code><a href=
                   6841: "#div"><ins class="diff-new">div</ins></a></code> <ins class=
                   6842: "diff-new">element is allowed in that context, even though this is
                   6843: not explicitly normatively stated by this specification.</ins>
                   6844: <a href="#references"><ins class="diff-new">[ATOM]</ins></a></p>
                   6845: </div>
                   6846: <p><ins class="diff-new">In addition,</ins> <a href=
                   6847: "#elements1"><ins class="diff-new">elements in the HTML
                   6848: namespace</ins></a> <ins class="diff-new">may be orphan nodes (i.e.
                   6849: without a parent node).</ins></p>
                   6850: <div class="example">
                   6851: <p><ins class="diff-new">For example, creating a</ins>
                   6852: <code><a href="#td"><ins class="diff-new">td</ins></a></code>
                   6853: <ins class="diff-new">element and storing it in a global variable
                   6854: in a script is conforming, even though</ins> <code><a href=
                   6855: "#td"><ins class="diff-new">td</ins></a></code> <ins class=
                   6856: "diff-new">elements are otherwise only supposed to be used
                   6857: inside</ins> <code><a href="#tr"><ins class=
                   6858: "diff-new">tr</ins></a></code> <ins class=
                   6859: "diff-new">elements.</ins></p>
                   6860: <pre>
                   6861: var data = {<ins class="diff-new">
                   6862:   name: "Banana",
                   6863:   cell: document.createElement('td'), 
                   6864: };
                   6865: </ins>
                   6866: </pre></div>
                   6867: <h4 id="kinds"><span class="secno"><del class=
                   6868: "diff-old">3.3.3.</del> <ins class="diff-chg">3.3.3</ins></span>
                   6869: Kinds of content</h4>
                   6870: <p>Each element in HTML falls into zero or more categories that
                   6871: group elements with similar characteristics together. The following
                   6872: categories are used in this specification:</p>
                   6873: <ul class="brief">
                   6874: <li><a href="#metadata0">Metadata content</a></li>
                   6875: <li><del class="diff-old">Prose</del> <a href=
                   6876: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a></li>
                   6877: <li><a href="#sectioning0">Sectioning content</a></li>
                   6878: <li><a href="#heading0">Heading content</a></li>
                   6879: <li><a href="#phrasing0">Phrasing content</a></li>
                   6880: <li><a href="#embedded1">Embedded content</a></li>
                   6881: <li><span>Form control content</span></li>
                   6882: <li><a href="#interactive1">Interactive content</a></li>
                   6883: </ul>
                   6884: <p>Some elements have unique requirements and do not fit into any
                   6885: particular category.</p>
                   6886: <h5 id="metadata"><span class="secno">3.3.3.1.</span> Metadata
                   6887: content</h5>
                   6888: <p><dfn id="metadata0">Metadata content</dfn> is content that sets
                   6889: up the presentation or <del class="diff-old">behaviour</del>
                   6890: <ins class="diff-chg">behavior</ins> of the rest of the content, or
                   6891: that sets up the relationship of the document with other documents,
                   6892: or that conveys other "out of band" information.</p>
                   6893: <p>Elements from other namespaces whose semantics are primarily
                   6894: metadata-related (e.g. RDF) are also <a href="#metadata0">metadata
                   6895: content</a> .</p>
                   6896: <h5 id="flow-content"><span class="secno">3.3.3.2.</span>
                   6897: <del class="diff-old">Prose</del> <ins class="diff-chg">Flow</ins>
                   6898: content</h5>
                   6899: <p>Most elements that are used in the body of documents and
                   6900: applications are <del class="diff-old">categorised</del>
                   6901: <ins class="diff-chg">categorized</ins> as <del class=
                   6902: "diff-old">prose</del> <dfn id="flow-content0"><ins class=
                   6903: "diff-chg">flow</ins> content</dfn> .</p>
                   6904: <p>As a general rule, elements whose content model allows any
                   6905: <del class="diff-old">prose</del> <a href=
                   6906: "#flow-content0"><ins class="diff-chg">flow</ins> content</a>
                   6907: should have either at least one descendant text node that is not
                   6908: <a href="#inter-element">inter-element whitespace</a> , or at least
                   6909: one descendant element node that is <a href="#embedded1">embedded
                   6910: content</a> . For the purposes of this requirement, <code><a href=
                   6911: "#del">del</a></code> elements and their descendants must not be
                   6912: counted as contributing to the ancestors of the <code><a href=
                   6913: "#del">del</a></code> element.</p>
                   6914: <p>This requirement is not a hard requirement, however, as there
                   6915: are many cases where an element can be empty legitimately, for
                   6916: example when it is used as a placeholder which will later be filled
                   6917: in by a script, or when the element is part of a template and would
                   6918: on most pages be filled in but on some pages is not relevant.</p>
                   6919: <h5 id="sectioning"><span class="secno">3.3.3.3.</span> Sectioning
                   6920: content</h5>
                   6921: <p><dfn id="sectioning0">Sectioning content</dfn> is content that
                   6922: defines the scope of <a href="#heading0" title=
                   6923: "heading content">headers</a> , <a href="#footer" title=
                   6924: "footer">footers</a> , and <a href="#address" title=
                   6925: "address">contact information</a> .</p>
                   6926: <p>Each <a href="#sectioning0">sectioning content</a> element
                   6927: potentially has a heading. See the section on <a href=
                   6928: "#headings0">headings and sections</a> for further details.</p>
                   6929: <h5 id="heading"><span class="secno">3.3.3.4.</span> Heading
                   6930: content</h5>
                   6931: <p><dfn id="heading0">Heading content</dfn> defines the header of a
                   6932: section (whether explicitly marked up using <a href=
                   6933: "#sectioning0">sectioning content</a> elements, or implied by the
                   6934: heading content itself).</p>
                   6935: <h5 id="phrasing"><span class="secno">3.3.3.5.</span> Phrasing
                   6936: content</h5>
                   6937: <p><dfn id="phrasing0">Phrasing content</dfn> is the text of the
                   6938: document, as well as elements that mark up that text at the
                   6939: intra-paragraph level. Runs of <a href="#phrasing0">phrasing
                   6940: content</a> form <a href="#paragraph" title=
                   6941: "paragraph">paragraphs</a> .</p>
                   6942: <p>All <a href="#phrasing0">phrasing content</a> is also
                   6943: <del class="diff-old">prose</del> <a href=
                   6944: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> . Any
                   6945: content model that expects <del class="diff-old">prose</del>
                   6946: <a href="#flow-content0"><ins class="diff-chg">flow</ins>
                   6947: content</a> also expects <a href="#phrasing0">phrasing content</a>
                   6948: .</p>
                   6949: <p>As a general rule, elements whose content model allows any
                   6950: <a href="#phrasing0">phrasing content</a> should have either at
                   6951: least one descendant text node that is not <a href=
                   6952: "#inter-element">inter-element whitespace</a> , or at least one
                   6953: descendant element node that is <a href="#embedded1">embedded
                   6954: content</a> . For the purposes of this requirement, nodes that are
                   6955: descendants of <code><a href="#del">del</a></code> elements must
                   6956: not be counted as contributing to the ancestors of the
                   6957: <code><a href="#del">del</a></code> element.</p>
                   6958: <p class="note">Most elements that are <del class=
                   6959: "diff-old">categorised</del> <ins class=
                   6960: "diff-chg">categorized</ins> as phrasing content can only contain
                   6961: elements that are themselves <del class=
                   6962: "diff-old">categorised</del> <ins class=
                   6963: "diff-chg">categorized</ins> as phrasing content, not any
                   6964: <del class="diff-old">prose</del> <ins class="diff-chg">flow</ins>
                   6965: content.</p>
                   6966: <p>Text nodes that are not <a href="#inter-element">inter-element
                   6967: whitespace</a> are <a href="#phrasing0">phrasing content</a> .</p>
                   6968: <h5 id="embedded"><span class="secno">3.3.3.6.</span> Embedded
                   6969: content</h5>
                   6970: <p><dfn id="embedded1">Embedded content</dfn> is content that
                   6971: imports another resource into the document, or content from another
                   6972: vocabulary that is inserted into the document.</p>
                   6973: <p>All <a href="#embedded1">embedded content</a> is also <a href=
                   6974: "#phrasing0">phrasing content</a> (and <del class=
                   6975: "diff-old">prose</del> <a href="#flow-content0"><ins class=
                   6976: "diff-chg">flow</ins> content</a> ). Any content model that expects
                   6977: <a href="#phrasing0">phrasing content</a> (or <del class=
                   6978: "diff-old">prose</del> <a href="#flow-content0"><ins class=
                   6979: "diff-chg">flow</ins> content</a> ) also expects <a href=
                   6980: "#embedded1">embedded content</a> .</p>
                   6981: <p>Elements that are from namespaces other than the <a href=
                   6982: "#html-namespace0">HTML namespace</a> and that convey content but
                   6983: not metadata, are <a href="#embedded1">embedded content</a> for the
                   6984: purposes of the content models defined in this specification. (For
                   6985: example, MathML, or SVG.)</p>
                   6986: <p>Some embedded content elements can have <dfn id=
                   6987: "fallback">fallback content</dfn> : content that is to be used when
                   6988: the external resource cannot be used (e.g. because it is of an
                   6989: unsupported format). The element definitions state what the
                   6990: fallback is, if any.</p>
                   6991: <h5 id="interactive0"><span class="secno">3.3.3.7.</span>
                   6992: Interactive content</h5>
                   6993: <p class="big-issue">Parts of this section should eventually be
                   6994: moved to DOM3 Events.</p>
                   6995: <p><dfn id="interactive1">Interactive content</dfn> is content that
                   6996: is specifically intended for user interaction.</p>
                   6997: <p>Certain elements in HTML can be activated, for instance
                   6998: <code><a href="#a">a</a></code> elements, <code>button</code>
                   6999: elements, or <code>input</code> elements when their
                   7000: <code>type</code> attribute is set to <code>radio</code> .
                   7001: Activation of those elements can happen in various (UA-defined)
                   7002: ways, for instance via the mouse or keyboard.</p>
                   7003: <p>When activation is performed via some method other than clicking
                   7004: the pointing device, the default action of the event that triggers
                   7005: the activation must, instead of being activating the element
                   7006: directly, be to <a href="#firing">fire a <code title=
                   7007: "">click</code> event</a> on the same element.</p>
                   7008: <p>The default action of this <code title=
                   7009: "event-click">click</code> event, or of the real <code title=
                   7010: "event-click">click</code> event if the element was activated by
                   7011: clicking a pointing device, must be to <span title=
                   7012: "fire a DOMActivate event">fire a further <code title=
                   7013: "event-DOMActivate">DOMActivate</code> event</span> at the same
                   7014: element, whose own default action is to go through all the elements
                   7015: the <code title="event-DOMActivate">DOMActivate</code> event
                   7016: bubbled through (starting at the target node and going towards the
                   7017: <code>Document</code> node), looking for an element with an
                   7018: <a href="#activation0">activation behavior</a> ; the first element,
                   7019: in reverse tree order, to have one, must have its activation
                   7020: behavior executed.</p>
                   7021: <p class="note">The above doesn't happen for arbitrary synthetic
                   7022: events dispatched by author script. However, the <code title=
                   7023: "dom-click"><a href="#click">click()</a></code> method can be used
                   7024: to make it happen programmatically.</p>
                   7025: <p>For certain form controls, this process is complicated further
                   7026: by <a href=
                   7027: "http://www.whatwg.org/specs/web-forms/current-work/#the-click">changes
                   7028: that must happen around the click event</a> . <a href=
                   7029: "#references">[WF2]</a></p>
                   7030: <p class="note">Most interactive elements have content models that
                   7031: disallow nesting interactive elements.</p>
                   7032: <h4 id="transparent"><span class="secno"><del class=
                   7033: "diff-old">3.3.4.</del> <ins class="diff-chg">3.3.4</ins></span>
                   7034: Transparent content models</h4>
                   7035: <p>Some elements are described as <dfn id=
                   7036: "transparent0">transparent</dfn> ; they have "transparent" as their
                   7037: content model. Some elements are described as <dfn id=
                   7038: "semi-transparent">semi-transparent</dfn> ; this means that part of
                   7039: their content model is "transparent" but that is not the only part
                   7040: of the content model that must be satisfied.</p>
                   7041: <p>When a content model includes a part that is "transparent",
                   7042: those parts must <del class="diff-old">only</del> <ins class=
                   7043: "diff-chg">not</ins> contain content that would <del class=
                   7044: "diff-old">still</del> <ins class="diff-chg">not</ins> be
                   7045: conformant if all transparent and semi-transparent elements in the
                   7046: tree were replaced, in their parent element, by the children in the
                   7047: "transparent" part of their content model, retaining order.</p>
                   7048: <p>When a transparent or semi-transparent element has no parent,
                   7049: then the part of its content model that is "transparent" must
                   7050: instead be treated as accepting any <del class=
                   7051: "diff-old">prose</del> <a href="#flow-content0"><ins class=
                   7052: "diff-chg">flow</ins> content</a> .</p>
                   7053: <h4 id="paragraphs"><span class="secno"><del class=
                   7054: "diff-old">3.3.5.</del> <ins class="diff-chg">3.3.5</ins></span>
                   7055: Paragraphs</h4>
                   7056: <p>A <dfn id="paragraph">paragraph</dfn> is typically a block of
                   7057: text with one or more sentences that discuss a particular topic, as
                   7058: in typography, but can also be used for more general thematic
                   7059: grouping. For instance, an address is also a paragraph, as is a
                   7060: part of a form, a byline, or a stanza in a poem.</p>
                   7061: <p>Paragraphs in <del class="diff-old">prose</del> <a href=
                   7062: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> are
                   7063: defined relative to what the document looks like without the
                   7064: <code><a href="#ins">ins</a></code> and <code><a href=
                   7065: "#del">del</a></code> elements complicating matters. Let
                   7066: <var title="">view</var> be a view of the DOM that replaces all
                   7067: <code><a href="#ins">ins</a></code> and <code><a href=
                   7068: "#del">del</a></code> elements in the document with their contents.
                   7069: Then, in <var title="">view</var> , for each run of <a href=
                   7070: "#phrasing0">phrasing content</a> uninterrupted by other types of
                   7071: content, in an element that accepts content other than <a href=
                   7072: "#phrasing0">phrasing content</a> , let <var title="">first</var>
                   7073: be the first node of the run, and let <var title="">last</var> be
                   7074: the last node of the run. For each run, a paragraph exists in the
                   7075: original DOM from immediately before <var title="">first</var> to
                   7076: immediately after <var title="">last</var> . (Paragraphs can thus
                   7077: span across <code><a href="#ins">ins</a></code> and <code><a href=
                   7078: "#del">del</a></code> elements.)</p>
                   7079: <p>A <a href="#paragraph">paragraph</a> is also formed by
                   7080: <code><a href="#p">p</a></code> elements.</p>
                   7081: <p class="note">The <code><a href="#p">p</a></code> element can be
                   7082: used to wrap individual paragraphs when there would otherwise not
                   7083: be any content other than phrasing content to separate the
                   7084: paragraphs from each other.</p>
                   7085: <div class="example">
                   7086: <p>In the following example, there are two paragraphs in a section.
                   7087: There is also a header, which contains phrasing content that is not
                   7088: a paragraph. Note how the comments and <span>intra-element
                   7089: whitespace</span> do not form paragraphs.</p>
                   7090: <pre>
                   7091: &lt;section&gt;
                   7092:   &lt;h1&gt;Example of paragraphs&lt;/h1&gt;
                   7093:   This is the &lt;em&gt;first&lt;/em&gt; paragraph in this example.
                   7094:   &lt;p&gt;This is the second.&lt;/p&gt;
                   7095:   &lt;!-- This is not a paragraph. --&gt;
                   7096: &lt;/section&gt;
                   7097: </pre>
                   7098: <p>The following example takes that markup and puts <code><a href=
                   7099: "#ins">ins</a></code> and <code><a href="#del">del</a></code>
                   7100: elements around some of the markup to show that the text was
                   7101: changed (though in this case, the changes don't really make much
                   7102: sense, admittedly). Notice how this example has exactly the same
                   7103: paragraphs as the previous one, despite the <code><a href=
                   7104: "#ins">ins</a></code> and <code><a href="#del">del</a></code>
                   7105: elements.</p>
                   7106: <pre>
                   7107: &lt;section&gt;
                   7108:   &lt;ins&gt;&lt;h1&gt;Example of paragraphs&lt;/h1&gt;
                   7109:   This is the &lt;em&gt;first&lt;/em&gt; paragraph in&lt;/ins&gt; this example&lt;del&gt;.
                   7110:   &lt;p&gt;This is the second.&lt;/p&gt;&lt;/del&gt;
                   7111:   &lt;!-- This is not a paragraph. --&gt;
                   7112: &lt;/section&gt;
                   7113: </pre></div>
                   7114: <h3 id="global"><span class="secno"><del class=
                   7115: "diff-old">3.4.</del> <ins class="diff-chg">3.4</ins></span> Global
                   7116: attributes</h3>
                   7117: <p>The following attributes are common to and may be specified on
                   7118: all <a href="#html-elements">HTML elements</a> (even those not
                   7119: defined in this specification):</p>
                   7120: <dl class="element">
                   7121: <dt>Global attributes:</dt>
                   7122: <dd><code title="attr-class"><a href="#class">class</a></code></dd>
                   7123: <dd><code title="attr-contenteditable"><a href=
                   7124: "#contenteditable0">contenteditable</a></code></dd>
                   7125: <dd><code title="attr-contextmenu"><a href=
                   7126: "#contextmenu">contextmenu</a></code></dd>
                   7127: <dd><code title="attr-dir"><a href="#dir">dir</a></code></dd>
                   7128: <dd><code title="attr-draggable"><a href=
                   7129: "#draggable">draggable</a></code></dd>
                   7130: <dd><code title="attr-id"><a href="#id">id</a></code></dd>
                   7131: <dd><code title="attr-irrelevant"><a href=
                   7132: "#irrelevant">irrelevant</a></code></dd>
                   7133: <dd><code title="attr-lang"><a href="#lang">lang</a></code></dd>
                   7134: <dd><code title="attr-ref"><a href="#ref">ref</a></code></dd>
                   7135: <dd><code title="attr-registrationmark"><a href=
                   7136: "#registrationmark">registrationmark</a></code></dd>
                   7137: <dd><code title="attr-style"><a href="#style"><ins class=
                   7138: "diff-new">style</ins></a></code></dd>
                   7139: <dd><code title="attr-tabindex"><a href=
                   7140: "#tabindex">tabindex</a></code></dd>
                   7141: <dd><code title="attr-template"><a href=
                   7142: "#template">template</a></code></dd>
                   7143: <dd><code title="attr-title"><a href="#title">title</a></code></dd>
                   7144: </dl>
                   7145: <p>In addition, the following <a href="#event3">event handler
                   7146: content attributes</a> may be specified on any <span>HTML
                   7147: element</span> :</p>
                   7148: <dl class="element">
                   7149: <dt>Event handler content attributes:</dt>
                   7150: <dd><code title="handler-onabort"><a href=
                   7151: "#onabort">onabort</a></code></dd>
                   7152: <dd><code title="handler-onbeforeunload"><a href=
                   7153: "#onbeforeunload">onbeforeunload</a></code></dd>
                   7154: <dd><code title="handler-onblur"><a href=
                   7155: "#onblur">onblur</a></code></dd>
                   7156: <dd><code title="handler-onchange"><a href=
                   7157: "#onchange">onchange</a></code></dd>
                   7158: <dd><code title="handler-onclick"><a href=
                   7159: "#onclick">onclick</a></code></dd>
                   7160: <dd><code title="handler-oncontextmenu"><a href=
                   7161: "#oncontextmenu">oncontextmenu</a></code></dd>
                   7162: <dd><code title="handler-ondblclick"><a href=
                   7163: "#ondblclick">ondblclick</a></code></dd>
                   7164: <dd><code title="handler-ondrag"><a href=
                   7165: "#ondrag">ondrag</a></code></dd>
                   7166: <dd><code title="handler-ondragend"><a href=
                   7167: "#ondragend">ondragend</a></code></dd>
                   7168: <dd><code title="handler-ondragenter"><a href=
                   7169: "#ondragenter">ondragenter</a></code></dd>
                   7170: <dd><code title="handler-ondragleave"><a href=
                   7171: "#ondragleave">ondragleave</a></code></dd>
                   7172: <dd><code title="handler-ondragover"><a href=
                   7173: "#ondragover">ondragover</a></code></dd>
                   7174: <dd><code title="handler-ondragstart"><a href=
                   7175: "#ondragstart">ondragstart</a></code></dd>
                   7176: <dd><code title="handler-ondrop"><a href=
                   7177: "#ondrop">ondrop</a></code></dd>
                   7178: <dd><code title="handler-onerror"><a href=
                   7179: "#onerror">onerror</a></code></dd>
                   7180: <dd><code title="handler-onfocus"><a href=
                   7181: "#onfocus">onfocus</a></code></dd>
                   7182: <dd><code title="handler-onkeydown"><a href=
                   7183: "#onkeydown">onkeydown</a></code></dd>
                   7184: <dd><code title="handler-onkeypress"><a href=
                   7185: "#onkeypress">onkeypress</a></code></dd>
                   7186: <dd><code title="handler-onkeyup"><a href=
                   7187: "#onkeyup">onkeyup</a></code></dd>
                   7188: <dd><code title="handler-onload"><a href=
                   7189: "#onload">onload</a></code></dd>
                   7190: <dd><code title="handler-onmessage"><a href=
                   7191: "#onmessage">onmessage</a></code></dd>
                   7192: <dd><code title="handler-onmousedown"><a href=
                   7193: "#onmousedown">onmousedown</a></code></dd>
                   7194: <dd><code title="handler-onmousemove"><a href=
                   7195: "#onmousemove">onmousemove</a></code></dd>
                   7196: <dd><code title="handler-onmouseout"><a href=
                   7197: "#onmouseout">onmouseout</a></code></dd>
                   7198: <dd><code title="handler-onmouseover"><a href=
                   7199: "#onmouseover">onmouseover</a></code></dd>
                   7200: <dd><code title="handler-onmouseup"><a href=
                   7201: "#onmouseup">onmouseup</a></code></dd>
                   7202: <dd><code title="handler-onmousewheel"><a href=
                   7203: "#onmousewheel">onmousewheel</a></code></dd>
                   7204: <dd><code title="handler-onresize"><a href=
                   7205: "#onresize">onresize</a></code></dd>
                   7206: <dd><code title="handler-onscroll"><a href=
                   7207: "#onscroll">onscroll</a></code></dd>
                   7208: <dd><code title="handler-onselect"><a href=
                   7209: "#onselect">onselect</a></code></dd>
                   7210: <dd><code title="handler-onstorage"><a href=
                   7211: "#onstorage"><ins class="diff-new">onstorage</ins></a></code></dd>
                   7212: <dd><code title="handler-onsubmit"><a href=
                   7213: "#onsubmit">onsubmit</a></code></dd>
                   7214: <dd><code title="handler-onunload"><a href=
                   7215: "#onunload">onunload</a></code></dd>
                   7216: </dl>
                   7217: <p><ins class="diff-new">Also,</ins> <a href="#custom" title=
                   7218: "custom data attribute"><ins class="diff-new">custom data
                   7219: attributes</ins></a> <ins class="diff-new">(e.g.</ins> <code title=
                   7220: ""><ins class="diff-new">data-foldername</ins></code> <ins class=
                   7221: "diff-new">or</ins> <code title=""><ins class=
                   7222: "diff-new">data-msgid</ins></code> <ins class="diff-new">) can be
                   7223: specified on any</ins> <span><ins class="diff-new">HTML
                   7224: element</ins></span> ,<ins class="diff-new">to store custom data
                   7225: specific to the page.</ins></p>
                   7226: <p><ins class="diff-new">In</ins> <a href="#html-"><ins class=
                   7227: "diff-new">HTML documents</ins></a> ,<ins class=
                   7228: "diff-new">the</ins> <code><a href="#html"><ins class=
                   7229: "diff-new">html</ins></a></code> <ins class="diff-new">element, and
                   7230: any other elements in the</ins> <a href=
                   7231: "#html-namespace0"><ins class="diff-new">HTML namespace</ins></a>
                   7232: <ins class="diff-new">whose parent element is not in the</ins>
                   7233: <a href="#html-namespace0"><ins class="diff-new">HTML
                   7234: namespace</ins></a> ,<ins class="diff-new">may have an</ins>
                   7235: <code title=""><ins class="diff-new">xmlns</ins></code> <ins class=
                   7236: "diff-new">attribute specified, if, and only if, it has the exact
                   7237: value "</ins> <code><ins class=
                   7238: "diff-new">http://www.w3.org/1999/xhtml</ins></code> <ins class=
                   7239: "diff-new">". This does not apply to</ins> <a href=
                   7240: "#xml-documents"><ins class="diff-new">XML documents</ins></a>
                   7241: .</p>
                   7242: <p class="note"><ins class="diff-new">In HTML, the</ins>
                   7243: <code title=""><ins class="diff-new">xmlns</ins></code> <ins class=
                   7244: "diff-new">attribute has absolutely no effect. It is basically a
                   7245: talisman. It is allowed merely to make migration to and from XHTML
                   7246: mildly easier. When parsed by an</ins> <a href=
                   7247: "#html-0"><ins class="diff-new">HTML parser</ins></a> ,<ins class=
                   7248: "diff-new">the attribute ends up in no namespace, not the "</ins>
                   7249: <code><ins class=
                   7250: "diff-new">http://www.w3.org/2000/xmlns/</ins></code> <ins class=
                   7251: "diff-new">" namespace like namespace declaration attributes in XML
                   7252: do.</ins></p>
                   7253: <p class="note"><ins class="diff-new">In XML, an</ins> <code title=
                   7254: ""><ins class="diff-new">xmlns</ins></code> <ins class=
                   7255: "diff-new">attribute is part of the namespace declaration
                   7256: mechanism, and an element cannot actually have an</ins>
                   7257: <code title=""><ins class="diff-new">xmlns</ins></code> <ins class=
                   7258: "diff-new">attribute in no namespace specified.</ins></p>
                   7259: <h4 id="the-id"><span class="secno"><del class=
                   7260: "diff-old">3.4.1.</del> <ins class="diff-chg">3.4.1</ins></span>
                   7261: The <dfn id="id" title="attr-id"><code>id</code></dfn>
                   7262: attribute</h4>
                   7263: <p>The <code title="attr-id"><a href="#id">id</a></code> attribute
                   7264: represents its element's unique identifier. The value must be
                   7265: unique in the subtree within which the element finds itself and
                   7266: must contain at least one character. The value must not contain any
                   7267: <a href="#space" title="space character">space characters</a> .</p>
                   7268: <p>If the value is not the empty string, user agents must associate
                   7269: the element with the given value (exactly, including any space
                   7270: characters) for the purposes of ID matching within the subtree the
                   7271: element finds itself (e.g. for selectors in CSS or for the
                   7272: <code>getElementById()</code> method in the DOM).</p>
                   7273: <p>Identifiers are opaque strings. Particular meanings should not
                   7274: be derived from the value of the <code title="attr-id"><a href=
                   7275: "#id">id</a></code> attribute.</p>
                   7276: <p>This specification doesn't preclude an element having multiple
                   7277: IDs, if other mechanisms (e.g. DOM Core methods) can set an
                   7278: element's ID in a way that doesn't conflict with the <code title=
                   7279: "attr-id"><a href="#id">id</a></code> attribute.</p>
                   7280: <p>The <dfn id="id0" title="dom-id"><code>id</code></dfn> DOM
                   7281: attribute must <a href="#reflect">reflect</a> the <code title=
                   7282: "attr-id"><a href="#id">id</a></code> content attribute.</p>
                   7283: <h4 id="the-title"><span class="secno"><del class=
                   7284: "diff-old">3.4.2.</del> <ins class="diff-chg">3.4.2</ins></span>
                   7285: The <dfn id="title" title="attr-title"><code>title</code></dfn>
                   7286: attribute</h4>
                   7287: <p>The <code title="attr-title"><a href="#title">title</a></code>
                   7288: attribute represents advisory information for the element, such as
                   7289: would be appropriate for a tooltip. On a link, this could be the
                   7290: title or a description of the target resource; on an image, it
                   7291: could be the image credit or a description of the image; on a
                   7292: paragraph, it could be a footnote or commentary on the text; on a
                   7293: citation, it could be further information about the source; and so
                   7294: forth. The value is text.</p>
                   7295: <p>If this attribute is omitted from an element, then it implies
                   7296: that the <code title="attr-title"><a href="#title">title</a></code>
                   7297: attribute of the nearest ancestor <a href="#html-elements" title=
                   7298: "HTML elements">HTML element</a> with a <code title=
                   7299: "attr-title"><a href="#title">title</a></code> attribute set is
                   7300: also relevant to this element. Setting the attribute overrides
                   7301: this, explicitly stating that the advisory information of any
                   7302: ancestors is not relevant to this element. Setting the attribute to
                   7303: the empty string indicates that the element has no advisory
                   7304: information.</p>
                   7305: <p>If the <code title="attr-title"><a href=
                   7306: "#title">title</a></code> attribute's value contains U+000A LINE
                   7307: FEED (LF) characters, the content is split into multiple lines.
                   7308: Each U+000A LINE FEED (LF) character represents a line break.</p>
                   7309: <p>Some elements, such as <code><a href="#link">link</a></code> and
                   7310: <code><del class="diff-old">dfn</del> <a href="#abbr"><ins class=
                   7311: "diff-chg">abbr</ins></a></code> , define additional semantics for
                   7312: the <code title="attr-title"><a href="#title">title</a></code>
                   7313: attribute beyond the semantics described above.</p>
                   7314: <p>The <dfn id="title0" title="dom-title"><code>title</code></dfn>
                   7315: DOM attribute must <a href="#reflect">reflect</a> the <code title=
                   7316: "attr-title"><a href="#title">title</a></code> content
                   7317: attribute.</p>
                   7318: <h4 id="the-lang"><span class="secno"><del class=
                   7319: "diff-old">3.4.3.</del> <ins class="diff-chg">3.4.3</ins></span>
                   7320: The <dfn id="lang" title="attr-lang"><code>lang</code></dfn> (HTML
                   7321: only) and <dfn id="xmllang" title=
                   7322: "attr-xml-lang"><code>xml:lang</code></dfn> (XML only)
                   7323: attributes</h4>
                   7324: <p>The <code title="attr-lang"><a href="#lang">lang</a></code>
                   7325: attribute specifies the primary <dfn id="language">language</dfn>
                   7326: for the element's contents and for any of the element's attributes
                   7327: that contain text. Its value must be a valid RFC 3066 language
                   7328: code, or the empty string. <a href="#references">[RFC3066]</a></p>
                   7329: <p>The <code title="attr-xml-lang"><a href=
                   7330: "#xmllang">xml:lang</a></code> attribute is defined in XML.
                   7331: <a href="#references">[XML]</a></p>
                   7332: <p>If these attributes are omitted from an element, then it implies
                   7333: that the language of this element is the same as the language of
                   7334: the parent element. Setting the attribute to the empty string
                   7335: indicates that the primary language is unknown.</p>
                   7336: <p>The <code title="attr-lang"><a href="#lang">lang</a></code>
                   7337: attribute may <del class="diff-old">only</del> be used on elements
                   7338: of <a href="#html-">HTML documents</a> . Authors must not use the
                   7339: <code title="attr-lang"><a href="#lang">lang</a></code> attribute
                   7340: in <a href="#xml-documents">XML documents</a> .</p>
                   7341: <p>The <code title="attr-xml-lang"><a href=
                   7342: "#xmllang">xml:lang</a></code> attribute may <del class=
                   7343: "diff-old">only</del> be used on elements of <a href=
                   7344: "#xml-documents">XML documents</a> . Authors must not use the
                   7345: <code title="attr-xml-lang"><a href="#xmllang">xml:lang</a></code>
                   7346: attribute in <a href="#html-">HTML documents</a> .</p>
                   7347: <p>To determine the language of a node, user agents must look at
                   7348: the nearest ancestor element (including the element itself if the
                   7349: node is an element) that has an <code title=
                   7350: "attr-xml-lang"><a href="#xmllang">xml:lang</a></code> attribute
                   7351: set or is an <a href="#html-elements" title="HTML elements">HTML
                   7352: element</a> and has a <code title="attr-lang"><a href=
                   7353: "#lang">lang</a></code> attribute set. That attribute specifies the
                   7354: language of the node.</p>
                   7355: <p>If both the <code title="attr-xml-lang"><a href=
                   7356: "#xmllang">xml:lang</a></code> attribute and the <code title=
                   7357: "attr-lang"><a href="#lang">lang</a></code> attribute are set on an
                   7358: element, user agents must use the <code title=
                   7359: "attr-xml-lang"><a href="#xmllang">xml:lang</a></code> attribute,
                   7360: and the <code title="attr-lang"><a href="#lang">lang</a></code>
                   7361: attribute must be <a href="#ignored" title="ignore">ignored</a> for
                   7362: the purposes of determining the element's language.</p>
                   7363: <p>If no explicit language is given for the <a href=
                   7364: "#root-element">root element</a> , then language information from a
                   7365: higher-level protocol (such as HTTP), if any, must be used as the
                   7366: final fallback language. In the absence of any language
                   7367: information, the default value is unknown (the empty string).</p>
                   7368: <p>User agents may use the element's language to determine proper
                   7369: processing or rendering (e.g. in the selection of appropriate fonts
                   7370: or <del class="diff-old">pronounciations,</del> <ins class=
                   7371: "diff-chg">pronunciations,</ins> or for dictionary selection).</p>
                   7372: <p>The <dfn id="lang0" title="dom-lang"><code>lang</code></dfn> DOM
                   7373: attribute must <a href="#reflect">reflect</a> the <code title=
                   7374: "attr-lang"><a href="#lang">lang</a></code> content attribute.</p>
1.2     ! mike     7375: <h4 id="the-xmlbase"><span class="secno"><ins class=
        !          7376: "diff-new">3.4.4</ins></span> <ins class="diff-new">The</ins>
        !          7377: <dfn id="xmlbase" title="attr-xml-base"><code><ins class=
        !          7378: "diff-new">xml:base</ins></code></dfn> <ins class=
        !          7379: "diff-new">attribute (XML only)</ins></h4>
        !          7380: <p><ins class="diff-new">The</ins> <code title=
        !          7381: "attr-xml-base"><a href="#xmlbase"><ins class=
        !          7382: "diff-new">xml:base</ins></a></code> <ins class=
        !          7383: "diff-new">attribute is defined in XML Base.</ins> <a href=
        !          7384: "#references"><ins class="diff-new">[XMLBASE]</ins></a></p>
        !          7385: <p><ins class="diff-new">The</ins> <code title=
        !          7386: "attr-xml-base"><a href="#xmlbase"><ins class=
        !          7387: "diff-new">xml:base</ins></a></code> <ins class=
        !          7388: "diff-new">attribute may be used on elements of</ins> <a href=
        !          7389: "#xml-documents"><ins class="diff-new">XML documents</ins></a>
        !          7390: .<ins class="diff-new">Authors must not use the</ins> <code title=
        !          7391: "attr-xml-base"><a href="#xmlbase"><ins class=
        !          7392: "diff-new">xml:base</ins></a></code> <ins class=
        !          7393: "diff-new">attribute in</ins> <a href="#html-"><ins class=
        !          7394: "diff-new">HTML documents</ins></a> .</p>
1.1       mike     7395: <h4 id="the-dir"><span class="secno"><del class=
1.2     ! mike     7396: "diff-old">3.4.4.</del> <ins class="diff-chg">3.4.5</ins></span>
1.1       mike     7397: The <dfn id="dir" title="attr-dir"><code>dir</code></dfn>
                   7398: attribute</h4>
                   7399: <p>The <code title="attr-dir"><a href="#dir">dir</a></code>
                   7400: attribute specifies the element's text directionality. The
                   7401: attribute is an <a href="#enumerated">enumerated attribute</a> with
                   7402: the keyword <code title="">ltr</code> mapping to the state
                   7403: <em>ltr</em> , and the keyword <code title="">rtl</code> mapping to
                   7404: the state <em>rtl</em> . The attribute has no defaults.</p>
                   7405: <p>If the attribute has the state <em>ltr</em> , the element's
                   7406: directionality is left-to-right. If the attribute has the state
                   7407: <em>rtl</em> , the element's directionality is right-to-left.
                   7408: Otherwise, the element's directionality is the same as its
                   7409: <del class="diff-old">parent.</del> <ins class="diff-chg">parent
                   7410: element, or</ins> <em><ins class="diff-chg">ltr</ins></em>
                   7411: <ins class="diff-chg">if there is no parent element.</ins></p>
                   7412: <p>The processing of this attribute depends on the presentation
                   7413: layer. For example, CSS 2.1 defines a mapping from this attribute
                   7414: to the CSS 'direction' and 'unicode-bidi' properties, and defines
                   7415: rendering in terms of those properties.</p>
                   7416: <p>The <dfn id="dir0" title="dom-dir"><code>dir</code></dfn> DOM
                   7417: attribute on an element must <a href="#reflect">reflect</a> the
                   7418: <code title="attr-dir"><a href="#dir">dir</a></code> content
                   7419: attribute of that element, <a href="#limited0">limited to only
                   7420: known values</a> .</p>
                   7421: <p>The <dfn id="dir1" title=
                   7422: "dom-document-dir"><code>dir</code></dfn> DOM attribute on
                   7423: <code><a href="#htmldocument">HTMLDocument</a></code> objects must
                   7424: <a href="#reflect">reflect</a> the <code title="attr-dir"><a href=
                   7425: "#dir">dir</a></code> content attribute of <a href="#the-html0">the
                   7426: <code>html</code> element</a> , if any, <a href="#limited0">limited
                   7427: to only known values</a> . If there is no such element, then the
                   7428: attribute must return the empty string and do nothing on
                   7429: setting.</p>
                   7430: <h4 id="classes"><span class="secno"><del class=
1.2     ! mike     7431: "diff-old">3.4.5.</del> <ins class="diff-chg">3.4.6</ins></span>
1.1       mike     7432: The <dfn id="class" title="attr-class"><code>class</code></dfn>
                   7433: attribute</h4>
                   7434: <p>Every <a href="#html-elements" title="HTML elements">HTML
                   7435: element</a> may have a <code title="attr-class"><a href=
                   7436: "#class">class</a></code> attribute specified.</p>
                   7437: <p>The attribute, if specified, must have a value that is an
                   7438: <a href="#unordered">unordered set of unique space-separated
                   7439: tokens</a> representing the various classes that the element
                   7440: belongs to.</p>
                   7441: <p>The classes that an <a href="#html-elements" title=
                   7442: "HTML elements">HTML element</a> has assigned to it consists of all
                   7443: the classes returned when the value of the <code title=
                   7444: "attr-class"><a href="#class">class</a></code> attribute is
                   7445: <a href="#split" title="split a string on spaces">split on
                   7446: spaces</a> .</p>
                   7447: <p class="note">Assigning classes to an element affects class
                   7448: matching in selectors in CSS, the <code title=
                   7449: "dom-document-getElementsByClassName"><a href=
                   7450: "#getelementsbyclassname">getElementsByClassName()</a></code>
                   7451: method in the DOM, and other such features.</p>
                   7452: <p>Authors may use any value in the <code title=
                   7453: "attr-class"><a href="#class">class</a></code> attribute, but are
                   7454: encouraged to use the values that describe the nature of the
                   7455: content, rather than values that describe the desired presentation
                   7456: of the content.</p>
                   7457: <p>The <dfn id="classname" title=
                   7458: "dom-className"><code>className</code></dfn> and <dfn id=
                   7459: "classlist" title="dom-classList"><code>classList</code></dfn> DOM
                   7460: attributes must both <a href="#reflect">reflect</a> the
                   7461: <code title="attr-class"><a href="#class">class</a></code> content
                   7462: attribute.</p>
                   7463: <h4 id="the-irrelevant"><span class="secno"><del class=
1.2     ! mike     7464: "diff-old">3.4.6.</del> <ins class="diff-chg">3.4.7</ins></span>
1.1       mike     7465: The <dfn id="irrelevant" title=
                   7466: "attr-irrelevant"><code>irrelevant</code></dfn> attribute</h4>
                   7467: <p>All elements may have the <code title="attr-irrelevant"><a href=
                   7468: "#irrelevant">irrelevant</a></code> content attribute set. The
                   7469: <code title="attr-irrelevant"><a href=
                   7470: "#irrelevant">irrelevant</a></code> attribute is a <a href=
                   7471: "#boolean0">boolean attribute</a> . When specified on an element,
                   7472: it indicates that the element is not yet, or is no longer,
                   7473: relevant. User agents should not render elements that have the
                   7474: <code title="attr-irrelevant"><a href=
                   7475: "#irrelevant">irrelevant</a></code> attribute specified.</p>
                   7476: <div class="example">
                   7477: <p>In the following skeletal example, the attribute is used to hide
                   7478: the Web game's main screen until the user logs in:</p>
                   7479: <pre>
                   7480:   &lt;h1&gt;The Example Game&lt;/h1&gt;
                   7481:   &lt;section id="login"&gt;
                   7482:    &lt;h2&gt;Login&lt;/h2&gt;
                   7483:    &lt;form&gt;
                   7484:     ...
                   7485:     &lt;!-- calls login() once the user's credentials have been checked --&gt;
                   7486:    &lt;/form&gt;
                   7487:    &lt;script&gt;
                   7488:     function login() {
                   7489:       // switch screens
                   7490:       document.getElementById('login').irrelevant = true;
                   7491:       document.getElementById('game').irrelevant = false;
                   7492:     }
                   7493:    &lt;/script&gt;
                   7494:   &lt;/section&gt;
                   7495:   &lt;section id="game" irrelevant&gt;
                   7496:    ...
                   7497: &lt;/section&gt;
                   7498: </pre></div>
                   7499: <p>The <code title="attr-irrelevant"><a href=
                   7500: "#irrelevant">irrelevant</a></code> attribute must not be used to
                   7501: hide content that could legitimately be shown in another
                   7502: presentation. For example, it is incorrect to use <code title=
                   7503: "attr-irrelevant"><a href="#irrelevant">irrelevant</a></code> to
                   7504: hide panels in a tabbed dialog, because the tabbed interface is
                   7505: merely a kind of overflow presentation — showing all the form
                   7506: controls in one big page with a scrollbar would be equivalent, and
                   7507: no less correct.</p>
                   7508: <p>Elements in a section hidden by the <code title=
                   7509: "attr-irrelevant"><a href="#irrelevant">irrelevant</a></code>
                   7510: attribute are still active, e.g. scripts and form controls in such
                   7511: sections still render execute and submit respectively. Only their
                   7512: presentation to the user changes.</p>
                   7513: <p>The <dfn id="irrelevant0" title=
                   7514: "dom-irrelevant"><code>irrelevant</code></dfn> DOM attribute must
                   7515: <a href="#reflect">reflect</a> the content attribute of the same
                   7516: name.</p>
                   7517: <h4 id="the-style"><span class="secno"><ins class=
1.2     ! mike     7518: "diff-new">3.4.8</ins></span> <ins class="diff-new">The</ins>
1.1       mike     7519: <dfn id="style" title="attr-style"><code><ins class=
                   7520: "diff-new">style</ins></code></dfn> <ins class=
                   7521: "diff-new">attribute</ins></h4>
                   7522: <p><ins class="diff-new">All elements may have the</ins>
                   7523: <code title="attr-style"><a href="#style"><ins class=
                   7524: "diff-new">style</ins></a></code> <ins class="diff-new">content
                   7525: attribute set. If specified, the attribute must contain only a list
                   7526: of zero or more semicolon-separated (;) CSS declarations.</ins>
                   7527: <a href="#references"><ins class="diff-new">[CSS21]</ins></a></p>
                   7528: <p><ins class="diff-new">The attribute, if specified, must be
                   7529: parsed and treated as the body (the part inside the curly brackets)
                   7530: of a declaration block in a rule whose selector matches just the
                   7531: element on which the attribute is set. For the purposes of the CSS
                   7532: cascade, the attribute must be considered to be a 'style' attribute
                   7533: at the author level.</ins></p>
                   7534: <p><ins class="diff-new">Documents that use</ins> <code title=
                   7535: "attr-style"><a href="#style"><ins class=
                   7536: "diff-new">style</ins></a></code> <ins class="diff-new">attributes
                   7537: on any of their elements must still be comprehensible and usable if
                   7538: those attributes were removed.</ins></p>
                   7539: <p class="note"><ins class="diff-new">In particular, using
                   7540: the</ins> <code title="attr-style"><a href="#style"><ins class=
                   7541: "diff-new">style</ins></a></code> <ins class="diff-new">attribute
                   7542: to hide and show content, or to convey meaning that is otherwise
                   7543: not included in the document, is non-conforming.</ins></p>
                   7544: <p><ins class="diff-new">The</ins> <dfn id="style0" title=
                   7545: "dom-style"><code><ins class="diff-new">style</ins></code></dfn>
                   7546: <ins class="diff-new">DOM attribute must return a</ins>
                   7547: <code><ins class="diff-new">CSSStyleDeclaration</ins></code>
                   7548: <ins class="diff-new">whose value represents the declarations
                   7549: specified in the attribute, if present. Mutating the</ins>
                   7550: <code><ins class="diff-new">CSSStyleDeclaration</ins></code>
                   7551: <ins class="diff-new">object must create a</ins> <code title=
                   7552: "attr-font-style"><ins class="diff-new">style</ins></code>
                   7553: <ins class="diff-new">attribute on the element (if there isn't one
                   7554: already) and then change its value to be a value representing the
                   7555: serialized form of the</ins> <code><ins class=
                   7556: "diff-new">CSSStyleDeclaration</ins></code> <ins class=
                   7557: "diff-new">object.</ins> <a href="#references"><ins class=
                   7558: "diff-new">[CSSOM]</ins></a></p>
                   7559: <div class="example">
                   7560: <p><ins class="diff-new">In the following example, the words that
                   7561: refer to colors are marked up using the</ins> <code><a href=
                   7562: "#span"><ins class="diff-new">span</ins></a></code> <ins class=
                   7563: "diff-new">element and the</ins> <code title="attr-style"><a href=
                   7564: "#style"><ins class="diff-new">style</ins></a></code> <ins class=
                   7565: "diff-new">attribute to make those words show up in the relevant
                   7566: colors in visual media.</ins></p>
                   7567: <pre>
                   7568: &lt;p&gt;My sweat suit is &lt;span style="color: green; background:<ins class="diff-new">
                   7569: transparent"&gt;green&lt;/span&gt; and my eyes are &lt;span style="color: blue;
                   7570: background:
                   7571: transparent"&gt;
                   7572: blue&lt;/span&gt;.&lt;/p&gt;
                   7573: </ins>
                   7574: </pre></div>
                   7575: <h4 id="embedding"><span class="secno"><ins class=
1.2     ! mike     7576: "diff-new">3.4.9</ins></span> <dfn id="embedding0"><ins class=
1.1       mike     7577: "diff-new">Embedding custom non-visible data</ins></dfn></h4>
                   7578: <p><ins class="diff-new">A</ins> <dfn id="custom"><ins class=
                   7579: "diff-new">custom data attribute</ins></dfn> <ins class=
                   7580: "diff-new">is an attribute whose name starts with the string
                   7581: "</ins> <dfn id="data-" title="attr-data-*"><code><ins class=
                   7582: "diff-new">data-</ins></code></dfn> <ins class="diff-new">" and has
                   7583: at least one character after the hyphen.</ins></p>
                   7584: <p><a href="#custom" title="custom data attribute"><ins class=
                   7585: "diff-new">Custom data attributes</ins></a> <ins class=
                   7586: "diff-new">are intended to store custom data private to the page or
                   7587: application, for which there are no more appropriate attributes or
                   7588: elements.</ins></p>
                   7589: <p><ins class="diff-new">Every</ins> <a href="#html-elements"
                   7590: title="HTML elements"><ins class="diff-new">HTML element</ins></a>
                   7591: <ins class="diff-new">may have any number of</ins> <a href=
                   7592: "#custom" title="custom data attribute"><ins class=
                   7593: "diff-new">custom data attributes</ins></a> <ins class=
                   7594: "diff-new">specified, with any value.</ins></p>
                   7595: <p><ins class="diff-new">The</ins> <dfn id="dataset" title=
                   7596: "dom-dataset"><code><ins class=
                   7597: "diff-new">dataset</ins></code></dfn> <ins class="diff-new">DOM
                   7598: attribute provides convenient accessors for all the</ins>
                   7599: <code title="attr-data-*"><a href="#data-"><ins class=
                   7600: "diff-new">data-*</ins></a></code> <ins class="diff-new">attributes
                   7601: on an element. On getting, the</ins> <code title=
                   7602: "dom-dataset"><a href="#dataset"><ins class=
                   7603: "diff-new">dataset</ins></a></code> <ins class="diff-new">DOM
                   7604: attribute must return a</ins> <code><a href=
                   7605: "#domstringmap0"><ins class=
                   7606: "diff-new">DOMStringMap</ins></a></code> <ins class=
                   7607: "diff-new">object, associated with the following three algorithms,
                   7608: which expose these attributes on their element:</ins></p>
                   7609: <dl>
                   7610: <dt><ins class="diff-new">The algorithm for getting values from
                   7611: names</ins></dt>
                   7612: <dd>
                   7613: <ol>
                   7614: <li><ins class="diff-new">Let</ins> <var title=""><ins class=
                   7615: "diff-new">name</ins></var> <ins class="diff-new">be the
                   7616: concatenation of the string</ins> <code title=""><ins class=
                   7617: "diff-new">data-</ins></code> <ins class="diff-new">and the name
                   7618: passed to the algorithm.</ins></li>
                   7619: <li><ins class="diff-new">If the element does not have an attribute
                   7620: with the name</ins> <var title=""><ins class=
                   7621: "diff-new">name</ins></var> ,<ins class="diff-new">then the name
                   7622: has no corresponding value, abort.</ins></li>
                   7623: <li><ins class="diff-new">Otherwise, return the value of the
                   7624: attribute with the name</ins> <var title=""><ins class=
                   7625: "diff-new">name</ins></var> .</li>
                   7626: </ol>
                   7627: </dd>
                   7628: <dt><ins class="diff-new">The algorithm for setting names to
                   7629: certain values</ins></dt>
                   7630: <dd>
                   7631: <ol>
                   7632: <li><ins class="diff-new">Let</ins> <var title=""><ins class=
                   7633: "diff-new">name</ins></var> <ins class="diff-new">be the
                   7634: concatenation of the string</ins> <code title=""><ins class=
                   7635: "diff-new">data-</ins></code> <ins class="diff-new">and the name
                   7636: passed to the algorithm.</ins></li>
                   7637: <li><ins class="diff-new">Let</ins> <var title=""><ins class=
                   7638: "diff-new">value</ins></var> <ins class="diff-new">be the value
                   7639: passed to the algorithm.</ins></li>
                   7640: <li><ins class="diff-new">Set the value of the attribute with the
                   7641: name</ins> <var title=""><ins class="diff-new">name</ins></var>
                   7642: ,<ins class="diff-new">to the value</ins> <var title=""><ins class=
                   7643: "diff-new">value</ins></var> ,<ins class="diff-new">replacing any
                   7644: previous value if the attribute already existed. If</ins>
                   7645: <code title=""><ins class="diff-new">setAttribute()</ins></code>
                   7646: <ins class="diff-new">would have raised an exception when setting
                   7647: an attribute with the name</ins> <var title=""><ins class=
                   7648: "diff-new">name</ins></var> ,<ins class="diff-new">then this must
                   7649: raise the same exception.</ins></li>
                   7650: </ol>
                   7651: </dd>
                   7652: <dt><ins class="diff-new">The algorithm for deleting
                   7653: names</ins></dt>
                   7654: <dd>
                   7655: <ol>
                   7656: <li><ins class="diff-new">Let</ins> <var title=""><ins class=
                   7657: "diff-new">name</ins></var> <ins class="diff-new">be the
                   7658: concatenation of the string</ins> <code title=""><ins class=
                   7659: "diff-new">data-</ins></code> <ins class="diff-new">and the name
                   7660: passed to the algorithm.</ins></li>
                   7661: <li><ins class="diff-new">Remove the attribute with the name</ins>
                   7662: <var title=""><ins class="diff-new">name</ins></var> ,<ins class=
                   7663: "diff-new">if such an attribute exists. Do nothing
                   7664: otherwise.</ins></li>
                   7665: </ol>
                   7666: </dd>
                   7667: </dl>
                   7668: <div class="example">
                   7669: <p><ins class="diff-new">If a Web page wanted an element to
                   7670: represent a space ship, e.g. as part of a game, it would have to
                   7671: use the</ins> <code class="attr-class"><ins class=
                   7672: "diff-new">class</ins></code> <ins class="diff-new">attribute along
                   7673: with</ins> <code title="attr-data-*"><a href="#data-"><ins class=
                   7674: "diff-new">data-*</ins></a></code> <ins class=
                   7675: "diff-new">attributes:</ins></p>
                   7676: <pre>
                   7677: <ins class="diff-new">
                   7678: &lt;div class="spaceship" data-id="92432"
                   7679:      data-weapons="laser 2" data-shields="50%"
                   7680:      data-x="30" data-y="10" data-z="90"&gt;
                   7681:  &lt;button class="fire"
                   7682:          onclick="spaceships[this.parentNode.dataset.id].fire()"&gt;
                   7683:   Fire
                   7684:  &lt;/button&gt;
                   7685: &lt;/div&gt;
                   7686: </ins>
                   7687: </pre></div>
                   7688: <p><ins class="diff-new">Authors should carefully design such
                   7689: extensions so that when the attributes are ignored and any
                   7690: associated CSS dropped, the page is still usable.</ins></p>
                   7691: <p><ins class="diff-new">User agents must not derive any
                   7692: implementation behavior from these attributes or values.
                   7693: Specifications intended for user agents must not define these
                   7694: attributes to have any meaningful values.</ins></p>
                   7695: <h3 id="interaction"><span class="secno"><del class=
                   7696: "diff-old">3.5.</del> <ins class="diff-chg">3.5</ins></span>
                   7697: <dfn id="interaction0">Interaction</dfn></h3>
                   7698: <h4 id="activation"><span class="secno"><del class=
                   7699: "diff-old">3.5.1.</del> <ins class="diff-chg">3.5.1</ins></span>
                   7700: Activation</h4>
                   7701: <p>The <dfn id="click" title="dom-click">click()</dfn> method must
                   7702: <a href="#firing">fire a <code>click</code> event</a> at the
                   7703: element, whose default action is the <span title=
                   7704: "fire a DOMActivate event">firing of a further <code title=
                   7705: "event-DOMActivate">DOMActivate</code> event</span> at the same
                   7706: element, whose own default action is to go through all the elements
                   7707: the <code title="event-DOMActivate">DOMActivate</code> event
                   7708: bubbled through (starting at the target node and going towards the
                   7709: <code>Document</code> node), looking for an element with an
                   7710: <a href="#activation0">activation behavior</a> ; the first element,
                   7711: in reverse tree order, to have one, must have its activation
                   7712: behavior executed.</p>
                   7713: <h4 id="focus"><span class="secno"><del class=
                   7714: "diff-old">3.5.2.</del> <ins class="diff-chg">3.5.2</ins></span>
                   7715: Focus</h4>
                   7716: <p>When an element is <em>focused</em> , key events received by the
                   7717: document must be targeted at that element. There <del class=
                   7718: "diff-old">is always an</del> <ins class="diff-chg">may be no</ins>
                   7719: element focused; <del class="diff-old">in the absence of other
                   7720: elements being</del> <ins class="diff-chg">when no element is</ins>
                   7721: focused, <ins class="diff-new">key events received by</ins> the
                   7722: <del class="diff-old">document's root</del> <ins class=
                   7723: "diff-chg">document must be targetted at</ins> <a href=
                   7724: "#the-body1"><ins class="diff-chg">the</ins> <code><ins class=
                   7725: "diff-chg">body</ins></code> element <del class="diff-old">is
                   7726: it.</del></a> .</p>
                   7727: <p><ins class="diff-chg">User agents may track focus for each</ins>
                   7728: <a href="#browsing1"><ins class="diff-chg">browsing
                   7729: context</ins></a> <ins class="diff-chg">or</ins> <code><ins class=
                   7730: "diff-chg">Document</ins></code> <ins class=
                   7731: "diff-chg">individually, or may support only one focused elment
                   7732: per</ins> <a href="#top-level"><ins class="diff-chg">top-level
                   7733: browsing context</ins></a> <ins class="diff-chg">— user agents
                   7734: should follow platform conventions in this regard.</ins></p>
                   7735: <p>Which <del class="diff-old">element</del> <ins class=
                   7736: "diff-chg">element(s)</ins> within a <del class=
                   7737: "diff-old">document</del> <a href="#top-level"><ins class=
                   7738: "diff-chg">top-level browsing context</ins></a> currently has focus
                   7739: <del class="diff-old">is</del> <ins class="diff-chg">must be</ins>
                   7740: independent of whether or not the <del class=
                   7741: "diff-old">document</del> <a href="#top-level"><ins class=
                   7742: "diff-chg">top-level browsing context</ins></a> itself has the
                   7743: <em>system focus</em> . <del class="diff-old">Some focusable
                   7744: elements might take part in sequential focus navigation .</del></p>
                   7745: <h5 id="focus-management"><span class="secno">3.5.2.1.</span> Focus
                   7746: management</h5>
                   7747: <p>The <del class="diff-old">focus() and blur()</del> <dfn id=
                   7748: "focusing"><ins class="diff-chg">focusing steps</ins></dfn>
                   7749: <del class="diff-old">methods must</del> <ins class="diff-chg">are
                   7750: as follows:</ins></p>
                   7751: <ol>
                   7752: <li>
                   7753: <p><ins class="diff-chg">If focusing the element will remove
                   7754: the</ins> focus <del class="diff-old">and unfocus</del> <ins class=
                   7755: "diff-chg">from another element, then run the</ins> <a href=
                   7756: "#unfocusing"><ins class="diff-chg">unfocusing steps</ins></a>
                   7757: <ins class="diff-chg">for that element.</ins></p>
                   7758: </li>
                   7759: <li>
                   7760: <p><ins class="diff-chg">Make</ins> the element <del class=
                   7761: "diff-old">respectively, if</del> the <ins class=
                   7762: "diff-new">currently focused</ins> element <del class="diff-old">is
                   7763: focusable.</del> <ins class="diff-chg">in its</ins> <a href=
                   7764: "#top-level"><ins class="diff-chg">top-level browsing
                   7765: context</ins></a> .</p>
                   7766: <p>Some elements, most notably <code><a href=
                   7767: "#area">area</a></code> , can correspond to more than one distinct
                   7768: focusable area. <del class="diff-old">When such an</del>
                   7769: <ins class="diff-chg">If a particular area was indicated when
                   7770: the</ins> element <ins class="diff-new">was focused, then
                   7771: that</ins> is <del class="diff-old">focused</del> <ins class=
                   7772: "diff-chg">the area that must get focus; otherwise, e.g. when</ins>
                   7773: using the <code title="dom-focus"><a href=
                   7774: "#focus0">focus()</a></code> method, the first such region in tree
                   7775: order is the one that must be focused. <del class=
                   7776: "diff-old">Well</del></p>
                   7777: </li>
                   7778: <li>
                   7779: <p><a href="#firing2"><ins class="diff-chg">Fire a simple
                   7780: event</ins></a> that <del class="diff-old">clearly needs
                   7781: more.</del> <ins class="diff-chg">doesn't bubble called</ins>
                   7782: <code title="event-focus"><ins class="diff-chg">focus</ins></code>
                   7783: <ins class="diff-chg">at the element.</ins></p>
                   7784: </li>
                   7785: </ol>
                   7786: <p><ins class="diff-chg">User agents must run the</ins> <a href=
                   7787: "#focusing"><ins class="diff-chg">focusing steps</ins></a>
                   7788: <ins class="diff-chg">for an element whenever the user moves the
                   7789: focus to a</ins> <a href="#focusable"><ins class=
                   7790: "diff-chg">focusable</ins></a> <ins class=
                   7791: "diff-chg">element.</ins></p>
                   7792: <p><ins class="diff-chg">The</ins> <dfn id="unfocusing"><ins class=
                   7793: "diff-chg">unfocusing steps</ins></dfn> <ins class="diff-chg">are
                   7794: as follows:</ins></p>
                   7795: <ol>
                   7796: <li>
                   7797: <p><ins class="diff-chg">Unfocus the element.</ins></p>
                   7798: </li>
                   7799: <li>
                   7800: <p><a href="#firing2"><ins class="diff-chg">Fire a simple
                   7801: event</ins></a> <ins class="diff-chg">that doesn't bubble
                   7802: called</ins> <code title="event-blur"><ins class=
                   7803: "diff-chg">blur</ins></code> <ins class="diff-chg">at the
                   7804: element.</ins></p>
                   7805: </li>
                   7806: </ol>
                   7807: <p><ins class="diff-chg">User agents should run the</ins> <a href=
                   7808: "#unfocusing"><ins class="diff-chg">unfocusing steps</ins></a>
                   7809: <ins class="diff-chg">for an element whenever the user moves the
                   7810: focus away from any</ins> <a href="#focusable"><ins class=
                   7811: "diff-chg">focusable</ins></a> <ins class=
                   7812: "diff-chg">element.</ins></p>
                   7813: <hr>
                   7814: <p><ins class="diff-chg">The</ins> <dfn id="focus0" title=
                   7815: "dom-focus"><code><ins class="diff-chg">focus()</ins></code></dfn>
                   7816: <ins class="diff-chg">method, when invoked, must run the following
                   7817: algorithm:</ins></p>
                   7818: <ol>
                   7819: <li>
                   7820: <p><ins class="diff-chg">If the element is marked as</ins>
                   7821: <i><a href="#locked"><ins class="diff-chg">locked for
                   7822: focus</ins></a></i> ,<ins class="diff-chg">then abort these
                   7823: steps.</ins></p>
                   7824: </li>
                   7825: <li>
                   7826: <p><ins class="diff-chg">If the element is not</ins> <a href=
                   7827: "#focusable"><ins class="diff-chg">focusable</ins></a> ,<ins class=
                   7828: "diff-chg">then abort these steps.</ins></p>
                   7829: </li>
                   7830: <li>
                   7831: <p><ins class="diff-chg">Mark the element as</ins> <dfn id=
                   7832: "locked"><ins class="diff-chg">locked for focus</ins></dfn> .</p>
                   7833: </li>
                   7834: <li>
                   7835: <p><ins class="diff-chg">If the element is not already focused, run
                   7836: the</ins> <a href="#focusing"><ins class="diff-chg">focusing
                   7837: steps</ins></a> <ins class="diff-chg">for the element.</ins></p>
                   7838: </li>
                   7839: <li>
                   7840: <p><ins class="diff-chg">Unmark the element as</ins> <i><a href=
                   7841: "#locked"><ins class="diff-chg">locked for focus</ins></a></i>
                   7842: .</p>
                   7843: </li>
                   7844: </ol>
                   7845: <p><ins class="diff-chg">The</ins> <dfn id="blur" title=
                   7846: "dom-blur"><code><ins class="diff-chg">blur()</ins></code></dfn>
                   7847: <ins class="diff-chg">method, when invoked, should run the</ins>
                   7848: <a href="#unfocusing"><ins class="diff-chg">unfocusing
                   7849: steps</ins></a> <ins class="diff-chg">for the element. User agents
                   7850: may selectively or uniformly ignore calls to this method for
                   7851: usability reasons.</ins></p>
                   7852: <hr>
                   7853: <p>The <dfn id="activeelement" title=
                   7854: "dom-document-activeElement"><code>activeElement</code></dfn>
                   7855: attribute must return the element in the document that <del class=
                   7856: "diff-old">has focus.</del> <ins class="diff-chg">is focused.</ins>
                   7857: If no element <del class="diff-old">specifically has focus,</del>
                   7858: <ins class="diff-chg">in the</ins> <code><ins class=
                   7859: "diff-chg">Document</ins></code> <ins class="diff-chg">is
                   7860: focused,</ins> this must return <a href="#the-body1">the
                   7861: <code>body</code> element</a> .</p>
                   7862: <p>The <dfn id="hasfocus" title=
                   7863: "dom-document-hasFocus"><code><del class="diff-old">hasFocus</del>
                   7864: <ins class="diff-chg">hasFocus()</ins></code></dfn> <del class=
                   7865: "diff-old">attribute</del> <ins class="diff-chg">method</ins> must
                   7866: return true if the document, one of its nested <a href="#browsing1"
                   7867: title="browsing context">browsing contexts</a> , or any element in
                   7868: the document or its browsing contexts currently has the system
                   7869: focus.</p>
                   7870: <h5 id="sequential"><span class="secno">3.5.2.2.</span> Sequential
                   7871: focus navigation</h5>
                   7872: <del class="diff-old">This section on the tabindex attribute needs
                   7873: to be checked for backwards-compatibility.</del>
                   7874: <p>The <dfn id="tabindex" title=
                   7875: "attr-tabindex"><code>tabindex</code></dfn> <ins class=
                   7876: "diff-new">content</ins> attribute specifies <ins class=
                   7877: "diff-new">whether the element is focusable, whether it can be
                   7878: reached using sequential focus navigation, and</ins> the relative
                   7879: order of <del class="diff-old">elements</del> <ins class=
                   7880: "diff-chg">the element</ins> for the purposes of sequential focus
                   7881: navigation. The name "tab index" comes from the common use of the
                   7882: "tab" key to navigate through the focusable elements. The term
                   7883: "tabbing" refers to moving forward through the focusable
                   7884: <del class="diff-old">elements.</del> <ins class=
                   7885: "diff-chg">elements that can be reached using sequential focus
                   7886: navigation.</ins></p>
                   7887: <p>The <code title="attr-tabindex"><a href=
                   7888: "#tabindex">tabindex</a></code> attribute, if specified, must have
                   7889: a value that is a <a href="#valid0">valid integer</a> .</p>
                   7890: <p>If the attribute is specified, it must be parsed using the
                   7891: <a href="#rules0">rules for parsing integers</a> . <ins class=
                   7892: "diff-new">The attribute's values have the following
                   7893: meanings:</ins></p>
                   7894: <dl>
                   7895: <dt>If <ins class="diff-new">the attribute is omitted or</ins>
                   7896: parsing the value returns an <del class="diff-old">error,</del>
                   7897: <ins class="diff-chg">error</ins></dt>
                   7898: <dd>
                   7899: <p><ins class="diff-chg">The user agent should follow platform
                   7900: conventions to determine if</ins> the <del class=
                   7901: "diff-old">attribute</del> <ins class="diff-chg">element</ins> is
                   7902: <del class="diff-old">ignored for the purposes of focus management
                   7903: (as</del> <ins class="diff-chg">to be focusable and,</ins> if
                   7904: <del class="diff-old">it wasn't specified). A positive integer or
                   7905: zero specifies the index of</del> <ins class="diff-chg">so,
                   7906: whether</ins> the element <del class="diff-old">in the current
                   7907: scope's tab order. Elements with the same index are sorted in
                   7908: tree</del> <ins class="diff-chg">can be reached using sequential
                   7909: focus navigation, and if so, what its relative</ins> order
                   7910: <del class="diff-old">for</del> <ins class="diff-chg">should
                   7911: be.</ins></p>
                   7912: </dd>
                   7913: <dt id="negative-tabindex"><ins class="diff-chg">If</ins> the
                   7914: <del class="diff-old">purposes of tabbing. A</del> <ins class=
                   7915: "diff-chg">value is a</ins> negative integer <del class=
                   7916: "diff-old">specifies that</del></dt>
                   7917: <dd>
                   7918: <p><ins class="diff-chg">The user agent must allow</ins> the
                   7919: element <del class="diff-old">should</del> <ins class=
                   7920: "diff-chg">to</ins> be <del class="diff-old">removed from the tab
                   7921: order. If</del> <ins class="diff-chg">focused, but should not
                   7922: allow</ins> the element <del class="diff-old">does normally take
                   7923: focus, it may still</del> <ins class="diff-chg">to</ins> be
                   7924: <del class="diff-old">focused</del> <ins class=
                   7925: "diff-chg">reached</ins> using <del class="diff-old">other means
                   7926: (e.g. it could be focused by a click).</del> <ins class=
                   7927: "diff-chg">sequential focus navigation.</ins></p>
                   7928: </dd>
                   7929: <dt>If the <del class="diff-old">attribute</del> <ins class=
                   7930: "diff-chg">value</ins> is <del class="diff-old">absent (or
                   7931: invalid), then the</del> <ins class="diff-chg">a zero</ins></dt>
                   7932: <dd>
                   7933: <p><ins class="diff-chg">The</ins> user agent must <del class=
                   7934: "diff-old">treat</del> <ins class="diff-chg">allow</ins> the
                   7935: element <del class="diff-old">as if it had</del> <ins class=
                   7936: "diff-chg">to be focused, should allow</ins> the <del class=
                   7937: "diff-old">value 0 or</del> <ins class="diff-chg">element to be
                   7938: reached using sequential focus navigation, and should follow
                   7939: platform conventions to determine the element's relative
                   7940: order.</ins></p>
                   7941: </dd>
                   7942: <dt><ins class="diff-chg">If</ins> the value <del class=
                   7943: "diff-old">-1, based on platform conventions. For example, a</del>
                   7944: <ins class="diff-chg">is greater than zero</ins></dt>
                   7945: <dd>
                   7946: <p><ins class="diff-chg">The</ins> user agent <del class=
                   7947: "diff-old">might default textarea elements</del> <ins class=
                   7948: "diff-chg">must allow the element</ins> to <del class=
                   7949: "diff-old">0,</del> <ins class="diff-chg">be focused, should allow
                   7950: the element to be reached using sequential focus navigation,</ins>
                   7951: and <del class="diff-old">button</del> <ins class="diff-chg">should
                   7952: place the element in the sequential focus navigation order so that
                   7953: it is:</ins></p>
                   7954: <ul>
                   7955: <li><ins class="diff-chg">before any focusable element whose</ins>
                   7956: <code title="attr-tabindex"><a href="#tabindex"><ins class=
                   7957: "diff-chg">tabindex</ins></a></code> <del class=
                   7958: "diff-old">elements</del> <ins class="diff-chg">attribute has been
                   7959: omitted or whose value, when parsed, returns an error,</ins></li>
                   7960: <li><ins class="diff-chg">before any focusable element whose</ins>
                   7961: <code title="attr-tabindex"><a href="#tabindex"><ins class=
                   7962: "diff-chg">tabindex</ins></a></code> <ins class=
                   7963: "diff-chg">attribute has a value equal</ins> to <del class=
                   7964: "diff-old">-1, making text fields part</del> <ins class=
                   7965: "diff-chg">or less than zero,</ins></li>
                   7966: <li><ins class="diff-chg">after any element whose</ins>
                   7967: <code title="attr-tabindex"><a href="#tabindex"><ins class=
                   7968: "diff-chg">tabindex</ins></a></code> <ins class=
                   7969: "diff-chg">attribute has a value greater than zero but less than
                   7970: the value</ins> of the <del class="diff-old">tabbing cycle but
                   7971: buttons not. When an</del> <code title="attr-tabindex"><a href=
                   7972: "#tabindex"><ins class="diff-chg">tabindex</ins></a></code>
                   7973: <ins class="diff-chg">attribute on the element,</ins></li>
                   7974: <li><ins class="diff-chg">after any</ins> element <del class=
                   7975: "diff-old">that does not normally take focus (i.e.</del> whose
                   7976: <del class="diff-old">default value would be -1)</del> <code title=
                   7977: "attr-tabindex"><a href="#tabindex"><ins class=
                   7978: "diff-chg">tabindex</ins></a></code> <ins class=
                   7979: "diff-chg">attribute</ins> has <ins class="diff-new">a value equal
                   7980: to the value of</ins> the <code title="attr-tabindex"><a href=
                   7981: "#tabindex">tabindex</a></code> attribute <del class=
                   7982: "diff-old">specified with</del> <ins class="diff-chg">on the
                   7983: element but that is earlier in the document in</ins> <a href=
                   7984: "#tree-order"><ins class="diff-chg">tree order</ins></a>
                   7985: <ins class="diff-chg">than the element,</ins></li>
                   7986: <li><ins class="diff-chg">before any element whose</ins>
                   7987: <code title="attr-tabindex"><a href="#tabindex"><ins class=
                   7988: "diff-chg">tabindex</ins></a></code> <ins class=
                   7989: "diff-chg">attribute has</ins> a <del class="diff-old">positive
                   7990: value, then it should be added</del> <ins class="diff-chg">value
                   7991: equal</ins> to the <del class="diff-old">tab</del> <ins class=
                   7992: "diff-chg">value of the</ins> <code title="attr-tabindex"><a href=
                   7993: "#tabindex"><ins class="diff-chg">tabindex</ins></a></code>
                   7994: <ins class="diff-chg">attribute on the element but that is later in
                   7995: the document in</ins> <a href="#tree-order"><ins class=
                   7996: "diff-chg">tree</ins> order</a> <ins class="diff-new">than the
                   7997: element,</ins> and <del class="diff-old">should</del></li>
                   7998: <li><ins class="diff-chg">before any element whose</ins>
                   7999: <code title="attr-tabindex"><a href="#tabindex"><ins class=
                   8000: "diff-chg">tabindex</ins></a></code> <ins class=
                   8001: "diff-chg">attribute has a value greater than the value of
                   8002: the</ins> <code title="attr-tabindex"><a href=
                   8003: "#tabindex"><ins class="diff-chg">tabindex</ins></a></code>
                   8004: <ins class="diff-chg">attribute on the element.</ins></li>
                   8005: </ul>
                   8006: </dd>
                   8007: </dl>
                   8008: <p><ins class="diff-chg">An element is</ins> <dfn id=
                   8009: "focusable"><ins class="diff-chg">focusable</ins></dfn> <ins class=
                   8010: "diff-chg">if the</ins> <code title="attr-tabindex"><a href=
                   8011: "#tabindex"><ins class="diff-chg">tabindex</ins></a></code>
                   8012: <ins class="diff-chg">attribute's definition above defines the
                   8013: element to</ins> be <del class="diff-old">made focusable.</del>
                   8014: <ins class="diff-chg">focusable</ins> <em><ins class=
                   8015: "diff-chg">and</ins></em> <ins class="diff-chg">the element
                   8016: is</ins> <span><ins class="diff-chg">being rendered</ins></span>
                   8017: <ins class="diff-chg">.</ins></p>
                   8018: <p>When <ins class="diff-new">an element is</ins> focused, the
                   8019: element matches the CSS <code>:focus</code> pseudo-class and key
                   8020: events are dispatched on that element in response to keyboard
                   8021: input.</p>
                   8022: <p>The <dfn id="tabindex0" title=
                   8023: "dom-tabIndex"><code>tabIndex</code></dfn> DOM attribute
                   8024: <del class="diff-old">reflects</del> <ins class=
                   8025: "diff-chg">must</ins> <a href="#reflect"><ins class=
                   8026: "diff-chg">reflect</ins></a> the value of the <code title=
                   8027: "attr-tabIndex"><a href="#tabindex">tabIndex</a></code> content
                   8028: attribute. If the attribute is not <del class="diff-old">present
                   8029: (or has</del> <ins class="diff-chg">present, or parsing its value
                   8030: returns</ins> an <del class="diff-old">invalid value)</del>
                   8031: <ins class="diff-chg">error,</ins> then the DOM attribute must
                   8032: return <del class="diff-old">the UA's default value for that
                   8033: element, which will be either</del> 0 <del class=
                   8034: "diff-old">(for</del> <ins class="diff-chg">for</ins> elements
                   8035: <del class="diff-old">in the tab order) or -1 (for</del>
                   8036: <ins class="diff-chg">that are focusable and −1 for</ins> elements
                   8037: <ins class="diff-new">that are</ins> not <del class="diff-old">in
                   8038: the tab order).</del> <ins class="diff-chg">focusable.</ins></p>
                   8039: <h4 id="scrolling"><span class="secno"><del class=
                   8040: "diff-old">3.5.3.</del> <ins class="diff-chg">3.5.3</ins></span>
                   8041: Scrolling elements into view</h4>
                   8042: <p>The <dfn id="scrollintoview" title=
                   8043: "dom-scrollIntoView"><code>scrollIntoView([ <var title="">top</var>
                   8044: ])</code></dfn> method, when called, must cause the element on
                   8045: which the method was called to have the attention of the user
                   8046: called to it.</p>
                   8047: <p class="note">In a speech browser, this could happen by having
                   8048: the current playback position move to the start of the given
                   8049: element.</p>
                   8050: <p>In visual user agents, if the argument is present and has the
                   8051: value false, the user agent should scroll the element into view
                   8052: such that both the bottom and the top of the element are in the
                   8053: viewport, with the bottom of the element aligned with the bottom of
                   8054: the viewport. If it isn't possible to show the entire element in
                   8055: that way, or if the argument is omitted or is true, then the user
                   8056: agent <del class="diff-old">must</del> <ins class=
                   8057: "diff-chg">should</ins> instead <del class="diff-old">simply</del>
                   8058: align the top of the element with the top of the viewport.
                   8059: <ins class="diff-new">Visual user agents should further scroll
                   8060: horizontally as necessary to bring the element to the attention of
                   8061: the user.</ins></p>
                   8062: <p>Non-visual user agents may ignore the argument, or may treat it
                   8063: in some media-specific manner most useful to the user.</p>
                   8064: <h3 id="the-root"><span class="secno"><del class=
                   8065: "diff-old">3.6.</del> <ins class="diff-chg">3.6</ins></span> The
                   8066: root element</h3>
                   8067: <h4 id="the-html"><span class="secno"><del class=
                   8068: "diff-old">3.6.1.</del> <ins class="diff-chg">3.6.1</ins></span>
                   8069: The <dfn id="html"><code>html</code></dfn> element</h4>
                   8070: <dl class="element">
                   8071: <dt>Categories</dt>
                   8072: <dd>None.</dd>
                   8073: <dt>Contexts in which this element may be used:</dt>
                   8074: <dd>As the root element of a document.</dd>
                   8075: <dd>Wherever a subdocument fragment is allowed in a compound
                   8076: document.</dd>
                   8077: <dt>Content model:</dt>
                   8078: <dd>A <code><a href="#head">head</a></code> element followed by a
                   8079: <code><a href="#body0">body</a></code> element.</dd>
                   8080: <dt>Element-specific attributes:</dt>
                   8081: <dd><code title="attr-html-manifest"><a href=
                   8082: "#manifest">manifest</a></code></dd>
                   8083: <dt>DOM interface:</dt>
                   8084: <dd><del class="diff-old">No difference from</del> <ins class=
                   8085: "diff-chg">Uses</ins> <code><a href=
                   8086: "#htmlelement">HTMLElement</a></code> .</dd>
                   8087: </dl>
                   8088: <p>The <code><a href="#html">html</a></code> element represents the
                   8089: root of an HTML document.</p>
                   8090: <p>The <dfn id="manifest" title=
                   8091: "attr-html-manifest"><code>manifest</code></dfn> attribute gives
                   8092: the address of the document's <a href="#application0">application
                   8093: cache</a> <a href="#the-manifest" title=
                   8094: "concept-appcache-manifest">manifest</a> , if there is one. If the
                   8095: attribute is present, the attribute's value must be a valid URI (or
                   8096: IRI).</p>
                   8097: <p>The <code title="attr-html-manifest"><a href=
                   8098: "#manifest">manifest</a></code> attribute only <a href=
                   8099: "#application2" title="concept-appcache-init-with-attribute">has an
                   8100: effect</a> during the early stages of document load. Changing the
                   8101: attribute dynamically thus has no effect (and thus, no DOM API is
                   8102: provided for this attribute). <del class="diff-old">Furthermore, as
                   8103: it is processed before any</del></p>
                   8104: <p class="note"><ins class="diff-chg">Later</ins> <code><a href=
                   8105: "#base">base</a></code> elements <del class="diff-old">are seen,
                   8106: its value is not subject to being made relative to any base URI.
                   8107: Though it has absolutely no effect and no meaning,</del>
                   8108: <ins class="diff-chg">can't affect</ins> the <ins class=
                   8109: "diff-chg">resolving of relative URIs in</ins> <code title=
                   8110: "attr-html-manifest"><del class="diff-old">html</del> <a href=
                   8111: "#manifest"><ins class="diff-chg">manifest</ins></a></code>
                   8112: <del class="diff-old">element, in HTML documents , may have an
                   8113: xmlns attribute specified, if, and only if, it has the exact value
                   8114: " http://www.w3.org/1999/xhtml ". This does not apply to XML
                   8115: documents . In HTML, the xmlns attribute has absolutely no effect.
                   8116: It is basically a talisman. It is allowed merely to make migration
                   8117: to and from XHTML mildly easier. When parsed by an HTML parser ,
                   8118: the attribute ends up in the null namespace, not</del> <ins class=
                   8119: "diff-chg">attributes, as</ins> the <del class="diff-old">"
                   8120: http://www.w3.org/2000/xmlns/ " namespace like namespace
                   8121: declaration</del> attributes <del class="diff-old">in XML do. In
                   8122: XML, an xmlns attribute is part of the namespace declaration
                   8123: mechanism, and an element cannot actually have an xmlns attribute
                   8124: in the null namespace specified.</del> <ins class="diff-chg">are
                   8125: processed before those elements are seen.</ins></p>
                   8126: <h3 id="document"><span class="secno"><del class=
                   8127: "diff-old">3.7.</del> <ins class="diff-chg">3.7</ins></span>
                   8128: Document metadata</h3>
                   8129: <h4 id="the-head"><span class="secno"><del class=
                   8130: "diff-old">3.7.1.</del> <ins class="diff-chg">3.7.1</ins></span>
                   8131: The <dfn id="head"><code>head</code></dfn> element</h4>
                   8132: <dl class="element">
                   8133: <dt>Categories</dt>
                   8134: <dd>None.</dd>
                   8135: <dt>Contexts in which this element may be used:</dt>
                   8136: <dd>As the first element in an <code><a href=
                   8137: "#html">html</a></code> element.</dd>
                   8138: <dt>Content model:</dt>
                   8139: <dd>One or more elements of <a href="#metadata0">metadata
                   8140: content</a> , of which exactly one is a <code><a href=
                   8141: "#title1">title</a></code> element.</dd>
                   8142: <dt>Element-specific attributes:</dt>
                   8143: <dd>None.</dd>
                   8144: <dt>DOM interface:</dt>
                   8145: <dd><del class="diff-old">No difference from</del> <ins class=
                   8146: "diff-chg">Uses</ins> <code><a href=
                   8147: "#htmlelement">HTMLElement</a></code> .</dd>
                   8148: </dl>
                   8149: <p>The <code><a href="#head">head</a></code> element collects the
                   8150: document's metadata.</p>
                   8151: <h4 id="the-title0"><span class="secno"><del class=
                   8152: "diff-old">3.7.2.</del> <ins class="diff-chg">3.7.2</ins></span>
                   8153: The <dfn id="title1"><code>title</code></dfn> element</h4>
                   8154: <dl class="element">
                   8155: <dt>Categories</dt>
                   8156: <dd><a href="#metadata0">Metadata content</a> .</dd>
                   8157: <dt>Contexts in which this element may be used:</dt>
                   8158: <dd>In a <code><a href="#head">head</a></code> element containing
                   8159: no other <code><a href="#title1">title</a></code> elements.</dd>
                   8160: <dt>Content model:</dt>
                   8161: <dd>Text.</dd>
                   8162: <dt>Element-specific attributes:</dt>
                   8163: <dd>None.</dd>
                   8164: <dt>DOM interface:</dt>
                   8165: <dd><del class="diff-old">No difference from</del> <ins class=
                   8166: "diff-chg">Uses</ins> <code><a href=
                   8167: "#htmlelement">HTMLElement</a></code> .</dd>
                   8168: </dl>
                   8169: <p>The <code><a href="#title1">title</a></code> element represents
                   8170: the document's title or name. Authors should use titles that
                   8171: identify their documents even when they are used out of context,
                   8172: for example in a user's history or bookmarks, or in search results.
                   8173: The document's title is often different from its first header,
                   8174: since the first header does not have to stand alone when taken out
                   8175: of context.</p>
                   8176: <p>There must be no more than one <code><a href=
                   8177: "#title1">title</a></code> element per document.</p>
                   8178: <p>The <code><a href="#title1">title</a></code> element must not
                   8179: contain any elements.</p>
                   8180: <div class="example">
                   8181: <p>Here are some examples of appropriate titles, contrasted with
                   8182: the top-level headers that might be used on those same pages.</p>
                   8183: <pre>
                   8184:   &lt;title&gt;Introduction to The Mating Rituals of Bees&lt;/title&gt;
                   8185:     ...
                   8186:   &lt;h1&gt;Introduction&lt;/h1&gt;
                   8187:   &lt;p&gt;This companion guide to the highly successful
                   8188:   &lt;cite&gt;Introduction to Medieval Bee-Keeping&lt;/cite&gt; book is...
                   8189: </pre>
                   8190: <p>The next page might be a part of the same site. Note how the
                   8191: title describes the subject matter unambiguously, while the first
                   8192: header assumes the reader knowns what the context is and therefore
                   8193: won't wonder if the dances are Salsa or Waltz:</p>
                   8194: <pre>
                   8195:   &lt;title&gt;Dances used during bee mating rituals&lt;/title&gt;
                   8196:     ...
                   8197: &lt;h1&gt;
                   8198: The
                   8199: Dances&lt;/h1&gt;
                   8200: </pre></div>
                   8201: <p>The string to use as the document's title is given by the
                   8202: <code title="dom-document-title"><a href=
                   8203: "#document.title">document.title</a></code> DOM attribute. User
                   8204: agents should use the document's title when referring to the
                   8205: document in their user interface.</p>
                   8206: <h4 id="the-base"><span class="secno"><del class=
                   8207: "diff-old">3.7.3.</del> <ins class="diff-chg">3.7.3</ins></span>
                   8208: The <dfn id="base"><code>base</code></dfn> element</h4>
                   8209: <dl class="element">
                   8210: <dt>Categories</dt>
                   8211: <dd><a href="#metadata0">Metadata content</a> .</dd>
                   8212: <dt>Contexts in which this element may be used:</dt>
                   8213: <dd>In a <code><a href="#head">head</a></code> element containing
                   8214: no other <code><a href="#base">base</a></code> elements.</dd>
                   8215: <dt>Content model:</dt>
                   8216: <dd>Empty.</dd>
                   8217: <dt>Element-specific attributes:</dt>
                   8218: <dd><code title="attr-base-href"><a href=
                   8219: "#href">href</a></code></dd>
                   8220: <dd><code title="attr-base-target"><a href=
                   8221: "#target">target</a></code></dd>
                   8222: <dt>DOM interface:</dt>
                   8223: <dd>
                   8224: <pre class="idl">
                   8225: interface <dfn id=
                   8226: "htmlbaseelement">HTMLBaseElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
                   8227:            attribute DOMString <a href="#href0" title=
                   8228: "dom-base-href">href</a>;
                   8229:            attribute DOMString <a href="#target0" title=
                   8230: "dom-base-target">target</a>;
                   8231: };
                   8232: </pre></dd>
                   8233: </dl>
                   8234: <p>The <code><a href="#base">base</a></code> element allows authors
                   8235: to specify the document's base URI for the purposes of resolving
                   8236: relative URIs, and the name of the default <a href=
                   8237: "#browsing1">browsing context</a> for the purposes of <a href=
                   8238: "#following0">following hyperlinks</a> .</p>
                   8239: <p>There must be no more than one <code><a href=
                   8240: "#base">base</a></code> element per document.</p>
                   8241: <p>A <code><a href="#base">base</a></code> element must have either
                   8242: an <code title="attr-base-href"><a href="#href">href</a></code>
                   8243: attribute, a <code title="attr-base-target"><a href=
                   8244: "#target">target</a></code> attribute, or both.</p>
                   8245: <p>The <dfn id="href" title=
                   8246: "attr-base-href"><code>href</code></dfn> content attribute, if
                   8247: specified, must contain a URI (or IRI).</p>
                   8248: <p>A <code><a href="#base">base</a></code> element, if it has an
                   8249: <code title="attr-base-href"><a href="#href">href</a></code>
                   8250: attribute, must come before any other elements in the tree that
                   8251: have attributes with URIs (except the <code><a href=
                   8252: "#html">html</a></code> element and its <code title=
                   8253: "attr-html-manifest"><a href="#manifest">manifest</a></code>
                   8254: attribute).</p>
                   8255: <p>User agents must use the value of the <code title=
                   8256: "att-base-href">href</code> attribute of the first <code><a href=
                   8257: "#base">base</a></code> element that is both a child of <a href=
                   8258: "#the-head0">the <code>head</code> element</a> and has an
                   8259: <code title="att-base-href">href</code> attribute, if there is such
                   8260: an element, as the document entity's base URI for the purposes of
                   8261: section 5.1.1 of RFC 3986 ("Establishing a Base URI": "Base URI
                   8262: Embedded in Content"). This base URI from RFC 3986 is referred to
                   8263: by the algorithm given in XML Base, which <a href="#xmlBase">is a
                   8264: normative part of this specification</a> . <a href=
                   8265: "#references">[RFC3986]</a></p>
                   8266: <p>If the base URI given by this attribute is a relative URI, it
                   8267: must be resolved relative to the higher-level base URIs (i.e. the
                   8268: base URI from the encapsulating entity or the URI used to retrieve
                   8269: the entity) to obtain an absolute base URI. All <code title=
1.2     ! mike     8270: "attr-xml-base"><a href="#xmlbase">xml:base</a></code> attributes
        !          8271: must be ignored when resolving relative URIs in this <code title=
1.1       mike     8272: "attr-base-href"><a href="#href">href</a></code> attribute.</p>
                   8273: <p class="note">If there are multiple <code><a href=
                   8274: "#base">base</a></code> elements with <code title=
                   8275: "att-base-href">href</code> attributes, all but the first are
                   8276: ignored.</p>
                   8277: <p>The <dfn id="target" title=
                   8278: "attr-base-target"><code>target</code></dfn> attribute, if
                   8279: specified, must contain a <a href="#valid9">valid browsing context
                   8280: name <ins class="diff-new">or keyword</ins></a> . User agents use
                   8281: this name when <a href="#following0">following hyperlinks</a> .</p>
                   8282: <p>A <code><a href="#base">base</a></code> element, if it has a
                   8283: <code title="attr-base-target"><a href="#target">target</a></code>
                   8284: attribute, must come before any elements in the tree that represent
                   8285: <a href="#hyperlinks" title="hyperlink">hyperlinks</a> .</p>
                   8286: <p>The <dfn id="href0" title=
                   8287: "dom-base-href"><code>href</code></dfn> and <dfn id="target0"
                   8288: title="dom-base-target"><code>target</code></dfn> DOM attributes
                   8289: must <a href="#reflect">reflect</a> the content attributes of the
                   8290: same name.</p>
                   8291: <h4 id="the-link"><span class="secno"><del class=
                   8292: "diff-old">3.7.4.</del> <ins class="diff-chg">3.7.4</ins></span>
                   8293: The <dfn id="link"><code>link</code></dfn> element</h4>
                   8294: <dl class="element">
                   8295: <dt>Categories</dt>
                   8296: <dd><a href="#metadata0">Metadata content</a> .</dd>
                   8297: <dt>Contexts in which this element may be used:</dt>
                   8298: <dd>Where <a href="#metadata0">metadata content</a> is
                   8299: expected.</dd>
                   8300: <dd>In a <code><a href="#noscript">noscript</a></code> element that
                   8301: is a child of a <code><a href="#head">head</a></code> element.</dd>
                   8302: <dt>Content model:</dt>
                   8303: <dd>Empty.</dd>
                   8304: <dt>Element-specific attributes:</dt>
                   8305: <dd><code title="attr-link-href"><a href=
                   8306: "#href1">href</a></code></dd>
                   8307: <dd><code title="attr-link-rel"><a href="#rel">rel</a></code></dd>
                   8308: <dd><code title="attr-link-media"><a href=
                   8309: "#media0">media</a></code></dd>
                   8310: <dd><code title="attr-link-hreflang"><a href=
                   8311: "#hreflang">hreflang</a></code></dd>
                   8312: <dd><code title="attr-link-type"><a href=
                   8313: "#type">type</a></code></dd>
                   8314: <dd><code title="attr-link-sizes"><a href="#sizes0"><ins class=
                   8315: "diff-new">sizes</ins></a></code></dd>
                   8316: <dd>Also, the <code title="attr-link-title"><a href=
                   8317: "#title2">title</a></code> attribute has special semantics on this
                   8318: element.</dd>
                   8319: <dt>DOM interface:</dt>
                   8320: <dd>
                   8321: <pre class="idl">
                   8322: interface <dfn id=
                   8323: "htmllinkelement">HTMLLinkElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
                   8324:            attribute boolean <a href="#disabled" title=
                   8325: "dom-link-disabled">disabled</a>;
                   8326:            attribute DOMString <a href="#href2" title=
                   8327: "dom-link-href">href</a>;
                   8328:            attribute DOMString <a href="#rel0" title=
                   8329: "dom-link-rel">rel</a>;
                   8330:   readonly attribute DOMTokenList <a href="#rellist" title=
                   8331: "dom-link-relList">relList</a>;
                   8332:            attribute DOMString <a href="#media1" title=
                   8333: "dom-link-media">media</a>;
                   8334:            attribute DOMString <a href="#hreflang0" title=
                   8335: "dom-link-hreflang">hreflang</a>;
                   8336:            attribute DOMString <a href="#type0" title=
                   8337: "dom-link-type">type</a>;
                   8338: <ins class="diff-new">           attribute DOMString <a href=
                   8339: "#sizes" title="dom-link-sizes">sizes</a>;
                   8340: </ins>
                   8341: };
                   8342: </pre>
                   8343: <p>The <code>LinkStyle</code> interface must also be implemented by
                   8344: this element, the <a href="#styling0">styling processing model</a>
                   8345: defines how. <a href="#references">[CSSOM]</a></p>
                   8346: </dd>
                   8347: </dl>
                   8348: <p>The <code><a href="#link">link</a></code> element allows authors
                   8349: to link their document to other resources.</p>
                   8350: <p>The destination of the link is given by the <dfn id="href1"
                   8351: title="attr-link-href"><code>href</code></dfn> attribute, which
                   8352: must be present and must contain a URI (or IRI). If the
                   8353: <code title="attr-link-href"><a href="#href1">href</a></code>
                   8354: attribute is absent, then the element does not define a link.</p>
                   8355: <p>The type of link indicated (the relationship) is given by the
                   8356: value of the <dfn id="rel" title=
                   8357: "attr-link-rel"><code>rel</code></dfn> attribute, which must be
                   8358: present, and must have a value that is a <a href="#set-of">set of
                   8359: space-separated tokens</a> . The <a href="#linkTypes">allowed
                   8360: values and their meanings</a> are defined in a later section. If
                   8361: the <code title="attr-link-rel"><a href="#rel">rel</a></code>
                   8362: attribute is absent, or if the value used is not allowed according
                   8363: to the definitions in this specification, then the element does not
                   8364: define a link.</p>
                   8365: <p>Two categories of links can be created using the <code><a href=
                   8366: "#link">link</a></code> element. <dfn id="links1" title=
                   8367: "external resource link">Links to external resources</dfn> are
                   8368: links to resources that are to be used to augment the current
                   8369: document, and <dfn id="hyperlink1" title="hyperlink link">hyperlink
                   8370: links</dfn> are <a href="#hyperlinks" title="hyperlink">links to
                   8371: other documents</a> . The <a href="#linkTypes">link types
                   8372: section</a> defines whether a particular link type is an external
                   8373: resource or a hyperlink. One element can create multiple links (of
                   8374: which some might be external resource links and some might be
                   8375: <del class="diff-old">hyperlinks).</del> <ins class=
                   8376: "diff-chg">hyperlinks); exactly which and how many links are
                   8377: created depends on the keywords given in the</ins> <code title=
                   8378: "attr-link-rel"><a href="#rel"><ins class=
                   8379: "diff-chg">rel</ins></a></code> <ins class=
                   8380: "diff-chg">attribute.</ins> User agents <del class=
                   8381: "diff-old">should</del> <ins class="diff-chg">must</ins> process
                   8382: the links on a per-link basis, not a per-element basis.</p>
                   8383: <p>The exact <del class="diff-old">behaviour</del> <ins class=
                   8384: "diff-chg">behavior</ins> for links to external resources depends
                   8385: on the exact relationship, as defined for the relevant link type.
                   8386: Some of the attributes control whether or not the external resource
                   8387: is to be applied (as defined below). For external resources that
                   8388: are represented in the DOM (for example, style sheets), the DOM
                   8389: representation must be made available even if the resource is not
                   8390: applied. (However, user agents may opt to only fetch such resources
                   8391: when they are needed, instead of pro-actively downloading all the
                   8392: external resources that are not applied.)</p>
                   8393: <p><ins class="diff-new">HTTP semantics must be followed when
                   8394: fetching external resources. (For example, redirects must be
                   8395: followed and 404 responses must cause the external resource to not
                   8396: be applied.)</ins></p>
                   8397: <p>Interactive user agents should provide users with a means to
                   8398: <a href="#following0" title="following hyperlinks">follow the
                   8399: hyperlinks</a> created using the <code><a href=
                   8400: "#link">link</a></code> element, somewhere within their user
                   8401: interface. The exact interface is not defined by this
                   8402: specification, but it should include the following information
                   8403: (obtained from the element's attributes, again as defined below),
                   8404: in some form or another (possibly simplified), for each hyperlink
                   8405: created with each <code><a href="#link">link</a></code> element in
                   8406: the document:</p>
                   8407: <ul>
                   8408: <li>The relationship between this document and the resource (given
                   8409: by the <code title="attr-link-rel"><a href="#rel">rel</a></code>
                   8410: attribute)</li>
                   8411: <li>The title of the resource (given by the <code title=
                   8412: "attr-link-title"><a href="#title2">title</a></code>
                   8413: attribute).</li>
                   8414: <li>The URI of the resource (given by the <code title=
                   8415: "attr-link-href"><a href="#href1">href</a></code> attribute).</li>
                   8416: <li>The language of the resource (given by the <code title=
                   8417: "attr-link-hreflang"><a href="#hreflang">hreflang</a></code>
                   8418: attribute).</li>
                   8419: <li>The optimum media for the resource (given by the <code title=
                   8420: "attr-link-media"><a href="#media0">media</a></code>
                   8421: attribute).</li>
                   8422: </ul>
                   8423: <p>User agents may also include other information, such as the type
                   8424: of the resource (as given by the <code title=
                   8425: "attr-link-type"><a href="#type">type</a></code> attribute).</p>
                   8426: <p class="note"><ins class="diff-new">Hyperlinks created with
                   8427: the</ins> <code><a href="#link"><ins class=
                   8428: "diff-new">link</ins></a></code> <ins class="diff-new">element and
                   8429: its</ins> <code title="attr-link-rel"><a href="#rel"><ins class=
                   8430: "diff-new">rel</ins></a></code> <ins class="diff-new">attribute
                   8431: apply to the whole page. This contrasts with the</ins> <code title=
                   8432: "attr-hyperlink-rel"><a href="#rel3"><ins class=
                   8433: "diff-new">rel</ins></a></code> <ins class="diff-new">attribute
                   8434: of</ins> <code><a href="#a"><ins class=
                   8435: "diff-new">a</ins></a></code> <ins class="diff-new">and</ins>
                   8436: <code><a href="#area"><ins class="diff-new">area</ins></a></code>
                   8437: <ins class="diff-new">elements, which indicates the type of a link
                   8438: whose context is given by the link's location within the
                   8439: document.</ins></p>
                   8440: <p>The <dfn id="media0" title=
                   8441: "attr-link-media"><code>media</code></dfn> attribute says which
                   8442: media the resource applies to. The value must be a valid <a href=
                   8443: "#mq">media <del class="diff-old">query.</del> <ins class=
                   8444: "diff-chg">query</ins></a> . <a href="#references">[MQ]</a></p>
                   8445: <p>If the link is a <a href="#hyperlink1" title=
                   8446: "hyperlink link">hyperlink</a> then the <code title=
                   8447: "attr-link-media"><a href="#media0">media</a></code> attribute is
                   8448: purely advisory, and describes for which media the document in
                   8449: question was designed.</p>
                   8450: <p>However, if the link is an <a href="#links1">external resource
                   8451: link</a> , then the <code title="attr-link-media"><a href=
                   8452: "#media0">media</a></code> attribute is prescriptive. The user
                   8453: agent must <del class="diff-old">only</del> apply the external
                   8454: resource to <span>views</span> while their state match the listed
                   8455: <del class="diff-old">media.</del> <ins class="diff-chg">media, and
                   8456: must not apply them otherwise.</ins></p>
                   8457: <p id="default-media">The default, if the <code title=
                   8458: "attr-link-media"><a href="#media0">media</a></code> attribute is
                   8459: omitted, is <code>all</code> , meaning that by default links apply
                   8460: to all media.</p>
                   8461: <p>The <dfn id="hreflang" title=
                   8462: "attr-link-hreflang"><code>hreflang</code></dfn> attribute on the
                   8463: <code><a href="#link">link</a></code> element has the same
                   8464: semantics as the <a href="#hreflang3" title=
                   8465: "attr-hyperlink-hreflang"><code>hreflang</code> attribute on
                   8466: hyperlink elements</a> .</p>
                   8467: <p>The <dfn id="type" title=
                   8468: "attr-link-type"><code>type</code></dfn> attribute gives the MIME
                   8469: type of the linked resource. It is purely advisory. The value must
                   8470: be a valid MIME type, optionally with parameters. <a href=
                   8471: "#references">[RFC2046]</a></p>
                   8472: <p>For <a href="#links1" title="external resource link">external
                   8473: resource links</a> , user agents may use the type given in this
                   8474: attribute to decide whether or not to consider using the resource
                   8475: at all. If the UA does not support the given MIME type for the
                   8476: given link relationship, then the UA may opt not to download and
                   8477: apply the resource.</p>
                   8478: <p>User agents must not consider the <code title=
                   8479: "attr-link-type"><a href="#type">type</a></code> attribute
                   8480: authoritative — upon fetching the resource, user agents must not
                   8481: use metadata included in the link to the resource to determine its
                   8482: type.</p>
                   8483: <p>If the attribute is omitted, <ins class="diff-new">but the user
                   8484: agent would fetch the resource if the type was known and
                   8485: supported,</ins> then the <del class="diff-old">UA</del>
                   8486: <ins class="diff-chg">user agent</ins> must fetch the resource
                   8487: <del class="diff-old">to</del> <ins class="diff-chg">and</ins>
                   8488: determine its type <del class="diff-old">and thus</del> <a href=
                   8489: "#content-type8" title="Content-Type"><ins class="diff-chg">from
                   8490: its Content-Type metadata</ins></a> <ins class="diff-chg">to</ins>
                   8491: determine if it supports (and can apply) that external resource.
                   8492: <ins class="diff-new">If no type metadata is specified, but the
                   8493: external resource link type has a default type defined, then the
                   8494: user agent must assume that the resource is of that type.</ins></p>
                   8495: <div class="example">
                   8496: <p>If a document contains <del class="diff-old">three</del>
                   8497: <ins class="diff-chg">four</ins> style sheet links <del class=
                   8498: "diff-old">labelled</del> <ins class="diff-chg">labeled</ins> as
                   8499: follows:</p>
                   8500: <del class="diff-old">&lt;link rel="stylesheet" href="A"
                   8501: type="text/css"&gt; &lt;link rel="stylesheet" href="B"
                   8502: type="text/plain"&gt;</del>
                   8503: <pre>
                   8504: &lt;link rel="stylesheet" href="A" type="text/plain"&gt;
                   8505: <ins class=
                   8506: "diff-chg">&lt;link rel="stylesheet" href="B" type="text/css"&gt;
                   8507: </ins>
                   8508: &lt;link
                   8509: rel="stylesheet"
                   8510: href="C"&gt;
                   8511: </pre>
                   8512: <p>...then a compliant UA that supported only CSS style sheets
                   8513: would fetch the <del class="diff-old">A</del> <ins class=
                   8514: "diff-chg">B</ins> and C files, and skip the <del class=
                   8515: "diff-old">B</del> <ins class="diff-chg">A</ins> file (since
                   8516: <code>text/plain</code> is not the MIME type for CSS style
                   8517: sheets).</p>
                   8518: <p>For <del class="diff-old">these two files,</del> <ins class=
                   8519: "diff-chg">files B and C,</ins> it would then check the actual
                   8520: types returned by the <del class="diff-old">UA.</del> <ins class=
                   8521: "diff-chg">server.</ins> For those that are sent as
                   8522: <code>text/css</code> , it would apply the styles, but for those
                   8523: <del class="diff-old">labelled</del> <ins class=
                   8524: "diff-chg">labeled</ins> as <code>text/plain</code> , or any other
                   8525: type, it would not.</p>
                   8526: <p><ins class="diff-new">If one the two files was returned without
                   8527: a</ins> <a href="#content-type8"><ins class=
                   8528: "diff-new">Content-Type</ins></a> <ins class="diff-new">metadata,
                   8529: or with a syntactically incorrect type like</ins> <code title=
                   8530: ""><ins class="diff-new">Content-Type:&nbsp;"null"</ins></code>
                   8531: ,<ins class="diff-new">then the default type for</ins> <code title=
                   8532: "rel-stylesheet"><a href="#stylesheet"><ins class=
                   8533: "diff-new">stylesheet</ins></a></code> <ins class="diff-new">links
                   8534: would kick in. Since that default type is</ins> <code title=
                   8535: ""><ins class="diff-new">text/css</ins></code> ,<ins class=
                   8536: "diff-new">the style sheet</ins> <em><ins class=
                   8537: "diff-new">would</ins></em> <ins class="diff-new">nonetheless be
                   8538: applied.</ins></p>
                   8539: </div>
                   8540: <p>The <dfn id="title2" title=
                   8541: "attr-link-title"><code>title</code></dfn> attribute gives the
                   8542: title of the link. With one exception, it is purely advisory. The
                   8543: value is text. The exception is for style sheet links, where the
                   8544: <code title="attr-link-title"><a href="#title2">title</a></code>
                   8545: attribute defines <a href="#alternative">alternative style sheet
                   8546: sets</a> .</p>
                   8547: <p class="note">The <code title="attr-link-title"><a href=
                   8548: "#title2">title</a></code> attribute on <code><a href=
                   8549: "#link">link</a></code> elements differs from the global
                   8550: <code title="attr-title"><a href="#title">title</a></code>
                   8551: attribute of most other elements in that a link without a title
                   8552: does not inherit the title of the parent element: it merely has no
                   8553: title.</p>
                   8554: <p><ins class="diff-new">The</ins> <code title=
                   8555: "attr-link-sizes"><a href="#sizes0"><ins class=
                   8556: "diff-new">sizes</ins></a></code> <ins class="diff-new">attribute
                   8557: is used with the</ins> <code title="rel-icon"><a href=
                   8558: "#icon3"><ins class="diff-new">icon</ins></a></code> <ins class=
                   8559: "diff-new">link type. The attribute must not be specified on</ins>
                   8560: <code><a href="#link"><ins class="diff-new">link</ins></a></code>
                   8561: <ins class="diff-new">elements that do not have a</ins>
                   8562: <code title="attr-link-rel"><a href="#rel"><ins class=
                   8563: "diff-new">rel</ins></a></code> <ins class="diff-new">attribute
                   8564: that specifies the</ins> <code title="rel-icon"><a href=
                   8565: "#icon3"><ins class="diff-new">icon</ins></a></code> <ins class=
                   8566: "diff-new">keyword.</ins></p>
                   8567: <p>Some versions of HTTP defined a <code title="">Link:</code>
                   8568: header, to be processed like a series of <code><a href=
                   8569: "#link">link</a></code> elements. <del class="diff-old">When
                   8570: processing links, those must be taken into consideration as well.
                   8571: For</del> <ins class="diff-chg">If supported, for</ins> the
                   8572: purposes of <del class="diff-old">ordering,</del> <ins class=
                   8573: "diff-chg">ordering</ins> links defined by HTTP headers must be
                   8574: assumed to come before any links in the document, in the order that
                   8575: they were given in the HTTP entity header. Relative URIs in these
                   8576: headers <del class="diff-old">must be</del> <ins class=
                   8577: "diff-chg">are</ins> resolved according to the rules given in HTTP,
                   8578: not relative to base URIs set by the document (e.g. using a
                   8579: <code><a href="#base">base</a></code> element or <code title=
1.2     ! mike     8580: "attr-xml-base"><a href="#xmlbase">xml:base</a></code> attributes).
        !          8581: <a href="#references">[RFC2616]</a> <a href=
        !          8582: "#references">[RFC2068]</a></p>
1.1       mike     8583: <p>The DOM attributes <dfn id="href2" title=
                   8584: "dom-link-href"><code>href</code></dfn> , <dfn id="rel0" title=
                   8585: "dom-link-rel"><code>rel</code></dfn> , <dfn id="media1" title=
                   8586: "dom-link-media"><code>media</code></dfn> , <dfn id="hreflang0"
                   8587: title="dom-link-hreflang"><code>hreflang</code></dfn> , and
                   8588: <dfn id="type0" title="dom-link-type"><code>type</code></dfn> ,
                   8589: <ins class="diff-new">and</ins> <dfn id="sizes" title=
                   8590: "dom-link-sizes"><code><ins class=
                   8591: "diff-new">sizes</ins></code></dfn> each must <a href=
                   8592: "#reflect">reflect</a> the respective content attributes of the
                   8593: same name.</p>
                   8594: <p>The DOM attribute <dfn id="rellist" title=
                   8595: "dom-link-rellist"><code>relList</code></dfn> must <a href=
                   8596: "#reflect">reflect</a> the <code title="attr-link-rel"><a href=
                   8597: "#rel">rel</a></code> content attribute.</p>
                   8598: <p>The DOM attribute <dfn id="disabled" title=
                   8599: "dom-link-disabled"><code>disabled</code></dfn> only applies to
                   8600: style sheet links. When the <code><a href="#link">link</a></code>
                   8601: element defines a style sheet link, then the <code title=
                   8602: "dom-link-disabled"><a href="#disabled">disabled</a></code>
                   8603: attribute behaves as defined <a href="#disabled1" title=
                   8604: "dom-linkstyle-disabled">for the alternative style sheets DOM</a> .
                   8605: For all other <code><a href="#link">link</a></code> elements it
                   8606: always return false and does nothing on setting.</p>
                   8607: <h4 id="meta"><span class="secno"><del class=
                   8608: "diff-old">3.7.5.</del> <ins class="diff-chg">3.7.5</ins></span>
                   8609: The <dfn id="meta0"><code>meta</code></dfn> element</h4>
                   8610: <dl class="element">
                   8611: <dt>Categories</dt>
                   8612: <dd><a href="#metadata0">Metadata content</a> .</dd>
                   8613: <dt>Contexts in which this element may be used:</dt>
                   8614: <dd>If the <code title="attr-meta-charset"><a href=
                   8615: "#charset1">charset</a></code> attribute is <del class=
                   8616: "diff-old">present:</del> <ins class="diff-chg">present, or if the
                   8617: element is in the</ins> <a href="#encoding" title=
                   8618: "attr-meta-http-equiv-content-type"><ins class="diff-chg">Encoding
                   8619: declaration state</ins></a> : as the first element in a
                   8620: <code><a href="#head">head</a></code> element.</dd>
                   8621: <dd>If the <code title="attr-meta-http-equiv"><a href=
                   8622: "#http-equiv0">http-equiv</a></code> attribute is <del class=
                   8623: "diff-old">present:</del> <ins class="diff-chg">present, and the
                   8624: element is not in the</ins> <a href="#encoding" title=
                   8625: "attr-meta-http-equiv-content-type"><ins class="diff-chg">Encoding
                   8626: declaration state</ins></a> : in a <code><a href=
                   8627: "#head">head</a></code> element.</dd>
                   8628: <dd>If the <code title="attr-meta-http-equiv"><a href=
                   8629: "#http-equiv0">http-equiv</a></code> attribute is <del class=
                   8630: "diff-old">present:</del> <ins class="diff-chg">present, and the
                   8631: element is not in the</ins> <a href="#encoding" title=
                   8632: "attr-meta-http-equiv-content-type"><ins class="diff-chg">Encoding
                   8633: declaration state</ins></a> : in a <code><a href=
                   8634: "#noscript">noscript</a></code> element that is a child of a
                   8635: <code><a href="#head">head</a></code> element.</dd>
                   8636: <dd>If the <code title="attr-meta-name"><a href=
                   8637: "#name">name</a></code> attribute is present: where <a href=
                   8638: "#metadata0">metadata content</a> is expected.</dd>
                   8639: <dt>Content model:</dt>
                   8640: <dd>Empty.</dd>
                   8641: <dt>Element-specific attributes:</dt>
                   8642: <dd><code title="attr-meta-name"><a href=
                   8643: "#name">name</a></code></dd>
                   8644: <dd><code title="attr-meta-http-equiv"><a href=
                   8645: "#http-equiv0">http-equiv</a></code></dd>
                   8646: <dd><code title="attr-meta-content"><a href=
                   8647: "#content0">content</a></code></dd>
                   8648: <dd><code title="attr-meta-charset"><a href=
                   8649: "#charset1">charset</a></code> ( <a href="#html-" title=
                   8650: "HTML documents">HTML</a> only)</dd>
                   8651: <dt>DOM interface:</dt>
                   8652: <dd>
                   8653: <pre class="idl">
                   8654: interface <dfn id=
                   8655: "htmlmetaelement">HTMLMetaElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
                   8656:            attribute DOMString <a href="#content1" title=
                   8657: "dom-meta-content">content</a>;
                   8658:            attribute DOMString <a href="#name0" title=
                   8659: "dom-meta-name">name</a>;
                   8660:            attribute DOMString <a href="#httpequiv" title=
                   8661: "dom-meta-httpEquiv">httpEquiv</a>;
                   8662: };
                   8663: </pre></dd>
                   8664: </dl>
                   8665: <p>The <code><a href="#meta0">meta</a></code> element represents
                   8666: various kinds of metadata that cannot be expressed using the
                   8667: <code><a href="#title1">title</a></code> , <code><a href=
                   8668: "#base">base</a></code> , <code><a href="#link">link</a></code> ,
                   8669: <code><a href="#style1">style</a></code> , and <code><a href=
                   8670: "#script1">script</a></code> elements.</p>
                   8671: <p>The <code><a href="#meta0">meta</a></code> element can represent
                   8672: document-level metadata with the <code title=
                   8673: "attr-meta-name"><a href="#name">name</a></code> attribute, pragma
                   8674: directives with the <code title="attr-meta-http-equiv"><a href=
                   8675: "#http-equiv0">http-equiv</a></code> attribute, and the file's
                   8676: <a href="#character2">character encoding declaration</a> when an
                   8677: HTML document is <del class="diff-old">serialised</del> <ins class=
                   8678: "diff-chg">serialized</ins> to string form (e.g. for transmission
                   8679: over the network or for disk storage) with the <code title=
                   8680: "attr-meta-charset"><a href="#charset1">charset</a></code>
                   8681: attribute.</p>
                   8682: <p>Exactly one of the <code title="attr-meta-name"><a href=
                   8683: "#name">name</a></code> , <code title=
                   8684: "attr-meta-http-equiv"><a href="#http-equiv0">http-equiv</a></code>
                   8685: , and <code title="attr-meta-charset"><a href=
                   8686: "#charset1">charset</a></code> attributes must be specified.</p>
                   8687: <p>If either <code title="attr-meta-name"><a href=
                   8688: "#name">name</a></code> or <code title=
                   8689: "attr-meta-http-equiv"><a href="#http-equiv0">http-equiv</a></code>
                   8690: is specified, then the <code title="attr-meta-content"><a href=
                   8691: "#content0">content</a></code> attribute must also be specified.
                   8692: Otherwise, it must be omitted.</p>
                   8693: <p>The <dfn id="charset1" title=
                   8694: "attr-meta-charset"><code><ins class=
                   8695: "diff-new">charset</ins></code></dfn> <ins class=
                   8696: "diff-new">attribute specifies the character encoding used by the
                   8697: document. This is called a</ins> <a href="#character2"><ins class=
                   8698: "diff-new">character encoding declaration</ins></a> .</p>
                   8699: <p><ins class="diff-new">The</ins> <code title=
                   8700: "attr-meta-charset"><a href="#charset1">charset</a></code>
                   8701: attribute may <del class="diff-old">only</del> be specified in
                   8702: <a href="#html5" title="HTML5">HTML documents <del class=
                   8703: "diff-old">,</del></a> <ins class="diff-chg">only,</ins> it must
                   8704: not be used in <a href="#xhtml5" title="XHTML">XML documents</a> .
                   8705: If the <code title="attr-meta-charset"><a href=
                   8706: "#charset1">charset</a></code> attribute is specified, the element
                   8707: must be the first element in <a href="#the-head0">the
                   8708: <code>head</code> element</a> of the file.</p>
                   8709: <p>The <dfn id="content0" title=
                   8710: "attr-meta-content"><code>content</code></dfn> attribute gives the
                   8711: value of the document metadata or pragma directive when the element
                   8712: is used for those purposes. The allowed values depend on the exact
                   8713: context, as described in subsequent sections of this
                   8714: specification.</p>
                   8715: <p>If a <code><a href="#meta0">meta</a></code> element has a
                   8716: <dfn id="name" title="attr-meta-name"><code>name</code></dfn>
                   8717: attribute, it sets document metadata. Document metadata is
                   8718: expressed in terms of name/value pairs, the <code title=
                   8719: "attr-meta-name"><a href="#name">name</a></code> attribute on the
                   8720: <code><a href="#meta0">meta</a></code> element giving the name, and
                   8721: the <code title="attr-meta-content"><a href=
                   8722: "#content0">content</a></code> attribute on the same element giving
                   8723: the value. The name specifies what aspect of metadata is being set;
                   8724: valid names and the meaning of their values are described in the
                   8725: following sections. If a <code><a href="#meta0">meta</a></code>
                   8726: element has no <code title="attr-meta-content"><a href=
                   8727: "#content0">content</a></code> attribute, then the value part of
                   8728: the metadata name/value pair is the empty string.</p>
                   8729: <p>If a <code><a href="#meta0">meta</a></code> element has the
                   8730: <code title="attr-meta-http-equiv"><a href=
                   8731: "#http-equiv0">http-equiv</a></code> attribute specified, it must
                   8732: be either in a <code><a href="#head">head</a></code> element or in
                   8733: a <code><a href="#noscript">noscript</a></code> element that itself
                   8734: is in a <code><a href="#head">head</a></code> element. If a
                   8735: <code><a href="#meta0">meta</a></code> element does not have the
                   8736: <code title="attr-meta-http-equiv"><a href=
                   8737: "#http-equiv0">http-equiv</a></code> attribute specified, it must
                   8738: be in a <code><a href="#head">head</a></code> element.</p>
                   8739: <p>The DOM attributes <dfn id="name0" title=
                   8740: "dom-meta-name"><code>name</code></dfn> and <dfn id="content1"
                   8741: title="dom-meta-content"><code>content</code></dfn> must <a href=
                   8742: "#reflect">reflect</a> the respective content attributes of the
                   8743: same name. The DOM attribute <dfn id="httpequiv" title=
                   8744: "dom-meta-httpEquiv"><code>httpEquiv</code></dfn> must <a href=
                   8745: "#reflect">reflect</a> the content attribute <code title=
                   8746: "attr-meta-http-equiv"><a href="#http-equiv0">http-equiv</a></code>
                   8747: .</p>
                   8748: <h5 id="standard"><span class="secno">3.7.5.1.</span> Standard
                   8749: metadata names</h5>
                   8750: <p>This specification defines a few names for the <code title=
                   8751: "attr-meta-name"><a href="#name">name</a></code> attribute of the
                   8752: <code><a href="#meta0">meta</a></code> element.</p>
                   8753: <dl>
                   8754: <dt><del class="diff-old">generator</del> <dfn id=
                   8755: "application-name" title="meta-application-name"><ins class=
                   8756: "diff-chg">application-name</ins></dfn></dt>
                   8757: <dd>
                   8758: <p>The value must be a <ins class="diff-new">short</ins> free-form
                   8759: string that <del class="diff-old">identifies</del> <ins class=
                   8760: "diff-chg">giving</ins> the <del class="diff-old">software used to
                   8761: generate</del> <ins class="diff-chg">name of</ins> the <del class=
                   8762: "diff-old">document. This value</del> <ins class="diff-chg">Web
                   8763: application that the page represents. If the page is not a Web
                   8764: application, the</ins> <code title="meta-application-name"><a href=
                   8765: "#application-name"><ins class=
                   8766: "diff-chg">application-name</ins></a></code> <ins class=
                   8767: "diff-chg">metadata name</ins> must not be <del class=
                   8768: "diff-old">used on hand-authored pages. WYSIWYG editors have
                   8769: additional constraints</del> <ins class="diff-chg">used. User
                   8770: agents may use the application name in UI in preference to the
                   8771: page's</ins> <code><a href="#title1"><ins class=
                   8772: "diff-chg">title</ins></a> <del class="diff-old">on</del></code> ,
                   8773: <ins class="diff-chg">since</ins> the <del class="diff-old">value
                   8774: used with this metadata name.</del> <ins class="diff-chg">title
                   8775: might include status messages and the like relevant to the status
                   8776: of the page at a particular moment in time instead of just being
                   8777: the name of the application.</ins></p>
                   8778: </dd>
                   8779: <dt><del class="diff-old">dns</del> <dfn id="description" title=
                   8780: "meta-description"><ins class=
                   8781: "diff-chg">description</ins></dfn></dt>
                   8782: <dd>
                   8783: <p>The value must be <del class="diff-old">an ordered set of unique
1.2     ! mike     8784: space-separated tokens , each word of which is</del> a <del class=
        !          8785: "diff-old">host name. The list allows authors to provide a list of
        !          8786: host names</del> <ins class="diff-chg">free-form string</ins> that
        !          8787: <ins class="diff-new">describes</ins> the <del class=
1.1       mike     8788: "diff-old">user is expected to subsequently need. User agents may,
                   8789: according to user preferences and prevailing network conditions,
                   8790: pre-emptively resolve the given DNS names (extracting the names
                   8791: from the</del> <ins class="diff-chg">page. The</ins> value
                   8792: <del class="diff-old">using the rules</del> <ins class=
                   8793: "diff-chg">must be appropriate</ins> for <del class=
1.2     ! mike     8794: "diff-old">splitting</del> <ins class="diff-chg">use in</ins> a
        !          8795: <ins class="diff-new">directory of pages, e.g. in a search
        !          8796: engine.</ins></p>
1.1       mike     8797: </dd>
                   8798: <dt><dfn id="generator" title="meta-generator"><ins class=
1.2     ! mike     8799: "diff-new">generator</ins></dfn></dt>
1.1       mike     8800: <dd>
1.2     ! mike     8801: <p><ins class="diff-new">The value must be a free-form</ins> string
        !          8802: <del class="diff-old">on spaces ), thus precaching the DNS
        !          8803: information for those hosts and potentially reducing</del>
        !          8804: <ins class="diff-chg">that identifies</ins> the <del class=
        !          8805: "diff-old">time between page loads for subsequent user
        !          8806: interactions. Higher priority should be given</del> <ins class=
        !          8807: "diff-chg">software used</ins> to <del class="diff-old">host names
        !          8808: given earlier in</del> <ins class="diff-chg">generate</ins> the
        !          8809: <del class="diff-old">list.</del> <ins class="diff-chg">document.
        !          8810: This value must not be used on hand-authored pages.</ins></p>
1.1       mike     8811: </dd>
                   8812: </dl>
                   8813: <h5 id="other"><span class="secno">3.7.5.2.</span> Other metadata
                   8814: names</h5>
                   8815: <p><dfn id="extensions" title="concept-meta-extensions">Extensions
                   8816: to the predefined set of metadata names</dfn> may be registered in
                   8817: the <a href="http://wiki.whatwg.org/wiki/MetaExtensions">WHATWG
                   8818: Wiki MetaExtensions page</a> .</p>
                   8819: <p>Anyone is free to edit the WHATWG Wiki MetaExtensions page at
                   8820: any time to add a type. These new names must be specified with the
                   8821: following information:</p>
                   8822: <dl>
                   8823: <dt>Keyword</dt>
                   8824: <dd>
                   8825: <p>The actual name being defined. The name should not be
                   8826: confusingly similar to any other defined name (e.g. differing only
                   8827: in case).</p>
                   8828: </dd>
                   8829: <dt>Brief description</dt>
                   8830: <dd>
                   8831: <p>A short description of what the metadata name's meaning is,
                   8832: including the format the value is required to be in.</p>
                   8833: </dd>
                   8834: <dt>Link to more details</dt>
                   8835: <dd>A link to a more detailed description of the metadata name's
                   8836: semantics and requirements. It could be another page on the Wiki,
                   8837: or a link to an external page.</dd>
                   8838: <dt>Synonyms</dt>
                   8839: <dd>
                   8840: <p>A list of other names that have exactly the same processing
                   8841: requirements. Authors should not use the names defined to be
                   8842: synonyms, they are only intended to allow user agents to support
                   8843: legacy content.</p>
                   8844: </dd>
                   8845: <dt>Status</dt>
                   8846: <dd>
                   8847: <p>One of the following:</p>
                   8848: <dl>
                   8849: <dt>Proposal</dt>
                   8850: <dd>The name has not received wide peer review and approval.
                   8851: Someone has proposed it and is using it.</dd>
                   8852: <dt>Accepted</dt>
                   8853: <dd>The name has received wide peer review and approval. It has a
                   8854: specification that unambiguously defines how to handle pages that
                   8855: use the name, including when they use it in incorrect ways.</dd>
                   8856: <dt>Unendorsed</dt>
                   8857: <dd>The metadata name has received wide peer review and it has been
                   8858: found wanting. Existing pages are using this keyword, but new pages
                   8859: should avoid it. The "brief description" and "link to more details"
                   8860: entries will give details of what authors should use instead, if
                   8861: anything.</dd>
                   8862: </dl>
                   8863: <p>If a metadata name is added with the "proposal" status and found
                   8864: to be redundant with existing values, it should be removed and
                   8865: listed as a synonym for the existing value.</p>
                   8866: </dd>
                   8867: </dl>
                   8868: <p>Conformance checkers must use the information given on the
                   8869: WHATWG Wiki MetaExtensions page to establish if a value not
                   8870: explicitly defined in this specification is allowed or not. When an
                   8871: author uses a new type not defined by either this specification or
                   8872: the Wiki page, conformance checkers should offer to add the value
                   8873: to the Wiki, with the details described above, with the "proposal"
                   8874: status.</p>
                   8875: <p>This specification does not define how new values will get
                   8876: approved. It is expected that the Wiki will have a community that
                   8877: addresses this.</p>
                   8878: <p>Metadata names whose values are to be URIs must not be proposed
                   8879: or accepted. Links must be represented using the <code><a href=
                   8880: "#link">link</a></code> element, not the <code><a href=
                   8881: "#meta0">meta</a></code> element.</p>
                   8882: <h5 id="pragma"><span class="secno">3.7.5.3.</span> Pragma
                   8883: directives</h5>
                   8884: <p>When the <dfn id="http-equiv" title=
                   8885: "attr-meta-http-equiv"><code>http-equiv</code></dfn> attribute is
                   8886: specified on a <code><a href="#meta0">meta</a></code> element, the
                   8887: element is a pragma directive.</p>
                   8888: <p>The <dfn id="http-equiv0" title=
                   8889: "attr-meta-http-equiv"><code>http-equiv</code></dfn> attribute is
                   8890: an <a href="#enumerated">enumerated attribute</a> . The following
                   8891: table lists the keywords defined for this attribute. The states
                   8892: given in the first cell of the <del class="diff-old">the</del> rows
                   8893: with keywords give the states to which those keywords map.</p>
                   8894: <table>
                   8895: <thead>
                   8896: <tr>
                   8897: <th>State</th>
                   8898: <th>Keywords</th>
                   8899: </tr>
                   8900: </thead>
                   8901: <tbody>
                   8902: <tr>
                   8903: <td><del class="diff-old">Refresh</del> <a href="#encoding" title=
                   8904: "attr-meta-http-equiv-content-type"><ins class="diff-chg">Encoding
                   8905: declaration</ins></a></td>
                   8906: <td><code title=""><del class="diff-old">refresh</del> <ins class=
                   8907: "diff-chg">Content-Type</ins></code></td>
                   8908: </tr>
                   8909: <tr>
                   8910: <td><a href="#default" title=
                   8911: "attr-meta-http-equiv-default-style">Default style</a></td>
                   8912: <td><code title="">default-style</code></td>
                   8913: </tr>
                   8914: <tr>
                   8915: <td><a href="#refresh" title=
                   8916: "attr-meta-http-equiv-refresh"><ins class=
                   8917: "diff-new">Refresh</ins></a></td>
                   8918: <td><code title=""><ins class="diff-new">refresh</ins></code></td>
                   8919: </tr>
                   8920: </tbody>
                   8921: </table>
                   8922: <p>When a <code><a href="#meta0">meta</a></code> element is
                   8923: inserted into the document, if its <code title=
                   8924: "attr-meta-http-equiv"><a href="#http-equiv0">http-equiv</a></code>
                   8925: attribute is present and represents one of the above states, then
                   8926: the user agent must run the algorithm appropriate for that state,
                   8927: as described in the following list:</p>
                   8928: <dl>
                   8929: <dt><dfn id="encoding" title=
                   8930: "attr-meta-http-equiv-content-type"><ins class="diff-new">Encoding
                   8931: declaration state</ins></dfn></dt>
                   8932: <dd>
                   8933: <p><ins class="diff-new">The</ins> <a href="#encoding" title=
                   8934: "attr-meta-http-equiv-content-type"><ins class="diff-new">Encoding
                   8935: declaration state's</ins></a> <ins class="diff-new">user agent
                   8936: requirements are all handled by the parsing section of the
                   8937: specification. The state is just an alternative form of setting
                   8938: the</ins> <code title="meta-charset"><ins class=
                   8939: "diff-new">charset</ins></code> <ins class="diff-new">attribute: it
                   8940: is a</ins> <a href="#character2"><ins class="diff-new">character
                   8941: encoding declaration</ins></a> .</p>
                   8942: <p><ins class="diff-new">For</ins> <code><a href=
                   8943: "#meta0"><ins class="diff-new">meta</ins></a></code> <ins class=
                   8944: "diff-new">elements in the</ins> <a href="#encoding" title=
                   8945: "attr-meta-http-equiv-content-type"><ins class="diff-new">Encoding
                   8946: declaration state</ins></a> ,<ins class="diff-new">the</ins>
                   8947: <code title="attr-meta-content"><a href="#content0"><ins class=
                   8948: "diff-new">content</ins></a></code> <ins class="diff-new">attribute
                   8949: must have a value that is a case-insensitive match of a string that
                   8950: consists of the literal string "</ins> <code title=""><ins class=
                   8951: "diff-new">text/html;</ins></code> <ins class="diff-new">",
                   8952: optionally followed by any number of</ins> <a href="#space" title=
                   8953: "space character"><ins class="diff-new">space characters</ins></a>
                   8954: ,<ins class="diff-new">followed by the literal string "</ins>
                   8955: <code title=""><ins class="diff-new">charset=</ins></code>
                   8956: <ins class="diff-new">", followed by the character encoding name
                   8957: of</ins> <a href="#charset"><ins class="diff-new">the character
                   8958: encoding declaration</ins></a> .</p>
                   8959: <p><ins class="diff-new">If the document contains a</ins>
                   8960: <code><a href="#meta0"><ins class="diff-new">meta</ins></a></code>
                   8961: <ins class="diff-new">element in the</ins> <a href="#encoding"
                   8962: title="attr-meta-http-equiv-content-type"><ins class=
                   8963: "diff-new">Encoding declaration state</ins></a> <ins class=
                   8964: "diff-new">then that element must be the first element in the
                   8965: document's</ins> <code><a href="#head"><ins class=
                   8966: "diff-new">head</ins></a></code> <ins class="diff-new">element, and
                   8967: the document must not contain a</ins> <code><a href=
                   8968: "#meta0"><ins class="diff-new">meta</ins></a></code> <ins class=
                   8969: "diff-new">element with the</ins> <code title=
                   8970: "attr-meta-charset"><a href="#charset1"><ins class=
                   8971: "diff-new">charset</ins></a></code> <ins class="diff-new">attribute
                   8972: present.</ins></p>
                   8973: <p><ins class="diff-new">The</ins> <a href="#encoding" title=
                   8974: "attr-meta-http-equiv-content-type"><ins class="diff-new">Encoding
                   8975: declaration state</ins></a> <ins class="diff-new">may be used
                   8976: in</ins> <a href="#html5" title="HTML5"><ins class="diff-new">HTML
                   8977: documents</ins></a> <ins class="diff-new">only, elements in that
                   8978: state must not be used in</ins> <a href="#xhtml5" title=
                   8979: "XHTML"><ins class="diff-new">XML documents</ins></a> .</p>
                   8980: </dd>
                   8981: <dt><dfn id="default" title=
                   8982: "attr-meta-http-equiv-default-style"><ins class="diff-new">Default
                   8983: style state</ins></dfn></dt>
                   8984: <dd>
                   8985: <ol>
                   8986: <li class="big-issue">...</li>
                   8987: </ol>
                   8988: </dd>
                   8989: <dt><dfn id="refresh" title="attr-meta-http-equiv-refresh">Refresh
                   8990: state</dfn></dt>
                   8991: <dd>
                   8992: <ol>
                   8993: <li>
                   8994: <p>If another <code><a href="#meta0">meta</a></code> element in the
                   8995: <a href="#refresh" title="attr-meta-http-equiv-refresh">Refresh
                   8996: state</a> has already been successfully processed (i.e. when it was
                   8997: inserted the user agent processed it and reached the last step of
                   8998: this list of steps), then abort these steps.</p>
                   8999: </li>
                   9000: <li>
                   9001: <p>If the <code><a href="#meta0">meta</a></code> element has no
                   9002: <code title="attr-meta-content"><a href=
                   9003: "#content0">content</a></code> attribute, or if that attribute's
                   9004: value is the empty string, then abort these steps.</p>
                   9005: </li>
                   9006: <li>
                   9007: <p>Let <var title="">input</var> be the value of the element's
                   9008: <code title="attr-meta-content"><a href=
                   9009: "#content0">content</a></code> attribute.</p>
                   9010: </li>
                   9011: <li>
                   9012: <p>Let <var title="">position</var> point at the first character of
                   9013: <var title="">input</var> .</p>
                   9014: </li>
                   9015: <li>
                   9016: <p><a href="#skip-whitespace">Skip whitespace</a> .</p>
                   9017: </li>
                   9018: <li>
                   9019: <p><a href="#collect" title=
                   9020: "collect a sequence of characters">Collect a sequence of
                   9021: characters</a> in the range U+0030 DIGIT ZERO to U+0039 DIGIT NINE,
                   9022: and parse the resulting string using the <a href="#rules">rules for
                   9023: parsing non-negative integers</a> . If the sequence of characters
                   9024: collected is the empty string, then no number will have been
                   9025: parsed; abort these steps. Otherwise, let <var title="">time</var>
                   9026: be the parsed number.</p>
                   9027: </li>
                   9028: <li>
                   9029: <p><a href="#collect" title=
                   9030: "collect a sequence of characters">Collect a sequence of
                   9031: characters</a> in the range U+0030 DIGIT ZERO to U+0039 DIGIT NINE
                   9032: and U+002E FULL STOP (" <code title="">.</code> "). Ignore any
                   9033: collected characters.</p>
                   9034: </li>
                   9035: <li>
                   9036: <p><a href="#skip-whitespace">Skip whitespace</a> .</p>
                   9037: </li>
                   9038: <li>
                   9039: <p>Let <var title="">url</var> be the address of the current
                   9040: page.</p>
                   9041: </li>
                   9042: <li>
                   9043: <p>If the character in <var title="">input</var> pointed to by
                   9044: <var title="">position</var> is a U+003B SEMICOLON (" <code title=
                   9045: "">;</code> "), then advance <var title="">position</var> to the
                   9046: next character. Otherwise, jump to the last step.</p>
                   9047: </li>
                   9048: <li>
                   9049: <p><a href="#skip-whitespace">Skip whitespace</a> .</p>
                   9050: </li>
                   9051: <li>
                   9052: <p>If the character in <var title="">input</var> pointed to by
                   9053: <var title="">position</var> is one of U+0055 LATIN CAPITAL LETTER
                   9054: U or U+0075 LATIN SMALL LETTER U, then advance <var title=
                   9055: "">position</var> to the next character. Otherwise, jump to the
                   9056: last step.</p>
                   9057: </li>
                   9058: <li>
                   9059: <p>If the character in <var title="">input</var> pointed to by
                   9060: <var title="">position</var> is one of U+0052 LATIN CAPITAL LETTER
                   9061: R or U+0072 LATIN SMALL LETTER R, then advance <var title=
                   9062: "">position</var> to the next character. Otherwise, jump to the
                   9063: last step.</p>
                   9064: </li>
                   9065: <li>
                   9066: <p>If the character in <var title="">input</var> pointed to by
                   9067: <var title="">position</var> is one of U+004C LATIN CAPITAL LETTER
                   9068: L or U+006C LATIN SMALL LETTER L, then advance <var title=
                   9069: "">position</var> to the next character. Otherwise, jump to the
                   9070: last step.</p>
                   9071: </li>
                   9072: <li>
                   9073: <p><a href="#skip-whitespace">Skip whitespace</a> .</p>
                   9074: </li>
                   9075: <li>
                   9076: <p>If the character in <var title="">input</var> pointed to by
                   9077: <var title="">position</var> is a U+003D EQUALS SIGN ("
                   9078: <code title="">=</code> "), then advance <var title=
                   9079: "">position</var> to the next character. Otherwise, jump to the
                   9080: last step.</p>
                   9081: </li>
                   9082: <li>
                   9083: <p><a href="#skip-whitespace">Skip whitespace</a> .</p>
                   9084: </li>
                   9085: <li>
                   9086: <p>Let <var title="">url</var> be equal to the substring of
                   9087: <var title="">input</var> from the character at <var title=
                   9088: "">position</var> to the end of the string.</p>
                   9089: </li>
                   9090: <li>
                   9091: <p>Strip any trailing <a href="#space" title=
                   9092: "space character">space characters</a> from the end of <var title=
                   9093: "">url</var> .</p>
                   9094: </li>
                   9095: <li>
                   9096: <p>Strip any U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF),
                   9097: and U+000D CARRIAGE RETURN (CR) characters from <var title=
                   9098: "">url</var> .</p>
                   9099: </li>
                   9100: <li>
                   9101: <p>Resolve the <var title="">url</var> value to an absolute URI
                   9102: using <a href="#elements2" title="element's base URI">the base
                   9103: URI</a> of the <code><a href="#meta0">meta</a></code> element.</p>
                   9104: </li>
                   9105: <li>
                   9106: <p><ins class="diff-new">Perform one or more of the following
                   9107: steps:</ins></p>
                   9108: <ul>
                   9109: <li>
                   9110: <p>Set a timer so that in <var title="">time</var> seconds,
                   9111: <ins class="diff-new">adjusted to take into account user or user
                   9112: agent preferences,</ins> if the user has not canceled the redirect,
                   9113: the user agent <a href="#navigate" title="navigate">navigates</a>
                   9114: <ins class="diff-new">the document's browsing context</ins> to
                   9115: <var title="">url</var> , with <a href="#replacement">replacement
                   9116: enabled</a> , <ins class="diff-new">and with the document's
                   9117: browsing context as the</ins> <a href="#source0"><ins class=
                   9118: "diff-new">source browsing context</ins></a> .</p>
                   9119: </li>
                   9120: <li>
                   9121: <p><ins class="diff-new">Provide the user with an interface that,
                   9122: when selected,</ins> <span><ins class=
                   9123: "diff-new">navigates</ins></span> <ins class="diff-new">a</ins>
                   9124: <a href="#browsing1"><ins class="diff-new">browsing
                   9125: context</ins></a> <ins class="diff-new">to</ins> <var title=
                   9126: ""><ins class="diff-new">url</ins></var> ,<ins class=
                   9127: "diff-new">with the document's browsing context as the</ins>
                   9128: <a href="#source0"><ins class="diff-new">source browsing
                   9129: context</ins></a> .</p>
                   9130: </li>
                   9131: <li>
                   9132: <p><ins class="diff-new">Do nothing.</ins></p>
                   9133: </li>
                   9134: </ul>
                   9135: <p><ins class="diff-new">In addition, the user agent may, as with
                   9136: anything, inform the user of any and all aspects of its operation,
                   9137: including the state of any timers, the destinations of any timed
                   9138: redirects, and so forth.</ins></p>
                   9139: </li>
                   9140: </ol>
                   9141: <p>For <code><a href="#meta0">meta</a></code> elements in the
                   9142: <a href="#refresh" title="attr-meta-http-equiv-refresh">Refresh
                   9143: state</a> , the <code title="attr-meta-content"><a href=
                   9144: "#content0">content</a></code> attribute must have a value
                   9145: consisting either of:</p>
                   9146: <ul>
                   9147: <li>just a <a href="#valid">valid non-negative integer</a> ,
                   9148: or</li>
                   9149: <li>a <a href="#valid">valid non-negative integer</a> , followed by
                   9150: a U+003B SEMICOLON ( <code title="">;</code> ), followed by one or
                   9151: more <a href="#space" title="space character">space characters</a>
                   9152: , followed by either a U+0055 LATIN CAPITAL LETTER U or a U+0075
                   9153: LATIN SMALL LETTER U, a U+0052 LATIN CAPITAL LETTER R or a U+0072
                   9154: LATIN SMALL LETTER R, a U+004C LATIN CAPITAL LETTER L or a U+006C
                   9155: LATIN SMALL LETTER L, a U+003D EQUALS SIGN ( <code title=
                   9156: "">=</code> ), and then a valid URI (or IRI).</li>
                   9157: </ul>
                   9158: <p>In the former case, the integer represents a number of seconds
                   9159: before the page is to be reloaded; in the latter case the integer
                   9160: represents a number of seconds before the page is to be replaced by
                   9161: the page at the given URI.</p>
                   9162: </dd>
                   9163: </dl>
                   9164: <p><ins class="diff-chg">There must not be more than one</ins>
                   9165: <code><del class="diff-old">Default style</del> <a href=
                   9166: "#meta0"><ins class="diff-chg">meta</ins></a></code> <ins class=
                   9167: "diff-chg">element with any particular</ins> state <del class=
                   9168: "diff-old">...</del> <ins class="diff-chg">in the document at a
                   9169: time.</ins></p>
                   9170: <h5 id="charset"><span class="secno">3.7.5.4.</span> Specifying the
                   9171: document's character encoding</h5>
                   9172: <p><del class="diff-old">The meta element may also be used to
                   9173: provide UAs with</del> <ins class="diff-chg">A</ins> <dfn id=
                   9174: "character2">character encoding <del class="diff-old">information
                   9175: for HTML files, by setting the charset</del> <ins class=
                   9176: "diff-chg">declaration</ins></dfn> <del class="diff-old">attribute
                   9177: to the name of a character encoding. This</del> is <del class=
                   9178: "diff-old">called</del> a <ins class="diff-new">mechanism by which
                   9179: the</ins> character encoding <del class=
                   9180: "diff-old">declaration.</del> <ins class="diff-chg">used to store
                   9181: or transmit a document is specified.</ins></p>
                   9182: <p>The following restrictions apply to character encoding
                   9183: declarations:</p>
                   9184: <ul>
                   9185: <li>The character encoding name given must be the name of the
                   9186: character encoding used to <del class="diff-old">serialise</del>
                   9187: <ins class="diff-chg">serialize</ins> the file.</li>
                   9188: <li>The value must be a valid character encoding name, and must be
                   9189: the preferred name for that encoding. <a href=
                   9190: "#references">[IANACHARSET]</a></li>
                   9191: <li>The <del class="diff-old">attribute value</del> <ins class=
                   9192: "diff-chg">character encoding declaration</ins> must be <del class=
                   9193: "diff-old">serialised</del> <ins class="diff-chg">serialized</ins>
                   9194: without the use of <a href="#character3" title=
                   9195: "syntax-charref">character <del class="diff-old">entity</del>
                   9196: references</a> <ins class="diff-new">or character escapes</ins> of
                   9197: any kind.</li>
                   9198: </ul>
                   9199: <p>If the document does not start with a BOM, and if its encoding
                   9200: is not explicitly given by <a href="#content-type8" title=
                   9201: "Content-Type">Content-Type metadata</a> , then the character
                   9202: encoding used must be <del class="diff-old">a superset of US-ASCII
                   9203: (specifically, ANSI_X3.4-1968) for bytes in the range 0x09 - 0x0D,
                   9204: 0x20, 0x21, 0x22, 0x26, 0x27, 0x2C - 0x3F, 0x41 - 0x5A, and 0x61 -
                   9205: 0x7A ,</del> <ins class="diff-chg">an</ins> <a href=
                   9206: "#ascii-compatible"><ins class="diff-chg">ASCII-compatible
                   9207: character encoding</ins></a> , and, in addition, if that encoding
                   9208: isn't US-ASCII itself, then the encoding must be specified using a
                   9209: <code><a href="#meta0">meta</a></code> element with a <code title=
                   9210: "attr-meta-charset"><a href="#charset1">charset</a></code>
                   9211: <del class="diff-old">attribute.</del> <ins class=
                   9212: "diff-chg">attribute or a</ins> <code><a href="#meta0"><ins class=
                   9213: "diff-chg">meta</ins></a></code> <ins class="diff-chg">element in
                   9214: the</ins> <a href="#encoding" title=
                   9215: "attr-meta-http-equiv-content-type"><ins class="diff-chg">Encoding
                   9216: declaration state</ins></a> .</p>
                   9217: <p><ins class="diff-chg">If the document contains a</ins>
                   9218: <code><a href="#meta0"><ins class="diff-chg">meta</ins></a></code>
                   9219: <ins class="diff-chg">element with a</ins> <code title=
                   9220: "attr-meta-charset"><a href="#charset1"><ins class=
                   9221: "diff-chg">charset</ins></a></code> <ins class="diff-chg">attribute
                   9222: or a</ins> <code><a href="#meta0"><ins class=
                   9223: "diff-chg">meta</ins></a></code> <ins class="diff-chg">element in
                   9224: the</ins> <a href="#encoding" title=
                   9225: "attr-meta-http-equiv-content-type"><ins class="diff-chg">Encoding
                   9226: declaration state</ins></a> ,<ins class="diff-chg">then the
                   9227: character encoding used must be an</ins> <a href=
                   9228: "#ascii-compatible"><ins class="diff-chg">ASCII-compatible
                   9229: character encoding</ins></a> .</p>
                   9230: <p><ins class="diff-chg">An</ins> <dfn id=
                   9231: "ascii-compatible"><ins class="diff-chg">ASCII-compatible character
                   9232: encoding</ins></dfn> <ins class="diff-chg">is one that is a
                   9233: superset of US-ASCII (specifically, ANSI_X3.4-1968) for bytes in
                   9234: the range 0x09 - 0x0D, 0x20, 0x21, 0x22, 0x26, 0x27, 0x2C - 0x3F,
                   9235: 0x41 - 0x5A, and 0x61 - 0x7A .</ins></p>
                   9236: <p>Authors should not use JIS_X0212-1990, x-JIS0208, and encodings
                   9237: based on EBCDIC. Authors should not use UTF-32. Authors must not
                   9238: use the CESU-8, UTF-7, BOCU-1 and SCSU encodings. <a href=
                   9239: "#references">[CESU8]</a> <a href="#references">[UTF7]</a> <a href=
                   9240: "#references">[BOCU1]</a> <a href="#references">[SCSU]</a></p>
                   9241: <p>Authors are encouraged to use UTF-8. Conformance checkers may
                   9242: advise against authors using legacy encodings.</p>
                   9243: <p>In XHTML, the XML declaration should be used for inline
                   9244: character encoding information, if necessary.</p>
                   9245: <h4 id="the-style0"><span class="secno"><del class=
                   9246: "diff-old">3.7.6.</del> <ins class="diff-chg">3.7.6</ins></span>
                   9247: The <dfn id="style1"><code>style</code></dfn> element</h4>
                   9248: <dl class="element">
                   9249: <dt>Categories</dt>
                   9250: <dd><a href="#metadata0">Metadata content</a> .</dd>
                   9251: <dd>If the <code title="attr-style-scoped"><a href=
                   9252: "#scoped">scoped</a></code> attribute is present: <del class=
                   9253: "diff-old">prose</del> <a href="#flow-content0"><ins class=
                   9254: "diff-chg">flow</ins> content</a> .</dd>
                   9255: <dt>Contexts in which this element may be used:</dt>
                   9256: <dd>If the <code title="attr-style-scoped"><a href=
                   9257: "#scoped">scoped</a></code> attribute is absent: where <a href=
                   9258: "#metadata0">metadata content</a> is expected.</dd>
                   9259: <dd>If the <code title="attr-style-scoped"><a href=
                   9260: "#scoped">scoped</a></code> attribute is absent: in a
                   9261: <code><a href="#noscript">noscript</a></code> element that is a
                   9262: child of a <code><a href="#head">head</a></code> element.</dd>
                   9263: <dd>If the <code title="attr-style-scoped"><a href=
                   9264: "#scoped">scoped</a></code> attribute is present: where <del class=
                   9265: "diff-old">prose</del> <a href="#flow-content0"><ins class=
                   9266: "diff-chg">flow</ins> content</a> is expected, but before any
                   9267: sibling elements other than <code><a href=
                   9268: "#style1">style</a></code> elements and before any text nodes other
                   9269: than <a href="#inter-element">inter-element whitespace</a> .</dd>
                   9270: <dt>Content model:</dt>
                   9271: <dd>Depends on the value of the <code title=
                   9272: "attr-style-type"><a href="#type1">type</a></code> attribute.</dd>
                   9273: <dt>Element-specific attributes:</dt>
                   9274: <dd><code title="attr-style-media"><a href=
                   9275: "#media2">media</a></code></dd>
                   9276: <dd><code title="attr-style-type"><a href=
                   9277: "#type1">type</a></code></dd>
                   9278: <dd><code title="attr-style-scoped"><a href=
                   9279: "#scoped">scoped</a></code></dd>
                   9280: <dd>Also, the <code title="attr-style-title"><a href=
                   9281: "#title3">title</a></code> attribute has special semantics on this
                   9282: element.</dd>
                   9283: <dt>DOM interface:</dt>
                   9284: <dd>
                   9285: <pre class="idl">
                   9286: interface <dfn id=
                   9287: "htmlstyleelement">HTMLStyleElement</dfn> : <a href=
                   9288: "#htmlelement">HTMLElement</a> {
                   9289:            attribute boolean <code title=
                   9290: "dom-style-disabled"><a href="#disabled0">disabled</a></code>;
                   9291:            attribute DOMString <code title=
                   9292: "dom-style-media"><a href="#media3">media</a></code>;
                   9293:            attribute DOMString <code title=
                   9294: "dom-style-type"><a href="#type2">type</a></code>;
                   9295:            attribute boolean <code title=
                   9296: "dom-style-scoped"><a href="#scoped0">scoped</a></code>;
                   9297: };
                   9298: </pre>
                   9299: <p>The <code>LinkStyle</code> interface must also be implemented by
                   9300: this element, the <a href="#styling0">styling processing model</a>
                   9301: defines how. <a href="#references">[CSSOM]</a></p>
                   9302: </dd>
                   9303: </dl>
                   9304: <p>The <code><a href="#style1">style</a></code> element allows
                   9305: authors to embed style information in their documents. The
                   9306: <code><a href="#style1">style</a></code> element is one of several
                   9307: inputs to the <a href="#styling0">styling processing model</a>
                   9308: .</p>
                   9309: <p>If the <dfn id="type1" title=
                   9310: "attr-style-type"><code>type</code></dfn> attribute is given, it
                   9311: must contain a valid MIME type, optionally with parameters, that
                   9312: designates a styling language. <a href="#references">[RFC2046]</a>
                   9313: If the attribute is absent, the type defaults to
                   9314: <code>text/css</code> . <a href="#references">[RFC2138]</a></p>
                   9315: <p>When examining types to determine if they support the language,
                   9316: user agents must not ignore unknown MIME parameters — types with
                   9317: unknown parameters must be assumed to be unsupported.</p>
                   9318: <p>The <dfn id="media2" title=
                   9319: "attr-style-media"><code>media</code></dfn> attribute says which
                   9320: media the styles apply to. The value must be a valid <a href=
                   9321: "#mq">media <del class="diff-old">query.</del> <ins class=
                   9322: "diff-chg">query</ins></a> . <a href="#references">[MQ]</a> User
                   9323: agents must <del class="diff-old">only</del> apply the styles to
                   9324: <span>views</span> while their state match the listed <del class=
                   9325: "diff-old">media.</del> <ins class="diff-chg">media, and must not
                   9326: apply them otherwise.</ins> <a href=
                   9327: "#references">[DOM3VIEWS]</a></p>
                   9328: <p id="style-default-media">The default, if the <code title=
                   9329: "attr-style-media"><a href="#media2">media</a></code> attribute is
                   9330: omitted, is <code>all</code> , meaning that by default styles apply
                   9331: to all media.</p>
                   9332: <p>The <dfn id="scoped" title=
                   9333: "attr-style-scoped"><code>scoped</code></dfn> attribute is a
                   9334: <a href="#boolean0">boolean attribute</a> . If the attribute is
                   9335: present, then the user agent must <del class="diff-old">only</del>
                   9336: apply the specified style information <ins class=
                   9337: "diff-new">only</ins> to the <code><a href=
                   9338: "#style1">style</a></code> element's parent element (if any), and
                   9339: that element's child nodes. Otherwise, the specified styles must,
1.2     ! mike     9340: if applied, be applied to the entire document. <del class=
        !          9341: "diff-old">If the scoped attribute is not specified, the style
        !          9342: element must be the child of a head element or of a noscript
        !          9343: element that is a child of a head element. If the scoped attribute
        !          9344: is specified, then the style element must be the child of a prose
        !          9345: content element, before any text nodes other than inter-element
        !          9346: whitespace , and before any elements other than other style
        !          9347: elements.</del></p>
1.1       mike     9348: <p id="title-on-style">The <dfn id="title3" title=
                   9349: "attr-style-title"><code>title</code></dfn> attribute on
                   9350: <code><a href="#style1">style</a></code> elements defines <a href=
                   9351: "#alternative">alternative style sheet sets</a> . If the
                   9352: <code><a href="#style1">style</a></code> element has no
                   9353: <code title="attr-style-title"><a href="#title3">title</a></code>
                   9354: attribute, then it has no title; the <code title=
                   9355: "attr-title"><a href="#title">title</a></code> attribute of
                   9356: ancestors does not apply to the <code><a href=
                   9357: "#style1">style</a></code> element.</p>
                   9358: <p class="note">The <code title="attr-style-title"><a href=
                   9359: "#title3">title</a></code> attribute on <code><a href=
                   9360: "#style1">style</a></code> elements, like the <code title=
                   9361: "attr-link-title"><a href="#title2">title</a></code> attribute on
                   9362: <code><a href="#link">link</a></code> elements, differs from the
                   9363: global <code title="attr-title"><a href="#title">title</a></code>
                   9364: attribute in that a <code><a href="#style1">style</a></code> block
                   9365: without a title does not inherit the title of the parent element:
                   9366: it merely has no title.</p>
                   9367: <p>All descendant elements must be processed, according to their
                   9368: semantics, before the <code><a href="#style1">style</a></code>
                   9369: element itself is evaluated. For styling languages that consist of
                   9370: pure text, user agents must evaluate <code><a href=
                   9371: "#style1">style</a></code> elements by passing the concatenation of
                   9372: the contents of all the <a href="#text-node" title="text node">text
                   9373: nodes</a> that are direct children of the <code><a href=
                   9374: "#style1">style</a></code> element (not any other nodes such as
                   9375: comments or elements), in <a href="#tree-order">tree order</a> , to
                   9376: the style system. For XML-based styling languages, user agents must
                   9377: pass all the children nodes of the <code><a href=
                   9378: "#style1">style</a></code> element to the style system.</p>
                   9379: <p class="note">This specification does not specify a style system,
                   9380: but CSS is expected to be supported by most Web browsers. <a href=
                   9381: "#references">[CSS21]</a></p>
                   9382: <p>The <dfn id="media3" title=
                   9383: "dom-style-media"><code>media</code></dfn> , <dfn id="type2" title=
                   9384: "dom-style-type"><code>type</code></dfn> and <dfn id="scoped0"
                   9385: title="dom-style-scoped"><code>scoped</code></dfn> DOM attributes
                   9386: must <a href="#reflect">reflect</a> the respective content
                   9387: attributes of the same name.</p>
                   9388: <p>The DOM <dfn id="disabled0" title=
                   9389: "dom-style-disabled"><code>disabled</code></dfn> attribute behaves
                   9390: as defined <a href="#disabled1" title="dom-linkstyle-disabled">for
                   9391: the alternative style sheets DOM</a> .</p>
                   9392: <h4 id="styling"><span class="secno"><del class=
                   9393: "diff-old">3.7.7.</del> <ins class="diff-chg">3.7.7</ins></span>
                   9394: <dfn id="styling0" title=
                   9395: "styling processing model">Styling</dfn></h4>
                   9396: <p>The <code><a href="#link">link</a></code> and <code><a href=
                   9397: "#style1">style</a></code> elements can provide styling information
                   9398: for the user agent to use when rendering the document. The DOM
                   9399: Styling specification specifies what styling information is to be
                   9400: used by the user agent and how it is to be used. <a href=
                   9401: "#references">[CSSOM]</a></p>
                   9402: <p>The <code><a href="#style1">style</a></code> and <code><a href=
                   9403: "#link">link</a></code> elements implement the
                   9404: <code>LinkStyle</code> interface. <a href=
                   9405: "#references">[CSSOM]</a></p>
                   9406: <p>For <code><a href="#style1">style</a></code> elements, if the
                   9407: user agent does not support the specified styling language, then
                   9408: the <code title="dom-LinkStyle-sheet">sheet</code> attribute of the
                   9409: element's <code>LinkStyle</code> interface must return null.
                   9410: Similarly, <code><a href="#link">link</a></code> elements that do
                   9411: not represent <a href="#stylesheet" title="rel-stylesheet">external
                   9412: resource links that contribute to the styling processing model</a>
                   9413: (i.e. that do not have a <code title="rel-stylesheet"><a href=
                   9414: "#stylesheet">stylesheet</a></code> keyword in their <code title=
                   9415: "attr-link-rel"><a href="#rel">rel</a></code> attribute), and
                   9416: <code><a href="#link">link</a></code> elements whose specified
                   9417: resource has not yet been downloaded, or is not in a supported
                   9418: styling language, must have their <code>LinkStyle</code>
                   9419: interface's <code title="dom-LinkStyle-sheet">sheet</code>
                   9420: attribute return null.</p>
                   9421: <p>Otherwise, the <code>LinkStyle</code> interface's <code title=
                   9422: "dom-LinkStyle-sheet">sheet</code> attribute must return a
                   9423: <code>StyleSheet</code> object with the attributes implemented as
                   9424: follows: <a href="#references">[CSSOM]</a></p>
                   9425: <dl>
                   9426: <dt>The content type ( <code title=
                   9427: "dom-stylesheet-type">type</code> DOM attribute)</dt>
                   9428: <dd>
                   9429: <p>The content type must be the same as the style's specified type.
                   9430: For <code><a href="#style1">style</a></code> elements, this is the
                   9431: same as the <code title="attr-style-type"><a href=
                   9432: "#type1">type</a></code> content attribute's value, or <code title=
                   9433: "">text/css</code> if that is omitted. For <code><a href=
                   9434: "#link">link</a></code> elements, this is the <a href=
                   9435: "#content-type8" title="Content-Type">Content-Type metadata of the
                   9436: specified resource</a> .</p>
                   9437: </dd>
                   9438: <dt>The location ( <code title="dom-stylesheet-href">href</code>
                   9439: DOM attribute)</dt>
                   9440: <dd>
                   9441: <p>For <code><a href="#link">link</a></code> elements, the location
                   9442: must be the URI given by the element's <code title=
                   9443: "attr-link-href"><a href="#href1">href</a></code> content
                   9444: attribute. For <code><a href="#style1">style</a></code> elements,
                   9445: there is no location.</p>
                   9446: </dd>
                   9447: <dt>The intended destination media for style information (
                   9448: <code title="dom-stylesheet-media">media</code> DOM attribute)</dt>
                   9449: <dd>
                   9450: <p>The media must be the same as the value of the element's
                   9451: <code title="">media</code> content attribute.</p>
                   9452: </dd>
                   9453: <dt>The style sheet title ( <code title=
                   9454: "dom-stylesheet-title">title</code> DOM attribute)</dt>
                   9455: <dd>
                   9456: <p>The title must be the same as the value of the element's
                   9457: <code title="">title</code> content attribute. If the attribute is
                   9458: absent, then the style sheet does not have a title. The title is
                   9459: used for defining <dfn id="alternative">alternative style sheet
                   9460: sets</dfn> .</p>
                   9461: </dd>
                   9462: </dl>
                   9463: <p>The <dfn id="disabled1" title=
                   9464: "dom-LinkStyle-disabled"><code>disabled</code></dfn> DOM attribute
                   9465: on <code><a href="#link">link</a></code> and <code><a href=
                   9466: "#style1">style</a></code> elements must return false and do
                   9467: nothing on setting, if the <code title=
                   9468: "dom-linkstyle-sheet">sheet</code> attribute of their
                   9469: <code>LinkStyle</code> interface is null. Otherwise, it must return
                   9470: the value of the <code>StyleSheet</code> interface's <code title=
                   9471: "dom-stylesheet-disabled">disabled</code> attribute on getting, and
                   9472: forward the new value to that same attribute on setting.</p>
                   9473: <h3 id="sections"><span class="secno"><del class=
                   9474: "diff-old">3.8.</del> <ins class="diff-chg">3.8</ins></span>
                   9475: Sections</h3>
                   9476: <p id="applyToSection">Some elements, for example <code><a href=
                   9477: "#address">address</a></code> elements, are scoped to their nearest
                   9478: ancestor <a href="#sectioning0">sectioning <del class=
                   9479: "diff-old">content.</del> <ins class="diff-chg">content</ins></a> .
                   9480: For such elements <var title="">x</var> , the elements that apply
                   9481: to a <a href="#sectioning0">sectioning content</a> element
                   9482: <var title="">e</var> are all the <var title="">x</var> elements
                   9483: whose nearest <a href="#sectioning0">sectioning content</a>
                   9484: ancestor is <var title="">e</var> .</p>
                   9485: <h4 id="the-body"><span class="secno"><del class=
                   9486: "diff-old">3.8.1.</del> <ins class="diff-chg">3.8.1</ins></span>
                   9487: The <dfn id="body0"><code>body</code></dfn> element</h4>
                   9488: <dl class="element">
                   9489: <dt>Categories</dt>
                   9490: <dd><a href="#sectioning0">Sectioning content</a> .</dd>
                   9491: <dt>Contexts in which this element may be used:</dt>
                   9492: <dd>As the second element in an <code><a href=
                   9493: "#html">html</a></code> element.</dd>
                   9494: <dt>Content model:</dt>
                   9495: <dd><del class="diff-old">Prose</del> <a href=
                   9496: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   9497: .</dd>
                   9498: <dt>Element-specific attributes:</dt>
                   9499: <dd>None.</dd>
                   9500: <dt>DOM interface:</dt>
                   9501: <dd><del class="diff-old">No difference from</del>
                   9502: <pre>
                   9503: <ins class="diff-chg">class=idl&gt;
                   9504: interface
                   9505: </ins><dfn id="htmlbodyelement"><ins class="diff-chg">
                   9506: HTMLBodyElement
                   9507: </ins></dfn><ins class="diff-chg">
                   9508: :
                   9509: </ins>
                   9510: <a href="#htmlelement">
                   9511: HTMLElement
                   9512: </a>
                   9513: <del class="diff-old">.
                   9514: </del>
                   9515: <ins class="diff-chg">{};
                   9516: </ins>
                   9517: </pre></dd>
                   9518: </dl>
                   9519: <p>The <code><a href="#body0">body</a></code> element represents
                   9520: the main content of the document.</p>
                   9521: <p>In conforming documents, there is only one <code><a href=
                   9522: "#body0">body</a></code> element. The <code title=
                   9523: "dom-document-body"><a href="#body">document.body</a></code> DOM
                   9524: attribute provides scripts with easy access to a document's
                   9525: <code><a href="#body0">body</a></code> element.</p>
                   9526: <p class="note">Some DOM operations (for example, parts of the
                   9527: <a href="#drag-and">drag and drop</a> model) are defined in terms
                   9528: of " <a href="#the-body1">the body element</a> ". This refers to a
                   9529: particular element in the DOM, as per the definition of the term,
                   9530: and not any arbitrary <code><a href="#body0">body</a></code>
                   9531: element.</p>
                   9532: <h4 id="the-section"><span class="secno"><del class=
                   9533: "diff-old">3.8.2.</del> <ins class="diff-chg">3.8.2</ins></span>
                   9534: The <dfn id="section"><code>section</code></dfn> element</h4>
                   9535: <dl class="element">
                   9536: <dt>Categories</dt>
                   9537: <dd><del class="diff-old">Prose</del> <a href=
                   9538: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   9539: .</dd>
                   9540: <dd><a href="#sectioning0">Sectioning content</a> .</dd>
                   9541: <dt>Contexts in which this element may be used:</dt>
                   9542: <dd>Where <del class="diff-old">prose</del> <a href=
                   9543: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   9544: expected.</dd>
                   9545: <dt>Content model:</dt>
                   9546: <dd><del class="diff-old">Prose</del> <a href=
                   9547: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   9548: .</dd>
                   9549: <dt>Element-specific attributes:</dt>
                   9550: <dd>None.</dd>
                   9551: <dt>DOM interface:</dt>
                   9552: <dd><del class="diff-old">No difference from</del> <ins class=
                   9553: "diff-chg">Uses</ins> <code><a href=
                   9554: "#htmlelement">HTMLElement</a></code> .</dd>
                   9555: </dl>
                   9556: <p>The <code><a href="#section">section</a></code> element
                   9557: represents a generic document or application section. A section, in
                   9558: this context, is a thematic grouping of content, typically with a
                   9559: header, possibly with a footer.</p>
                   9560: <p class="example">Examples of sections would be chapters, the
                   9561: various tabbed pages in a tabbed dialog box, or the numbered
                   9562: sections of a thesis. A Web site's home page could be split into
                   9563: sections for an introduction, news items, contact information.</p>
                   9564: <h4 id="the-nav"><span class="secno"><del class=
                   9565: "diff-old">3.8.3.</del> <ins class="diff-chg">3.8.3</ins></span>
                   9566: The <dfn id="nav"><code>nav</code></dfn> element</h4>
                   9567: <dl class="element">
                   9568: <dt>Categories</dt>
                   9569: <dd><del class="diff-old">Prose</del> <a href=
                   9570: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   9571: .</dd>
                   9572: <dd><a href="#sectioning0">Sectioning content</a> .</dd>
                   9573: <dt>Contexts in which this element may be used:</dt>
                   9574: <dd>Where <del class="diff-old">prose</del> <a href=
                   9575: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   9576: expected.</dd>
                   9577: <dt>Content model:</dt>
                   9578: <dd><del class="diff-old">Prose</del> <a href=
                   9579: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   9580: .</dd>
                   9581: <dt>Element-specific attributes:</dt>
                   9582: <dd>None.</dd>
                   9583: <dt>DOM interface:</dt>
                   9584: <dd><del class="diff-old">No difference from</del> <ins class=
                   9585: "diff-chg">Uses</ins> <code><a href=
                   9586: "#htmlelement">HTMLElement</a></code> .</dd>
                   9587: </dl>
                   9588: <p>The <code><a href="#nav">nav</a></code> element represents a
                   9589: section of a page that links to other pages or to parts within the
                   9590: page: a section with navigation links. <ins class="diff-new">Not
                   9591: all groups of links on a page need to be in a</ins> <code><a href=
                   9592: "#nav"><ins class="diff-new">nav</ins></a></code> <ins class=
                   9593: "diff-new">element — only sections that consist of primary
                   9594: navigation blocks are appropriate for the</ins> <code><a href=
                   9595: "#nav"><ins class="diff-new">nav</ins></a></code> <ins class=
                   9596: "diff-new">element. In particular, it is common for footers to have
                   9597: a list of links to various key parts of a site, but the</ins>
                   9598: <code><a href="#footer"><ins class=
                   9599: "diff-new">footer</ins></a></code> <ins class="diff-new">element is
                   9600: more appropriate in such cases.</ins></p>
                   9601: <div class="example">
                   9602: <p><ins class="diff-new">In the following example, the page has
                   9603: several places where links are present, but only one of those
                   9604: places is considered a navigation section.</ins></p>
                   9605: <pre>
                   9606: &lt;body&gt;<ins class="diff-new">
                   9607:  &lt;header&gt;
                   9608:   &lt;h1&gt;Wake up sheeple!&lt;/h1&gt;
                   9609:   &lt;p&gt;&lt;a href="news.html"&gt;News&lt;/a&gt; -
                   9610:      &lt;a href="blog.html"&gt;Blog&lt;/a&gt; -
                   9611:      &lt;a href="forums.html"&gt;Forums&lt;/a&gt;&lt;/p&gt;
                   9612:  &lt;/header&gt;
                   9613:  &lt;nav&gt;
                   9614:   &lt;h1&gt;Navigation&lt;/h1&gt;
                   9615:   &lt;ul&gt;
                   9616:    &lt;li&gt;&lt;a href="articles.html"&gt;Index of all articles&lt;/a&gt;&lt;li&gt;
                   9617:    &lt;li&gt;&lt;a href="today.html"&gt;Things sheeple need to wake up for today&lt;/a&gt;&lt;li&gt;
                   9618:    &lt;li&gt;&lt;a href="successes.html"&gt;Sheeple we have managed to wake&lt;/a&gt;&lt;li&gt;
                   9619:   &lt;/ul&gt;
                   9620:  &lt;/nav&gt;
                   9621:  &lt;article&gt;
                   9622:   &lt;p&gt;...<em>page content would be here</em>...&lt;/p&gt;
                   9623:  &lt;/article&gt;
                   9624:  &lt;footer&gt;
                   9625:   &lt;p&gt;Copyright © 2006 The Example Company&lt;/p&gt;
                   9626:   &lt;p&gt;&lt;a href="about.html"&gt;About&lt;/a&gt; -
                   9627:      &lt;a href="policy.html"&gt;Privacy Policy&lt;/a&gt; -
                   9628:      &lt;a href="contact.html"&gt;Contact Us&lt;/a&gt;&lt;/p&gt;
                   9629:  &lt;/footer&gt;
                   9630: &lt;/body&gt;
                   9631: </ins>
                   9632: </pre></div>
                   9633: <h4 id="the-article"><span class="secno"><del class=
                   9634: "diff-old">3.8.4.</del> <ins class="diff-chg">3.8.4</ins></span>
                   9635: The <dfn id="article"><code>article</code></dfn> element</h4>
                   9636: <dl class="element">
                   9637: <dt>Categories</dt>
                   9638: <dd><del class="diff-old">Prose</del> <a href=
                   9639: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   9640: .</dd>
                   9641: <dd><a href="#sectioning0">Sectioning content</a> .</dd>
                   9642: <dt>Contexts in which this element may be used:</dt>
                   9643: <dd>Where <del class="diff-old">prose</del> <a href=
                   9644: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   9645: expected.</dd>
                   9646: <dt>Content model:</dt>
                   9647: <dd><del class="diff-old">Prose</del> <a href=
                   9648: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   9649: .</dd>
                   9650: <dt>Element-specific attributes:</dt>
                   9651: <dd>None.</dd>
                   9652: <dt>DOM interface:</dt>
                   9653: <dd><del class="diff-old">No difference from</del> <ins class=
                   9654: "diff-chg">Uses</ins> <code><a href=
                   9655: "#htmlelement">HTMLElement</a></code> .</dd>
                   9656: </dl>
                   9657: <p>The <code><a href="#article">article</a></code> element
                   9658: represents a section of a page that consists of a composition that
                   9659: forms an independent part of a document, page, or site. This could
                   9660: be a forum post, a magazine or newspaper article, a Web log entry,
                   9661: a user-submitted comment, or any other independent item of
                   9662: content.</p>
                   9663: <p class="note">An <code><a href="#article">article</a></code>
                   9664: element is "independent" in that its contents could stand alone,
                   9665: for example in syndication. However, the element is still
                   9666: associated with its ancestors; for instance, contact information
                   9667: that <a href="#applyToSection">applies</a> to a parent
                   9668: <code><a href="#body0">body</a></code> element still covers the
                   9669: <code><a href="#article">article</a></code> as well.</p>
                   9670: <p>When <code><a href="#article">article</a></code> elements are
                   9671: nested, the inner <code><a href="#article">article</a></code>
                   9672: elements represent articles that are in principle related to the
                   9673: contents of the outer article. For instance, a Web log entry on a
                   9674: site that accepts user-submitted comments could represent the
                   9675: comments as <code><a href="#article">article</a></code> elements
                   9676: nested within the <code><a href="#article">article</a></code>
                   9677: element for the Web log entry.</p>
                   9678: <p>Author information associated with an <code><a href=
                   9679: "#article">article</a></code> element (q.v. the <code><a href=
                   9680: "#address">address</a></code> element) does not apply to nested
                   9681: <code><a href="#article">article</a></code> elements. <del class=
                   9682: "diff-old">3.8.5. The blockquote element Categories Prose content .
                   9683: Sectioning content . Contexts in which this element may be used:
                   9684: Where prose content is expected. Content model: Prose content .
                   9685: Element-specific attributes: cite DOM interface: &lt;pre
                   9686: class=idl&gt;interface { attribute DOMString ; }; The
                   9687: HTMLQuoteElement interface is also used by the q element. The
                   9688: blockquote element represents a section that is quoted from another
                   9689: source. Content inside a blockquote must be quoted from another
                   9690: source, whose URI, if it has one, should be cited in the cite
                   9691: attribute. If the cite attribute is present, it must be a URI (or
                   9692: IRI). User agents should allow users to follow such citation links.
                   9693: If a blockquote element is preceded or followed by a paragraph that
                   9694: contains a single cite element and is itself not preceded or
                   9695: followed by another blockquote element and does not itself have a q
                   9696: element descendant, then, the citation given by that cite element
                   9697: gives the source of the quotation contained in the blockquote
                   9698: element. The cite DOM attribute reflects the element's cite content
                   9699: attribte. The best way to represent a conversation is not with the
                   9700: cite and blockquote elements, but with the dialog
                   9701: element.</del></p>
                   9702: <h4 id="the-aside"><span class="secno"><del class=
                   9703: "diff-old">3.8.6.</del> <ins class="diff-chg">3.8.5</ins></span>
                   9704: The <dfn id="aside"><code>aside</code></dfn> element</h4>
                   9705: <dl class="element">
                   9706: <dt>Categories</dt>
                   9707: <dd><del class="diff-old">Prose</del> <a href=
                   9708: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   9709: .</dd>
                   9710: <dd><a href="#sectioning0">Sectioning content</a> .</dd>
                   9711: <dt>Contexts in which this element may be used:</dt>
                   9712: <dd>Where <del class="diff-old">prose</del> <a href=
                   9713: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   9714: expected.</dd>
                   9715: <dt>Content model:</dt>
                   9716: <dd><del class="diff-old">Prose</del> <a href=
                   9717: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   9718: .</dd>
                   9719: <dt>Element-specific attributes:</dt>
                   9720: <dd>None.</dd>
                   9721: <dt>DOM interface:</dt>
                   9722: <dd><del class="diff-old">No difference from</del> <ins class=
                   9723: "diff-chg">Uses</ins> <code><a href=
                   9724: "#htmlelement">HTMLElement</a></code> .</dd>
                   9725: </dl>
                   9726: <p>The <code><a href="#aside">aside</a></code> element represents a
                   9727: section of a page that consists of content that is tangentially
                   9728: related to the content around the <code><a href=
                   9729: "#aside">aside</a></code> element, and which could be considered
                   9730: separate from that content. Such sections are often represented as
                   9731: sidebars in printed typography.</p>
                   9732: <div class="example">
                   9733: <p><ins class="diff-new">The following example shows how an aside
                   9734: is used to mark up background material on Switzerland in a much
                   9735: longer news story on Europe.</ins></p>
                   9736: <pre>
                   9737: &lt;aside&gt;<ins class="diff-new">
                   9738:  &lt;h1&gt;Switzerland&lt;/h1&gt;
                   9739:  &lt;p&gt;Switzerland, a land-locked country in the middle of geographic
                   9740:  Europe, has not joined the geopolitical European Union, though it is
                   9741:  a signatory to a number of European treaties.&lt;/p&gt;
                   9742: &lt;/aside&gt;
                   9743: </ins>
                   9744: </pre></div>
                   9745: <div class="example">
                   9746: <p><ins class="diff-new">The following example shows how an aside
                   9747: is used to mark up a pull quote in a longer article.</ins></p>
                   9748: <pre>
                   9749: ...<ins class="diff-new">
                   9750: &lt;p&gt;He later joined a large company, continuing on the same work.
                   9751: &lt;q&gt;I love my job. People ask me what I do for fun when I'm not at
                   9752: work. But I'm paid to do my hobby, so I never know what to
                   9753: answer. Some people wonder what they would do if they didn't have to
                   9754: work... but I know what I would do, because I was unemployed for a
                   9755: year, and I filled that time doing exactly what I do
                   9756: now.&lt;/q&gt;&lt;/p&gt;
                   9757: &lt;aside&gt;
                   9758:  &lt;q&gt; People ask me what I do for fun when I'm not at work. But I'm
                   9759:  paid to do my hobby, so I never know what to answer. &lt;/q&gt;
                   9760: &lt;/aside&gt;
                   9761: &lt;p&gt;Of course his work — or should that be hobby? —
                   9762: isn't his only passion. He also enjoys other pleasures.&lt;/p&gt;
                   9763: ...
                   9764: </ins>
                   9765: </pre></div>
                   9766: <h4 id="the-h1"><span class="secno"><del class=
                   9767: "diff-old">3.8.7.</del> <ins class="diff-chg">3.8.6</ins></span>
                   9768: The <dfn id="h1"><code>h1</code></dfn> , <dfn id=
                   9769: "h2"><code>h2</code></dfn> , <dfn id="h3"><code>h3</code></dfn> ,
                   9770: <dfn id="h4"><code>h4</code></dfn> , <dfn id=
                   9771: "h5"><code>h5</code></dfn> , and <dfn id="h6"><code>h6</code></dfn>
                   9772: elements</h4>
                   9773: <dl class="element">
                   9774: <dt>Categories</dt>
                   9775: <dd><del class="diff-old">Prose</del> <a href=
                   9776: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   9777: .</dd>
                   9778: <dd><a href="#heading0">Heading content</a> .</dd>
                   9779: <dt>Contexts in which this element may be used:</dt>
                   9780: <dd>Where <del class="diff-old">prose</del> <a href=
                   9781: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   9782: expected.</dd>
                   9783: <dt>Content model:</dt>
                   9784: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   9785: <dt>Element-specific attributes:</dt>
                   9786: <dd>None.</dd>
                   9787: <dt>DOM interface:</dt>
                   9788: <dd><del class="diff-old">No difference from</del> <ins class=
                   9789: "diff-chg">Uses</ins> <code><a href=
                   9790: "#htmlelement">HTMLElement</a></code> .</dd>
                   9791: </dl>
                   9792: <p>These elements define headers for their sections.</p>
                   9793: <p>The semantics and meaning of these elements are defined in the
                   9794: section on <a href="#headings0">headings and sections</a> .</p>
                   9795: <p>These elements have a <dfn id="rank">rank</dfn> given by the
                   9796: number in their name. The <code><a href="#h1">h1</a></code> element
                   9797: is said to have the highest rank, the <code><a href=
                   9798: "#h6">h6</a></code> element has the lowest rank, and two elements
                   9799: with the same name have equal rank.</p>
                   9800: <h4 id="the-header"><span class="secno"><del class=
                   9801: "diff-old">3.8.8.</del> <ins class="diff-chg">3.8.7</ins></span>
                   9802: The <dfn id="header"><code>header</code></dfn> element</h4>
                   9803: <dl class="element">
                   9804: <dt>Categories</dt>
                   9805: <dd><del class="diff-old">Prose</del> <a href=
                   9806: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   9807: .</dd>
                   9808: <dd><a href="#heading0">Heading content</a> .</dd>
                   9809: <dt>Contexts in which this element may be used:</dt>
                   9810: <dd>Where <del class="diff-old">prose</del> <a href=
                   9811: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   9812: expected.</dd>
                   9813: <dt>Content model:</dt>
                   9814: <dd><del class="diff-old">Prose</del> <a href=
                   9815: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a> ,
                   9816: including at least one descendant that is <a href=
                   9817: "#heading0">heading content</a> , but no <a href=
                   9818: "#sectioning0">sectioning content</a> descendants, no
                   9819: <code><a href="#header">header</a></code> element descendants, and
                   9820: no <code><a href="#footer">footer</a></code> element
                   9821: descendants.</dd>
                   9822: <dt>Element-specific attributes:</dt>
                   9823: <dd>None.</dd>
                   9824: <dt>DOM interface:</dt>
                   9825: <dd><del class="diff-old">No difference from</del> <ins class=
                   9826: "diff-chg">Uses</ins> <code><a href=
                   9827: "#htmlelement">HTMLElement</a></code> .</dd>
                   9828: </dl>
                   9829: <p>The <code><a href="#header">header</a></code> element represents
                   9830: the header of a section. <del class="diff-old">Headers</del>
                   9831: <ins class="diff-chg">The element is typically used to group a set
                   9832: of</ins> <code><a href="#h1"><ins class=
                   9833: "diff-chg">h1</ins></a></code> <ins class="diff-chg">–</ins>
                   9834: <code><a href="#h6"><ins class="diff-chg">h6</ins></a></code>
                   9835: <ins class="diff-chg">elements to mark up a page's title with its
                   9836: subtitle or tagline. However,</ins> <code><a href=
                   9837: "#header"><ins class="diff-chg">header</ins></a></code> <ins class=
                   9838: "diff-chg">elements</ins> may contain more than just the section's
                   9839: <del class="diff-old">heading</del> <ins class="diff-chg">headings
                   9840: and subheadings</ins> — for example it would be reasonable for the
                   9841: header to include version history information.</p>
                   9842: <p>For the purposes of document summaries, outlines, and the like,
                   9843: <code><a href="#header">header</a></code> elements are equivalent
                   9844: to the highest <a href="#rank" title="rank">ranked</a>
                   9845: <code><a href="#h1">h1</a></code> <del class="diff-old">-</del>
                   9846: <ins class="diff-chg">–</ins> <code><a href="#h6">h6</a></code>
                   9847: element descendant of the <code><a href="#header">header</a></code>
                   9848: element (the first such element if there are multiple elements with
                   9849: that <a href="#rank">rank</a> ).</p>
                   9850: <p>Other heading elements in the <code><a href=
                   9851: "#header">header</a></code> element indicate subheadings or
                   9852: subtitles.</p>
                   9853: <p><ins class="diff-new">The</ins> <a href="#rank"><ins class=
                   9854: "diff-new">rank</ins></a> <ins class="diff-new">of a</ins>
                   9855: <code><a href="#header"><ins class=
                   9856: "diff-new">header</ins></a></code> <ins class="diff-new">element is
                   9857: the same as for an</ins> <code><a href="#h1"><ins class=
                   9858: "diff-new">h1</ins></a></code> <ins class="diff-new">element (the
                   9859: highest rank).</ins></p>
                   9860: <p><ins class="diff-new">The section on</ins> <a href=
                   9861: "#headings0"><ins class="diff-new">headings and sections</ins></a>
                   9862: <ins class="diff-new">defines how</ins> <code><a href=
                   9863: "#header"><ins class="diff-new">header</ins></a></code> <ins class=
                   9864: "diff-new">elements are assigned to individual sections.</ins></p>
                   9865: <div class="example">
                   9866: <p>Here are some examples of valid headers. In each case, the
                   9867: emphasised text represents the text that would be used as the
                   9868: header in an application extracting header data and ignoring
                   9869: subheadings.</p>
                   9870: <pre>
                   9871: &lt;header&gt;
                   9872:  &lt;h1&gt;<strong>The reality dysfunction</strong>&lt;/h1&gt;
                   9873:  &lt;h2&gt;Space is not the only void&lt;/h2&gt;
                   9874: &lt;/header&gt;
                   9875: </pre>
                   9876: <pre>
                   9877: &lt;header&gt;
                   9878: <ins class=
                   9879: "diff-new"> &lt;h1&gt;<strong>Dr. Strangelove</strong>&lt;/h1&gt;
                   9880:  &lt;h2&gt;Or: How I Learned to Stop Worrying and Love the Bomb&lt;/h2&gt;
                   9881: &lt;/header&gt;
                   9882: </ins>
                   9883: </pre>
                   9884: <pre>
                   9885: &lt;header&gt;
                   9886:  &lt;p&gt;Welcome to...&lt;/p&gt;
                   9887:  &lt;h1&gt;<strong>Voidwars!</strong>&lt;/h1&gt;
                   9888: &lt;/header&gt;
                   9889: </pre>
                   9890: <pre>
                   9891: &lt;header&gt;
                   9892:  &lt;h1&gt;<strong>Scalable Vector Graphics (SVG) 1.2</strong>&lt;/h1&gt;
                   9893:  &lt;h2&gt;W3C Working Draft 27 October 2004&lt;/h2&gt;
                   9894:  &lt;dl&gt;
                   9895:   &lt;dt&gt;This version:&lt;/dt&gt;
                   9896:   &lt;dd&gt;&lt;a href="http://www.w3.org/TR/2004/WD-SVG12-20041027/"&gt;http://www.w3.org/TR/2004/WD-SVG12-20041027/&lt;/a&gt;&lt;/dd&gt;
                   9897:   &lt;dt&gt;Previous version:&lt;/dt&gt;
                   9898:   &lt;dd&gt;&lt;a href="http://www.w3.org/TR/2004/WD-SVG12-20040510/"&gt;http://www.w3.org/TR/2004/WD-SVG12-20040510/&lt;/a&gt;&lt;/dd&gt;
                   9899:   &lt;dt&gt;Latest version of SVG 1.2:&lt;/dt&gt;
                   9900:   &lt;dd&gt;&lt;a href="http://www.w3.org/TR/SVG12/"&gt;http://www.w3.org/TR/SVG12/&lt;/a&gt;&lt;/dd&gt;
                   9901:   &lt;dt&gt;Latest SVG Recommendation:&lt;/dt&gt;
                   9902:   &lt;dd&gt;&lt;a href="http://www.w3.org/TR/SVG/"&gt;http://www.w3.org/TR/SVG/&lt;/a&gt;&lt;/dd&gt;
                   9903:   &lt;dt&gt;Editor:&lt;/dt&gt;
                   9904:   &lt;dd&gt;Dean Jackson, W3C, &lt;a href="mailto:dean@w3.org"&gt;dean@w3.org&lt;/a&gt;&lt;/dd&gt;
                   9905:   &lt;dt&gt;Authors:&lt;/dt&gt;
                   9906:   &lt;dd&gt;See &lt;a href="#authors"&gt;Author List&lt;/a&gt;&lt;/dd&gt;
                   9907:  &lt;/dl&gt;
                   9908:  &lt;p class="copyright"&gt;&lt;a href="http://www.w3.org/Consortium/Legal/ipr-notic <em>...</em>
                   9909: &lt;/header&gt;
                   9910: </pre></div>
                   9911: <del class="diff-old">The section on headings and sections defines
                   9912: how header elements are assigned to individual sections. The rank
                   9913: of a header element is the same as for an h1 element (the highest
                   9914: rank).</del>
                   9915: <h4 id="the-footer"><span class="secno"><del class=
                   9916: "diff-old">3.8.9.</del> <ins class="diff-chg">3.8.8</ins></span>
                   9917: The <dfn id="footer"><code>footer</code></dfn> element</h4>
                   9918: <dl class="element">
                   9919: <dt>Categories</dt>
                   9920: <dd><del class="diff-old">Prose</del> <a href=
                   9921: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   9922: .</dd>
                   9923: <dt>Contexts in which this element may be used:</dt>
                   9924: <dd>Where <del class="diff-old">prose</del> <a href=
                   9925: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   9926: expected.</dd>
                   9927: <dt>Content model:</dt>
                   9928: <dd><del class="diff-old">Prose</del> <a href=
                   9929: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a> , but
                   9930: with no <a href="#heading0">heading content</a> descendants, no
                   9931: <a href="#sectioning0">sectioning content</a> descendants, and no
                   9932: <code><a href="#footer">footer</a></code> element descendants.</dd>
                   9933: <dt>Element-specific attributes:</dt>
                   9934: <dd>None.</dd>
                   9935: <dt>DOM interface:</dt>
                   9936: <dd><del class="diff-old">No difference from</del> <ins class=
                   9937: "diff-chg">Uses</ins> <code><a href=
                   9938: "#htmlelement">HTMLElement</a></code> .</dd>
                   9939: </dl>
                   9940: <p>The <code><a href="#footer">footer</a></code> element represents
                   9941: the footer for the section it <a href="#applyToSection">applies</a>
                   9942: to. A footer typically contains information about its section such
                   9943: as who wrote it, links to related documents, copyright data, and
                   9944: the like.</p>
                   9945: <p>Contact information for the section given in a <code><a href=
                   9946: "#footer">footer</a></code> should be marked up using the
                   9947: <code><a href="#address">address</a></code> element.</p>
                   9948: <p><ins class="diff-new">Footers don't necessarily have to appear
                   9949: at the end of a section, though they usually do.</ins></p>
                   9950: <div class="example">
                   9951: <p><ins class="diff-new">Here is a page with two footers, one at
                   9952: the top and one at the bottom, with the same content:</ins></p>
                   9953: <pre>
                   9954: &lt;body&gt;
                   9955: <ins class=
                   9956: "diff-new"> &lt;footer&gt;&lt;a href="../"&gt;Back to index...&lt;/a&gt;&lt;/footer&gt;
                   9957:  &lt;h1&gt;Lorem ipsum&lt;/h1&gt;
                   9958:  &lt;p&gt;A dolor sit amet, consectetur adipisicing elit, sed do eiusmod
                   9959:  tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
                   9960:  veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
                   9961:  ea commodo consequat. Duis aute irure dolor in reprehenderit in
                   9962:  voluptate velit esse cillum dolore eu fugiat nulla
                   9963:  pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
                   9964:  culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
                   9965:  &lt;footer&gt;&lt;a href="../"&gt;Back to index...&lt;/a&gt;&lt;/footer&gt;
                   9966: &lt;/body&gt;
                   9967: </ins>
                   9968: </pre></div>
                   9969: <h4 id="the-address"><span class="secno"><del class=
                   9970: "diff-old">3.8.10.</del> <ins class="diff-chg">3.8.9</ins></span>
                   9971: The <dfn id="address"><code>address</code></dfn> element</h4>
                   9972: <dl class="element">
                   9973: <dt>Categories</dt>
                   9974: <dd><del class="diff-old">Prose</del> <a href=
                   9975: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   9976: .</dd>
                   9977: <dt>Contexts in which this element may be used:</dt>
                   9978: <dd>Where <del class="diff-old">prose</del> <a href=
                   9979: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   9980: expected.</dd>
                   9981: <dt>Content model:</dt>
                   9982: <dd><del class="diff-old">Prose</del> <a href=
                   9983: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a> , but
                   9984: with no <a href="#heading0">heading content</a> descendants, no
                   9985: <a href="#sectioning0">sectioning content</a> descendants, no
                   9986: <code><a href="#footer">footer</a></code> element descendants, and
                   9987: no <code><a href="#address">address</a></code> element
                   9988: descendants.</dd>
                   9989: <dt>Element-specific attributes:</dt>
                   9990: <dd>None.</dd>
                   9991: <dt>DOM interface:</dt>
                   9992: <dd><del class="diff-old">No difference from</del> <ins class=
                   9993: "diff-chg">Uses</ins> <code><a href=
                   9994: "#htmlelement">HTMLElement</a></code> .</dd>
                   9995: </dl>
                   9996: <p>The <code><a href="#address">address</a></code> element
                   9997: represents the contact information for the section it <a href=
                   9998: "#applyToSection">applies</a> to. <ins class="diff-new">If it
                   9999: applies to</ins> <a href="#the-body1"><ins class=
                   10000: "diff-new">the</ins> <code><ins class="diff-new">body</ins></code>
                   10001: <ins class="diff-new">element</ins></a> ,<ins class="diff-new">then
                   10002: it instead applies to the document as a whole.</ins></p>
                   10003: <div class="example">
                   10004: <p>For example, a page at the W3C Web site related to HTML might
                   10005: include the following contact information:</p>
                   10006: <pre>
                   10007: &lt;ADDRESS&gt;
                   10008:  &lt;A href="../People/Raggett/"&gt;Dave Raggett&lt;/A&gt;, 
                   10009:  &lt;A href="../People/Arnaud/"&gt;Arnaud Le Hors&lt;/A&gt;, 
                   10010:  contact persons for the &lt;A href="Activity"&gt;W3C HTML Activity&lt;/A&gt;
                   10011: &lt;/ADDRESS&gt;
                   10012: </pre></div>
                   10013: <p>The <code><a href="#address">address</a></code> element must not
                   10014: be used to represent arbitrary addresses (e.g. postal addresses),
                   10015: unless those addresses are contact information for the section.
                   10016: (The <code><a href="#p">p</a></code> element is the appropriate
                   10017: element for marking up such addresses.)</p>
                   10018: <p>The <code><a href="#address">address</a></code> element must not
                   10019: contain information other than contact information.</p>
                   10020: <div class="example">
                   10021: <p>For example, the following is non-conforming use of the
                   10022: <code><a href="#address">address</a></code> element:</p>
                   10023: <pre>
                   10024: &lt;ADDRESS&gt;
                   10025: Last
                   10026: Modified:
                   10027: 1999/12/24
                   10028: 23:37:50&lt;/ADDRESS&gt;
                   10029: </pre></div>
                   10030: <p>Typically, the <code><a href="#address">address</a></code>
                   10031: element would be included with other information in a
                   10032: <code><a href="#footer">footer</a></code> element.</p>
                   10033: <p>To determine the contact information for a <a href=
                   10034: "#sectioning0">sectioning <ins class="diff-new">content</ins></a>
                   10035: element (such as a document's <code><a href=
                   10036: "#body0">body</a></code> element, which would give the contact
                   10037: information for the page), UAs must collect all the <code><a href=
                   10038: "#address">address</a></code> elements that <a href=
                   10039: "#applyToSection">apply</a> to that <a href=
                   10040: "#sectioning0">sectioning <ins class="diff-new">content</ins></a>
                   10041: element and its ancestor <a href="#sectioning0">sectioning
                   10042: <ins class="diff-new">content</ins></a> elements. The contact
                   10043: information is the collection of all the information given by those
                   10044: elements.</p>
                   10045: <p class="note">Contact information for one <a href=
                   10046: "#sectioning0">sectioning <ins class="diff-new">content</ins></a>
                   10047: element, e.g. an <code><a href="#aside">aside</a></code> element,
                   10048: does not apply to its ancestor elements, e.g. the page's
                   10049: <code><a href="#body0">body</a></code> .</p>
                   10050: <h4 id="headings"><span class="secno"><del class=
                   10051: "diff-old">3.8.11.</del> <ins class="diff-chg">3.8.10</ins></span>
                   10052: <dfn id="headings0">Headings and sections</dfn></h4>
                   10053: <p>The <code><a href="#h1">h1</a></code> <del class=
                   10054: "diff-old">-</del> <ins class="diff-chg">–</ins> <code><a href=
                   10055: "#h6">h6</a></code> elements and the <code><a href=
                   10056: "#header">header</a></code> element are headings.</p>
                   10057: <p>The first element of <a href="#heading0">heading content</a> in
                   10058: an element of <a href="#sectioning0">sectioning content</a> gives
                   10059: the header for that section. Subsequent headers of equal or higher
                   10060: <a href="#rank">rank</a> start new (implied) sections, headers of
                   10061: lower <a href="#rank">rank</a> start subsections that are part of
                   10062: the previous one.</p>
                   10063: <p><del class="diff-old">Sectioning elements other than</del>
                   10064: <del class="diff-old">blockquote</del> <a href=
                   10065: "#sectioning0"><ins class="diff-chg">Sectioning content</ins></a>
                   10066: <ins class="diff-chg">elements</ins> are always considered
                   10067: subsections of their nearest ancestor element of <a href=
                   10068: "#sectioning0">sectioning <del class="diff-old">content,</del>
                   10069: <ins class="diff-chg">content</ins></a> , regardless of what
                   10070: implied sections other headings may have created. <del class=
                   10071: "diff-old">However,</del></p>
                   10072: <p><ins class="diff-chg">Certain elements are said to be</ins>
                   10073: <dfn id="sectioning1" title="sectioning root"><ins class=
                   10074: "diff-chg">sectioning roots</ins></dfn> ,<ins class=
                   10075: "diff-chg">including</ins> <code><a href=
                   10076: "#blockquote">blockquote</a></code> <del class="diff-old">elements
                   10077: are associated with implied sections. Effectively,</del>
                   10078: <ins class="diff-chg">and</ins> <code><del class=
                   10079: "diff-old">blockquote</del> <a href="#td"><ins class=
                   10080: "diff-chg">td</ins></a></code> <ins class="diff-new">elements.
                   10081: These</ins> elements <del class="diff-old">act like sections
                   10082: on</del> <ins class="diff-chg">can have their own outlines,
                   10083: but</ins> the <del class="diff-old">inside,</del> <ins class=
                   10084: "diff-chg">sections</ins> and <del class="diff-old">act opaquely
                   10085: on</del> <ins class="diff-chg">headers inside these elements do not
                   10086: contribute to</ins> the <del class="diff-old">outside.</del>
                   10087: <ins class="diff-chg">outlines of their ancestors.</ins></p>
                   10088: <div class="example">
                   10089: <p>For the following fragment:</p>
                   10090: <pre>
                   10091: &lt;body&gt;
                   10092:  &lt;h1&gt;Foo&lt;/h1&gt;
                   10093:  &lt;h2&gt;Bar&lt;/h2&gt;
                   10094:  &lt;blockquote&gt;
                   10095:   &lt;h3&gt;Bla&lt;/h3&gt;
                   10096:  &lt;/blockquote&gt;
                   10097:  &lt;p&gt;Baz&lt;/p&gt;
                   10098:  &lt;h2&gt;Quux&lt;/h2&gt;
                   10099:  &lt;section&gt;
                   10100:   &lt;h3&gt;Thud&lt;/h3&gt;
                   10101:  &lt;/section&gt;
                   10102:  &lt;p&gt;Grunt&lt;/p&gt;
                   10103: &lt;/body&gt;
                   10104: </pre>
                   10105: <p>...the structure would be:</p>
                   10106: <ol>
                   10107: <li>Foo (heading of explicit <code><a href="#body0">body</a></code>
                   10108: <del class="diff-old">section)</del> <ins class="diff-chg">section,
                   10109: containing the "Grunt" paragraph)</ins>
                   10110: <ol>
                   10111: <li>Bar (heading starting implied <del class="diff-old">section)
                   10112: Bla (heading of explicit blockquote section) Baz (paragraph)</del>
                   10113: <ins class="diff-chg">section, containing a block quote and the
                   10114: "Baz" paragraph)</ins></li>
                   10115: <li>Quux (heading starting implied section)</li>
                   10116: <li>Thud (heading of explicit <code><a href=
                   10117: "#section">section</a></code> section)</li>
                   10118: </ol>
                   10119: <del class="diff-old">Grunt (paragraph)</del></li>
                   10120: </ol>
                   10121: <p>Notice how the <code><del class="diff-old">blockquote nests
                   10122: inside an implicit section while the</del> <a href=
                   10123: "#section">section</a></code> <del class="diff-old">does not (and
                   10124: in fact,</del> ends the earlier implicit section so that a later
                   10125: paragraph <ins class="diff-new">("Grunt")</ins> is back at the top
                   10126: <del class="diff-old">level).</del> <ins class=
                   10127: "diff-chg">level.</ins></p>
                   10128: </div>
                   10129: <p>Sections may contain headers of any <a href="#rank">rank</a> ,
                   10130: but authors are strongly encouraged to either use only
                   10131: <code><a href="#h1">h1</a></code> elements, or to use elements of
                   10132: the appropriate <a href="#rank">rank</a> for the section's nesting
                   10133: level.</p>
                   10134: <p>Authors are also encouraged to <del class=
                   10135: "diff-old">explictly</del> <ins class="diff-chg">explicitly</ins>
                   10136: wrap sections in elements of <a href="#sectioning0">sectioning
                   10137: content</a> , instead of relying on the implicit sections generated
                   10138: by having multiple heading in one element of <a href=
                   10139: "#sectioning0">sectioning content</a> .</p>
                   10140: <div class="example">
                   10141: <p>For example, the following is correct:</p>
                   10142: <pre>
                   10143: &lt;body&gt;
                   10144:  &lt;h4&gt;Apples&lt;/h4&gt;
                   10145:  &lt;p&gt;Apples are fruit.&lt;/p&gt;
                   10146:  &lt;section&gt;
                   10147:   &lt;h2&gt;Taste&lt;/h2&gt;
                   10148:   &lt;p&gt;They taste lovely.&lt;/p&gt;
                   10149:   &lt;h6&gt;Sweet&lt;/h6&gt;
                   10150:   &lt;p&gt;Red apples are sweeter than green ones.&lt;/p&gt;
                   10151:   &lt;h1&gt;Color&lt;/h1&gt;
                   10152:   &lt;p&gt;Apples come in various colors.&lt;/p&gt;
                   10153:  &lt;/section&gt;
                   10154: &lt;/body&gt;
                   10155: </pre>
                   10156: <p>However, the same document would be more clearly expressed
                   10157: as:</p>
                   10158: <pre>
                   10159: &lt;body&gt;
                   10160:  &lt;h1&gt;Apples&lt;/h1&gt;
                   10161:  &lt;p&gt;Apples are fruit.&lt;/p&gt;
                   10162:  &lt;section&gt;
                   10163:   &lt;h2&gt;Taste&lt;/h2&gt;
                   10164:   &lt;p&gt;They taste lovely.&lt;/p&gt;
                   10165:   &lt;section&gt;
                   10166:    &lt;h3&gt;Sweet&lt;/h3&gt;
                   10167:    &lt;p&gt;Red apples are sweeter than green ones.&lt;/p&gt;
                   10168:   &lt;/section&gt;
                   10169:  &lt;/section&gt;
                   10170:  &lt;section&gt;
                   10171:   &lt;h2&gt;Color&lt;/h2&gt;
                   10172:   &lt;p&gt;Apples come in various colors.&lt;/p&gt;
                   10173:  &lt;/section&gt;
                   10174: &lt;/body&gt;
                   10175: </pre>
                   10176: <p>Both of the documents above are semantically identical and would
                   10177: produce the same outline in compliant user agents.</p>
                   10178: </div>
                   10179: <h5 id="outlines"><span class="secno"><del class=
                   10180: "diff-old">3.8.11.1.</del> <ins class=
                   10181: "diff-chg">3.8.10.1.</ins></span> Creating an outline</h5>
                   10182: <p>This section <del class="diff-old">will be rewritten at some
                   10183: point. The</del> <ins class="diff-chg">defines an</ins> algorithm
                   10184: <del class="diff-old">likely won't change, but its description will
                   10185: be dramatically simplified. Documents can be viewed as</del>
                   10186: <ins class="diff-chg">for creating an</ins> <dfn id=
                   10187: "outline"><ins class="diff-chg">outline</ins></dfn> <ins class=
                   10188: "diff-chg">for</ins> a <del class="diff-old">tree of sections,
                   10189: which defines how each</del> <a href="#sectioning0"><ins class=
                   10190: "diff-chg">sectioning content</ins></a> element <del class=
                   10191: "diff-old">in the tree</del> <ins class="diff-chg">or a</ins>
                   10192: <a href="#sectioning1"><ins class="diff-chg">sectioning
                   10193: root</ins></a> <ins class="diff-chg">element. It</ins> is
                   10194: <del class="diff-old">semantically related to the others,</del>
                   10195: <ins class="diff-chg">defined</ins> in terms of <del class=
                   10196: "diff-old">the overall section structure. This tree is related to
                   10197: the document tree, but there is not</del> a <del class=
                   10198: "diff-old">one-to-one relationship between elements in</del>
                   10199: <ins class="diff-chg">walk over</ins> the <ins class=
                   10200: "diff-new">nodes of a</ins> DOM <ins class="diff-new">tree, in tree
                   10201: order, with each node being visited when it is</ins> <i><ins class=
                   10202: "diff-new">entered</ins></i> and <ins class="diff-new">when it
                   10203: is</ins> <i><ins class="diff-new">exited</ins></i> <ins class=
                   10204: "diff-new">during</ins> the <del class="diff-old">document's
                   10205: sections.</del> <ins class="diff-chg">walk.</ins></p>
                   10206: <p>The <del class="diff-old">tree of sections should be used when
                   10207: generating document outlines,</del> <ins class=
                   10208: "diff-chg">outline</ins> for <del class="diff-old">example when
                   10209: generating tables of contents. To derive the tree of sections from
                   10210: the document tree,</del> a <del class="diff-old">hypothetical tree
                   10211: is used, consisting of a view of the document tree containing only
                   10212: the elements of heading content and the elements of</del> <a href=
                   10213: "#sectioning0">sectioning content</a> <del class="diff-old">other
                   10214: than blockquote</del> <ins class="diff-chg">element or a</ins>
                   10215: <a href="#sectioning1"><ins class="diff-chg">sectioning
                   10216: root</ins></a> <del class="diff-old">. Descendants</del>
                   10217: <ins class="diff-chg">element consists</ins> of <del class=
                   10218: "diff-old">h1 - h6 , header ,</del> <ins class="diff-chg">a list of
                   10219: one or more potentially nested sections. Each section can have one
                   10220: heading associated with it. The algorithm for the outline also
                   10221: associates each node in the DOM tree with a particular
                   10222: section</ins> and <ins class="diff-new">potentially a heading. (The
                   10223: sections in the outline aren't</ins> <code><del class=
                   10224: "diff-old">blockquote</del> <a href="#section"><ins class=
                   10225: "diff-chg">section</ins></a></code> <ins class="diff-new">elements,
                   10226: though some may correspond to such</ins> elements <del class=
                   10227: "diff-old">must be removed from this view.</del> <ins class=
                   10228: "diff-chg">— they are merely conceptual sections.)</ins></p>
                   10229: <p>The <del class="diff-old">hypothetical tree</del> <ins class=
                   10230: "diff-chg">algorithm that</ins> must be <ins class=
                   10231: "diff-new">followed during a walk of a DOM subtree</ins> rooted at
                   10232: <del class="diff-old">the root element or at an element of</del>
                   10233: <ins class="diff-chg">a</ins> <a href="#sectioning0">sectioning
                   10234: content <del class="diff-old">. In particular, while the sections
                   10235: inside blockquote</del></a> <del class="diff-old">s do not
                   10236: contribute</del> <ins class="diff-chg">element or a</ins> <a href=
                   10237: "#sectioning1"><ins class="diff-chg">sectioning root</ins></a>
                   10238: <ins class="diff-chg">element</ins> to <ins class=
                   10239: "diff-new">determine that element's outline is as
                   10240: follows:</ins></p>
                   10241: <ol>
                   10242: <li>
                   10243: <p><ins class="diff-new">Let</ins> <var title=""><ins class=
                   10244: "diff-new">current outlinee</ins></var> <ins class="diff-new">be
                   10245: null. (It holds</ins> the <del class="diff-old">document's tree of
                   10246: sections, blockquote s</del> <ins class="diff-chg">element whose
                   10247: outline is being created.)</ins></p>
                   10248: </li>
                   10249: <li>
                   10250: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   10251: "diff-chg">current section</ins></var> <ins class="diff-chg">be
                   10252: null. (It holds a pointer to a section, so that elements in the
                   10253: DOM</ins> can <del class="diff-old">have outlines of their
                   10254: own.</del> <ins class="diff-chg">all be associated with a
                   10255: section.)</ins></p>
                   10256: </li>
                   10257: <li>
                   10258: <p><del class="diff-old">UAs must take</del> <ins class=
                   10259: "diff-chg">Create a stack to hold elements, which is used to handle
                   10260: nesting. Initialize</ins> this <del class="diff-old">hypothetical
                   10261: tree (which will become</del> <ins class="diff-chg">stack to
                   10262: empty.</ins></p>
                   10263: </li>
                   10264: <li>
                   10265: <p><ins class="diff-chg">As you walk over</ins> the <del class=
                   10266: "diff-old">outline) and mutate it by walking it depth first</del>
                   10267: <ins class="diff-chg">DOM</ins> in <a href="#tree-order">tree order
                   10268: <del class="diff-old">and, for each element of heading content that
                   10269: is not</del></a> , <ins class="diff-chg">trigger</ins> the first
                   10270: <ins class="diff-new">relevant step below for each</ins> element
                   10271: <del class="diff-old">of its parent sectioning content element,
                   10272: inserting a new element of sectioning content ,</del> as
                   10273: <del class="diff-old">follows:</del> <ins class="diff-chg">you
                   10274: enter and exit it.</ins></p>
                   10275: <dl class="switch">
                   10276: <dt>If the <del class="diff-old">element is a header element, or if
                   10277: it is an h1 - h6 node of rank equal to or higher than the first
                   10278: element in the parent element of sectioning content (assuming that
                   10279: is also an h1 - h6 node), or if the first element</del> <ins class=
                   10280: "diff-chg">top</ins> of the <del class="diff-old">parent element of
                   10281: sectioning content</del> <ins class="diff-chg">stack</ins> is an
                   10282: <ins class="diff-new">element, and you are exiting that</ins>
                   10283: element <del class="diff-old">of sectioning content :</del></dt>
                   10284: <dd><del class="diff-old">Insert the new</del>
                   10285: <p class="note"><ins class="diff-chg">The</ins> element <del class=
                   10286: "diff-old">of sectioning</del> <ins class="diff-chg">being exited
                   10287: is a</ins> <a href="#heading0"><ins class="diff-chg">heading</ins>
                   10288: content</a> <del class="diff-old">as the immediately following
                   10289: sibling of the parent</del> <ins class=
                   10290: "diff-chg">element.</ins></p>
                   10291: <p><ins class="diff-chg">Pop that</ins> element <del class=
                   10292: "diff-old">of sectioning content , and move all the elements</del>
                   10293: from the <del class="diff-old">current element</del> <ins class=
                   10294: "diff-chg">stack.</ins></p>
                   10295: </dd>
                   10296: <dt><ins class="diff-chg">If the top</ins> of <ins class=
                   10297: "diff-new">the stack is a</ins> <a href="#heading0">heading
                   10298: content</a> <del class="diff-old">up to the end of the parent</del>
                   10299: element <del class="diff-old">of</del></dt>
                   10300: <dd>
                   10301: <p><ins class="diff-chg">Do nothing.</ins></p>
                   10302: </dd>
                   10303: <dt><ins class="diff-chg">When entering a</ins> <a href=
                   10304: "#sectioning0">sectioning content</a> <del class="diff-old">into
                   10305: the new</del> element <del class="diff-old">of</del> <ins class=
                   10306: "diff-chg">or a</ins> <a href="#sectioning1">sectioning <del class=
                   10307: "diff-old">content . Otherwise:</del> <ins class=
                   10308: "diff-chg">root</ins></a> <ins class="diff-chg">element</ins></dt>
                   10309: <dd><del class="diff-old">Move</del>
                   10310: <p><ins class="diff-chg">If</ins> <var title=""><ins class=
                   10311: "diff-chg">current outlinee</ins></var> <ins class="diff-chg">is
                   10312: not null, push</ins> <var title=""><ins class="diff-chg">current
                   10313: outlinee</ins></var> <ins class="diff-chg">onto</ins> the
                   10314: <ins class="diff-new">stack.</ins></p>
                   10315: <p><ins class="diff-new">Let</ins> <var title="">current
                   10316: <del class="diff-old">heading element, and all subsequent siblings
                   10317: up to but excluding</del> <ins class=
                   10318: "diff-chg">outlinee</ins></var> <ins class="diff-chg">be</ins> the
                   10319: <del class="diff-old">next</del> element <del class="diff-old">of
                   10320: sectioning content , header element, or h1 - h6 of equal or higher
                   10321: rank , whichever comes first, into</del> <ins class="diff-chg">that
                   10322: is being entered.</ins></p>
                   10323: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   10324: "diff-chg">current section</ins></var> <ins class="diff-chg">be a
                   10325: newly created section for</ins> the <var title=""><ins class=
                   10326: "diff-new">current outlinee</ins></var> <ins class=
                   10327: "diff-new">element.</ins></p>
                   10328: <p><ins class="diff-new">Let there be a</ins> new <del class=
                   10329: "diff-old">element of sectioning content , then insert</del>
                   10330: <ins class="diff-chg">outline for</ins> the new <del class=
                   10331: "diff-old">element of sectioning content where</del> <var title=
                   10332: ""><ins class="diff-chg">current outlinee</ins></var> ,<ins class=
                   10333: "diff-chg">initialized with just</ins> the <ins class=
                   10334: "diff-new">new</ins> <var title="">current <del class=
                   10335: "diff-old">header was. The outline is then</del> <ins class=
                   10336: "diff-chg">section</ins></var> <ins class="diff-chg">as</ins> the
                   10337: <del class="diff-old">resulting hypothetical tree. The ranks
                   10338: of</del> <ins class="diff-chg">only section in</ins> the
                   10339: <del class="diff-old">headers become irrelevant at this point: each
                   10340: element of</del> <ins class="diff-chg">outline.</ins></p>
                   10341: </dd>
                   10342: <dt><ins class="diff-chg">When exiting a</ins> <a href=
                   10343: "#sectioning0">sectioning content</a> <del class=
                   10344: "diff-old">in</del> <ins class="diff-chg">element, if</ins> the
                   10345: <del class="diff-old">hypothetical tree contains either no or one
                   10346: heading element child. If there</del> <ins class=
                   10347: "diff-chg">stack</ins> is <del class="diff-old">one, then it gives
                   10348: the section's heading, of there isn't, the section has no
                   10349: heading.</del> <ins class="diff-chg">not empty</ins></dt>
                   10350: <dd>
                   10351: <p><del class="diff-old">Sections are nested as in</del>
                   10352: <ins class="diff-chg">Pop</ins> the <del class=
                   10353: "diff-old">hypothetical tree. If a sectioning</del> <ins class=
                   10354: "diff-chg">top</ins> element <del class="diff-old">is a child of
                   10355: another, that means it is a subsection of</del> <ins class=
                   10356: "diff-chg">from the stack, and let the</ins> <var title=
                   10357: ""><ins class="diff-chg">current outlinee</ins></var> <ins class=
                   10358: "diff-chg">be</ins> that <del class="diff-old">other section.</del>
                   10359: <ins class="diff-chg">element.</ins></p>
                   10360: <p><del class="diff-old">When creating an interactive table of
                   10361: contents, entries should jump the user to</del> <ins class=
                   10362: "diff-chg">Let</ins> <var title=""><ins class="diff-chg">current
                   10363: section</ins></var> <ins class="diff-chg">be</ins> the <del class=
                   10364: "diff-old">relevant</del> <ins class="diff-chg">last</ins> section
                   10365: <del class="diff-old">element, if it was a real element</del> in
                   10366: the <del class="diff-old">original document, or to the heading, if
                   10367: the section element was one</del> <ins class=
                   10368: "diff-chg">outline</ins> of <del class="diff-old">those created
                   10369: during</del> the <del class="diff-old">above process.
                   10370: Selecting</del> <var title=""><ins class="diff-chg">current
                   10371: outlinee</ins></var> <ins class="diff-chg">element.</ins></p>
                   10372: <p><ins class="diff-chg">Append</ins> the <del class=
                   10373: "diff-old">first section</del> <ins class="diff-chg">outline</ins>
                   10374: of the <del class="diff-old">document therefore always takes the
                   10375: user</del> <a href="#sectioning0"><ins class="diff-chg">sectioning
                   10376: content</ins></a> <ins class="diff-chg">element being exited</ins>
                   10377: to the <del class="diff-old">top of the document, regardless of
                   10378: where</del> <var title=""><ins class="diff-chg">current
                   10379: section</ins></var> .<ins class="diff-chg">(This does not change
                   10380: which section is</ins> the <del class="diff-old">first header</del>
                   10381: <ins class="diff-chg">last section</ins> in the <del class=
                   10382: "diff-old">body is to be found.</del> <ins class=
                   10383: "diff-chg">outline.)</ins></p>
                   10384: <del class="diff-old">The hypothetical tree (before mutations)
                   10385: could be generated by creating</del></dd>
                   10386: <dt><ins class="diff-chg">When exiting</ins> a <del class=
                   10387: "diff-old">TreeWalker with the following NodeFilter (described here
                   10388: as an anonymous ECMAScript function). [DOMTR] [ECMA262]</del>
                   10389: <a href="#sectioning1"><ins class="diff-chg">sectioning
                   10390: root</ins></a> <ins class="diff-chg">element, if the stack is not
                   10391: empty</ins></dt>
                   10392: <dd>
                   10393: <p><ins class="diff-chg">Run these steps:</ins></p>
                   10394: <del class="diff-old">function (n) { // This implementation only
                   10395: knows about HTML elements. // An implementation that supports other
                   10396: languages might be // different. // Reject anything that isn't an
                   10397: element. if (n.nodeType != Node.ELEMENT_NODE) return
                   10398: NodeFilter.FILTER_REJECT; // Skip any descendants of headings. if
                   10399: ((n.parentNode &amp;&amp; n.parentNode.namespaceURI ==
                   10400: 'http://www.w3.org/1999/xhtml') &amp;&amp; (n.parentNode.localName
                   10401: == 'h1' || n.parentNode.localName == 'h2' || n.parentNode.localName
                   10402: == 'h3' || n.parentNode.localName == 'h4' || n.parentNode.localName
                   10403: == 'h5' || n.parentNode.localName == 'h6' || n.parentNode.localName
                   10404: == 'header')) return NodeFilter.FILTER_REJECT; // Skip any
                   10405: blockquotes. if ((n.namespaceURI == 'http://www.w3.org/1999/xhtml')
                   10406: &amp;&amp; (n.localName == 'blockquote')) return
                   10407: NodeFilter.FILTER_REJECT; // Accept HTML elements in the list given
                   10408: in the prose above. if ((n.namespaceURI ==
                   10409: 'http://www.w3.org/1999/xhtml') &amp;&amp; (n.localName == 'body'
                   10410: || /*n.localName == 'blockquote' ||*/ n.localName == 'section' ||
                   10411: n.localName == 'nav' || n.localName == 'article' || n.localName ==
                   10412: 'aside' || n.localName == 'h1' || n.localName == 'h2' ||
                   10413: n.localName == 'h3' || n.localName == 'h4' || n.localName == 'h5'
                   10414: || n.localName == 'h6' || n.localName == 'header')) return
                   10415: NodeFilter.FILTER_ACCEPT; // Skip the rest. return
                   10416: NodeFilter.FILTER_SKIP; } 3.8.11.2. Determining which heading and
                   10417: section applies to a particular node This section will be rewritten
                   10418: at some point. The algorithm likely won't change, but its
                   10419: description will be dramatically simplified.</del>
                   10420: <ol>
                   10421: <li>
                   10422: <p><del class="diff-old">Given a particular node, user agents must
                   10423: use</del> <ins class="diff-chg">Pop</ins> the <del class=
                   10424: "diff-old">following algorithm, in</del> <ins class="diff-chg">top
                   10425: element from</ins> the <del class="diff-old">given order , to
                   10426: determine which heading</del> <ins class="diff-chg">stack,</ins>
                   10427: and <del class="diff-old">section the node is most closely
                   10428: associated with. The processing of this algorithm must stop as soon
                   10429: as</del> <ins class="diff-chg">let</ins> the <del class=
                   10430: "diff-old">associated section and heading are established (even if
                   10431: they are established to</del> <var title=""><ins class=
                   10432: "diff-chg">current outlinee</ins></var> be <del class=
                   10433: "diff-old">nothing).</del> <ins class="diff-chg">that
                   10434: element.</ins></p>
                   10435: </li>
                   10436: <li><del class="diff-old">If</del>
                   10437: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   10438: "diff-chg">current section</ins></var> <ins class=
                   10439: "diff-chg">be</ins> the <del class="diff-old">node has an ancestor
                   10440: that is a header element, then</del> <ins class="diff-chg">last
                   10441: section in</ins> the <del class="diff-old">associated heading
                   10442: is</del> <ins class="diff-chg">outline of</ins> the <del class=
                   10443: "diff-old">most distant such ancestor. The associated section is
                   10444: that header 's associated section (i.e. repeat this algorithm for
                   10445: that header ).</del> <var title=""><ins class="diff-chg">current
                   10446: outlinee</ins></var> <ins class="diff-chg">element.</ins></p>
                   10447: </li>
                   10448: <li>
                   10449: <p><i><ins class="diff-new">Loop:</ins></i> If <del class=
                   10450: "diff-old">the node</del> <var title=""><ins class=
                   10451: "diff-chg">current section</ins></var> has <del class="diff-old">an
                   10452: ancestor that is an h1 - h6 element, then the associated heading
                   10453: is</del> <ins class="diff-chg">no child sections, stop these
                   10454: steps.</ins></p>
                   10455: </li>
                   10456: <li>
                   10457: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   10458: "diff-chg">current section</ins></var> <ins class=
                   10459: "diff-chg">be</ins> the <del class="diff-old">most distant such
                   10460: ancestor. The associated</del> <ins class="diff-chg">last
                   10461: child</ins> section <del class="diff-old">is that heading's</del>
                   10462: <ins class="diff-chg">of the current</ins> <var title=
                   10463: ""><ins class="diff-chg">current</ins> section <del class=
                   10464: "diff-old">(i.e. repeat this algorithm for that heading
                   10465: element).</del></var> .</p>
                   10466: </li>
                   10467: <li><del class="diff-old">If</del>
                   10468: <p><ins class="diff-chg">Go back to</ins> the <del class=
                   10469: "diff-old">node is an h1 - h6</del> <ins class="diff-chg">substep
                   10470: labeled</ins> <i><ins class="diff-chg">Loop</ins></i> .</p>
                   10471: </li>
                   10472: </ol>
                   10473: </dd>
                   10474: <dt><ins class="diff-chg">When exiting a</ins> <a href=
                   10475: "#sectioning0"><ins class="diff-chg">sectioning content</ins></a>
                   10476: element or a <del class="diff-old">header</del> <a href=
                   10477: "#sectioning1"><ins class="diff-chg">sectioning root</ins></a>
                   10478: <del class="diff-old">element, then the associated heading is
                   10479: the</del> element <del class="diff-old">itself.</del></dt>
                   10480: <dd>
                   10481: <p class="note">The <del class="diff-old">UA must then
                   10482: generate</del> <var title=""><ins class="diff-chg">current
                   10483: outlinee</ins></var> <ins class="diff-chg">is</ins> the <del class=
                   10484: "diff-old">hypothetical</del> <ins class="diff-chg">element being
                   10485: exited.</ins></p>
                   10486: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   10487: "diff-chg">current</ins> section <del class="diff-old">tree
                   10488: described in the previous section, rooted at</del></var>
                   10489: <ins class="diff-chg">be</ins> the <del class=
                   10490: "diff-old">nearest</del> <ins class="diff-chg">first</ins> section
                   10491: <del class="diff-old">ancestor (or the root element if there is no
                   10492: such ancestor). If</del> <ins class="diff-chg">in</ins> the
                   10493: <del class="diff-old">parent</del> <ins class=
                   10494: "diff-chg">outline</ins> of the <del class="diff-old">heading in
                   10495: that hypothetical tree is an element in</del> <var title=
                   10496: ""><ins class="diff-chg">current outlinee</ins></var> <ins class=
                   10497: "diff-chg">element.</ins></p>
                   10498: <p><ins class="diff-chg">Skip to</ins> the <del class=
                   10499: "diff-old">real document tree, then that element is</del>
                   10500: <ins class="diff-chg">next step in</ins> the <del class=
                   10501: "diff-old">associated section. Otherwise, there</del> <ins class=
                   10502: "diff-chg">overall set of steps. (The walk</ins> is <del class=
                   10503: "diff-old">no associated section element.</del> <ins class=
                   10504: "diff-chg">over.)</ins></p>
                   10505: </dd>
                   10506: <dt>If the <del class="diff-old">node</del> <var title=
                   10507: ""><ins class="diff-chg">current outlinee</ins></var> is
                   10508: <del class="diff-old">an element of sectioning</del> <ins class=
                   10509: "diff-chg">null.</ins></dt>
                   10510: <dd>
                   10511: <p><ins class="diff-chg">Do nothing.</ins></p>
                   10512: </dd>
                   10513: <dt><ins class="diff-chg">When entering a</ins> <a href=
                   10514: "#heading0"><ins class="diff-chg">heading</ins> content <del class=
                   10515: "diff-old">, then</del></a> <ins class=
                   10516: "diff-chg">element</ins></dt>
                   10517: <dd>
                   10518: <p><ins class="diff-chg">If</ins> the <del class=
                   10519: "diff-old">associated</del> <var title=""><ins class=
                   10520: "diff-chg">current</ins> section <del class="diff-old">is itself.
                   10521: The UA must then generate</del></var> <ins class="diff-chg">has no
                   10522: heading, let</ins> the <del class="diff-old">hypothetical section
                   10523: tree described in</del> <ins class="diff-chg">element being entered
                   10524: be</ins> the <del class="diff-old">previous section, rooted
                   10525: at</del> <ins class="diff-chg">heading for</ins> the <var title=
                   10526: ""><ins class="diff-new">current</ins> section <del class=
                   10527: "diff-old">itself. If</del></var> .</p>
                   10528: <p><ins class="diff-chg">Otherwise, if</ins> the <del class=
                   10529: "diff-old">section element, in that hypothetical tree,</del>
                   10530: <ins class="diff-chg">element being entered</ins> has a <del class=
                   10531: "diff-old">child element that is an h1 - h6 element</del>
                   10532: <ins class="diff-chg">rank equal to</ins> or <del class=
                   10533: "diff-old">a header element, then that element is</del> <ins class=
                   10534: "diff-chg">greater than</ins> the <del class="diff-old">associated
                   10535: heading. Otherwise, there is no associated</del> heading
                   10536: <del class="diff-old">element. If</del> <ins class=
                   10537: "diff-chg">of</ins> the <del class="diff-old">node is a footer or
                   10538: address element,</del> <var title=""><ins class="diff-chg">current
                   10539: section</ins></var> , then <del class="diff-old">the
                   10540: associated</del> <ins class="diff-chg">create a new</ins> section
                   10541: <del class="diff-old">is</del> <ins class="diff-chg">and append it
                   10542: to</ins> the <del class="diff-old">nearest ancestor element</del>
                   10543: <ins class="diff-chg">outline</ins> of <del class=
                   10544: "diff-old">sectioning content , if there is one. The node's
                   10545: associated heading is</del> the <del class="diff-old">same as</del>
                   10546: <var title=""><ins class="diff-chg">current outlinee</ins></var>
                   10547: <ins class="diff-chg">element, so</ins> that <del class=
                   10548: "diff-old">element of sectioning content 's associated heading
                   10549: (i.e. repeat</del> this <del class="diff-old">algorithm for that
                   10550: element of sectioning content ). If there</del> <ins class=
                   10551: "diff-chg">new section</ins> is <del class="diff-old">no ancestor
                   10552: element</del> <ins class="diff-chg">the new last section</ins> of
                   10553: <del class="diff-old">sectioning content ,</del> <ins class=
                   10554: "diff-chg">that outline. Let</ins> <var title=""><ins class=
                   10555: "diff-chg">current section</ins></var> <ins class="diff-chg">be
                   10556: that new section. Let</ins> the element <del class="diff-old">has
                   10557: no associated section nor an associated heading. Otherwise,</del>
                   10558: <ins class="diff-chg">being entered be</ins> the <del class=
                   10559: "diff-old">node is just a normal node, and</del> <ins class=
                   10560: "diff-chg">new heading for</ins> the <del class="diff-old">document
                   10561: has to</del> <var title=""><ins class="diff-chg">current
                   10562: section</ins></var> .</p>
                   10563: <p><ins class="diff-chg">Otherwise, run these substeps:</ins></p>
                   10564: <ol>
                   10565: <li>
                   10566: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   10567: "diff-chg">candidate section</ins></var> be <del class=
                   10568: "diff-old">examined more closely to determine its</del> <var title=
                   10569: ""><ins class="diff-chg">current</ins> section <del class=
                   10570: "diff-old">and heading. Create a view rooted at the nearest
                   10571: ancestor element of sectioning content (or</del></var> .</p>
                   10572: </li>
                   10573: <li>
                   10574: <p><ins class="diff-chg">If</ins> the <del class=
                   10575: "diff-old">root</del> element <del class="diff-old">if there is
                   10576: none) that</del> <ins class="diff-chg">being entered</ins> has
                   10577: <del class="diff-old">just h1 - h6 elements, header elements, the
                   10578: node itself, and elements of sectioning content other</del>
                   10579: <ins class="diff-chg">a rank lower</ins> than <del class=
                   10580: "diff-old">blockquote elements. (Descendants of any</del>
                   10581: <ins class="diff-chg">the rank</ins> of the <del class=
                   10582: "diff-old">nodes in this view can be ignored, as can any node later
                   10583: in</del> <ins class="diff-chg">heading of</ins> the <del class=
                   10584: "diff-old">tree than</del> <var title=""><ins class=
                   10585: "diff-chg">candidate section</ins></var> ,<ins class=
                   10586: "diff-chg">then create a new section, and append it to</ins>
                   10587: <var title=""><ins class="diff-chg">candidate section</ins></var>
                   10588: .<ins class="diff-chg">(This does not change which section is</ins>
                   10589: the <del class="diff-old">node</del> <ins class="diff-chg">last
                   10590: section</ins> in <del class="diff-old">question, as</del> the
                   10591: <del class="diff-old">algorithm below merely walks backwards up
                   10592: this view.)</del> <ins class="diff-chg">outline.)</ins> Let
                   10593: <var title=""><del class="diff-old">n</del> <ins class=
                   10594: "diff-chg">current section</ins></var> be <del class="diff-old">an
                   10595: iterator for</del> this <del class="diff-old">view, initialised at
                   10596: the node in question.</del> <ins class="diff-chg">new
                   10597: section.</ins> Let <del class="diff-old">c</del> <ins class=
                   10598: "diff-chg">the element being entered</ins> be the <del class=
                   10599: "diff-old">current best candidate heading, initially null, and
                   10600: initially not used. It is used when top-level</del> <ins class=
                   10601: "diff-chg">new</ins> heading <del class="diff-old">candidates are
                   10602: to be searched</del> for <del class="diff-old">(see below). Repeat
                   10603: these steps (which effectively goes backwards through</del> the
                   10604: <del class="diff-old">node's previous siblings) until an answer is
                   10605: found:</del> <var title=""><ins class="diff-chg">current
                   10606: section</ins></var> .<ins class="diff-chg">Abort these
                   10607: substeps.</ins></p>
                   10608: </li>
                   10609: <li><del class="diff-old">If</del>
                   10610: <p><ins class="diff-chg">Let</ins> <var title=""><del class=
                   10611: "diff-old">n</del> <ins class="diff-chg">candidate
                   10612: section</ins></var> <del class="diff-old">points to a node with
                   10613: no</del> <ins class="diff-chg">be the section that contains
                   10614: the</ins> previous <del class="diff-old">sibling, and</del>
                   10615: <var title=""><del class="diff-old">c</del> <ins class=
                   10616: "diff-chg">candidate section</ins></var> <del class="diff-old">is
                   10617: null, then return</del> <ins class="diff-chg">in</ins> the
                   10618: <del class="diff-old">node's parent node as</del> <ins class=
                   10619: "diff-chg">outline of</ins> <var title=""><ins class=
                   10620: "diff-chg">current outlinee</ins></var> .</p>
                   10621: </li>
                   10622: <li>
                   10623: <p><ins class="diff-chg">Return to step 2.</ins></p>
                   10624: </li>
                   10625: </ol>
                   10626: <p><ins class="diff-chg">Push</ins> the <del class=
                   10627: "diff-old">answer. If</del> <ins class="diff-chg">element being
                   10628: entered onto</ins> the <del class="diff-old">node has no
                   10629: parent</del> <ins class="diff-chg">stack. (This causes the
                   10630: algorithm to skip any descendants of the element.)</ins></p>
                   10631: </dd>
                   10632: <dt><ins class="diff-chg">Otherwise</ins></dt>
                   10633: <dd>
                   10634: <p><ins class="diff-chg">Do nothing.</ins></p>
                   10635: </dd>
                   10636: </dl>
                   10637: <p id="associatedSection"><ins class="diff-chg">In addition,
                   10638: whenever you exit a</ins> node, <del class="diff-old">return null
                   10639: as</del> <ins class="diff-chg">after doing</ins> the <del class=
                   10640: "diff-old">answer. Otherwise,</del> <ins class="diff-chg">steps
                   10641: above,</ins> if <var title=""><del class="diff-old">n</del>
                   10642: <ins class="diff-chg">current section</ins></var> <del class=
                   10643: "diff-old">points to a</del> <ins class="diff-chg">is not null,
                   10644: associate the</ins> node with <del class="diff-old">no previous
                   10645: sibling, return c as</del> the <del class="diff-old">answer.
                   10646: Adjust</del> <ins class="diff-chg">section</ins> <var title=
                   10647: ""><del class="diff-old">n so that it points to the previous
                   10648: sibling of the</del> current <del class="diff-old">position.</del>
                   10649: <ins class="diff-chg">section</ins></var> .</p>
                   10650: </li>
                   10651: <li>
                   10652: <p>If <ins class="diff-new">the</ins> <var title=""><del class=
                   10653: "diff-old">n</del> <ins class="diff-chg">current
                   10654: outlinee</ins></var> is <del class="diff-old">pointing at an
                   10655: h1</del> <ins class="diff-chg">null, then there was no</ins>
                   10656: <a href="#sectioning0"><ins class="diff-chg">sectioning
                   10657: content</ins></a> <ins class="diff-chg">element</ins> or
                   10658: <del class="diff-old">header</del> <a href=
                   10659: "#sectioning1"><ins class="diff-chg">sectioning root</ins></a>
                   10660: <del class="diff-old">element, then return that</del> element
                   10661: <del class="diff-old">as</del> <ins class="diff-chg">in</ins> the
                   10662: <del class="diff-old">answer. If n</del> <ins class="diff-chg">DOM.
                   10663: There</ins> is <del class="diff-old">pointing at an h2 - h6
                   10664: element, and heading candidates are not being searched for, then
                   10665: return</del> <ins class="diff-chg">no outline. Abort these
                   10666: steps.</ins></p>
                   10667: </li>
                   10668: <li>
                   10669: <p><ins class="diff-chg">Associate any nodes</ins> that <del class=
                   10670: "diff-old">element as</del> <ins class="diff-chg">were not
                   10671: associated a section in</ins> the <del class="diff-old">answer.
                   10672: Otherwise, if n is pointing at an h2 - h6 element, and either c is
                   10673: still null, or</del> <ins class="diff-chg">steps above with</ins>
                   10674: <var title=""><del class="diff-old">c</del> <ins class=
                   10675: "diff-chg">current outlinee</ins></var> <del class="diff-old">is
                   10676: a</del> <ins class="diff-chg">as their section.</ins></p>
                   10677: </li>
                   10678: <li>
                   10679: <p><ins class="diff-chg">Associate all nodes with the</ins> heading
                   10680: of <del class="diff-old">lower rank than this one, then set c to be
                   10681: this element, and continue going backwards through</del> the
                   10682: <del class="diff-old">previous siblings.</del> <ins class=
                   10683: "diff-chg">section which which they are associated, if
                   10684: any.</ins></p>
                   10685: </li>
                   10686: <li>
                   10687: <p>If <var title=""><del class="diff-old">n</del> <ins class=
                   10688: "diff-chg">current outlinee</ins></var> is <del class=
                   10689: "diff-old">pointing at an</del> <a href="#the-body1"><ins class=
                   10690: "diff-chg">the</ins> <code><ins class="diff-chg">body</ins></code>
                   10691: element <del class="diff-old">of sectioning content</del></a> ,
                   10692: then <del class="diff-old">from this point on top-level heading
                   10693: candidates are being searched for. (Specifically, we are looking
                   10694: for</del> the <del class="diff-old">nearest top-level header</del>
                   10695: <ins class="diff-chg">outline created</ins> for <ins class=
                   10696: "diff-new">that element is</ins> the <del class="diff-old">current
                   10697: section.) Continue going backwards through</del> <ins class=
                   10698: "diff-chg">outline of</ins> the <del class="diff-old">previous
                   10699: siblings.</del> <ins class="diff-chg">entire document.</ins></p>
                   10700: </li>
                   10701: </ol>
                   10702: <del class="diff-old">If the answer from the previous step (the
                   10703: loop) is null, which can only happen if</del>
                   10704: <p><ins class="diff-chg">The tree of sections created by</ins> the
                   10705: <del class="diff-old">node has no preceeding headings and is not
                   10706: contained in</del> <ins class="diff-chg">algorithm above, or a
                   10707: proper subset thereof, must be used when generating document
                   10708: outlines, for example when generating tables of contents.</ins></p>
                   10709: <p><ins class="diff-chg">When creating</ins> an <del class=
                   10710: "diff-old">element</del> <ins class="diff-chg">interactive
                   10711: table</ins> of <del class="diff-old">sectioning content , then
                   10712: there is no associated heading and no associated section.
                   10713: Otherwise, if</del> <ins class="diff-chg">contents, entries should
                   10714: jump</ins> the <del class="diff-old">answer from</del> <ins class=
                   10715: "diff-chg">user to</ins> the <del class="diff-old">earlier loop
                   10716: step is an element of</del> <ins class="diff-chg">relevant</ins>
                   10717: <a href="#sectioning0">sectioning content <del class="diff-old">,
                   10718: then</del></a> <ins class="diff-chg">element, if</ins> the
                   10719: <del class="diff-old">associated</del> section <del class=
                   10720: "diff-old">is that</del> <ins class="diff-chg">was created for a
                   10721: real</ins> element <del class="diff-old">and</del> <ins class=
                   10722: "diff-chg">in</ins> the <del class="diff-old">associated</del>
                   10723: <ins class="diff-chg">original document, or to the relevant</ins>
                   10724: <a href="#heading0">heading <del class="diff-old">is that element
                   10725: of sectioning</del> content</a> <del class="diff-old">'s associated
                   10726: heading (i.e. repeat this algorithm for that section).
                   10727: Otherwise,</del> <ins class="diff-chg">element,</ins> if the
                   10728: <del class="diff-old">answer from that same earlier step is an h1 -
                   10729: h6 element or</del> <ins class="diff-chg">section in the tree was
                   10730: generated for</ins> a <ins class="diff-new">heading in the above
                   10731: process.</ins></p>
                   10732: <p class="note"><ins class="diff-new">Selecting the first section
                   10733: of the document therefore always takes the user to the top of the
                   10734: document, regardless of where the first header in the</ins>
                   10735: <code><del class="diff-old">header</del> <a href=
                   10736: "#body0"><ins class="diff-chg">body</ins></a></code> <del class=
                   10737: "diff-old">element, then the associated heading</del> is
                   10738: <del class="diff-old">that element and</del> <ins class=
                   10739: "diff-chg">to be found.</ins></p>
                   10740: <div class="note">
                   10741: <p><ins class="diff-chg">The following JavaScript function shows
                   10742: how</ins> the <del class="diff-old">associated section is that
                   10743: heading element's associated section (i.e. repeat this algorithm
                   10744: for that heading). Not all nodes have an associated header or
                   10745: section. For example, if a section</del> <ins class="diff-chg">tree
                   10746: walk could be implemented. The</ins> <var title=""><ins class=
                   10747: "diff-chg">root</ins></var> <ins class="diff-chg">argument</ins> is
                   10748: <del class="diff-old">implied, as when multiple headers are found
                   10749: in one element</del> <ins class="diff-chg">the root</ins> of
                   10750: <del class="diff-old">sectioning content , then a node in that
                   10751: section has an anonymous associated section (its section is not
                   10752: represented by a real element),</del> <ins class="diff-chg">the
                   10753: tree to walk,</ins> and the <del class="diff-old">algorithm above
                   10754: does not associate</del> <var title=""><ins class=
                   10755: "diff-chg">enter</ins></var> <ins class="diff-chg">and</ins>
                   10756: <var title=""><ins class="diff-chg">exit</ins></var> <ins class=
                   10757: "diff-chg">arguments are callbacks</ins> that <del class=
                   10758: "diff-old">node</del> <ins class="diff-chg">are called</ins> with
                   10759: <del class="diff-old">any particular element of sectioning content
                   10760: . For</del> the <del class="diff-old">following fragment:
                   10761: &lt;body&gt; &lt;h1&gt;X&lt;/h1&gt; &lt;h2&gt;X&lt;/h2&gt;
                   10762: &lt;blockquote&gt; &lt;h3&gt;X&lt;/h3&gt; &lt;/blockquote&gt; &lt;p
                   10763: id="a"&gt;X&lt;/p&gt; &lt;h4&gt;Text Node A&lt;/h4&gt;
                   10764: &lt;section&gt; &lt;h5&gt;X&lt;/h5&gt; &lt;/section&gt;
                   10765: &lt;p&gt;Text Node B&lt;/p&gt; &lt;/body&gt; The associations
                   10766: are</del> <ins class="diff-chg">nodes</ins> as <del class=
                   10767: "diff-old">follows (not all associations</del> <ins class=
                   10768: "diff-chg">they</ins> are <del class="diff-old">shown): Node
                   10769: Associated heading Associated section &lt;body&gt; &lt;h1&gt;
                   10770: &lt;body&gt; &lt;h1&gt; &lt;h1&gt; &lt;body&gt; &lt;h2&gt;
                   10771: &lt;h2&gt; None. &lt;blockquote&gt; &lt;h2&gt; None. &lt;h3&gt;
                   10772: &lt;h3&gt; &lt;blockquote&gt; &lt;p id="a"&gt; &lt;h2&gt; None.
                   10773: Text Node A &lt;h4&gt; None. Text Node B &lt;h1&gt;</del>
                   10774: <ins class="diff-chg">entered and exited.</ins> <a href=
                   10775: "#references"><ins class="diff-chg">[ECMA262]</ins></a> <del class=
                   10776: "diff-old">&lt;body&gt;</del></p>
                   10777: <pre>
                   10778: function (root, enter, exit) {
                   10779: <ins class="diff-chg">  var node = root;
                   10780:   start: do while (node) {
                   10781:     enter(node);
                   10782:     if (node.firstChild) {
                   10783:       node = node.firstChild;
                   10784:       continue start;
                   10785:     }
                   10786:     while (node) {
                   10787:       exit(node);
                   10788:       if (node.nextSibling) {
                   10789:         node = node.nextSibling;
                   10790:         continue start;
                   10791:       }
                   10792:       if (node == root)
                   10793:         node = null;
                   10794:       else
                   10795:         node = node.parentNode;
                   10796:     }
                   10797:   }
                   10798: }
                   10799: </ins>
                   10800: </pre></div>
                   10801: <h5 id="distinguishing"><span class="secno"><del class=
                   10802: "diff-old">3.8.11.3.</del> <ins class=
                   10803: "diff-chg">3.8.10.2.</ins></span> Distinguishing site-wide
                   10804: <del class="diff-old">headers</del> <ins class=
                   10805: "diff-chg">headings</ins> from page <del class=
                   10806: "diff-old">headers</del> <ins class="diff-chg">headings</ins></h5>
                   10807: <p>Given the <del class="diff-old">hypothetical section tree
                   10808: ,</del> <a href="#outline"><ins class="diff-chg">outline</ins></a>
                   10809: <ins class="diff-chg">of a document,</ins> but ignoring any
                   10810: sections created for <code><a href="#nav">nav</a></code> and
                   10811: <code><a href="#aside">aside</a></code> elements, and any of their
                   10812: descendants, if the <ins class="diff-new">only</ins> root of the
                   10813: tree is <a href="#the-body1">the <code>body</code> element</a> 's
                   10814: section, and it has only a single subsection which is created by an
                   10815: <code><a href="#article">article</a></code> element, then the
                   10816: <del class="diff-old">header</del> <ins class=
                   10817: "diff-chg">heading</ins> of <a href="#the-body1">the
                   10818: <code>body</code> element</a> should be assumed to be a site-wide
                   10819: <del class="diff-old">header,</del> <ins class=
                   10820: "diff-chg">heading,</ins> and the <del class=
                   10821: "diff-old">header</del> <ins class="diff-chg">heading</ins> of the
                   10822: <code><a href="#article">article</a></code> element should be
                   10823: assumed to be the page's <del class="diff-old">header.</del>
                   10824: <ins class="diff-chg">heading.</ins></p>
                   10825: <p>If a page starts with a heading that is common to the whole
                   10826: site, the document must be authored such that, in the document's
                   10827: <del class="diff-old">hypothetical section tree</del> <a href=
                   10828: "#outline"><ins class="diff-chg">outline</ins></a> , ignoring any
                   10829: sections created for <code><a href="#nav">nav</a></code> and
                   10830: <code><a href="#aside">aside</a></code> elements and any of their
                   10831: descendants, the <del class="diff-old">root of the</del> tree
                   10832: <del class="diff-old">is</del> <ins class="diff-chg">has only one
                   10833: root section,</ins> <a href="#the-body1">the <code>body</code>
                   10834: element</a> 's section, its heading is the site-wide heading,
                   10835: <a href="#the-body1">the <code>body</code> element</a> has just one
                   10836: subsection, that subsection is created by an <code><a href=
                   10837: "#article">article</a></code> element, and that <code><a href=
                   10838: "#article">article</a></code> 's <del class="diff-old">header</del>
                   10839: <ins class="diff-chg">heading</ins> is the page heading.</p>
                   10840: <p>If a page does not contain a site-wide heading, then the page
                   10841: must be authored such that, in the document's <del class=
                   10842: "diff-old">hypothetical section tree</del> <a href=
                   10843: "#outline"><ins class="diff-chg">outline</ins></a> , ignoring any
                   10844: sections created for <code><a href="#nav">nav</a></code> and
                   10845: <code><a href="#aside">aside</a></code> elements and any of their
                   10846: descendants, either <a href="#the-body1">the <code>body</code>
                   10847: element</a> has no subsections, or it has more than one subsection,
                   10848: or it has a single subsection but that subsection is not created by
                   10849: an <code><a href="#article">article</a></code> <del class=
                   10850: "diff-old">element.</del> <ins class="diff-chg">element, or there
                   10851: is more than one section at the root of the outline.</ins></p>
                   10852: <p class="note">Conceptually, a site is thus a document with many
                   10853: articles — when those articles are split into many pages, the
                   10854: heading of the original single page becomes the heading of the
                   10855: site, repeated on every page.</p>
                   10856: <h3 id="grouping"><span class="secno"><del class=
                   10857: "diff-old">3.9.</del> <ins class="diff-chg">3.9</ins></span>
                   10858: <del class="diff-old">Prose</del> <ins class="diff-chg">Grouping
                   10859: content</ins></h3>
                   10860: <h4 id="the-p"><span class="secno"><del class=
                   10861: "diff-old">3.9.1.</del> <ins class="diff-chg">3.9.1</ins></span>
                   10862: The <dfn id="p"><code>p</code></dfn> element</h4>
                   10863: <dl class="element">
                   10864: <dt>Categories</dt>
                   10865: <dd><del class="diff-old">Prose</del> <a href=
                   10866: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   10867: .</dd>
                   10868: <dt>Contexts in which this element may be used:</dt>
                   10869: <dd>Where <del class="diff-old">prose</del> <a href=
                   10870: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   10871: expected.</dd>
                   10872: <dt>Content model:</dt>
                   10873: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   10874: <dt>Element-specific attributes:</dt>
                   10875: <dd>None.</dd>
                   10876: <dt>DOM interface:</dt>
                   10877: <dd><del class="diff-old">No difference from</del> <ins class=
                   10878: "diff-chg">Uses</ins> <code><a href=
                   10879: "#htmlelement">HTMLElement</a></code> .</dd>
                   10880: </dl>
                   10881: <p>The <code><a href="#p">p</a></code> element represents a
                   10882: <a href="#paragraph">paragraph</a> .</p>
                   10883: <div class="example">
                   10884: <p>The following examples are conforming HTML fragments:</p>
                   10885: <pre>
                   10886: &lt;p&gt;The little kitten gently seated himself on a piece of
                   10887: carpet. Later in his life, this would be referred to as the time the
                   10888: cat
                   10889: sat
                   10890: on
                   10891: the
                   10892: mat.&lt;/p&gt;
                   10893: </pre>
                   10894: <pre>
                   10895: &lt;fieldset&gt;
                   10896:  &lt;legend&gt;Personal information&lt;/legend&gt;
                   10897:  &lt;p&gt;
                   10898:    &lt;label&gt;Name: &lt;input name="n"&gt;&lt;/label&gt;
                   10899:    &lt;label&gt;&lt;input name="anon" type="checkbox"&gt; Hide from other users&lt;/label&gt;
                   10900:  &lt;/p&gt;
                   10901:  &lt;p&gt;&lt;label&gt;Address: &lt;textarea name="a"&gt;&lt;/textarea&gt;&lt;/label&gt;&lt;/p&gt;
                   10902: &lt;/fieldset&gt;
                   10903: </pre>
                   10904: <pre>
                   10905: &lt;p&gt;There was once an example from Femley,&lt;br&gt;
                   10906: Whose markup was of dubious quality.&lt;br&gt;
                   10907: The validator complained,&lt;br&gt;
                   10908: So the author was pained,&lt;br&gt;
                   10909: To
                   10910: move
                   10911: the
                   10912: error
                   10913: from
                   10914: the
                   10915: markup
                   10916: to
                   10917: the
                   10918: rhyming.&lt;/p&gt;
                   10919: </pre></div>
                   10920: <p>The <code><a href="#p">p</a></code> element should not be used
                   10921: when a more specific element is more appropriate.</p>
                   10922: <div class="example">
                   10923: <p>The following example is technically correct:</p>
                   10924: <pre>
                   10925: &lt;section&gt;
                   10926:  &lt;!-- ... --&gt;
                   10927:  &lt;p&gt;Last modified: 2001-04-23&lt;/p&gt;
                   10928:  &lt;p&gt;Author: fred@example.com&lt;/p&gt;
                   10929: &lt;/section&gt;
                   10930: </pre>
                   10931: <p>However, it would be better marked-up as:</p>
                   10932: <pre>
                   10933: &lt;section&gt;
                   10934:  &lt;!-- ... --&gt;
                   10935:  &lt;footer&gt;Last modified: 2001-04-23&lt;/footer&gt;
                   10936:  &lt;address&gt;Author: fred@example.com&lt;/address&gt;
                   10937: &lt;/section&gt;
                   10938: </pre>
                   10939: <p>Or:</p>
                   10940: <pre>
                   10941: &lt;section&gt;
                   10942:  &lt;!-- ... --&gt;
                   10943:  &lt;footer&gt;
                   10944:   &lt;p&gt;Last modified: 2001-04-23&lt;/p&gt;
                   10945:   &lt;address&gt;Author: fred@example.com&lt;/address&gt;
                   10946:  &lt;/footer&gt;
                   10947: &lt;/section&gt;
                   10948: </pre></div>
                   10949: <h4 id="the-hr"><span class="secno"><del class=
                   10950: "diff-old">3.9.2.</del> <ins class="diff-chg">3.9.2</ins></span>
                   10951: The <dfn id="hr"><code>hr</code></dfn> element</h4>
                   10952: <dl class="element">
                   10953: <dt>Categories</dt>
                   10954: <dd><del class="diff-old">Prose</del> <a href=
                   10955: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   10956: .</dd>
                   10957: <dt>Contexts in which this element may be used:</dt>
                   10958: <dd>Where <del class="diff-old">prose</del> <a href=
                   10959: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   10960: expected.</dd>
                   10961: <dt>Content model:</dt>
                   10962: <dd>Empty.</dd>
                   10963: <dt>Element-specific attributes:</dt>
                   10964: <dd>None.</dd>
                   10965: <dt>DOM interface:</dt>
                   10966: <dd><del class="diff-old">No difference from</del> <ins class=
                   10967: "diff-chg">Uses</ins> <code><a href=
                   10968: "#htmlelement">HTMLElement</a></code> .</dd>
                   10969: </dl>
                   10970: <p>The <code><a href="#hr">hr</a></code> element represents a
                   10971: <a href="#paragraph">paragraph</a> -level thematic break, e.g. a
                   10972: scene change in a story, or a transition to another topic within a
                   10973: section of a reference book.</p>
                   10974: <h4 id="the-br"><span class="secno"><del class=
                   10975: "diff-old">3.9.3.</del> <ins class="diff-chg">3.9.3</ins></span>
                   10976: The <dfn id="br"><code>br</code></dfn> element</h4>
                   10977: <dl class="element">
                   10978: <dt>Categories</dt>
                   10979: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   10980: <dt>Contexts in which this element may be used:</dt>
                   10981: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   10982: expected.</dd>
                   10983: <dt>Content model:</dt>
                   10984: <dd>Empty.</dd>
                   10985: <dt>Element-specific attributes:</dt>
                   10986: <dd>None.</dd>
                   10987: <dt>DOM interface:</dt>
                   10988: <dd><del class="diff-old">No difference from</del> <ins class=
                   10989: "diff-chg">Uses</ins> <code><a href=
                   10990: "#htmlelement">HTMLElement</a></code> .</dd>
                   10991: </dl>
                   10992: <p>The <code><a href="#br">br</a></code> element represents a line
                   10993: break.</p>
                   10994: <p><code><a href="#br">br</a></code> elements must be empty. Any
                   10995: content inside <code><a href="#br">br</a></code> elements must not
                   10996: be considered part of the surrounding text.</p>
                   10997: <p><code><a href="#br">br</a></code> elements must <del class=
                   10998: "diff-old">only</del> be used <ins class="diff-new">only</ins> for
                   10999: line breaks that are actually part of the content, as in poems or
                   11000: addresses.</p>
                   11001: <div class="example">
                   11002: <p>The following example is correct usage of the <code><a href=
                   11003: "#br">br</a></code> element:</p>
                   11004: <pre>
                   11005: &lt;p&gt;P. Sherman&lt;br&gt;
                   11006: 42 Wallaby Way&lt;br&gt;
                   11007: Sydney&lt;/p&gt;
                   11008: </pre></div>
                   11009: <p><code><a href="#br">br</a></code> elements must not be used for
                   11010: separating thematic groups in a paragraph.</p>
                   11011: <div class="example">
                   11012: <p>The following examples are non-conforming, as they abuse the
                   11013: <code><a href="#br">br</a></code> element:</p>
                   11014: <pre>
                   11015: &lt;p&gt;&lt;a ...&gt;34 comments.&lt;/a&gt;&lt;br&gt;
                   11016: &lt;a
                   11017: ...&gt;Add
                   11018: a
                   11019: comment.&lt;a&gt;&lt;/p&gt;
                   11020: </pre>
                   11021: <pre>
                   11022: &lt;p&gt;Name: &lt;input name="name"&gt;&lt;br&gt;
                   11023: Address:
                   11024: &lt;input
                   11025: name="address"&gt;&lt;/p&gt;
                   11026: </pre>
                   11027: <p>Here are alternatives to the above, which are correct:</p>
                   11028: <pre>
                   11029: &lt;p&gt;&lt;a ...&gt;34 comments.&lt;/a&gt;&lt;/p&gt;
                   11030: &lt;p&gt;&lt;a
                   11031: ...&gt;Add
                   11032: a
                   11033: comment.&lt;a&gt;&lt;/p&gt;
                   11034: </pre>
                   11035: <pre>
                   11036: &lt;p&gt;Name: &lt;input name="name"&gt;&lt;/p&gt;
                   11037: &lt;p&gt;Address:
                   11038: &lt;input
                   11039: name="address"&gt;&lt;/p&gt;
                   11040: </pre></div>
                   11041: <p>If a <a href="#paragraph">paragraph</a> consists of nothing but
                   11042: a single <code><a href="#br">br</a></code> element, it represents a
                   11043: placeholder blank line (e.g. as in a template). Such blank lines
                   11044: must not be used for presentation purposes.</p>
                   11045: <h4 id="the-pre"><span class="secno"><ins class=
                   11046: "diff-new">3.9.4</ins></span> <ins class="diff-new">The</ins>
                   11047: <dfn id="pre"><code><ins class="diff-new">pre</ins></code></dfn>
                   11048: <ins class="diff-new">element</ins></h4>
                   11049: <dl class="element">
                   11050: <dt><ins class="diff-new">Categories</ins></dt>
                   11051: <dd><a href="#flow-content0"><ins class="diff-new">Flow
                   11052: content</ins></a> .</dd>
                   11053: <dt><ins class="diff-new">Contexts in which this element may be
                   11054: used:</ins></dt>
                   11055: <dd><ins class="diff-new">Where</ins> <a href=
                   11056: "#flow-content0"><ins class="diff-new">flow content</ins></a>
                   11057: <ins class="diff-new">is expected.</ins></dd>
                   11058: <dt><ins class="diff-new">Content model:</ins></dt>
                   11059: <dd><a href="#phrasing0"><ins class="diff-new">Phrasing
                   11060: content</ins></a> .</dd>
                   11061: <dt><ins class="diff-new">Element-specific attributes:</ins></dt>
                   11062: <dd><ins class="diff-new">None.</ins></dd>
                   11063: <dt><ins class="diff-new">DOM interface:</ins></dt>
                   11064: <dd><ins class="diff-new">Uses</ins> <code><a href=
                   11065: "#htmlelement"><ins class="diff-new">HTMLElement</ins></a></code>
                   11066: .</dd>
                   11067: </dl>
                   11068: <p><ins class="diff-new">The</ins> <code><a href="#pre"><ins class=
                   11069: "diff-new">pre</ins></a></code> <ins class="diff-new">element
                   11070: represents a block of preformatted text, in which structure is
                   11071: represented by typographic conventions rather than by
                   11072: elements.</ins></p>
                   11073: <p class="note"><strong><ins class="diff-new">In the</ins>
                   11074: <span title=""><ins class="diff-new">HTML
                   11075: serialization</ins></span> ,<ins class="diff-new">a leading newline
                   11076: character immediately following the</ins> <code><a href=
                   11077: "#pre"><ins class="diff-new">pre</ins></a></code> <ins class=
                   11078: "diff-new">element start tag is stripped.</ins></strong></p>
                   11079: <p><ins class="diff-new">Some examples of cases where the</ins>
                   11080: <code><a href="#pre"><ins class="diff-new">pre</ins></a></code>
                   11081: <ins class="diff-new">element could be used:</ins></p>
                   11082: <ul>
                   11083: <li><ins class="diff-new">Including an e-mail, with paragraphs
                   11084: indicated by blank lines, lists indicated by lines prefixed with a
                   11085: bullet, and so on.</ins></li>
                   11086: <li><ins class="diff-new">Including fragments of computer code,
                   11087: with structure indicated according to the conventions of that
                   11088: language.</ins></li>
                   11089: <li><ins class="diff-new">Displaying ASCII art.</ins></li>
                   11090: </ul>
                   11091: <p><ins class="diff-new">To represent a block of computer code,
                   11092: the</ins> <code><a href="#pre"><ins class=
                   11093: "diff-new">pre</ins></a></code> <ins class="diff-new">element can
                   11094: be used with a</ins> <code><a href="#code"><ins class=
                   11095: "diff-new">code</ins></a></code> <ins class="diff-new">element; to
                   11096: represent a block of computer output the</ins> <code><a href=
                   11097: "#pre"><ins class="diff-new">pre</ins></a></code> <ins class=
                   11098: "diff-new">element can be used with a</ins> <code><a href=
                   11099: "#samp"><ins class="diff-new">samp</ins></a></code> <ins class=
                   11100: "diff-new">element. Similarly, the</ins> <code><a href=
                   11101: "#kbd"><ins class="diff-new">kbd</ins></a></code> <ins class=
                   11102: "diff-new">element can be used within a</ins> <code><a href=
                   11103: "#pre"><ins class="diff-new">pre</ins></a></code> <ins class=
                   11104: "diff-new">element to indicate text that the user is to
                   11105: enter.</ins></p>
                   11106: <div class="example">
                   11107: <p><ins class="diff-new">In the following snippet, a sample of
                   11108: computer code is presented.</ins></p>
                   11109: <pre>
                   11110: &lt;p&gt;This is the &lt;code&gt;Panel&lt;/code&gt; constructor:&lt;/p&gt;<ins class="diff-new">
                   11111: &lt;pre&gt;&lt;code&gt;function Panel(element, canClose, closeHandler) {
                   11112:   this.element = element;
                   11113:   this.canClose = canClose;
                   11114:   this.closeHandler = function () { if (closeHandler) closeHandler() };
                   11115: }&lt;/code&gt;
                   11116: &lt;/pre&gt;
                   11117: </ins>
                   11118: </pre></div>
                   11119: <div class="example">
                   11120: <p><ins class="diff-new">In the following snippet,</ins>
                   11121: <code><a href="#samp"><ins class="diff-new">samp</ins></a></code>
                   11122: <ins class="diff-new">and</ins> <code><a href="#kbd"><ins class=
                   11123: "diff-new">kbd</ins></a></code> <ins class="diff-new">elements are
                   11124: mixed in the contents of a</ins> <code><a href="#pre"><ins class=
                   11125: "diff-new">pre</ins></a></code> <ins class="diff-new">element to
                   11126: show a session of Zork I.</ins></p>
                   11127: <pre>
                   11128: &lt;pre&gt;&lt;samp&gt;You are in an open field west of a big white house with a boarded<ins class="diff-new">
                   11129: front door.
                   11130: There is a small mailbox here.
                   11131: &gt;&lt;/samp&gt; &lt;kbd&gt;open mailbox&lt;/kbd&gt;
                   11132: &lt;samp&gt;Opening the mailbox reveals:
                   11133: A leaflet.
                   11134: &gt;
                   11135: &lt;/samp&gt;
                   11136: &lt;/pre&gt;
                   11137: </ins>
                   11138: </pre></div>
                   11139: <div class="example">
                   11140: <p><ins class="diff-new">The following shows a contemporary poem
                   11141: that uses the</ins> <code><a href="#pre"><ins class=
                   11142: "diff-new">pre</ins></a></code> <ins class="diff-new">element to
                   11143: preserve its unusual formatting, which forms an intrinsic part of
                   11144: the poem itself.</ins></p>
                   11145: <pre>
                   11146: &lt;pre&gt;                maxling<ins class="diff-new">
                   11147: it is with a          heart
                   11148:                heavy
                   11149: that i admit loss of a feline
                   11150:         so           loved
                   11151: a friend lost to the
                   11152:         unknown
                   11153:                                 (night)
                   11154: ~cdr
                   11155: 11dec07&lt;/pre&gt;
                   11156: </ins>
                   11157: </pre></div>
                   11158: <h4 id="the-dialog"><span class="secno"><del class=
                   11159: "diff-old">3.9.4.</del> <ins class="diff-chg">3.9.5</ins></span>
                   11160: The <dfn id="dialog"><code>dialog</code></dfn> element</h4>
                   11161: <dl class="element">
                   11162: <dt>Categories</dt>
                   11163: <dd><del class="diff-old">Prose</del> <a href=
                   11164: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   11165: .</dd>
                   11166: <dt>Contexts in which this element may be used:</dt>
                   11167: <dd>Where <del class="diff-old">prose</del> <a href=
                   11168: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   11169: expected.</dd>
                   11170: <dt>Content model:</dt>
                   11171: <dd>Zero or more pairs of <ins class="diff-new">one</ins>
                   11172: <code><a href="#dt">dt</a></code> <del class="diff-old">and</del>
                   11173: <ins class="diff-chg">element followed by one</ins> <code><a href=
                   11174: "#dd">dd</a></code> <del class="diff-old">elements.</del>
                   11175: <ins class="diff-chg">element.</ins></dd>
                   11176: <dt>Element-specific attributes:</dt>
                   11177: <dd>None.</dd>
                   11178: <dt>DOM interface:</dt>
                   11179: <dd><del class="diff-old">No difference from</del> <ins class=
                   11180: "diff-chg">Uses</ins> <code><a href=
                   11181: "#htmlelement">HTMLElement</a></code> .</dd>
                   11182: </dl>
                   11183: <p>The <code><a href="#dialog">dialog</a></code> element represents
                   11184: a conversation.</p>
                   11185: <p>Each part of the conversation must have an explicit talker (or
                   11186: speaker) given by a <code><a href="#dt">dt</a></code> element, and
                   11187: a discourse (or quote) given by a <code><a href="#dd">dd</a></code>
                   11188: element.</p>
                   11189: <div class="example">
                   11190: <p>This example demonstrates this using an extract from Abbot and
                   11191: Costello's famous sketch, <cite>Who's on first</cite> :</p>
                   11192: <pre>
                   11193: &lt;dialog&gt;
                   11194:  &lt;dt&gt; Costello
                   11195:  &lt;dd&gt; Look, you gotta first baseman?
                   11196:  &lt;dt&gt; Abbott
                   11197:  &lt;dd&gt; Certainly.
                   11198:  &lt;dt&gt; Costello
                   11199:  &lt;dd&gt; Who's playing first?
                   11200:  &lt;dt&gt; Abbott
                   11201:  &lt;dd&gt; That's right.
                   11202:  &lt;dt&gt; Costello
                   11203:  &lt;dd&gt; When you pay off the first baseman every month, who gets the money?
                   11204:  &lt;dt&gt; Abbott
                   11205:  &lt;dd&gt; Every dollar of it. 
                   11206: &lt;/dialog&gt;
                   11207: </pre></div>
                   11208: <p class="note">Text in a <code><a href="#dt">dt</a></code> element
                   11209: in a <code><a href="#dialog">dialog</a></code> element is
                   11210: implicitly the source of the text given in the following
                   11211: <code><a href="#dd">dd</a></code> element, and the contents of the
                   11212: <code><a href="#dd">dd</a></code> element are implicitly a quote
                   11213: from that speaker. There is thus no need to include <code><a href=
                   11214: "#cite2">cite</a></code> , <code><a href="#q">q</a></code> , or
                   11215: <code><a href="#blockquote">blockquote</a></code> elements in this
                   11216: markup. Indeed, a <code><a href="#q">q</a></code> element inside a
                   11217: <code><a href="#dd">dd</a></code> element in a conversation would
                   11218: actually imply the people talking were themselves quoting
                   11219: <del class="diff-old">someone else.</del> <ins class=
                   11220: "diff-chg">another work.</ins> See the <code><a href=
                   11221: "#cite2">cite</a></code> , <code><a href="#q">q</a></code> , and
                   11222: <code><a href="#blockquote">blockquote</a></code> elements for
                   11223: other ways to cite or quote. <del class="diff-old">3.10.
                   11224: Preformatted text</del></p>
                   11225: <h4 id="the-blockquote"><span class="secno"><del class=
                   11226: "diff-old">3.10.1.</del> <ins class="diff-chg">3.9.6</ins></span>
                   11227: The <dfn id="blockquote"><code><del class="diff-old">pre</del>
                   11228: <ins class="diff-chg">blockquote</ins></code></dfn> element</h4>
                   11229: <dl class="element">
                   11230: <dt>Categories</dt>
                   11231: <dd><del class="diff-old">Prose</del> <a href=
                   11232: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   11233: .</dd>
                   11234: <dd><a href="#sectioning1"><ins class="diff-new">Sectioning
                   11235: root</ins></a> .</dd>
                   11236: <dt>Contexts in which this element may be used:</dt>
                   11237: <dd>Where <del class="diff-old">prose</del> <a href=
                   11238: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   11239: expected.</dd>
                   11240: <dt>Content model:</dt>
                   11241: <dd><del class="diff-old">Phrasing</del> <a href=
                   11242: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   11243: .</dd>
                   11244: <dt>Element-specific attributes:</dt>
                   11245: <dd><del class="diff-old">None.</del> <code title=
                   11246: "attr-blockquote-cite"><a href="#cite"><ins class=
                   11247: "diff-chg">cite</ins></a></code></dd>
                   11248: <dt>DOM interface:</dt>
                   11249: <dd><del class="diff-old">No difference from</del>
                   11250: <pre>
                   11251: <ins class="diff-chg">     class=idl&gt;interface <dfn id=
                   11252: "htmlquoteelement">HTMLQuoteElement</dfn> : <a href=
                   11253: "#htmlelement">HTMLElement</a> {
                   11254:            attribute DOMString <a href="#cite0" title=
                   11255: "dom-quote-cite">cite</a>;
                   11256: };
                   11257: </ins>
                   11258: </pre>
                   11259: <p class="note"><ins class="diff-chg">The</ins> <code><del class=
                   11260: "diff-old">HTMLElement</del> <a href=
                   11261: "#htmlquoteelement"><ins class="diff-chg">HTMLQuoteElement</ins></a>
                   11262: <del class="diff-old">.</del></code> <ins class=
                   11263: "diff-chg">interface is also used by the</ins> <code><a href=
                   11264: "#q"><ins class="diff-chg">q</ins></a></code> <ins class=
                   11265: "diff-chg">element.</ins></p>
                   11266: </dd>
                   11267: </dl>
                   11268: <p>The <code><del class="diff-old">pre</del> <a href=
                   11269: "#blockquote"><ins class="diff-chg">blockquote</ins></a></code>
                   11270: element represents a <del class="diff-old">block of preformatted
                   11271: text, in which structure</del> <ins class="diff-chg">section
                   11272: that</ins> is <del class="diff-old">represented by typographic
                   11273: conventions rather than by elements.</del> <ins class=
                   11274: "diff-chg">quoted from another source.</ins></p>
                   11275: <p><del class="diff-old">Some examples of cases where the</del>
                   11276: <ins class="diff-chg">Content inside a</ins> <code><del class=
                   11277: "diff-old">pre</del> <a href="#blockquote"><ins class=
                   11278: "diff-chg">blockquote</ins></a></code> <del class=
                   11279: "diff-old">element could</del> <ins class="diff-chg">must</ins> be
                   11280: <del class="diff-old">used: Including an e-mail, with paragraphs
                   11281: indicated by blank lines, lists indicated by lines prefixed with a
                   11282: bullet, and so on. Including fragments of computer code, with
                   11283: structure indicated according to</del> <ins class="diff-chg">quoted
                   11284: from another source, whose URI, if it has one, should be cited
                   11285: in</ins> the <del class="diff-old">conventions of that language.
                   11286: Displaying ASCII art.</del> <dfn id="cite" title=
                   11287: "attr-blockquote-cite"><code><ins class=
                   11288: "diff-chg">cite</ins></code></dfn> <ins class=
                   11289: "diff-chg">attribute.</ins></p>
                   11290: <p><del class="diff-old">To represent a block of computer
                   11291: code,</del> <ins class="diff-chg">If</ins> the <code title=
                   11292: "attr-blockquote-cite"><del class="diff-old">pre</del> <a href=
                   11293: "#cite"><ins class="diff-chg">cite</ins></a></code> <del class=
                   11294: "diff-old">element can</del> <ins class="diff-chg">attribute is
                   11295: present, it must</ins> be <del class="diff-old">used with</del> a
                   11296: <del class="diff-old">code element;</del> <ins class="diff-chg">URI
                   11297: (or IRI). User agents should allow users</ins> to <del class=
                   11298: "diff-old">represent</del> <ins class="diff-chg">follow such
                   11299: citation links.</ins></p>
                   11300: <p><ins class="diff-chg">If</ins> a <del class="diff-old">block of
                   11301: computer output the</del> <code><del class="diff-old">pre</del>
                   11302: <a href="#blockquote"><ins class=
                   11303: "diff-chg">blockquote</ins></a></code> element <del class=
                   11304: "diff-old">can be used with</del> <ins class="diff-chg">is</ins>
                   11305: <a href="#preceded"><ins class="diff-chg">preceded or
                   11306: followed</ins></a> <ins class="diff-chg">by a single</ins> <a href=
                   11307: "#paragraph"><ins class="diff-chg">paragraph</ins></a> <ins class=
                   11308: "diff-chg">that contains</ins> a <ins class="diff-new">single</ins>
                   11309: <code><del class="diff-old">samp</del> <a href="#cite2"><ins class=
                   11310: "diff-chg">cite</ins></a></code> <del class="diff-old">element.
                   11311: Similarly, the</del> <ins class="diff-chg">element and that is
                   11312: itself not</ins> <a href="#preceded"><ins class="diff-chg">preceded
                   11313: or followed</ins></a> <ins class="diff-chg">by another</ins>
                   11314: <code><del class="diff-old">kbd</del> <a href=
                   11315: "#blockquote"><ins class="diff-chg">blockquote</ins></a></code>
                   11316: element <del class="diff-old">can be used within</del> <ins class=
                   11317: "diff-chg">and does not itself have</ins> a <code><del class=
                   11318: "diff-old">pre</del> <a href="#q"><ins class=
                   11319: "diff-chg">q</ins></a></code> element <del class="diff-old">to
                   11320: indicate text that the user is to enter. In</del> <ins class=
                   11321: "diff-chg">descendant, then,</ins> the <del class=
                   11322: "diff-old">following snippet, a sample</del> <ins class=
                   11323: "diff-chg">title</ins> of <del class="diff-old">computer code is
                   11324: presented. &lt;pre&gt;&lt;code&gt;function Panel(element, canClose,
                   11325: closeHandler) { this.element = element; this.canClose = canClose;
                   11326: this.closeHandler = function () { if (closeHandler) closeHandler()
                   11327: }; }&lt;/code&gt; &lt;/pre&gt; In</del> the <del class=
                   11328: "diff-old">following snippet, samp and</del> <ins class=
                   11329: "diff-chg">work given by that</ins> <code><del class=
                   11330: "diff-old">kbd</del> <a href="#cite2"><ins class=
                   11331: "diff-chg">cite</ins></a></code> <del class="diff-old">elements are
                   11332: mixed in</del> <ins class="diff-chg">element gives</ins> the
                   11333: <del class="diff-old">contents</del> <ins class=
                   11334: "diff-chg">source</ins> of <del class="diff-old">a</del>
                   11335: <ins class="diff-chg">the quotation contained in the</ins>
                   11336: <code><del class="diff-old">pre</del> <a href=
                   11337: "#blockquote"><ins class="diff-chg">blockquote</ins></a></code>
                   11338: <del class="diff-old">element to show a session of Zork I. You are
                   11339: in an open field west of a big white house with a boarded front
                   11340: door. There is a small mailbox here. &gt;&lt;/samp&gt;
                   11341: &lt;kbd&gt;open mailbox&lt;/kbd&gt; &lt;samp&gt;Opening the mailbox
                   11342: reveals: A leaflet. &gt; &lt;/samp&gt; &lt;/pre&gt;</del>
                   11343: <ins class="diff-chg">element.</ins></p>
                   11344: <p>The <del class="diff-old">following shows a contemporary poem
                   11345: that uses the</del> <dfn id="cite0" title=
                   11346: "dom-quote-cite"><code><ins class="diff-new">cite</ins></code>
                   11347: <del class="diff-old">pre</del></dfn> <ins class="diff-chg">DOM
                   11348: attribute must</ins> <a href="#reflect"><ins class=
                   11349: "diff-chg">reflect</ins></a> <ins class="diff-chg">the
                   11350: element's</ins> <code title=""><ins class=
                   11351: "diff-chg">cite</ins></code> <del class="diff-old">element</del>
                   11352: <ins class="diff-chg">content attribute.</ins></p>
                   11353: <p class="note"><ins class="diff-chg">The best way</ins> to
                   11354: <del class="diff-old">preserve its unusual formatting, which forms
                   11355: an intrinsic part of</del> <ins class="diff-chg">represent a
                   11356: conversation is not with</ins> the <del class="diff-old">poem
                   11357: itself. maxling</del> <code><del class="diff-old">it is with a
                   11358: heart heavy</del> <a href="#cite2"><ins class=
                   11359: "diff-chg">cite</ins></a> <del class="diff-old">that i admit loss
                   11360: of a feline so loved</del></code> <ins class="diff-chg">and</ins>
                   11361: <code><del class="diff-old">a friend lost to the unknown
                   11362: (night)</del> <a href="#blockquote"><ins class=
                   11363: "diff-chg">blockquote</ins></a> <del class="diff-old">~cdr
                   11364: 11dec07&lt;/pre&gt;</del></code> <ins class="diff-chg">elements,
                   11365: but with the</ins> <code><a href="#dialog"><ins class=
                   11366: "diff-chg">dialog</ins></a> <del class="diff-old">3.11.
                   11367: Lists</del></code> <ins class="diff-chg">element.</ins></p>
                   11368: <h4 id="the-ol"><span class="secno"><del class=
                   11369: "diff-old">3.11.1.</del> <ins class="diff-chg">3.9.7</ins></span>
                   11370: The <dfn id="ol"><code>ol</code></dfn> element</h4>
                   11371: <dl class="element">
                   11372: <dt>Categories</dt>
                   11373: <dd><del class="diff-old">Prose</del> <a href=
                   11374: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   11375: .</dd>
                   11376: <dt>Contexts in which this element may be used:</dt>
                   11377: <dd>Where <del class="diff-old">prose</del> <a href=
                   11378: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   11379: expected.</dd>
                   11380: <dt>Content model:</dt>
                   11381: <dd>Zero or more <code><a href="#li">li</a></code> elements.</dd>
                   11382: <dt>Element-specific attributes:</dt>
                   11383: <dd><code title="attr-ol-reversed"><a href="#reversed"><ins class=
                   11384: "diff-new">reversed</ins></a></code></dd>
                   11385: <dd><code title="attr-ol-start"><a href=
                   11386: "#start0">start</a></code></dd>
                   11387: <dt>DOM interface:</dt>
                   11388: <dd>
                   11389: <pre class="idl">
                   11390: interface <dfn id=
                   11391: "htmlolistelement">HTMLOListElement</dfn> : <a href=
                   11392: "#htmlelement">HTMLElement</a> {
                   11393: <ins class="diff-new">           attribute boolean <a href=
                   11394: "#reversed0" title="dom-ol-reversed">reversed</a>;
                   11395: </ins>
                   11396:            attribute long <a href="#start1" title=
                   11397: "dom-ol-start">start</a>;
                   11398: };
                   11399: </pre></dd>
                   11400: </dl>
                   11401: <p>The <code><a href="#ol">ol</a></code> element represents
                   11402: <del class="diff-old">an ordered</del> <ins class=
1.2     ! mike     11403: "diff-chg">a</ins> list of <ins class="diff-new">items, where
        !          11404: the</ins> items <del class="diff-old">(which</del> <ins class=
        !          11405: "diff-chg">have been intentionally ordered, such that changing the
        !          11406: order would change the meaning of the document.</ins></p>
        !          11407: <p><ins class="diff-chg">The items of the list</ins> are
1.1       mike     11408: <del class="diff-old">represented by</del> <ins class=
                   11409: "diff-chg">the</ins> <code><a href="#li">li</a></code> <del class=
                   11410: "diff-old">elements).</del> <ins class="diff-chg">element child
                   11411: nodes of the</ins> <code><a href="#ol"><ins class=
                   11412: "diff-chg">ol</ins></a></code> <ins class="diff-chg">element,
                   11413: in</ins> <a href="#tree-order"><ins class="diff-chg">tree
                   11414: order</ins></a> .</p>
                   11415: <p><ins class="diff-chg">The</ins> <dfn id="reversed" title=
                   11416: "attr-ol-reversed"><code><ins class=
                   11417: "diff-chg">reversed</ins></code></dfn> <ins class=
                   11418: "diff-chg">attribute is a</ins> <a href="#boolean0"><ins class=
                   11419: "diff-chg">boolean attribute</ins></a> .<ins class="diff-chg">If
                   11420: present, it indicates that the list is a descending list (..., 3,
                   11421: 2, 1). If the attribute is omitted, the list is an ascending list
                   11422: (1, 2, 3, ...).</ins></p>
                   11423: <p>The <dfn id="start0" title=
                   11424: "attr-ol-start"><code>start</code></dfn> attribute, if present,
                   11425: must be a <a href="#valid0">valid integer</a> giving the ordinal
                   11426: value of the first list item.</p>
                   11427: <p>If the <code title="attr-ol-start"><a href=
                   11428: "#start0">start</a></code> attribute is present, user agents must
                   11429: <a href="#rules0" title="rules for parsing integers">parse it as an
                   11430: integer</a> , in order to determine the attribute's value. The
                   11431: default value, used if the attribute is missing or if the value
                   11432: cannot be converted to a number according to the referenced
                   11433: algorithm, is <del class="diff-old">1. The items of the list
                   11434: are</del> <ins class="diff-chg">1 if</ins> the <ins class=
                   11435: "diff-chg">element has no</ins> <code title=
                   11436: "attr-ol-reversed"><del class="diff-old">li</del> <a href=
                   11437: "#reversed"><ins class="diff-chg">reversed</ins></a></code>
                   11438: <del class="diff-old">element child nodes of</del> <ins class=
                   11439: "diff-chg">attribute, and is</ins> the <ins class="diff-new">number
                   11440: of child</ins> <code><del class="diff-old">ol</del> <a href=
                   11441: "#li"><ins class="diff-chg">li</ins></a></code> <del class=
                   11442: "diff-old">element, in tree order .</del> <ins class=
                   11443: "diff-chg">elements otherwise.</ins></p>
                   11444: <p>The first item in the list has the ordinal value given by the
                   11445: <code><a href="#ol">ol</a></code> element's <code title=
                   11446: "attr-ol-start"><a href="#start0">start</a></code> attribute,
                   11447: unless that <code><a href="#li">li</a></code> element has a
                   11448: <code title="attr-li-value"><a href="#value">value</a></code>
                   11449: attribute with a value that can be successfully parsed, in which
                   11450: case it has the ordinal value given by that <code title=
                   11451: "attr-li-value"><a href="#value">value</a></code> attribute.</p>
                   11452: <p>Each subsequent item in the list has the ordinal value given by
                   11453: its <code title="attr-li-value"><a href="#value">value</a></code>
                   11454: attribute, if it has one, or, if it doesn't, the ordinal value of
                   11455: the previous item, plus <del class="diff-old">one.</del>
                   11456: <ins class="diff-chg">one if the</ins> <code title=
                   11457: "attr-ol-reversed"><a href="#reversed"><ins class=
                   11458: "diff-chg">reversed</ins></a></code> <ins class="diff-chg">is
                   11459: absent, or minus one if it is present.</ins></p>
                   11460: <p><ins class="diff-chg">The</ins> <dfn id="reversed0" title=
                   11461: "dom-ol-reversed"><code><ins class=
                   11462: "diff-chg">reversed</ins></code></dfn> <ins class="diff-chg">DOM
                   11463: attribute must</ins> <a href="#reflect"><ins class=
                   11464: "diff-chg">reflect</ins></a> <ins class="diff-chg">the value of
                   11465: the</ins> <code title="attr-ol-reversed"><a href=
                   11466: "#reversed"><ins class="diff-chg">reversed</ins></a></code>
                   11467: <ins class="diff-chg">content attribute.</ins></p>
                   11468: <p>The <dfn id="start1" title=
                   11469: "dom-ol-start"><code>start</code></dfn> DOM attribute must <a href=
                   11470: "#reflect">reflect</a> the value of the <code title=
                   11471: "attr-ol-start"><a href="#start0">start</a></code> content
                   11472: attribute.</p>
                   11473: <div class="example">
                   11474: <p><ins class="diff-new">The following markup shows a list where
                   11475: the order matters, and where the</ins> <code><a href=
                   11476: "#ol"><ins class="diff-new">ol</ins></a></code> <ins class=
                   11477: "diff-new">element is therefore appropriate. Compare this list to
                   11478: the equivalent list in the</ins> <code><a href="#ul"><ins class=
                   11479: "diff-new">ul</ins></a></code> <ins class="diff-new">section to see
                   11480: an example of the same items using the</ins> <code><a href=
                   11481: "#ul"><ins class="diff-new">ul</ins></a></code> <ins class=
                   11482: "diff-new">element.</ins></p>
                   11483: <pre>
                   11484: &lt;p&gt;I have lived in the following countries (given in the order of when<ins class="diff-new">
                   11485: I first lived there):&lt;/p&gt;
                   11486: &lt;ol&gt;
                   11487:  &lt;li&gt;Switzerland
                   11488:  &lt;li&gt;United Kingdom
                   11489:  &lt;li&gt;United States
                   11490:  &lt;li&gt;Norway
                   11491: &lt;/ol&gt;
                   11492: </ins>
                   11493: </pre>
                   11494: <p><ins class="diff-new">Note how changing the order of the list
                   11495: changes the meaning of the document. In the following example,
                   11496: changing the relative order of the first two items has changed the
                   11497: birthplace of the author:</ins></p>
                   11498: <pre>
                   11499: &lt;p&gt;I have lived in the following countries (given in the order of when<ins class="diff-new">
                   11500: I first lived there):&lt;/p&gt;
                   11501: &lt;ol&gt;
                   11502:  &lt;li&gt;United Kingdom
                   11503:  &lt;li&gt;Switzerland
                   11504:  &lt;li&gt;United States
                   11505:  &lt;li&gt;Norway
                   11506: &lt;/ol&gt;
                   11507: </ins>
                   11508: </pre></div>
                   11509: <h4 id="the-ul"><span class="secno"><del class=
                   11510: "diff-old">3.11.2.</del> <ins class="diff-chg">3.9.8</ins></span>
                   11511: The <dfn id="ul"><code>ul</code></dfn> element</h4>
                   11512: <dl class="element">
                   11513: <dt>Categories</dt>
                   11514: <dd><del class="diff-old">Prose</del> <a href=
                   11515: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   11516: .</dd>
                   11517: <dt>Contexts in which this element may be used:</dt>
                   11518: <dd>Where <del class="diff-old">prose</del> <a href=
                   11519: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   11520: expected.</dd>
                   11521: <dt>Content model:</dt>
                   11522: <dd>Zero or more <code><a href="#li">li</a></code> elements.</dd>
                   11523: <dt>Element-specific attributes:</dt>
                   11524: <dd>None.</dd>
                   11525: <dt>DOM interface:</dt>
                   11526: <dd><del class="diff-old">No difference from</del> <ins class=
                   11527: "diff-chg">Uses</ins> <code><a href=
                   11528: "#htmlelement">HTMLElement</a></code> .</dd>
                   11529: </dl>
                   11530: <p>The <code><a href="#ul">ul</a></code> element represents
                   11531: <del class="diff-old">an unordered</del> <ins class=
                   11532: "diff-chg">a</ins> list of <ins class="diff-new">items, where the
                   11533: order of the</ins> items <del class="diff-old">(which are
                   11534: represented by li elements).</del> <ins class="diff-chg">is not
                   11535: important — that is, where changing the order would not materially
                   11536: change the meaning of the document.</ins></p>
                   11537: <p>The items of the list are the <code><a href="#li">li</a></code>
                   11538: element child nodes of the <code><a href="#ul">ul</a></code>
                   11539: element.</p>
                   11540: <div class="example">
                   11541: <p><ins class="diff-new">The following markup shows a list where
                   11542: the order does not matter, and where the</ins> <code><a href=
                   11543: "#ul"><ins class="diff-new">ul</ins></a></code> <ins class=
                   11544: "diff-new">element is therefore appropriate. Compare this list to
                   11545: the equivalent list in the</ins> <code><a href="#ol"><ins class=
                   11546: "diff-new">ol</ins></a></code> <ins class="diff-new">section to see
                   11547: an example of the same items using the</ins> <code><a href=
                   11548: "#ol"><ins class="diff-new">ol</ins></a></code> <ins class=
                   11549: "diff-new">element.</ins></p>
                   11550: <pre>
                   11551: &lt;p&gt;I have lived in the following countries:&lt;/p&gt;<ins class="diff-new">
                   11552: &lt;ul&gt;
                   11553:  &lt;li&gt;Norway
                   11554:  &lt;li&gt;Switzerland
                   11555:  &lt;li&gt;United Kingdom
                   11556:  &lt;li&gt;United States
                   11557: &lt;/ul&gt;
                   11558: </ins>
                   11559: </pre>
                   11560: <p><ins class="diff-new">Note that changing the order of the list
                   11561: does not change the meaning of the document. The items in the
                   11562: snippet above are given in alphabetical order, but in the snippet
                   11563: below they are given in order of the size of their current account
                   11564: balance in 2007, without changing the meaning of the document
                   11565: whatsoever:</ins></p>
                   11566: <pre>
                   11567: &lt;p&gt;I have lived in the following countries:&lt;/p&gt;<ins class="diff-new">
                   11568: &lt;ul&gt;
                   11569:  &lt;li&gt;Switzerland
                   11570:  &lt;li&gt;Norway
                   11571:  &lt;li&gt;United Kingdom
                   11572:  &lt;li&gt;United States
                   11573: &lt;/ul&gt;
                   11574: </ins>
                   11575: </pre></div>
                   11576: <h4 id="the-li"><span class="secno"><del class=
                   11577: "diff-old">3.11.3.</del> <ins class="diff-chg">3.9.9</ins></span>
                   11578: The <dfn id="li"><code>li</code></dfn> element</h4>
                   11579: <dl class="element">
                   11580: <dt>Categories</dt>
                   11581: <dd>None.</dd>
                   11582: <dt>Contexts in which this element may be used:</dt>
                   11583: <dd>Inside <code><a href="#ol">ol</a></code> elements.</dd>
                   11584: <dd>Inside <code><a href="#ul">ul</a></code> elements.</dd>
                   11585: <dd>Inside <code><a href="#menu">menu</a></code> elements.</dd>
                   11586: <dt>Content model:</dt>
                   11587: <dd>When the element is a child of a <code><a href=
                   11588: "#menu">menu</a></code> element: <a href="#phrasing0">phrasing
                   11589: content</a> .</dd>
                   11590: <dd>Otherwise: <del class="diff-old">prose</del> <a href=
                   11591: "#flow-content0"><ins class="diff-chg">flow</ins> content</a>
                   11592: .</dd>
                   11593: <dt>Element-specific attributes:</dt>
                   11594: <dd>If the element is a child of an <code><a href=
                   11595: "#ol">ol</a></code> element: <code title="attr-li-value"><a href=
                   11596: "#value">value</a></code></dd>
                   11597: <dd>If the element is not the child of an <code><a href=
                   11598: "#ol">ol</a></code> element: None.</dd>
                   11599: <dt>DOM interface:</dt>
                   11600: <dd>
                   11601: <pre class="idl">
                   11602: interface <dfn id="htmllielement">HTMLLIElement</dfn> : <a href=
                   11603: "#htmlelement">HTMLElement</a> {
                   11604:            attribute long <a href="#value0" title=
                   11605: "dom-li-value">value</a>;
                   11606: };
                   11607: </pre></dd>
                   11608: </dl>
                   11609: <p>The <code><a href="#li">li</a></code> element represents a list
                   11610: item. If its parent element is an <code><a href="#ol">ol</a></code>
                   11611: , <code><a href="#ul">ul</a></code> , or <code><a href=
                   11612: "#menu">menu</a></code> element, then the element is an item of the
                   11613: parent element's list, as defined for those elements. Otherwise,
                   11614: the list item has no defined list-related relationship to any other
                   11615: <code><a href="#li">li</a></code> element.</p>
                   11616: <p>The <dfn id="value" title=
                   11617: "attr-li-value"><code>value</code></dfn> attribute, if present,
                   11618: must be a <a href="#valid0">valid integer</a> giving the ordinal
                   11619: value of the <del class="diff-old">first</del> list item.</p>
                   11620: <p>If the <code title="attr-li-value"><a href=
                   11621: "#value">value</a></code> attribute is present, user agents must
                   11622: <a href="#rules0" title="rules for parsing integers">parse it as an
                   11623: integer</a> , in order to determine the attribute's value. If the
                   11624: attribute's value cannot be converted to a number, the attribute
                   11625: must be treated as if it was absent. The attribute has no default
                   11626: value.</p>
                   11627: <p>The <code title="attr-li-value"><a href=
                   11628: "#value">value</a></code> attribute is processed relative to the
                   11629: element's parent <code><a href="#ol">ol</a></code> element (q.v.),
                   11630: if there is one. If there is not, the attribute has no effect.</p>
                   11631: <p>The <dfn id="value0" title=
                   11632: "dom-li-value"><code>value</code></dfn> DOM attribute must <a href=
                   11633: "#reflect">reflect</a> the value of the <code title=
                   11634: "dom-li-value"><a href="#value0">value</a></code> content
                   11635: attribute.</p>
                   11636: <div class="example">
                   11637: <p><ins class="diff-new">The following example, the top ten movies
                   11638: are listed (in reverse order). Note the way the list is given a
                   11639: title by using a</ins> <code><a href="#figure"><ins class=
                   11640: "diff-new">figure</ins></a></code> <ins class="diff-new">element
                   11641: and its</ins> <code><a href="#legend"><ins class=
                   11642: "diff-new">legend</ins></a></code> .</p>
                   11643: <pre>
                   11644: &lt;figure&gt;<ins class="diff-new">
                   11645:  &lt;legend&gt;The top 10 movies of all time&lt;/legend&gt;
                   11646:  &lt;ol&gt;
                   11647:   &lt;li value="10"&gt;&lt;cite&gt;Josie and the Pussycats&lt;/cite&gt;, 2001&lt;/li&gt;
                   11648:   &lt;li value="9"&gt;&lt;cite lang="sh"&gt;Црна мачка, бели мачор&lt;/cite&gt;, 1998&lt;/li&gt;
                   11649:   &lt;li value="8"&gt;&lt;cite&gt;A Bugs Life&lt;/cite&gt;, 1998&lt;/li&gt;
                   11650:   &lt;li value="7"&gt;&lt;cite&gt;Toy Story&lt;/cite&gt;, 1995&lt;/li&gt;
                   11651:   &lt;li value="6"&gt;&lt;cite&gt;Monsters, Inc&lt;/cite&gt;, 2001&lt;/li&gt;
                   11652:   &lt;li value="5"&gt;&lt;cite&gt;Cars&lt;/cite&gt;, 2006&lt;/li&gt;
                   11653:   &lt;li value="4"&gt;&lt;cite&gt;Toy Story 2&lt;/cite&gt;, 1999&lt;/li&gt;
                   11654:   &lt;li value="3"&gt;&lt;cite&gt;Finding Nemo&lt;/cite&gt;, 2003&lt;/li&gt;
                   11655:   &lt;li value="2"&gt;&lt;cite&gt;The Incredibles&lt;/cite&gt;, 2004&lt;/li&gt;
                   11656:   &lt;li value="1"&gt;&lt;cite&gt;Ratatouille&lt;/cite&gt;, 2007&lt;/li&gt;
                   11657:  &lt;/ol&gt;
                   11658: &lt;/figure&gt;
                   11659: </ins>
                   11660: </pre>
                   11661: <p><ins class="diff-new">The markup could also be written as
                   11662: follows, using the</ins> <code title="attr-ol-reversed"><a href=
                   11663: "#reversed"><ins class="diff-new">reversed</ins></a></code>
                   11664: <ins class="diff-new">attribute on the</ins> <code><a href=
                   11665: "#ol"><ins class="diff-new">ol</ins></a></code> <ins class=
                   11666: "diff-new">element:</ins></p>
                   11667: <pre>
                   11668: &lt;figure&gt;<ins class="diff-new">
                   11669:  &lt;legend&gt;The top 10 movies of all time&lt;/legend&gt;
                   11670:  &lt;ol reversed&gt;
                   11671:   &lt;li&gt;&lt;cite&gt;Josie and the Pussycats&lt;/cite&gt;, 2001&lt;/li&gt;
                   11672:   &lt;li&gt;&lt;cite lang="sh"&gt;Црна мачка, бели мачор&lt;/cite&gt;, 1998&lt;/li&gt;
                   11673:   &lt;li&gt;&lt;cite&gt;A Bugs Life&lt;/cite&gt;, 1998&lt;/li&gt;
                   11674:   &lt;li&gt;&lt;cite&gt;Toy Story&lt;/cite&gt;, 1995&lt;/li&gt;
                   11675:   &lt;li&gt;&lt;cite&gt;Monsters, Inc&lt;/cite&gt;, 2001&lt;/li&gt;
                   11676:   &lt;li&gt;&lt;cite&gt;Cars&lt;/cite&gt;, 2006&lt;/li&gt;
                   11677:   &lt;li&gt;&lt;cite&gt;Toy Story 2&lt;/cite&gt;, 1999&lt;/li&gt;
                   11678:   &lt;li&gt;&lt;cite&gt;Finding Nemo&lt;/cite&gt;, 2003&lt;/li&gt;
                   11679:   &lt;li&gt;&lt;cite&gt;The Incredibles&lt;/cite&gt;, 2004&lt;/li&gt;
                   11680:   &lt;li&gt;&lt;cite&gt;Ratatouille&lt;/cite&gt;, 2007&lt;/li&gt;
                   11681:  &lt;/ol&gt;
                   11682: &lt;/figure&gt;
                   11683: </ins>
                   11684: </pre></div>
                   11685: <h4 id="the-dl"><span class="secno"><del class=
                   11686: "diff-old">3.11.4.</del> <ins class="diff-chg">3.9.10</ins></span>
                   11687: The <dfn id="dl"><code>dl</code></dfn> element</h4>
                   11688: <dl class="element">
                   11689: <dt>Categories</dt>
                   11690: <dd><del class="diff-old">Prose</del> <a href=
                   11691: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   11692: .</dd>
                   11693: <dt>Contexts in which this element may be used:</dt>
                   11694: <dd>Where <del class="diff-old">prose</del> <a href=
                   11695: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   11696: expected.</dd>
                   11697: <dt>Content model:</dt>
                   11698: <dd>Zero or more groups each consisting of one or more
                   11699: <code><a href="#dt">dt</a></code> elements followed by one or mode
                   11700: <code><a href="#dd">dd</a></code> elements.</dd>
                   11701: <dt>Element-specific attributes:</dt>
                   11702: <dd>None.</dd>
                   11703: <dt>DOM interface:</dt>
                   11704: <dd><del class="diff-old">No difference from</del> <ins class=
                   11705: "diff-chg">Uses</ins> <code><a href=
                   11706: "#htmlelement">HTMLElement</a></code> .</dd>
                   11707: </dl>
                   11708: <p>The <code><a href="#dl">dl</a></code> element introduces an
                   11709: <del class="diff-old">unordered</del> association list consisting
                   11710: of zero or more name-value groups (a description list). Each group
                   11711: must consist of one or more names ( <code><a href=
                   11712: "#dt">dt</a></code> elements) followed by one or more values (
                   11713: <code><a href="#dd">dd</a></code> elements).</p>
                   11714: <p>Name-value groups may be terms and definitions, metadata topics
                   11715: and values, or any other groups of name-value data.</p>
                   11716: <p>The <del class="diff-old">following are all conforming HTML
                   11717: fragments. In the following example, one entry ("Authors") is
                   11718: linked to two</del> values <del class="diff-old">("John" and
                   11719: "Luke"). &lt;dl&gt; &lt;dt&gt; Authors &lt;dd&gt; John &lt;dd&gt;
                   11720: Luke &lt;dt&gt; Editor &lt;dd&gt; Frank &lt;/dl&gt; In the
                   11721: following example, one definition is linked to two terms.
                   11722: &lt;dl&gt; &lt;dt lang="en-US"&gt; &lt;dfn&gt;color&lt;/dfn&gt;
                   11723: &lt;/dt&gt; &lt;dt lang="en-GB"&gt; &lt;dfn&gt;colour&lt;/dfn&gt;
                   11724: &lt;/dt&gt; &lt;dd&gt; A sensation which (in humans) derives from
                   11725: the ability of the fine structure of the eye to distinguish three
                   11726: differently filtered analyses of a view. &lt;/dd&gt; &lt;/dl&gt;
                   11727: The following example illustrates the use</del> <ins class=
                   11728: "diff-chg">within a group are alternatives; multiple paragraphs
                   11729: forming part</ins> of the <ins class="diff-new">same value must all
                   11730: be given within the same</ins> <code><del class="diff-old">dl</del>
                   11731: <a href="#dd"><ins class="diff-chg">dd</ins></a></code> <del class=
                   11732: "diff-old">element to mark up metadata</del> <ins class=
                   11733: "diff-chg">element.</ins></p>
                   11734: <p><ins class="diff-chg">The order</ins> of <del class=
                   11735: "diff-old">sorts. At</del> the <del class="diff-old">end</del>
                   11736: <ins class="diff-chg">list</ins> of <del class="diff-old">the
                   11737: example, one group has two metadata labels ("Authors"</del>
                   11738: <ins class="diff-chg">groups,</ins> and <del class=
                   11739: "diff-old">"Editors")</del> <ins class="diff-chg">of the
                   11740: names</ins> and <del class="diff-old">two</del> values <del class=
                   11741: "diff-old">("Robert Rothman" and "Daniel Jackson"). &lt;dl&gt;
                   11742: &lt;dt&gt; Last modified time &lt;/dt&gt; &lt;dd&gt;
                   11743: 2004-12-23T23:33Z &lt;/dd&gt; &lt;dt&gt; Recommended update
                   11744: interval &lt;/dt&gt; &lt;dd&gt; 60s &lt;/dd&gt; &lt;dt&gt; Authors
                   11745: &lt;/dt&gt; &lt;dt&gt; Editors &lt;/dt&gt; &lt;dd&gt; Robert
                   11746: Rothman &lt;/dd&gt; &lt;dd&gt; Daniel Jackson &lt;/dd&gt;
                   11747: &lt;/dl&gt;</del> <ins class="diff-chg">within each group, may be
                   11748: significant.</ins></p>
                   11749: <p>If a <code><a href="#dl">dl</a></code> element is empty, it
                   11750: contains no groups.</p>
                   11751: <p>If a <code><a href="#dl">dl</a></code> element contains non-
                   11752: <a href="#inter-element" title=
                   11753: "inter-element whitespace">whitespace</a> <a href="#text-node"
                   11754: title="text node">text nodes</a> , or elements other than
                   11755: <code><a href="#dt">dt</a></code> and <code><a href=
                   11756: "#dd">dd</a></code> , then those elements or <a href="#text-node"
                   11757: title="text node">text nodes</a> do not form part of any groups in
                   11758: that <code><a href="#dl">dl</a> <del class="diff-old">, and the
                   11759: document is non-conforming.</del></code> .</p>
                   11760: <p>If a <code><a href="#dl">dl</a></code> element contains only
                   11761: <code><a href="#dt">dt</a></code> elements, then it consists of one
                   11762: group with names but no <del class="diff-old">values, and the
                   11763: document is non-conforming.</del> <ins class=
                   11764: "diff-chg">values.</ins></p>
                   11765: <p>If a <code><a href="#dl">dl</a></code> element contains only
                   11766: <code><a href="#dd">dd</a></code> elements, then it consists of one
                   11767: group with values but no <del class="diff-old">names,</del>
                   11768: <ins class="diff-chg">names.</ins></p>
                   11769: <p><ins class="diff-chg">If a</ins> <code><a href="#dl"><ins class=
                   11770: "diff-chg">dl</ins></a></code> <ins class="diff-chg">element starts
                   11771: with one or more</ins> <code><a href="#dd"><ins class=
                   11772: "diff-chg">dd</ins></a></code> <ins class="diff-chg">elements, then
                   11773: the first group has no associated name.</ins></p>
                   11774: <p><ins class="diff-chg">If a</ins> <code><a href="#dl"><ins class=
                   11775: "diff-chg">dl</ins></a></code> <ins class="diff-chg">element ends
                   11776: with one or more</ins> <code><a href="#dt"><ins class=
                   11777: "diff-chg">dt</ins></a></code> <ins class="diff-chg">elements, then
                   11778: the last group has no associated value.</ins></p>
                   11779: <p class="note"><ins class="diff-chg">When a</ins> <code><a href=
                   11780: "#dl"><ins class="diff-chg">dl</ins></a></code> <ins class=
                   11781: "diff-chg">element doesn't match its content model, it is often due
                   11782: to accidentally using</ins> <code><a href="#dd"><ins class=
                   11783: "diff-chg">dd</ins></a></code> <ins class="diff-chg">elements in
                   11784: the place of</ins> <code><a href="#dt"><ins class=
                   11785: "diff-chg">dt</ins></a></code> <ins class="diff-chg">elements and
                   11786: vice versa. Conformance checkers can spot such mistakes</ins> and
                   11787: <ins class="diff-new">might be able to advise authors how to
                   11788: correctly use</ins> the <del class="diff-old">document</del>
                   11789: <ins class="diff-chg">markup.</ins></p>
                   11790: <div class="example">
                   11791: <p><ins class="diff-chg">In the following example, one entry
                   11792: ("Authors")</ins> is <del class="diff-old">non-conforming.</del>
                   11793: <ins class="diff-chg">linked to two values ("John" and
                   11794: "Luke").</ins></p>
                   11795: <pre>
                   11796: &lt;dl&gt;<ins class="diff-chg">
                   11797:  &lt;dt&gt; Authors
                   11798:  &lt;dd&gt; John
                   11799:  &lt;dd&gt; Luke
                   11800:  &lt;dt&gt; Editor
                   11801:  &lt;dd&gt; Frank
                   11802: &lt;/dl&gt;
                   11803: </ins>
                   11804: </pre></div>
                   11805: <div class="example">
                   11806: <p><ins class="diff-chg">In the following example, one definition
                   11807: is linked to two terms.</ins></p>
                   11808: <pre>
                   11809: &lt;dl&gt;<ins class="diff-chg">
                   11810:  &lt;dt lang="en-US"&gt; &lt;dfn&gt;color&lt;/dfn&gt; &lt;/dt&gt;
                   11811:  &lt;dt lang="en-GB"&gt; &lt;dfn&gt;colour&lt;/dfn&gt; &lt;/dt&gt;
                   11812:  &lt;dd&gt; A sensation which (in humans) derives from the ability of
                   11813:  the fine structure of the eye to distinguish three differently
                   11814:  filtered analyses of a view. &lt;/dd&gt;
                   11815: &lt;/dl&gt;
                   11816: </ins>
                   11817: </pre></div>
                   11818: <div class="example">
                   11819: <p><ins class="diff-chg">The following example illustrates the use
                   11820: of the</ins> <code><a href="#dl"><ins class=
                   11821: "diff-chg">dl</ins></a></code> <ins class="diff-chg">element to
                   11822: mark up metadata of sorts. At the end of the example, one group has
                   11823: two metadata labels ("Authors" and "Editors") and two values
                   11824: ("Robert Rothman" and "Daniel Jackson").</ins></p>
                   11825: <pre>
                   11826: &lt;dl&gt;<ins class="diff-chg">
                   11827:  &lt;dt&gt; Last modified time &lt;/dt&gt;
                   11828:  &lt;dd&gt; 2004-12-23T23:33Z &lt;/dd&gt;
                   11829:  &lt;dt&gt; Recommended update interval &lt;/dt&gt;
                   11830:  &lt;dd&gt; 60s &lt;/dd&gt;
                   11831:  &lt;dt&gt; Authors &lt;/dt&gt;
                   11832:  &lt;dt&gt; Editors &lt;/dt&gt;
                   11833:  &lt;dd&gt; Robert Rothman &lt;/dd&gt;
                   11834:  &lt;dd&gt; Daniel Jackson &lt;/dd&gt;
                   11835: &lt;/dl&gt;
                   11836: </ins>
                   11837: </pre></div>
                   11838: <div class="example">
                   11839: <p><ins class="diff-chg">The following example shows the</ins>
                   11840: <code><a href="#dl"><ins class="diff-chg">dl</ins></a></code>
                   11841: <ins class="diff-chg">element used to give a set of instructions.
                   11842: The order of the instructions here is important (in the other
                   11843: examples, the order of the blocks was not important).</ins></p>
                   11844: <pre>
                   11845: &lt;p&gt;Determine the victory points as follows (use the<ins class="diff-chg">
                   11846: first matching case):&lt;/p&gt;
                   11847: &lt;dl&gt;
                   11848:  &lt;dt&gt; If you have exactly five gold coins &lt;/dt&gt;
                   11849:  &lt;dd&gt; You get five victory points &lt;/dd&gt;
                   11850:  &lt;dt&gt; If you have one or more gold coins, and you have one or more silver coins &lt;/dt&gt;
                   11851:  &lt;dd&gt; You get two victory points &lt;/dd&gt;
                   11852:  &lt;dt&gt; If you have one or more silver coins &lt;/dt&gt;
                   11853:  &lt;dd&gt; You get one victory point &lt;/dd&gt;
                   11854:  &lt;dt&gt; Otherwise &lt;/dt&gt;
                   11855:  &lt;dd&gt; You get no victory points &lt;/dd&gt;
                   11856: &lt;/dl&gt;
                   11857: </ins>
                   11858: </pre></div>
                   11859: <div class="example">
                   11860: <p><ins class="diff-chg">The following snippet shows a</ins>
                   11861: <code><a href="#dl"><ins class="diff-chg">dl</ins></a></code>
                   11862: <ins class="diff-chg">element being used as a glossary. Note the
                   11863: use of</ins> <code><a href="#dfn"><ins class=
                   11864: "diff-chg">dfn</ins></a></code> <ins class="diff-chg">to indicate
                   11865: the word being defined.</ins></p>
                   11866: <pre>
                   11867: &lt;dl&gt;<ins class="diff-chg">
                   11868:  &lt;dt&gt;&lt;dfn&gt;Apartment&lt;/dfn&gt;, n.&lt;/dt&gt;
                   11869:  &lt;dd&gt;An execution context grouping one or more threads with one or
                   11870:  more COM objects.&lt;/dd&gt;
                   11871:  &lt;dt&gt;&lt;dfn&gt;Flat&lt;/dfn&gt;, n.&lt;/dt&gt;
                   11872:  &lt;dd&gt;A deflated tire.&lt;/dd&gt;
                   11873:  &lt;dt&gt;&lt;dfn&gt;Home&lt;/dfn&gt;, n.&lt;/dt&gt;
                   11874:  &lt;dd&gt;The user's login directory.&lt;/dd&gt;
                   11875: &lt;/dl&gt;
                   11876: </ins>
                   11877: </pre></div>
                   11878: <p class="note">The <code><a href="#dl">dl</a></code> element is
                   11879: inappropriate for marking up dialogue, since dialogue is ordered
                   11880: (each speaker/line pair comes after the next). For an example of
                   11881: how to mark up dialogue, see the <code><a href=
                   11882: "#dialog">dialog</a></code> element.</p>
                   11883: <h4 id="the-dt"><span class="secno"><del class=
                   11884: "diff-old">3.11.5.</del> <ins class="diff-chg">3.9.11</ins></span>
                   11885: The <dfn id="dt"><code>dt</code></dfn> element</h4>
                   11886: <dl class="element">
                   11887: <dt>Categories</dt>
                   11888: <dd>None.</dd>
                   11889: <dt>Contexts in which this element may be used:</dt>
                   11890: <dd>Before <code><a href="#dd">dd</a></code> or <code><a href=
                   11891: "#dt">dt</a></code> elements inside <code><a href=
                   11892: "#dl">dl</a></code> elements.</dd>
                   11893: <dd>Before a <code><a href="#dd">dd</a></code> element inside a
                   11894: <code><a href="#dialog">dialog</a></code> element.</dd>
                   11895: <dt>Content model:</dt>
                   11896: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   11897: <dt>Element-specific attributes:</dt>
                   11898: <dd>None.</dd>
                   11899: <dt>DOM interface:</dt>
                   11900: <dd><del class="diff-old">No difference from</del> <ins class=
                   11901: "diff-chg">Uses</ins> <code><a href=
                   11902: "#htmlelement">HTMLElement</a></code> .</dd>
                   11903: </dl>
                   11904: <p>The <code><a href="#dt">dt</a></code> element represents the
                   11905: term, or name, part of a term-description group in a description
                   11906: list ( <code><a href="#dl">dl</a></code> element), and the talker,
                   11907: or speaker, part of a talker-discourse pair in a conversation (
                   11908: <code><a href="#dialog">dialog</a></code> element).</p>
                   11909: <p class="note">The <code><a href="#dt">dt</a></code> element
                   11910: itself, when used in a <code><a href="#dl">dl</a></code> element,
                   11911: does not indicate that its contents are a term being defined, but
                   11912: this can be indicated using the <code><a href="#dfn">dfn</a></code>
                   11913: element.</p>
                   11914: <p><ins class="diff-new">If the</ins> <code><a href=
                   11915: "#dt"><ins class="diff-new">dt</ins></a></code> <ins class=
                   11916: "diff-new">element is the child of a</ins> <code><a href=
                   11917: "#dialog"><ins class="diff-new">dialog</ins></a></code> <ins class=
                   11918: "diff-new">element, and it further contains a</ins> <code><a href=
                   11919: "#time"><ins class="diff-new">time</ins></a></code> <ins class=
                   11920: "diff-new">element, then that</ins> <code><a href=
                   11921: "#time"><ins class="diff-new">time</ins></a></code> <ins class=
                   11922: "diff-new">element represents a timestamp for when the associated
                   11923: discourse (</ins> <code><a href="#dd"><ins class=
                   11924: "diff-new">dd</ins></a></code> <ins class="diff-new">element) was
                   11925: said, and is not part of the name of the talker.</ins></p>
                   11926: <div class="example">
                   11927: <p><ins class="diff-new">The following extract shows how an IM
                   11928: conversation log could be marked up.</ins></p>
                   11929: <pre>
                   11930: &lt;dialog&gt;<ins class="diff-new">
                   11931:  &lt;dt&gt; &lt;time&gt;14:22&lt;/time&gt; egof
                   11932:  &lt;dd&gt; I'm not that nerdy, I've only seen 30% of the star trek episodes
                   11933:  &lt;dt&gt; &lt;time&gt;14:23&lt;/time&gt; kaj
                   11934:  &lt;dd&gt; if you know what percentage of the star trek episodes you have seen, you are inarguably nerdy
                   11935:  &lt;dt&gt; &lt;time&gt;14:23&lt;/time&gt; egof
                   11936:  &lt;dd&gt; it's unarguably
                   11937:  &lt;dt&gt; &lt;time&gt;14:24&lt;/time&gt; kaj
                   11938:  &lt;dd&gt; you are not helping your case
                   11939: &lt;/dialog&gt;
                   11940: </ins>
                   11941: </pre></div>
                   11942: <h4 id="the-dd"><span class="secno"><del class=
                   11943: "diff-old">3.11.6.</del> <ins class="diff-chg">3.9.12</ins></span>
                   11944: The <dfn id="dd"><code>dd</code></dfn> element</h4>
                   11945: <dl class="element">
                   11946: <dt>Categories</dt>
                   11947: <dd>None.</dd>
                   11948: <dt>Contexts in which this element may be used:</dt>
                   11949: <dd>After <code><a href="#dt">dt</a></code> or <code><a href=
                   11950: "#dd">dd</a></code> elements inside <code><a href=
                   11951: "#dl">dl</a></code> elements.</dd>
                   11952: <dd>After a <code><a href="#dt">dt</a></code> element inside a
                   11953: <code><a href="#dialog">dialog</a></code> element.</dd>
                   11954: <dt>Content model:</dt>
                   11955: <dd><del class="diff-old">Prose</del> <a href=
                   11956: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   11957: .</dd>
                   11958: <dt>Element-specific attributes:</dt>
                   11959: <dd>None.</dd>
                   11960: <dt>DOM interface:</dt>
                   11961: <dd><del class="diff-old">No difference from</del> <ins class=
                   11962: "diff-chg">Uses</ins> <code><a href=
                   11963: "#htmlelement">HTMLElement</a></code> .</dd>
                   11964: </dl>
                   11965: <p>The <code><a href="#dd">dd</a></code> element represents the
                   11966: description, definition, or value, part of a term-description group
                   11967: in a description list ( <code><a href="#dl">dl</a></code> element),
                   11968: and the discourse, or quote, part in a conversation (
                   11969: <code><a href="#dialog">dialog</a></code> element).</p>
                   11970: <h3 id="text-level"><span class="secno"><del class=
                   11971: "diff-old">3.12.</del> <ins class="diff-chg">3.10</ins></span>
                   11972: <del class="diff-old">Phrase elements</del> <ins class=
                   11973: "diff-chg">Text-level semantics</ins></h3>
                   11974: <h4 id="the-a"><span class="secno"><del class=
                   11975: "diff-old">3.12.1.</del> <ins class="diff-chg">3.10.1</ins></span>
                   11976: The <dfn id="a"><code>a</code></dfn> element</h4>
                   11977: <dl class="element">
                   11978: <dt>Categories</dt>
                   11979: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   11980: <dd><a href="#interactive1">Interactive content</a> .</dd>
                   11981: <dt>Contexts in which this element may be used:</dt>
                   11982: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   11983: expected.</dd>
                   11984: <dt>Content model:</dt>
                   11985: <dd><a href="#phrasing0">Phrasing content</a> , but there must be
                   11986: no <a href="#interactive1">interactive content</a> descendant.</dd>
                   11987: <dt>Element-specific attributes:</dt>
                   11988: <dd><code title="attr-hyperlink-href"><a href=
                   11989: "#href6">href</a></code></dd>
                   11990: <dd><code title="attr-hyperlink-target"><a href=
                   11991: "#target3">target</a></code></dd>
                   11992: <dd><code title="attr-hyperlink-ping"><a href=
                   11993: "#ping">ping</a></code></dd>
                   11994: <dd><code title="attr-hyperlink-rel"><a href=
                   11995: "#rel3">rel</a></code></dd>
                   11996: <dd><code title="attr-hyperlink-media"><a href=
                   11997: "#media12">media</a></code></dd>
                   11998: <dd><code title="attr-hyperlink-hreflang"><a href=
                   11999: "#hreflang3">hreflang</a></code></dd>
                   12000: <dd><code title="attr-hyperlink-type"><a href=
                   12001: "#type17">type</a></code></dd>
                   12002: <dt>DOM interface:</dt>
                   12003: <dd>
                   12004: <pre>
                   12005: <del class="diff-old">     class=idl&gt;interface  {
                   12006: </del>
                   12007: <ins class=
                   12008: "diff-chg">     class=idl&gt;[Stringifies=href] interface <dfn id=
                   12009: "htmlanchorelement">HTMLAnchorElement</dfn> : <a href=
                   12010: "#htmlelement">HTMLElement</a> {
                   12011: </ins>
                   12012:            attribute DOMString <a href="#href3" title=
                   12013: "dom-a-href">href</a>;
                   12014:            attribute DOMString <a href="#target1" title=
                   12015: "dom-a-target">target</a>;
                   12016:            attribute DOMString <a href="#ping0" title=
                   12017: "dom-a-ping">ping</a>;
                   12018:            attribute DOMString <a href="#rel1" title=
                   12019: "dom-a-rel">rel</a>;
                   12020:   readonly attribute DOMTokenList <a href="#rellist0" title=
                   12021: "dom-a-relList">relList</a>;
                   12022:            attribute DOMString <a href="#media4" title=
                   12023: "dom-a-media">media</a>;
                   12024:            attribute DOMString <a href="#hreflang1" title=
                   12025: "dom-a-hreflang">hreflang</a>;
                   12026:            attribute DOMString <a href="#type3" title=
                   12027: "dom-a-type">type</a>;
                   12028: };
                   12029: </pre>
                   12030: <p>The <code title="command-ro"><a href=
                   12031: "#command2">Command</a></code> interface must also be implemented
                   12032: by this element.</p>
                   12033: </dd>
                   12034: </dl>
                   12035: <p>If the <code><a href="#a">a</a></code> element has an
                   12036: <code title="attr-hyperlink-href"><a href="#href6">href</a></code>
                   12037: attribute, then it represents a <a href="#hyperlinks">hyperlink</a>
                   12038: .</p>
                   12039: <p>If the <code><a href="#a">a</a></code> element has no
                   12040: <code title="attr-hyperlink-href"><a href="#href6">href</a></code>
                   12041: attribute, then the element is a placeholder for where a link might
                   12042: otherwise have been placed, if it had been relevant.</p>
                   12043: <p>The <code title="attr-hyperlink-target"><a href=
                   12044: "#target3">target</a></code> , <code title=
                   12045: "attr-hyperlink-ping"><a href="#ping">ping</a></code> ,
                   12046: <code title="attr-hyperlink-rel"><a href="#rel3">rel</a></code> ,
                   12047: <code title="attr-hyperlink-media"><a href=
                   12048: "#media12">media</a></code> , <code title=
                   12049: "attr-hyperlink-hreflang"><a href="#hreflang3">hreflang</a></code>
                   12050: , and <code title="attr-hyperlink-type"><a href=
                   12051: "#type17">type</a></code> attributes must be omitted if the
                   12052: <code title="attr-hyperlink-href"><a href="#href6">href</a></code>
                   12053: attribute is not present.</p>
                   12054: <div class="example">
                   12055: <p>If a site uses a consistent navigation toolbar on every page,
                   12056: then the link that would normally link to the page itself could be
                   12057: marked up using an <code><a href="#a">a</a></code> element:</p>
                   12058: <pre>
                   12059: &lt;nav&gt;
                   12060:  &lt;ul&gt;
                   12061:   &lt;li&gt; &lt;a href="/"&gt;Home&lt;/a&gt; &lt;/li&gt;
                   12062:   &lt;li&gt; &lt;a href="/news"&gt;News&lt;/a&gt; &lt;/li&gt;
                   12063:   &lt;li&gt; &lt;a&gt;Examples&lt;/a&gt; &lt;/li&gt;
                   12064:   &lt;li&gt; &lt;a href="/legal"&gt;Legal&lt;/a&gt; &lt;/li&gt;
                   12065:  &lt;/ul&gt;
                   12066: &lt;/nav&gt;
                   12067: </pre></div>
                   12068: <p>Interactive user agents should allow users to <a href=
                   12069: "#following0" title="following hyperlinks">follow hyperlinks</a>
                   12070: created using the <code><a href="#a">a</a></code> element. The
                   12071: <code title="attr-hyperlink-href"><a href="#href6">href</a></code>
                   12072: , <code title="attr-hyperlink-target"><a href=
                   12073: "#target3">target</a></code> and <code title=
                   12074: "attr-hyperlink-ping"><a href="#ping">ping</a></code> attributes
                   12075: decide how the link is followed. The <code title=
                   12076: "attr-hyperlink-rel"><a href="#rel3">rel</a></code> , <code title=
                   12077: "attr-hyperlink-media"><a href="#media12">media</a></code> ,
                   12078: <code title="attr-hyperlink-hreflang"><a href=
                   12079: "#hreflang3">hreflang</a></code> , and <code title=
                   12080: "attr-hyperlink-type"><a href="#type17">type</a></code> attributes
                   12081: may be used to indicate to the user the likely nature of the target
                   12082: resource before the user follows the link.</p>
                   12083: <p>The <a href="#activation0">activation behavior</a> of
                   12084: <code><a href="#a">a</a></code> elements that represent
                   12085: <span>hyperlinks</span> is to run the following steps:</p>
                   12086: <ol>
                   12087: <li>
                   12088: <p>If the <code title="event-DOMActivate">DOMActivate</code> event
                   12089: in question is not <span title=
                   12090: "concept-events-trusted">trusted</span> (i.e. a <code title=
                   12091: "dom-click"><a href="#click">click()</a></code> method call was the
                   12092: reason for the event being dispatched), and the <code><a href=
                   12093: "#a">a</a></code> element's <code title=
                   12094: "attr-hyperlink-target"><a href="#target3">target</a></code>
                   12095: attribute is <span class="big-issue">...</span> then raise an
                   12096: <code>INVALID_ACCESS_ERR</code> exception and abort these
                   12097: steps.</p>
                   12098: </li>
                   12099: <li>
                   12100: <p>If the target of the <code title=
                   12101: "event-DOMActivate">DOMActivate</code> event is an <code><a href=
                   12102: "#img">img</a></code> element with an <code title=
                   12103: "attr-img-ismap"><a href="#ismap">ismap</a></code> attribute
                   12104: specified, then server-side image map processing must be performed,
                   12105: as follows:</p>
                   12106: <ol>
                   12107: <li>If the <code title="event-DOMActivate">DOMActivate</code> event
                   12108: was dispatched as the result of a real pointing-device-triggered
                   12109: <code title="event-click">click</code> event on the <code><a href=
                   12110: "#img">img</a></code> element, then let <var title="">x</var> be
                   12111: the distance in CSS pixels from the left edge of the image to the
                   12112: location of the click, and let <var title="">y</var> be the
                   12113: distance in CSS pixels from the top edge of the image to the
                   12114: location of the click. Otherwise, let <var title="">x</var> and
                   12115: <var title="">y</var> be zero.</li>
                   12116: <li>Let the <dfn id="hyperlink2"><var>hyperlink suffix</var></dfn>
                   12117: be a U+003F QUESTION MARK character, the value of <var title=
                   12118: "">x</var> expressed as a base-ten integer using ASCII digits
                   12119: (U+0030 DIGIT ZERO to U+0039 DIGIT NINE), a U+002C COMMA character,
                   12120: and the value of <var title="">y</var> expressed as a base-ten
                   12121: integer using ASCII digits.</li>
                   12122: </ol>
                   12123: </li>
                   12124: <li>
                   12125: <p>Finally, the user agent must <a href="#following0" title=
                   12126: "following hyperlinks">follow the hyperlink</a> defined by the
                   12127: <code><a href="#a">a</a></code> element. If the steps above defined
                   12128: a <var><a href="#hyperlink2">hyperlink suffix</a></var> , then take
                   12129: that into account when following the hyperlink.</p>
                   12130: </li>
                   12131: </ol>
                   12132: <p class="note">One way that a user agent can enable users to
                   12133: follow hyperlinks is by allowing <code><a href="#a">a</a></code>
                   12134: elements to be clicked, or focussed and activated by the keyboard.
                   12135: This <span title="interactive elements">will cause</span> the
                   12136: aforementioned <a href="#activation0">activation behavior</a> to be
                   12137: invoked.</p>
                   12138: <p>The DOM attributes <dfn id="href3" title=
                   12139: "dom-a-href"><code>href</code></dfn> , <dfn id="ping0" title=
                   12140: "dom-a-ping"><code>ping</code></dfn> , <dfn id="target1" title=
                   12141: "dom-a-target"><code>target</code></dfn> , <dfn id="rel1" title=
                   12142: "dom-a-rel"><code>rel</code></dfn> , <dfn id="media4" title=
                   12143: "dom-a-media"><code>media</code></dfn> , <dfn id="hreflang1" title=
                   12144: "dom-a-hreflang"><code>hreflang</code></dfn> , and <dfn id="type3"
                   12145: title="dom-a-type"><code>type</code></dfn> , must each <a href=
                   12146: "#reflect">reflect</a> the respective content attributes of the
                   12147: same name.</p>
                   12148: <p>The DOM attribute <dfn id="rellist0" title=
                   12149: "dom-a-rellist"><code>relList</code></dfn> must <a href=
                   12150: "#reflect">reflect</a> the <code title=
                   12151: "attr-hyperlink-rel"><a href="#rel3">rel</a></code> content
                   12152: attribute.</p>
                   12153: <h4 id="the-q"><span class="secno"><del class=
                   12154: "diff-old">3.12.2.</del> <ins class="diff-chg">3.10.2</ins></span>
                   12155: The <dfn id="q"><code>q</code></dfn> element</h4>
                   12156: <dl class="element">
                   12157: <dt>Categories</dt>
                   12158: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   12159: <dt>Contexts in which this element may be used:</dt>
                   12160: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   12161: expected.</dd>
                   12162: <dt>Content model:</dt>
                   12163: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   12164: <dt>Element-specific attributes:</dt>
                   12165: <dd><code title="attr-q-cite"><a href="#cite1">cite</a></code></dd>
                   12166: <dt>DOM interface:</dt>
                   12167: <dd>The <code><a href="#q">q</a></code> element uses the
                   12168: <code><a href="#htmlquoteelement">HTMLQuoteElement</a></code>
                   12169: interface.</dd>
                   12170: </dl>
                   12171: <p>The <code><a href="#q">q</a></code> element represents
                   12172: <del class="diff-old">a part of a paragraph</del> <ins class=
                   12173: "diff-chg">some</ins> <a href="#phrasing0" title=
                   12174: "phrasing content"><ins class="diff-chg">phrasing content</ins></a>
                   12175: quoted from another source.</p>
                   12176: <p><ins class="diff-new">Quotation punctuation (such as quotation
                   12177: marks), if any, must be placed inside the</ins> <code><a href=
                   12178: "#q"><ins class="diff-new">q</ins></a></code> <ins class=
                   12179: "diff-new">element.</ins></p>
                   12180: <p>Content inside a <code><a href="#q">q</a></code> element must be
                   12181: quoted from another source, whose URI, if it has one, should be
                   12182: cited in the <dfn id="cite1" title=
                   12183: "attr-q-cite"><code>cite</code></dfn> attribute.</p>
                   12184: <p>If the <code title="attr-q-cite"><a href=
                   12185: "#cite1">cite</a></code> attribute is present, it must be a URI (or
                   12186: IRI). User agents should allow users to follow such citation
                   12187: links.</p>
                   12188: <p>If a <code><a href="#q">q</a></code> element is contained
                   12189: (directly or indirectly) in a <a href="#paragraph">paragraph</a>
                   12190: that contains a single <code><a href="#cite2">cite</a></code>
                   12191: element and has no other <code><a href="#q">q</a></code> element
                   12192: descendants, then, the <del class="diff-old">citation</del>
                   12193: <ins class="diff-chg">title of the work</ins> given by that
                   12194: <code><a href="#cite2">cite</a></code> element gives the source of
                   12195: the quotation contained in the <code><a href="#q">q</a></code>
                   12196: element.</p>
                   12197: <div class="example">
                   12198: <p><ins class="diff-new">Here is a simple example of the use of
                   12199: the</ins> <code><a href="#q"><ins class=
                   12200: "diff-new">q</ins></a></code> <ins class=
                   12201: "diff-new">element:</ins></p>
                   12202: <pre>
1.2     ! mike     12203: &lt;p&gt;The man said &lt;q&gt;"Things that are impossible just take
        !          12204: <ins class="diff-new">longer"&lt;/q&gt;.
1.1       mike     12205: I
                   12206: disagreed
                   12207: with
                   12208: him.&lt;/p&gt;
                   12209: </ins>
                   12210: </pre></div>
                   12211: <div class="example">
                   12212: <p><ins class="diff-new">Here is an example with both an explicit
                   12213: citation link in the</ins> <code><a href="#q"><ins class=
                   12214: "diff-new">q</ins></a></code> <ins class="diff-new">element, and an
                   12215: explicit citation outside:</ins></p>
                   12216: <pre>
1.2     ! mike     12217: &lt;p&gt;The W3C page &lt;cite&gt;About W3C&lt;/cite&gt; says the W3C's<ins class="diff-new">
        !          12218: mission is &lt;q cite="http://www.w3.org/Consortium/"&gt;"To lead the
1.1       mike     12219: World Wide Web to its full potential by developing protocols and
                   12220: guidelines that ensure long-term growth for the Web"&lt;/q&gt;. I
                   12221: disagree
                   12222: with
                   12223: this
                   12224: mission.&lt;/p&gt;
                   12225: </ins>
                   12226: </pre></div>
                   12227: <div class="example">
                   12228: <p><ins class="diff-new">In the following example, the quotation
                   12229: itself contains a quotation:</ins></p>
                   12230: <pre>
                   12231: &lt;p&gt;In &lt;cite&gt;Example One&lt;/cite&gt;, he writes &lt;q&gt;"The man<ins class="diff-new">
                   12232: said &lt;q&gt;'Things that are impossible just take longer'&lt;/q&gt;. I
                   12233: disagreed
                   12234: with
                   12235: him"&lt;/q&gt;.
                   12236: Well,
                   12237: I
                   12238: disagree
                   12239: even
                   12240: more!&lt;/p&gt;
                   12241: </ins>
                   12242: </pre></div>
                   12243: <div class="example">
                   12244: <p><ins class="diff-new">In the following example, there are no
                   12245: quotation marks:</ins></p>
                   12246: <pre>
                   12247: <ins class="diff-new">
                   12248: &lt;p&gt;
                   12249: His
                   12250: best
                   12251: argument:
                   12252: &lt;q&gt;
                   12253: I
                   12254: disagree!&lt;/q&gt;
                   12255: &lt;/p&gt;
                   12256: </ins>
                   12257: </pre></div>
                   12258: <h4 id="the-cite"><span class="secno"><del class=
                   12259: "diff-old">3.12.3.</del> <ins class="diff-chg">3.10.3</ins></span>
                   12260: The <dfn id="cite2"><code>cite</code></dfn> element</h4>
                   12261: <dl class="element">
                   12262: <dt>Categories</dt>
                   12263: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   12264: <dt>Contexts in which this element may be used:</dt>
                   12265: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   12266: expected.</dd>
                   12267: <dt>Content model:</dt>
                   12268: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   12269: <dt>Element-specific attributes:</dt>
                   12270: <dd>None.</dd>
                   12271: <dt>DOM interface:</dt>
                   12272: <dd><del class="diff-old">No difference from</del> <ins class=
                   12273: "diff-chg">Uses</ins> <code><a href=
                   12274: "#htmlelement">HTMLElement</a></code> .</dd>
                   12275: </dl>
                   12276: <p>The <code><a href="#cite2">cite</a></code> element represents
                   12277: <del class="diff-old">a citation:</del> the <del class=
                   12278: "diff-old">source,</del> <ins class="diff-chg">title of a work
                   12279: (e.g. a book, a paper, an essay, a poem, a score, a song, a script,
                   12280: a film, a TV show, a game, a sculpture, a painting, a theatre
                   12281: production, a play, an opera, a musical, an exhibition, etc). This
                   12282: can be a work that is being quoted</ins> or <del class=
                   12283: "diff-old">reference, for</del> <ins class="diff-chg">referenced in
                   12284: detail (i.e.</ins> a <del class="diff-old">quote</del> <ins class=
                   12285: "diff-chg">citation),</ins> or <del class="diff-old">statement
                   12286: made</del> <ins class="diff-chg">it can just be a work that is
                   12287: mentioned</ins> in <ins class="diff-new">passing.</ins></p>
                   12288: <p><ins class="diff-new">A person's name is not</ins> the
                   12289: <del class="diff-old">document.</del> <ins class="diff-chg">title
                   12290: of a work — even if people call that person a piece of work — and
                   12291: the element must therefore not be used to mark up people's names.
                   12292: (In some cases, the</ins> <code><a href="#b"><ins class=
                   12293: "diff-chg">b</ins></a></code> <ins class="diff-chg">element might
                   12294: be appropriate for names; e.g. in a gossip article where the names
                   12295: of famous people are keywords rendered with a different style to
                   12296: draw attention to them. In other cases, if an element is</ins>
                   12297: <em><ins class="diff-chg">really</ins></em> <ins class=
                   12298: "diff-chg">needed, the</ins> <code><a href="#span"><ins class=
                   12299: "diff-chg">span</ins></a></code> <ins class="diff-chg">element can
                   12300: be used.)</ins></p>
                   12301: <p><ins class="diff-chg">A ship is similarly not a work, and the
                   12302: element must not be used to mark up ship names (the</ins>
                   12303: <code><a href="#i"><ins class="diff-chg">i</ins></a></code>
                   12304: <ins class="diff-chg">element can be used for that
                   12305: purpose).</ins></p>
                   12306: <div class="example">
                   12307: <p><ins class="diff-chg">This next example shows a typical use of
                   12308: the</ins> <code><a href="#cite2"><ins class=
                   12309: "diff-chg">cite</ins></a></code> <ins class=
                   12310: "diff-chg">element:</ins></p>
                   12311: <pre>
                   12312: &lt;p&gt;My favourite book is &lt;cite&gt;The Reality Dysfunction&lt;/cite&gt; by<ins class="diff-chg">
                   12313: Peter F. Hamilton. My favourite comic is &lt;cite&gt;Pearls Before
                   12314: Swine&lt;/cite&gt; by Stephan Pastis. My favourite track is &lt;cite&gt;Jive
                   12315: Samba&lt;/cite&gt;
                   12316: by
                   12317: the
                   12318: Cannonball
                   12319: Adderley
                   12320: Sextet.&lt;/p&gt;
                   12321: </ins>
                   12322: </pre></div>
                   12323: <div class="example">
                   12324: <p><ins class="diff-chg">This is correct usage:</ins></p>
                   12325: <pre>
                   12326: &lt;p&gt;According to the Wikipedia article &lt;cite&gt;HTML&lt;/cite&gt;, as it<ins class="diff-chg">
                   12327: stood in mid-February 2008, leaving attribute values unquoted is
                   12328: unsafe.
                   12329: This
                   12330: is
                   12331: obviously
                   12332: an
                   12333: over-simplification.&lt;/p&gt;
                   12334: </ins>
                   12335: </pre>
                   12336: <p><ins class="diff-chg">The following, however, is incorrect
                   12337: usage, as the</ins> <code><a href="#cite2"><ins class=
                   12338: "diff-chg">cite</ins></a></code> <ins class="diff-chg">element here
                   12339: is containing far more than the title of the work:</ins></p>
                   12340: <pre ins="" class="diff-chg">
                   12341:     class=bad&gt;&lt;!-- do not copy this example, it is an example of bad usage! --&gt;
                   12342: &lt;p&gt;According to &lt;cite&gt;the Wikipedia article on HTML&lt;/cite&gt;, as it
                   12343: stood in mid-February 2008, leaving attribute values unquoted is
                   12344: unsafe.
                   12345: This
                   12346: is
                   12347: obviously
                   12348: an
                   12349: over-simplification.&lt;/p&gt;
                   12350: </pre></div>
                   12351: <div class="example">
                   12352: <p><ins class="diff-chg">The</ins> <code><a href=
                   12353: "#cite2"><ins class="diff-chg">cite</ins></a></code> <ins class=
                   12354: "diff-chg">element is obviously a key part of any citation in a
                   12355: bibliography, but it is only used to mark the title:</ins></p>
                   12356: <pre>
                   12357: &lt;p&gt;&lt;cite&gt;Universal Declaration of Human Rights&lt;/cite&gt;, United Nations,<ins class="diff-chg">
                   12358: December
                   12359: 1948.
                   12360: Adopted
                   12361: by
                   12362: General
                   12363: Assembly
                   12364: resolution
                   12365: 217
                   12366: A
                   12367: (III).&lt;/p&gt;
                   12368: </ins>
                   12369: </pre></div>
                   12370: <p class="note">A <em>citation</em> is not a <em>quote</em> (for
                   12371: which the <code><a href="#q">q</a></code> element is
                   12372: appropriate).</p>
                   12373: <div class="example">
                   12374: <p>This is incorrect <del class="diff-old">usage:</del> <ins class=
                   12375: "diff-chg">usage, because</ins> <code><a href="#cite2"><ins class=
                   12376: "diff-chg">cite</ins></a></code> <ins class="diff-chg">is not for
                   12377: quotes:</ins></p>
                   12378: <pre>
                   12379: &lt;p&gt;
                   12380: &lt;cite&gt;
                   12381: This
                   12382: is
                   12383: wrong!&lt;/cite&gt;,
                   12384: said
                   12385: Ian.&lt;/p&gt;
                   12386: </pre>
                   12387: <p>This is <del class="diff-old">the correct way to do it:</del>
                   12388: <ins class="diff-chg">also incorrect usage, because a person is not
                   12389: a work:</ins></p>
                   12390: <pre>
                   12391: &lt;p&gt;
                   12392: &lt;q&gt;
                   12393: This
                   12394: is
                   12395: <del class="diff-old">correct!&lt;/q&gt;,
                   12396: </del>
                   12397: <ins class="diff-chg">still
                   12398: wrong!&lt;/q&gt;,
                   12399: </ins>
                   12400: said
                   12401: &lt;cite&gt;
                   12402: Ian&lt;/cite&gt;.&lt;/p&gt;
                   12403: </pre>
                   12404: <p><del class="diff-old">This is also wrong, because the title and
                   12405: the name are</del> <ins class="diff-chg">The correct usage
                   12406: does</ins> not <del class="diff-old">references or citations:</del>
                   12407: <ins class="diff-chg">use a</ins> <code><a href=
                   12408: "#cite2"><ins class="diff-chg">cite</ins></a></code> <ins class=
                   12409: "diff-chg">element:</ins></p>
                   12410: <del class="diff-old">by &lt;cite&gt; Peter F.
                   12411: Hamilton&lt;/cite&gt;.&lt;/p&gt;</del>
                   12412: <pre>
                   12413: <ins class="diff-chg">&lt;p&gt;
                   12414: &lt;q&gt;
                   12415: This
                   12416: is
                   12417: correct&lt;/q&gt;,
                   12418: said
                   12419: Ian.&lt;/p&gt;
                   12420: </ins>
                   12421: </pre>
                   12422: <p><del class="diff-old">This is correct, because even though</del>
                   12423: <ins class="diff-chg">As mentioned above,</ins> the <del class=
                   12424: "diff-old">source is not quoted, it is cited:</del> <code><a href=
                   12425: "#b"><ins class="diff-chg">b</ins></a></code> <ins class=
                   12426: "diff-chg">element might be relevant for marking names as being
                   12427: keywords in certain kinds of documents:</ins></p>
                   12428: <del class="diff-old">the Wikipedia article on HTML&lt;/cite&gt;,
                   12429: HTML is defined in formal specifications that were developed and
                   12430: published throughout the 1990s.&lt;/p&gt;</del>
                   12431: <pre>
                   12432: &lt;p&gt;And then &lt;b&gt;Ian&lt;/b&gt; said &lt;q&gt;this might be right, in a
                   12433: <ins class="diff-chg">gossip
                   12434: column,
                   12435: maybe!&lt;/q&gt;.&lt;/p&gt;
                   12436: </ins>
                   12437: </pre></div>
                   12438: <p class="note">The <code><a href="#cite2">cite</a></code> element
                   12439: can apply to <code><a href="#blockquote">blockquote</a></code> and
                   12440: <code><a href="#q">q</a></code> elements in certain cases described
                   12441: in the definitions of those elements.</p>
                   12442: <div class="example">
                   12443: <p><ins class="diff-new">This next example shows the use of</ins>
                   12444: <code><a href="#cite2"><ins class="diff-new">cite</ins></a></code>
                   12445: <ins class="diff-new">alongside</ins> <code><a href=
                   12446: "#blockquote"><ins class="diff-new">blockquote</ins></a></code>
                   12447: :</p>
                   12448: <pre>
                   12449: &lt;p&gt;His next piece was the aptly named &lt;cite&gt;Sonnet 130&lt;/cite&gt;:&lt;/p&gt;<ins class="diff-new">
                   12450: &lt;blockquote&gt;
                   12451:   &lt;p&gt;My mistress' eyes are nothing like the sun,&lt;br&gt;
                   12452:   Coral is far more red, than her lips red,
                   12453: ...
                   12454: </ins>
                   12455: </pre></div>
                   12456: <h4 id="the-em"><span class="secno"><del class=
                   12457: "diff-old">3.12.4.</del> <ins class="diff-chg">3.10.4</ins></span>
                   12458: The <dfn id="em"><code>em</code></dfn> element</h4>
                   12459: <dl class="element">
                   12460: <dt>Categories</dt>
                   12461: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   12462: <dt>Contexts in which this element may be used:</dt>
                   12463: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   12464: expected.</dd>
                   12465: <dt>Content model:</dt>
                   12466: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   12467: <dt>Element-specific attributes:</dt>
                   12468: <dd>None.</dd>
                   12469: <dt>DOM interface:</dt>
                   12470: <dd><del class="diff-old">No difference from</del> <ins class=
                   12471: "diff-chg">Uses</ins> <code><a href=
                   12472: "#htmlelement">HTMLElement</a></code> .</dd>
                   12473: </dl>
                   12474: <p>The <code><a href="#em">em</a></code> element represents stress
                   12475: emphasis of its contents.</p>
                   12476: <p>The level of emphasis that a <del class=
                   12477: "diff-old">particlar</del> <ins class="diff-chg">particular</ins>
                   12478: piece of content has is given by its number of ancestor
                   12479: <code><a href="#em">em</a></code> elements.</p>
                   12480: <p>The placement of emphasis changes the meaning of the sentence.
                   12481: The element thus forms an integral part of the content. The precise
                   12482: way in which emphasis is used in this way depends on the
                   12483: language.</p>
                   12484: <div class="example">
                   12485: <p>These examples show how changing the emphasis changes the
                   12486: meaning. First, a general statement of fact, with no emphasis:</p>
                   12487: <pre>
                   12488: &lt;p&gt;
                   12489: Cats
                   12490: are
                   12491: cute
                   12492: animals.&lt;/p&gt;
                   12493: </pre>
                   12494: <p>By <del class="diff-old">emphasising</del> <ins class=
                   12495: "diff-chg">emphasizing</ins> the first word, the statement implies
                   12496: that the kind of animal under discussion is in question (maybe
                   12497: someone is asserting that dogs are cute):</p>
                   12498: <pre>
                   12499: &lt;p&gt;
                   12500: &lt;em&gt;
                   12501: Cats&lt;/em&gt;
                   12502: are
                   12503: cute
                   12504: animals.&lt;/p&gt;
                   12505: </pre>
                   12506: <p>Moving the emphasis to the verb, one highlights that the truth
                   12507: of the entire sentence is in question (maybe someone is saying cats
                   12508: are not cute):</p>
                   12509: <pre>
                   12510: &lt;p&gt;
                   12511: Cats
                   12512: &lt;em&gt;
                   12513: are&lt;/em&gt;
                   12514: cute
                   12515: animals.&lt;/p&gt;
                   12516: </pre>
                   12517: <p>By moving it to the adjective, the exact nature of the cats is
                   12518: reasserted (maybe someone suggested cats were <em>mean</em>
                   12519: animals):</p>
                   12520: <pre>
                   12521: &lt;p&gt;
                   12522: Cats
                   12523: are
                   12524: &lt;em&gt;
                   12525: cute&lt;/em&gt;
                   12526: animals.&lt;/p&gt;
                   12527: </pre>
                   12528: <p>Similarly, if someone asserted that cats were vegetables,
                   12529: someone correcting this might <del class="diff-old">emphasise</del>
                   12530: <ins class="diff-chg">emphasize</ins> the last word:</p>
                   12531: <pre>
                   12532: &lt;p&gt;
                   12533: Cats
                   12534: are
                   12535: cute
                   12536: &lt;em&gt;
                   12537: animals&lt;/em&gt;.&lt;/p&gt;
                   12538: </pre>
                   12539: <p>By <del class="diff-old">emphasising</del> <ins class=
                   12540: "diff-chg">emphasizing</ins> the entire sentence, it becomes clear
                   12541: that the speaker is fighting hard to get the point across. This
                   12542: kind of emphasis also typically affects the punctuation, hence the
                   12543: exclamation mark here.</p>
                   12544: <pre>
                   12545: &lt;p&gt;
                   12546: &lt;em&gt;
                   12547: Cats
                   12548: are
                   12549: cute
                   12550: animals!&lt;/em&gt;
                   12551: &lt;/p&gt;
                   12552: </pre>
                   12553: <p>Anger mixed with <del class="diff-old">emphasising</del>
                   12554: <ins class="diff-chg">emphasizing</ins> the cuteness could lead to
                   12555: markup such as:</p>
                   12556: <pre>
                   12557: &lt;p&gt;
                   12558: &lt;em&gt;
                   12559: Cats
                   12560: are
                   12561: &lt;em&gt;
                   12562: cute&lt;/em&gt;
                   12563: animals!&lt;/em&gt;
                   12564: &lt;/p&gt;
                   12565: </pre></div>
                   12566: <h4 id="the-strong"><span class="secno"><del class=
                   12567: "diff-old">3.12.5.</del> <ins class="diff-chg">3.10.5</ins></span>
                   12568: The <dfn id="strong"><code>strong</code></dfn> element</h4>
                   12569: <dl class="element">
                   12570: <dt>Categories</dt>
                   12571: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   12572: <dt>Contexts in which this element may be used:</dt>
                   12573: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   12574: expected.</dd>
                   12575: <dt>Content model:</dt>
                   12576: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   12577: <dt>Element-specific attributes:</dt>
                   12578: <dd>None.</dd>
                   12579: <dt>DOM interface:</dt>
                   12580: <dd><del class="diff-old">No difference from</del> <ins class=
                   12581: "diff-chg">Uses</ins> <code><a href=
                   12582: "#htmlelement">HTMLElement</a></code> .</dd>
                   12583: </dl>
                   12584: <p>The <code><a href="#strong">strong</a></code> element represents
                   12585: strong importance for its contents.</p>
                   12586: <p>The relative level of importance of a piece of content is given
                   12587: by its number of ancestor <code><a href="#strong">strong</a></code>
                   12588: elements; each <code><a href="#strong">strong</a></code> element
                   12589: increases the importance of its contents.</p>
                   12590: <p>Changing the importance of a piece of text with the
                   12591: <code><a href="#strong">strong</a></code> element does not change
                   12592: the meaning of the sentence.</p>
                   12593: <div class="example">
                   12594: <p>Here is an example of a warning notice in a game, with the
                   12595: various parts marked up according to how important they are:</p>
                   12596: <pre>
                   12597: &lt;p&gt;&lt;strong&gt;Warning.&lt;/strong&gt; This dungeon is dangerous.
                   12598: &lt;strong&gt;Avoid the ducks.&lt;/strong&gt; Take any gold you find.
                   12599: &lt;strong&gt;&lt;strong&gt;Do not take any of the diamonds&lt;/strong&gt;,
                   12600: they are explosive and &lt;strong&gt;will destroy anything within
                   12601: ten
                   12602: meters.&lt;/strong&gt;
                   12603: &lt;/strong&gt;
                   12604: You
                   12605: have
                   12606: been
                   12607: warned.&lt;/p&gt;
                   12608: </pre></div>
                   12609: <h4 id="the-small"><span class="secno"><del class=
                   12610: "diff-old">3.12.6.</del> <ins class="diff-chg">3.10.6</ins></span>
                   12611: The <dfn id="small"><code>small</code></dfn> element</h4>
                   12612: <dl class="element">
                   12613: <dt>Categories</dt>
                   12614: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   12615: <dt>Contexts in which this element may be used:</dt>
                   12616: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   12617: expected.</dd>
                   12618: <dt>Content model:</dt>
                   12619: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   12620: <dt>Element-specific attributes:</dt>
                   12621: <dd>None.</dd>
                   12622: <dt>DOM interface:</dt>
                   12623: <dd><del class="diff-old">No difference from</del> <ins class=
                   12624: "diff-chg">Uses</ins> <code><a href=
                   12625: "#htmlelement">HTMLElement</a></code> .</dd>
                   12626: </dl>
                   12627: <p>The <code><a href="#small">small</a></code> element represents
                   12628: small print (part of a document often describing legal
                   12629: restrictions, such as copyrights or other disadvantages), or other
                   12630: side comments.</p>
                   12631: <p class="note">The <code><a href="#small">small</a></code> element
                   12632: does not <del class="diff-old">"de-emphasise"</del> <ins class=
                   12633: "diff-chg">"de-emphasize"</ins> or lower the importance of text
                   12634: emphasised by the <code><a href="#em">em</a></code> element or
                   12635: marked as important with the <code><a href=
                   12636: "#strong">strong</a></code> element.</p>
                   12637: <div class="example">
                   12638: <p>In this example the footer contains contact information and a
                   12639: copyright.</p>
                   12640: <pre>
                   12641: &lt;footer&gt;
                   12642:  &lt;address&gt;
                   12643:   For more details, contact
                   12644:   &lt;a href="mailto:js@example.com"&gt;John Smith&lt;/a&gt;.
                   12645:  &lt;/address&gt;
                   12646:  &lt;p&gt;&lt;small&gt;© copyright 2038 Example Corp.&lt;/small&gt;&lt;/p&gt;
                   12647: &lt;/footer&gt;
                   12648: </pre>
                   12649: <p>In this second example, the <code><a href=
                   12650: "#small">small</a></code> element is used for a side comment.</p>
                   12651: <pre>
                   12652: &lt;p&gt;Example Corp today announced record profits for the
                   12653: second quarter &lt;small&gt;(Full Disclosure: Foo News is a subsidiary of
                   12654: Example Corp)&lt;/small&gt;, leading to speculation about a third quarter
                   12655: merger
                   12656: with
                   12657: Demo
                   12658: Group.&lt;/p&gt;
                   12659: </pre>
                   12660: <p>In this last example, the <code><a href=
                   12661: "#small">small</a></code> element is marked as being
                   12662: <em>important</em> small print.</p>
                   12663: <pre>
                   12664: &lt;p&gt;
                   12665: &lt;strong&gt;
                   12666: &lt;small&gt;
                   12667: Continued
                   12668: use
                   12669: of
                   12670: this
                   12671: service
                   12672: will
                   12673: result
                   12674: in
                   12675: a
                   12676: kiss.&lt;/small&gt;
                   12677: &lt;/strong&gt;
                   12678: &lt;/p&gt;
                   12679: </pre></div>
                   12680: <h4 id="the-mark"><span class="secno"><del class=
                   12681: "diff-old">3.12.7.</del> <ins class="diff-chg">3.10.7</ins></span>
                   12682: The <dfn id="mark"><code><del class="diff-old">m</del> <ins class=
                   12683: "diff-chg">mark</ins></code></dfn> element</h4>
                   12684: <dl class="element">
                   12685: <dt>Categories</dt>
                   12686: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   12687: <dt>Contexts in which this element may be used:</dt>
                   12688: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   12689: expected.</dd>
                   12690: <dt>Content model:</dt>
                   12691: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   12692: <dt>Element-specific attributes:</dt>
                   12693: <dd>None.</dd>
                   12694: <dt>DOM interface:</dt>
                   12695: <dd><del class="diff-old">No difference from</del> <ins class=
                   12696: "diff-chg">Uses</ins> <code><a href=
                   12697: "#htmlelement">HTMLElement</a></code> .</dd>
                   12698: </dl>
                   12699: <del class="diff-old">This section has a large number of
                   12700: outstanding comments and will likely be rewritten or removed from
                   12701: the spec.</del>
                   12702: <p>The <code><del class="diff-old">m</del> <a href=
                   12703: "#mark"><ins class="diff-chg">mark</ins></a></code> element
                   12704: represents a run of text <ins class="diff-new">in one
                   12705: document</ins> marked or <del class="diff-old">highlighted.
                   12706: In</del> <ins class="diff-chg">highlighted for reference purposes,
                   12707: due to its relevance in another context. When used in a quotation
                   12708: or other block of text referred to from</ins> the <del class=
                   12709: "diff-old">following snippet,</del> <ins class="diff-chg">prose, it
                   12710: indicates</ins> a <del class="diff-old">paragraph</del> <ins class=
                   12711: "diff-chg">highlight that was not originally present but which has
                   12712: been added to bring the reader's attention to a part</ins> of
                   12713: <ins class="diff-new">the</ins> text <del class=
                   12714: "diff-old">refers</del> <ins class="diff-chg">that might not have
                   12715: been considered important by the original author when the block was
                   12716: originally written, but which is now under previously unexpected
                   12717: scrutiny. When used in the main prose of a document, it indicates a
                   12718: part of the document that has been highlighted due to its likely
1.2     ! mike     12719: relevance</ins> to <ins class="diff-new">the user's current
        !          12720: activity.</ins></p>
        !          12721: <p class="big-issue"><ins class="diff-new">The rendering section
        !          12722: will eventually suggest that user agents provide</ins> a
        !          12723: <del class="diff-old">specific</del> <ins class="diff-chg">way to
        !          12724: let users jump between</ins> <code><a href="#mark"><ins class=
        !          12725: "diff-chg">mark</ins></a></code> <ins class="diff-chg">elements.
        !          12726: Suggested rendering is a neon yellow background highlight, though
        !          12727: UAs maybe should allow this to be toggled.</ins></p>
1.1       mike     12728: <div class="example">
                   12729: <p><ins class="diff-chg">This example shows how the</ins>
                   12730: <code><a href="#mark"><ins class="diff-chg">mark</ins></a></code>
                   12731: <ins class="diff-chg">example can be used to bring attention to a
                   12732: particular</ins> part of a <del class="diff-old">code
                   12733: fragment.</del> <ins class="diff-chg">quotation:</ins></p>
                   12734: <del class="diff-old">&lt;pre&gt;&lt;code&gt;var i: Integer; begin
                   12735: i := &lt;m&gt;1.1&lt;/m&gt;; end.&lt;/code&gt; &lt;/pre&gt;</del>
                   12736: <pre>
                   12737: &lt;p lang="en-US"&gt;Consider the following quote:&lt;/p&gt;
                   12738: <ins class="diff-chg">&lt;blockquote lang="en-GB"&gt;
                   12739:  &lt;p&gt;Look around and you will find, no-one's really
                   12740:  &lt;mark&gt;colour&lt;/mark&gt; blind.&lt;/p&gt;
                   12741: &lt;/blockquote&gt;
                   12742: &lt;p lang="en-US"&gt;As we can tell from the &lt;em&gt;spelling&lt;/em&gt; of the word,
                   12743: the
                   12744: person
                   12745: writing
                   12746: this
                   12747: quote
                   12748: is
                   12749: clearly
                   12750: not
                   12751: American.&lt;/p&gt;
                   12752: </ins>
                   12753: </pre></div>
                   12754: <div class="example">
                   12755: <p>Another example of the <code><del class="diff-old">m</del>
                   12756: <a href="#mark"><ins class="diff-chg">mark</ins></a></code> element
                   12757: is highlighting parts of a document that are matching some search
                   12758: string. If someone looked at a document, and the server knew that
                   12759: the user was searching for the word "kitten", then the server might
                   12760: return the document with one paragraph modified as follows:</p>
                   12761: <del class="diff-old">s who are visiting me these days. They're
                   12762: really cute. I think</del>
                   12763: <pre>
                   12764: &lt;p&gt;I also have some &lt;mark&gt;kitten&lt;/mark&gt;s who are visiting me
                   12765: <ins class=
                   12766: "diff-chg">these days. They're really cute. I think they like my garden! Maybe I
                   12767: should
                   12768: adopt
                   12769: a
                   12770: &lt;mark&gt;
                   12771: kitten&lt;/mark&gt;.&lt;/p&gt;
                   12772: </ins>
                   12773: </pre></div>
                   12774: <div class="example">
                   12775: <p><ins class="diff-chg">In the following snippet, a paragraph of
                   12776: text refers to a specific part of a code fragment.</ins></p>
                   12777: <pre>
                   12778: &lt;p&gt;The highlighted part below is where the error lies:&lt;/p&gt;<ins class="diff-chg">
                   12779: &lt;pre&gt;&lt;code&gt;var i: Integer;
                   12780: begin
                   12781:    i := &lt;mark&gt;1.1&lt;/mark&gt;;
                   12782: end.&lt;/code&gt;
                   12783: &lt;/pre&gt;
                   12784: </ins>
                   12785: </pre></div>
                   12786: <div class="example">
                   12787: <p><ins class="diff-chg">This is another example showing the use
                   12788: of</ins> <code><a href="#mark"><ins class=
                   12789: "diff-chg">mark</ins></a></code> <ins class="diff-chg">to highlight
                   12790: a part of quoted text that was originally not emphasised. In this
                   12791: example, common typographic conventions have led the author to
                   12792: explicitly style</ins> <code><a href="#mark"><ins class=
                   12793: "diff-chg">mark</ins></a></code> <ins class="diff-chg">elements in
                   12794: quotes to render in italics.</ins></p>
                   12795: <pre>
                   12796: &lt;article&gt;<ins class="diff-chg">
                   12797:  &lt;style&gt;
                   12798:   blockquote mark, q mark {
                   12799:     font: inherit; font-style: italic;
                   12800:     text-decoration: none;
                   12801:     background: transparent; color: inherit;
                   12802:   }
                   12803:   .bubble em {
                   12804:     font: inherit; font-size: larger;
                   12805:     text-decoration: underline;
                   12806:   }
                   12807:  &lt;/style&gt;
                   12808:  &lt;h1&gt;She knew&lt;/h1&gt;
                   12809:  &lt;p&gt;Did you notice the subtle joke in the joke on panel 4?&lt;/p&gt;
                   12810:  &lt;blockquote&gt;
                   12811:   &lt;p class="bubble"&gt;I didn't &lt;em&gt;want&lt;/em&gt; to believe. &lt;mark&gt;Of course
                   12812:   on some level I realized it was a known-plaintext attack.&lt;/mark&gt; But I
                   12813:   couldn't admit it until I saw for myself.&lt;/p&gt;
                   12814:  &lt;/blockquote&gt;
                   12815:  &lt;p&gt;(Emphasis mine.) I thought that was great. It's so pedantic, yet it
                   12816:  explains everything neatly.&lt;/p&gt;
                   12817: &lt;/article&gt;
                   12818: </ins>
                   12819: </pre>
                   12820: <p><ins class="diff-chg">Note, incidentally, the distinction
                   12821: between the</ins> <code><a href="#em"><ins class=
                   12822: "diff-chg">em</ins></a></code> <ins class="diff-chg">element in
                   12823: this example, which is part of the original text being quoted, and
                   12824: the</ins> <code><a href="#mark"><ins class=
                   12825: "diff-chg">mark</ins></a></code> <ins class="diff-chg">element,
                   12826: which is highlighting a part for comment.</ins></p>
                   12827: </div>
                   12828: <div class="example">
                   12829: <p><ins class="diff-chg">The following example shows the difference
                   12830: between denoting the</ins> <em><ins class=
                   12831: "diff-chg">importance</ins></em> <ins class="diff-chg">of a span of
                   12832: text (</ins> <code><a href="#strong"><ins class=
                   12833: "diff-chg">strong</ins></a></code> <ins class="diff-chg">) as
                   12834: opposed to denoting the</ins> <em><ins class=
                   12835: "diff-chg">relevance</ins></em> <ins class="diff-chg">of a span of
                   12836: text (</ins> <code><a href="#mark"><ins class=
                   12837: "diff-chg">mark</ins></a></code> <ins class="diff-chg">). It is an
                   12838: extract from a textbook, where the extract has had the parts
                   12839: relevant to the exam highlighted. The safety warnings, important
                   12840: though</ins> they <del class="diff-old">like my
                   12841: garden!&lt;/p&gt;</del> <ins class="diff-chg">may be, are
                   12842: apparently not relevant to the exam.</ins></p>
                   12843: <pre>
                   12844: &lt;h3&gt;Wormhole Physics Introduction&lt;/h3&gt;<ins class=
                   12845: "diff-chg">
                   12846: &lt;p&gt;&lt;mark&gt;A wormhole in normal conditions can be held open for a
                   12847: maximum of just under 39 minutes.&lt;/mark&gt; Conditions that can increase
                   12848: the time include a powerful energy source coupled to one or both of
                   12849: the gates connecting the wormhole, and a large gravity well (such as a
                   12850: black hole).&lt;/p&gt;
                   12851: &lt;p&gt;&lt;mark&gt;Momentum is preserved across the wormhole. Electromagnetic
                   12852: radiation can travel in both directions through a wormhole,
                   12853: but matter cannot.&lt;/mark&gt;&lt;/p&gt;
                   12854: &lt;p&gt;When a wormhole is created, a vortex normally forms.
                   12855: &lt;strong&gt;Warning: The vortex caused by the wormhole opening will
                   12856: annihilate anything in its path.&lt;/strong&gt; Vortexes can be avoided when
                   12857: using sufficiently advanced dialing technology.&lt;/p&gt;
                   12858: &lt;p&gt;&lt;mark&gt;An obstruction in a gate will prevent it from accepting a
                   12859: wormhole
                   12860: connection.&lt;/mark&gt;
                   12861: &lt;/p&gt;
                   12862: </ins>
                   12863: </pre></div>
                   12864: <h4 id="the-dfn"><span class="secno"><del class=
                   12865: "diff-old">3.12.8.</del> <ins class="diff-chg">3.10.8</ins></span>
                   12866: The <dfn id="dfn"><code>dfn</code></dfn> element</h4>
                   12867: <dl class="element">
                   12868: <dt>Categories</dt>
                   12869: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   12870: <dt>Contexts in which this element may be used:</dt>
                   12871: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   12872: expected.</dd>
                   12873: <dt>Content model:</dt>
                   12874: <dd><a href="#phrasing0">Phrasing content</a> , but there must be
                   12875: no descendant <code><a href="#dfn">dfn</a></code> elements.</dd>
                   12876: <dt>Element-specific attributes:</dt>
                   12877: <dd>None, but the <code title="attr-dfn-title"><a href=
                   12878: "#title4">title</a></code> attribute has special semantics on this
                   12879: element.</dd>
                   12880: <dt>DOM interface:</dt>
                   12881: <dd><del class="diff-old">No difference from</del> <ins class=
                   12882: "diff-chg">Uses</ins> <code><a href=
                   12883: "#htmlelement">HTMLElement</a></code> .</dd>
                   12884: </dl>
                   12885: <p>The <code><a href="#dfn">dfn</a></code> element represents the
                   12886: defining instance of a term. The <a href="#paragraph" title=
                   12887: "paragraph">paragraph</a> , <a href="#dl" title="dl">description
                   12888: list group</a> , or <a href="#sectioning0" title=
                   12889: "sectioning content">section</a> that <del class=
                   12890: "diff-old">contains</del> <ins class="diff-chg">is the nearest
                   12891: ancestor of</ins> the <code><a href="#dfn">dfn</a></code> element
                   12892: <del class="diff-old">contains</del> <ins class="diff-chg">must
                   12893: also contain</ins> the <del class="diff-old">definition</del>
                   12894: <ins class="diff-chg">definition(s)</ins> for the <a href=
                   12895: "#defining" title="defining term">term</a> given by the <del class=
                   12896: "diff-old">contents of the</del> <code><a href=
                   12897: "#dfn">dfn</a></code> element.</p>
                   12898: <p><dfn id="defining">Defining term</dfn> : If the <code><a href=
                   12899: "#dfn">dfn</a></code> element has a <dfn id="title4" title=
                   12900: "attr-dfn-title"><code>title</code></dfn> attribute, then the exact
                   12901: value of that attribute is the term being defined. Otherwise, if it
                   12902: contains exactly one element child node and no child <a href=
                   12903: "#text-node" title="text node">text nodes</a> , and that child
                   12904: element is an <code><a href="#abbr">abbr</a></code> element with a
                   12905: <code title="attr-abbr-title"><a href="#title5">title</a></code>
                   12906: attribute, then the exact value of <em>that</em> attribute is the
                   12907: term being defined. Otherwise, it is the exact <code><a href=
                   12908: "#textcontent">textContent</a></code> of the <code><a href=
                   12909: "#dfn">dfn</a></code> element that gives the term being
                   12910: defined.</p>
                   12911: <p>If the <code title="attr-dfn-title"><a href=
                   12912: "#title4">title</a></code> attribute of the <code><a href=
                   12913: "#dfn">dfn</a></code> element is present, then it must <del class=
                   12914: "diff-old">only</del> contain <ins class="diff-new">only</ins> the
                   12915: term being defined. <del class="diff-old">There must only be one
                   12916: dfn element per document for each term defined (i.e. there must not
                   12917: be any duplicate terms ).</del></p>
                   12918: <p class="note">The <code title="attr-title"><a href=
                   12919: "#title">title</a></code> attribute of ancestor elements does not
                   12920: affect <code><a href="#dfn">dfn</a></code> elements. <del class=
                   12921: "diff-old">The dfn element enables automatic cross-references.
                   12922: Specifically, any span , abbr , code , var , samp , or</del></p>
                   12923: <p><ins class="diff-chg">An</ins> <code><del class=
                   12924: "diff-old">i</del> <a href="#a"><ins class=
                   12925: "diff-chg">a</ins></a></code> element that <del class=
                   12926: "diff-old">has a non-empty title attribute whose value exactly
                   12927: equals the term of</del> <ins class="diff-chg">links to</ins> a
                   12928: <code><a href="#dfn">dfn</a></code> element <del class=
                   12929: "diff-old">in the same document, or which has no title attribute
                   12930: but whose textContent exactly equals the term</del> <ins class=
                   12931: "diff-chg">represents an instance</ins> of <del class="diff-old">a
                   12932: dfn element in</del> the <del class="diff-old">document, and that
                   12933: has no interactive elements or dfn elements either as ancestors or
                   12934: descendants, and has no other elements as ancestors that are
                   12935: themselves matching these conditions, should be presented in such a
                   12936: way that the user can jump from the element to</del> <ins class=
                   12937: "diff-chg">term defined by</ins> the <del class=
                   12938: "diff-old">first</del> <code><a href="#dfn">dfn</a></code>
                   12939: <del class="diff-old">element giving the defining instance of that
                   12940: term.</del> <ins class="diff-chg">element.</ins></p>
                   12941: <div class="example">
                   12942: <p>In the following fragment, the term "GDO" is first defined in
                   12943: the first paragraph, then used in the second. <del class=
                   12944: "diff-old">A compliant UA could provide a link from the abbr
                   12945: element in</del></p>
                   12946: <pre>
                   12947: &lt;p&gt;The &lt;dfn&gt;&lt;abbr title="Garage Door Opener"&gt;GDO&lt;/abbr&gt;&lt;/dfn&gt;
                   12948: <ins class=
                   12949: "diff-chg">is a device that allows off-world teams to open the iris.&lt;/p&gt;
                   12950: &lt;!-- ... later in the document: --&gt;
                   12951: &lt;p&gt;Teal'c activated his &lt;abbr title="Garage Door Opener"&gt;GDO&lt;/abbr&gt;
                   12952: and
                   12953: so
                   12954: Hammond
                   12955: ordered
                   12956: </ins>
                   12957: the
                   12958: <del class="diff-old">second
                   12959: paragraph
                   12960: </del>
                   12961: <ins class="diff-chg">iris
                   12962: </ins>
                   12963: to
                   12964: <ins class="diff-new">be
                   12965: opened.&lt;/p&gt;
                   12966: </ins>
                   12967: </pre>
                   12968: <p><ins class="diff-new">With</ins> the <ins class=
                   12969: "diff-new">addition of an</ins> <code><del class=
                   12970: "diff-old">dfn</del> <a href="#a"><ins class=
                   12971: "diff-chg">a</ins></a></code> <del class="diff-old">element
                   12972: in</del> <ins class="diff-chg">element,</ins> the <del class=
                   12973: "diff-old">first.</del> <ins class="diff-chg">reference can be made
                   12974: explicit:</ins></p>
                   12975: <del class="diff-old"></del>
                   12976: <pre>
                   12977: &lt;p&gt;The &lt;dfn id=gdo&gt;&lt;abbr title="Garage Door Opener"&gt;GDO&lt;/abbr&gt;&lt;/dfn&gt;
                   12978: is a device that allows off-world teams to open the iris.&lt;/p&gt;
                   12979: &lt;!-- ... later in the document: --&gt;
                   12980: <del class=
                   12981: "diff-old">&lt;p&gt;Teal'c activated his &lt;abbr title="Garage Door Opener"&gt;GDO&lt;/abbr&gt;
                   12982: </del>
                   12983: <ins class=
                   12984: "diff-chg">&lt;p&gt;Teal'c activated his &lt;a href=#gdo&gt;&lt;abbr title="Garage Door Opener"&gt;GDO&lt;/abbr&gt;&lt;/a&gt;
                   12985: </ins>
                   12986: and
                   12987: so
                   12988: Hammond
                   12989: ordered
                   12990: the
                   12991: iris
                   12992: to
                   12993: be
                   12994: opened.&lt;/p&gt;
                   12995: </pre></div>
                   12996: <h4 id="the-abbr"><span class="secno"><del class=
                   12997: "diff-old">3.12.9.</del> <ins class="diff-chg">3.10.9</ins></span>
                   12998: The <dfn id="abbr"><code>abbr</code></dfn> element</h4>
                   12999: <dl class="element">
                   13000: <dt>Categories</dt>
                   13001: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   13002: <dt>Contexts in which this element may be used:</dt>
                   13003: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   13004: expected.</dd>
                   13005: <dt>Content model:</dt>
                   13006: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   13007: <dt>Element-specific attributes:</dt>
                   13008: <dd>None, but the <code title="attr-abbr-title"><a href=
                   13009: "#title5">title</a></code> attribute has special semantics on this
                   13010: element.</dd>
                   13011: <dt>DOM interface:</dt>
                   13012: <dd><del class="diff-old">No difference from</del> <ins class=
                   13013: "diff-chg">Uses</ins> <code><a href=
                   13014: "#htmlelement">HTMLElement</a></code> .</dd>
                   13015: </dl>
                   13016: <p>The <code><a href="#abbr">abbr</a></code> element represents an
                   13017: abbreviation or <del class="diff-old">acronym.</del> <ins class=
                   13018: "diff-chg">acronym, optionally with its expansion.</ins> The
                   13019: <dfn id="title5" title="attr-abbr-title"><code>title</code></dfn>
                   13020: attribute <del class="diff-old">should</del> <ins class=
                   13021: "diff-chg">may</ins> be used to provide an expansion of the
                   13022: abbreviation. <del class="diff-old">If present, the attribute</del>
                   13023: <ins class="diff-chg">The attribute, if specified,</ins> must
                   13024: <del class="diff-old">only</del> contain an expansion of the
                   13025: <del class="diff-old">abbreviation.</del> <ins class=
                   13026: "diff-chg">abbreviation, and nothing else.</ins></p>
                   13027: <div class="example">
                   13028: <p>The paragraph below contains an abbreviation marked up with the
                   13029: <code><a href="#abbr">abbr</a></code> element. <ins class=
                   13030: "diff-new">This paragraph</ins> <a href="#defining" title=
                   13031: "defining term"><ins class="diff-new">defines the term</ins></a>
                   13032: <ins class="diff-new">"Web Hypertext Application Technology Working
                   13033: Group".</ins></p>
                   13034: <del class="diff-old">The &lt;abbr title="Web Hypertext Application
                   13035: Technology Working Group"&gt;WHATWG&lt;/abbr&gt; is a loose
                   13036: unofficial collaboration of Web browser manufacturers and
                   13037: interested parties who wish to develop new technologies designed to
                   13038: allow authors to write and deploy</del>
                   13039: <pre>
                   13040: &lt;p&gt;The &lt;dfn id=whatwg&gt;&lt;abbr title="Web Hypertext Application
                   13041: <ins class=
                   13042: "diff-chg">Technology Working Group"&gt;WHATWG&lt;/abbr&gt;&lt;/dfn&gt; is a loose
                   13043: unofficial collaboration of Web browser manufacturers and interested
                   13044: parties who wish to develop new technologies designed to allow authors
                   13045: to
                   13046: write
                   13047: and
                   13048: deploy
                   13049: </ins>
                   13050: Applications
                   13051: over
                   13052: the
                   13053: World
                   13054: Wide
                   13055: Web.&lt;/p&gt;
                   13056: </pre></div>
                   13057: <div class="example">
                   13058: <p><del class="diff-old">The title attribute may be omitted if
                   13059: there is a dfn element in the document whose defining term</del>
                   13060: <ins class="diff-chg">This paragraph has two abbreviations. Notice
                   13061: how only one</ins> is <ins class="diff-new">defined;</ins> the
                   13062: <del class="diff-old">abbreviation (the textContent of</del>
                   13063: <ins class="diff-chg">other, with no expansion associated with it,
                   13064: does not use</ins> the <code><a href="#abbr">abbr</a></code>
                   13065: <del class="diff-old">element).</del> <ins class=
                   13066: "diff-chg">element.</ins></p>
                   13067: <pre>
                   13068: &lt;p&gt;The &lt;abbr title="Web Hypertext Application Technology Working<ins class="diff-chg">
                   13069: Group"&gt;
                   13070: WHATWG&lt;/abbr&gt;
                   13071: started
                   13072: working
                   13073: on
                   13074: HTML5
                   13075: in
                   13076: 2004.&lt;/p&gt;
                   13077: </ins>
                   13078: </pre></div>
                   13079: <div class="example">
                   13080: <p><del class="diff-old">In the example below, the word "Zat" is
                   13081: used as</del> <ins class="diff-chg">This paragraph links</ins> an
                   13082: abbreviation <del class="diff-old">in</del> <ins class=
                   13083: "diff-chg">to its definition.</ins></p>
                   13084: <pre>
                   13085: &lt;p&gt;The &lt;a href="#whatwg"&gt;&lt;abbr title="Web Hypertext Application<ins class="diff-chg">
                   13086: Technology Working Group"&gt;WHATWG&lt;/abbr&gt;&lt;/a&gt; community does not
                   13087: have
                   13088: much
                   13089: representation
                   13090: from
                   13091: Asia.&lt;/p&gt;
                   13092: </ins>
                   13093: </pre></div>
                   13094: <div class="example">
                   13095: <p><ins class="diff-chg">This paragraph marks up an abbreviation
                   13096: without giving an expansion, possibly as a hook to apply styles for
                   13097: abbreviations (e.g. smallcaps).</ins></p>
                   13098: <pre>
                   13099: &lt;p&gt;Philip` and Dashiva both denied that they were going to<ins class="diff-chg">
                   13100: get the issue counts from past revisions of the specification to
                   13101: backfill
                   13102: </ins>
                   13103: the
                   13104: <del class="diff-old">second
                   13105: paragraph.
                   13106: The
                   13107: </del>
                   13108: <ins class="diff-chg">&lt;abbr&gt;
                   13109: WHATWG&lt;/abbr&gt;
                   13110: issue
                   13111: graph.&lt;/p&gt;
                   13112: </ins>
                   13113: </pre></div>
                   13114: <p><ins class="diff-chg">If an</ins> abbreviation is <del class=
                   13115: "diff-old">defined in</del> <ins class="diff-chg">pluralized,</ins>
                   13116: the <del class="diff-old">first, so</del> <ins class=
                   13117: "diff-chg">expansion's grammatical number (plural vs singular) must
                   13118: match</ins> the <del class="diff-old">explanatory title attribute
                   13119: has been omitted. Because</del> <ins class="diff-chg">grammatical
                   13120: number</ins> of the <del class="diff-old">way dfn elements are
                   13121: defined,</del> <ins class="diff-chg">contents of</ins> the
                   13122: <del class="diff-old">second abbr element</del> <ins class=
                   13123: "diff-chg">element.</ins></p>
                   13124: <div class="example">
                   13125: <p><ins class="diff-chg">Here the plural is outside the element, so
                   13126: the expansion is</ins> in <del class="diff-old">this example would
                   13127: be connected (in some UA-specific way) to</del> the <del class=
                   13128: "diff-old">first.</del> <ins class="diff-chg">singular:</ins></p>
                   13129: <del class="diff-old">&lt;p&gt; Jack used a</del>
                   13130: <pre>
                   13131: &lt;p&gt;Two &lt;abbr title="Working Group"&gt;WG&lt;/abbr&gt;s worked on
                   13132: <ins class=
                   13133: "diff-chg">this specification: the &lt;abbr&gt;WHATWG&lt;/abbr&gt; and the
                   13134: </ins>
                   13135: &lt;abbr&gt;
                   13136: <del class="diff-old">Zat&lt;/abbr&gt;
                   13137: to
                   13138: make
                   13139: </del>
                   13140: <ins class="diff-chg">HTMLWG&lt;/abbr&gt;.&lt;/p&gt;
                   13141: </ins>
                   13142: </pre>
                   13143: <p><ins class="diff-chg">Here</ins> the <del class="diff-old">boxes
                   13144: of evidence disappear.&lt;/p&gt;</del> <ins class="diff-chg">plural
                   13145: is inside the element, so the expansion is in the plural:</ins></p>
                   13146: <pre>
                   13147: &lt;p&gt;Two &lt;abbr title="Working Groups"&gt;WGs&lt;/abbr&gt; worked on<ins class="diff-chg">
                   13148: this specification: the &lt;abbr&gt;WHATWG&lt;/abbr&gt; and the
                   13149: &lt;abbr&gt;
                   13150: HTMLWG&lt;/abbr&gt;.&lt;/p&gt;
                   13151: </ins>
                   13152: </pre></div>
                   13153: <h4 id="the-time"><span class="secno"><del class=
                   13154: "diff-old">3.12.10.</del> <ins class=
                   13155: "diff-chg">3.10.10</ins></span> The <dfn id=
                   13156: "time"><code>time</code></dfn> element</h4>
                   13157: <dl class="element">
                   13158: <dt>Categories</dt>
                   13159: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   13160: <dt>Contexts in which this element may be used:</dt>
                   13161: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   13162: expected.</dd>
                   13163: <dt>Content model:</dt>
                   13164: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   13165: <dt>Element-specific attributes:</dt>
                   13166: <dd><code title="attr-time-datetime"><a href=
                   13167: "#datetime">datetime</a></code></dd>
                   13168: <dt>DOM interface:</dt>
                   13169: <dd>
                   13170: <pre class="idl">
                   13171: interface <dfn id=
                   13172: "htmltimeelement">HTMLTimeElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
                   13173:            attribute DOMString <a href="#datetime0" title=
                   13174: "dom-time-datetime">dateTime</a>;
                   13175:   readonly attribute <a href=
                   13176: "#domtimestamp">DOMTimeStamp</a> <a href="#date0" title=
                   13177: "dom-time-date">date</a>;
                   13178:   readonly attribute <a href=
                   13179: "#domtimestamp">DOMTimeStamp</a> <a href="#time1" title=
                   13180: "dom-time-time">time</a>;
                   13181:   readonly attribute <a href=
                   13182: "#domtimestamp">DOMTimeStamp</a> <a href="#timezone0" title=
                   13183: "dom-time-timezone">timezone</a>;
                   13184: };
                   13185: </pre></dd>
                   13186: </dl>
                   13187: <p>The <code><a href="#time">time</a></code> element represents a
                   13188: date and/or a time.</p>
                   13189: <p>The <dfn id="datetime" title=
                   13190: "attr-time-datetime"><code>datetime</code></dfn> attribute, if
                   13191: present, must contain a <a href="#date-or">date or time string</a>
                   13192: that identifies the date or time being specified.</p>
                   13193: <p>If the <code title="attr-time-datetime"><a href=
                   13194: "#datetime">datetime</a></code> attribute is not present, then the
                   13195: date or time must be specified in the content of the element, such
                   13196: that parsing the element's <code><a href=
                   13197: "#textcontent">textContent</a></code> according to the rules for
                   13198: parsing <a href="#date-or0" title=
                   13199: "date or time string in content">date or time strings in
                   13200: content</a> successfully extracts a date or time.</p>
                   13201: <p>The <dfn id="datetime0" title=
                   13202: "dom-time-datetime"><code>dateTime</code></dfn> DOM attribute must
                   13203: <a href="#reflect">reflect</a> the <code title=
                   13204: "attr-time-datetime"><a href="#datetime">datetime</a></code>
                   13205: content attribute.</p>
                   13206: <p>User agents, to obtain the <dfn id="date" title=
                   13207: "concept-time-date">date</dfn> , <dfn id="time0" title=
                   13208: "concept-time-time">time</dfn> , and <dfn id="timezone" title=
                   13209: "concept-time-timezone">timezone</dfn> represented by a
                   13210: <code><a href="#time">time</a></code> element, must follow these
                   13211: steps:</p>
                   13212: <ol>
                   13213: <li>If the <code title="attr-time-datetime"><a href=
                   13214: "#datetime">datetime</a></code> attribute is present, then parse it
                   13215: according to the rules for parsing <a href="#date-or1" title=
                   13216: "date or time string in attributes">date or time strings in
                   13217: attributes</a> , and let the result be <var title="">result</var>
                   13218: .</li>
                   13219: <li>Otherwise, parse the element's <code><a href=
                   13220: "#textcontent">textContent</a></code> according to the rules for
                   13221: parsing <a href="#date-or1" title=
                   13222: "date or time string in attributes">date or time strings in
                   13223: content</a> , and let the result be <var title="">result</var>
                   13224: .</li>
                   13225: <li>If <var title="">result</var> is empty (because the parsing
                   13226: failed), then the <a href="#date" title=
                   13227: "concept-time-date">date</a> is unknown, the <a href="#time0"
                   13228: title="concept-time-time">time</a> is unknown, and the <a href=
                   13229: "#timezone" title="concept-time-timezone">timezone</a> is
                   13230: unknown.</li>
                   13231: <li>Otherwise: if <var title="">result</var> contains a date, then
                   13232: that is the <a href="#date" title="concept-time-date">date</a> ; if
                   13233: <var title="">result</var> contains a time, then that is the
                   13234: <a href="#time0" title="concept-time-time">time</a> ; and if
                   13235: <var title="">result</var> contains a timezone, then the timezone
                   13236: is the element's <a href="#timezone" title=
                   13237: "concept-time-timezone">timezone</a> . (A timezone can only be
                   13238: present if both a date and a time are also present.)</li>
                   13239: </ol>
                   13240: <p>The <dfn id="date0" title=
                   13241: "dom-time-date"><code>date</code></dfn> DOM attribute must return
                   13242: null if the <a href="#date" title="concept-time-date">date</a> is
                   13243: unknown, and otherwise must return the time corresponding to
                   13244: midnight UTC (i.e. the first second) of the given <a href="#date"
                   13245: title="concept-time-date">date</a> .</p>
                   13246: <p>The <dfn id="time1" title=
                   13247: "dom-time-time"><code>time</code></dfn> DOM attribute must return
                   13248: null if the <a href="#time0" title="concept-time-time">time</a> is
                   13249: unknown, and otherwise must return the time corresponding to the
                   13250: given <a href="#time0" title="concept-time-time">time</a> of
                   13251: 1970-01-01, with the timezone UTC.</p>
                   13252: <p>The <dfn id="timezone0" title=
                   13253: "dom-time-timezone"><code>timezone</code></dfn> DOM attribute must
                   13254: return null if the <a href="#timezone" title=
                   13255: "concept-time-timezone">timezone</a> is unknown, and otherwise must
                   13256: return the time corresponding to 1970-01-01 00:00 UTC in the given
                   13257: <a href="#timezone" title="concept-time-timezone">timezone</a> ,
                   13258: with the timezone set to UTC (i.e. the time corresponding to
                   13259: 1970-01-01 at 00:00 UTC plus the offset corresponding to the
                   13260: timezone).</p>
                   13261: <div class="example">
                   13262: <p>In the following snippet:</p>
                   13263: <pre>
                   13264: &lt;p&gt;
                   13265: Our
                   13266: first
                   13267: date
                   13268: was
                   13269: &lt;time
                   13270: datetime="2006-09-23"&gt;
                   13271: a
                   13272: <del class="diff-old">saturday&lt;/time&gt;.&lt;/p&gt;
                   13273: </del>
                   13274: <ins class="diff-chg">Saturday&lt;/time&gt;.&lt;/p&gt;
                   13275: </ins>
                   13276: </pre>
                   13277: <p>...the <code><a href="#time">time</a></code> element's
                   13278: <code title="dom-time-date"><a href="#date0">date</a></code>
                   13279: attribute would have the value 1,158,969,600,000ms, and the
                   13280: <code title="dom-time-time"><a href="#time1">time</a></code> and
                   13281: <code title="dom-time-timezone"><a href=
                   13282: "#timezone0">timezone</a></code> attributes would return null.</p>
                   13283: <p>In the following snippet:</p>
                   13284: <pre>
                   13285: &lt;p&gt;
                   13286: We
                   13287: stopped
                   13288: talking
                   13289: at
                   13290: &lt;time
                   13291: datetime="2006-09-24
                   13292: 05:00
                   13293: -7"&gt;
                   13294: 5am
                   13295: the
                   13296: next
                   13297: morning&lt;/time&gt;.&lt;/p&gt;
                   13298: </pre>
                   13299: <p>...the <code><a href="#time">time</a></code> element's
                   13300: <code title="dom-time-date"><a href="#date0">date</a></code>
                   13301: attribute would have the value 1,159,056,000,000ms, the
                   13302: <code title="dom-time-time"><a href="#time1">time</a></code>
                   13303: attribute would have the value 18,000,000ms, and the <code title=
                   13304: "dom-time-timezone"><a href="#timezone0">timezone</a></code>
                   13305: attribute would return <del class="diff-old">-25,200,000ms.</del>
                   13306: <ins class="diff-chg">−25,200,000ms.</ins> To obtain the actual
                   13307: time, the three attributes can be added together, obtaining
                   13308: 1,159,048,800,000, which is the specified date and time in UTC.</p>
                   13309: <p>Finally, in the following snippet:</p>
                   13310: <pre>
                   13311: &lt;p&gt;
                   13312: Many
                   13313: people
                   13314: get
                   13315: up
                   13316: at
                   13317: &lt;time&gt;
                   13318: 08:00&lt;/time&gt;.&lt;/p&gt;
                   13319: </pre>
                   13320: <p>...the <code><a href="#time">time</a></code> element's
                   13321: <code title="dom-time-date"><a href="#date0">date</a></code>
                   13322: attribute would have the value null, the <code title=
                   13323: "dom-time-time"><a href="#time1">time</a></code> attribute would
                   13324: have the value 28,800,000ms, and the <code title=
                   13325: "dom-time-timezone"><a href="#timezone0">timezone</a></code>
                   13326: attribute would return null.</p>
                   13327: </div>
                   13328: <p class="big-issue">These APIs may be suboptimal. Comments on
                   13329: making them more useful to JS authors are welcome. The primary use
                   13330: cases for these elements are for marking up publication dates e.g.
                   13331: in blog entries, and for marking event dates in hCalendar markup.
                   13332: Thus the DOM APIs are likely to be used as ways to generate
                   13333: interactive calendar widgets or some such.</p>
                   13334: <h4 id="the-progress"><span class="secno"><del class=
                   13335: "diff-old">3.12.11.</del> <ins class=
                   13336: "diff-chg">3.10.11</ins></span> The <dfn id=
                   13337: "progress"><code>progress</code></dfn> element</h4>
                   13338: <dl class="element">
                   13339: <dt>Categories</dt>
                   13340: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   13341: <dt>Contexts in which this element may be used:</dt>
                   13342: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   13343: expected.</dd>
                   13344: <dt>Content model:</dt>
                   13345: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   13346: <dt>Element-specific attributes:</dt>
                   13347: <dd><code title="attr-progress-value"><a href=
                   13348: "#value1">value</a></code></dd>
                   13349: <dd><code title="attr-progress-max"><a href=
                   13350: "#max">max</a></code></dd>
                   13351: <dt>DOM interface:</dt>
                   13352: <dd>
                   13353: <pre class="idl">
                   13354: interface <dfn id=
                   13355: "htmlprogresselement">HTMLProgressElement</dfn> : <a href=
                   13356: "#htmlelement">HTMLElement</a> {
                   13357:            attribute float <a href="#value2" title=
                   13358: "dom-progress-value">value</a>;
                   13359:            attribute float <a href="#max0" title=
                   13360: "dom-progress-max">max</a>;
                   13361:   readonly attribute float <a href="#position" title=
                   13362: "dom-progress-position">position</a>;
                   13363: };
                   13364: </pre></dd>
                   13365: </dl>
                   13366: <p>The <code><a href="#progress">progress</a></code> element
                   13367: represents the completion progress of a task. The progress is
                   13368: either indeterminate, indicating that progress is being made but
                   13369: that it is not clear how much more work remains to be done before
                   13370: the task is complete (e.g. because the task is waiting for a remote
                   13371: host to respond), or the progress is a number in the range zero to
                   13372: a maximum, giving the fraction of work that has so far been
                   13373: completed.</p>
                   13374: <p>There are two attributes that determine the current task
                   13375: completion represented by the element.</p>
                   13376: <p>The <dfn id="value1" title=
                   13377: "attr-progress-value"><code>value</code></dfn> attribute specifies
                   13378: how much of the task has been completed, and the <dfn id="max"
                   13379: title="attr-progress-max"><code>max</code></dfn> attribute
                   13380: specifies how much work the task requires in total. The units are
                   13381: arbitrary and not specified.</p>
                   13382: <p>Instead of using the attributes, authors are recommended to
                   13383: <del class="diff-old">simply</del> include the current value and
                   13384: the maximum value inline as text inside the element.</p>
                   13385: <div class="example">
                   13386: <p>Here is a snippet of a Web application that shows the progress
                   13387: of some automated task:</p>
                   13388: <pre>
                   13389: &lt;section&gt;
                   13390:  &lt;h2&gt;Task Progress&lt;/h2&gt;
                   13391: <del class=
                   13392: "diff-old"> &lt;p&gt;&lt;label&gt;Progress: &lt;progress&gt;&lt;span id="p"&gt;0&lt;/span&gt;%&lt;/progress&gt;&lt;/p&gt;
                   13393: </del>
                   13394: <ins class=
                   13395: "diff-chg"> &lt;p&gt;Progress: &lt;progress&gt;&lt;span id="p"&gt;0&lt;/span&gt;%&lt;/progress&gt;&lt;/p&gt;
                   13396: </ins>
                   13397:  &lt;script&gt;
                   13398:   var progressBar = document.getElementById('p');
                   13399:   function updateProgress(newValue) {
                   13400:     progressBar.textContent = newValue;
                   13401:   }
                   13402:  &lt;/script&gt;
                   13403: &lt;/section&gt;
                   13404: </pre>
                   13405: <p>(The <code>updateProgress()</code> method in this example would
                   13406: be called by some other code on the page to update the actual
                   13407: progress bar as the task progressed.)</p>
                   13408: </div>
                   13409: <p><strong>Author requirements</strong> : The <code title=
                   13410: "attr-progress-max"><a href="#max">max</a></code> and <code title=
                   13411: "attr-progress-value"><a href="#value1">value</a></code>
                   13412: attributes, when present, must have values that are <a href=
                   13413: "#valid1" title="valid floating point number">valid floating point
                   13414: numbers</a> . The <code title="attr-progress-max"><a href=
                   13415: "#max">max</a></code> attribute, if present, must have a value
                   13416: greater than zero. The <code title="attr-progress-value"><a href=
                   13417: "#value1">value</a></code> attribute, if present, must have a value
                   13418: equal to or greater than zero, and less than or equal to the value
                   13419: of the <code title="attr-progress-max"><a href=
                   13420: "#max">max</a></code> attribute, if present.</p>
                   13421: <p class="note"><ins class="diff-new">The</ins> <code><a href=
                   13422: "#progress"><ins class="diff-new">progress</ins></a></code>
                   13423: <ins class="diff-new">element is the wrong element to use for
                   13424: something that is just a gauge, as opposed to task progress. For
                   13425: instance, indicating disk space usage using</ins> <code><a href=
                   13426: "#progress"><ins class="diff-new">progress</ins></a></code>
                   13427: <ins class="diff-new">would be inappropriate. Instead, the</ins>
                   13428: <code><a href="#meter"><ins class="diff-new">meter</ins></a></code>
                   13429: <ins class="diff-new">element is available for such use
                   13430: cases.</ins></p>
                   13431: <p><strong>User agent requirements</strong> : User agents must
                   13432: parse the <code title="attr-progress-max"><a href=
                   13433: "#max">max</a></code> and <code title=
                   13434: "attr-progress-value"><a href="#value1">value</a></code>
                   13435: attributes' values according to the <a href="#rules1">rules for
                   13436: parsing floating point number values</a> .</p>
                   13437: <p>If the <code title="attr-progress-value"><a href=
                   13438: "#value1">value</a></code> attribute is omitted, then user agents
                   13439: must also parse the <code><a href=
                   13440: "#textcontent">textContent</a></code> of the <code><a href=
                   13441: "#progress">progress</a></code> element in question using the
                   13442: <a href="#steps">steps for finding one or two numbers of a ratio in
                   13443: a string</a> . These steps will return nothing, one number, one
                   13444: number with a denominator punctuation character, or two
                   13445: numbers.</p>
                   13446: <p>Using the results of this processing, user agents must determine
                   13447: whether the progress bar is an indeterminate progress bar, or
                   13448: whether it is a determinate progress bar, and in the latter case,
                   13449: what its current and maximum values are, all as follows:</p>
                   13450: <ol>
                   13451: <li>If the <code title="attr-progress-max"><a href=
                   13452: "#max">max</a></code> attribute is omitted, and the <code title=
                   13453: "attr-progress-value"><a href="#value1">value</a></code> is
                   13454: omitted, and the results of parsing the <code><a href=
                   13455: "#textcontent">textContent</a></code> was nothing, then the
                   13456: progress bar is an indeterminate progress bar. Abort these
                   13457: steps.</li>
                   13458: <li>Otherwise, it is a determinate progress bar.</li>
                   13459: <li>If the <code title="attr-progress-max"><a href=
                   13460: "#max">max</a></code> attribute is included, then, if a value could
                   13461: be parsed out of it, then the maximum value is that value.</li>
                   13462: <li>Otherwise, if the <code title="attr-progress-max"><a href=
                   13463: "#max">max</a></code> attribute is absent but the <code title=
                   13464: "attr-progress-value"><a href="#value1">value</a></code> attribute
                   13465: is present, or, if the <code title="attr-progress-max"><a href=
                   13466: "#max">max</a></code> attribute is present but no value could be
                   13467: parsed from it, then the maximum is 1.</li>
                   13468: <li>Otherwise, if neither attribute is included, then, if the
                   13469: <code><a href="#textcontent">textContent</a></code> contained one
                   13470: number with an associated denominator punctuation character, then
                   13471: the maximum value is the <span>value associated with that
                   13472: denominator punctuation character</span> ; otherwise, if the
                   13473: <code><a href="#textcontent">textContent</a></code> contained two
                   13474: numbers, the maximum value is the higher of the two values;
                   13475: otherwise, the maximum value is 1.</li>
                   13476: <li>If the <code title="attr-progress-value"><a href=
                   13477: "#value1">value</a></code> attribute is present on the element and
                   13478: a value could be parsed out of it, that value is the current value
                   13479: of the progress bar. Otherwise, if the attribute is present but no
                   13480: value could be parsed from it, the current value is zero.</li>
                   13481: <li>Otherwise if the <code title="attr-progress-value"><a href=
                   13482: "#value1">value</a></code> attribute is absent and the <code title=
                   13483: "attr-progress-max"><a href="#max">max</a></code> attribute is
                   13484: present, then, if the <code><a href=
                   13485: "#textcontent">textContent</a></code> was parsed and found to
                   13486: contain just one number, with no associated denominator punctuation
                   13487: character, then the current value is that number. Otherwise, if the
                   13488: <code title="attr-progress-value"><a href=
                   13489: "#value1">value</a></code> attribute is absent and the <code title=
                   13490: "attr-progress-max"><a href="#max">max</a></code> attribute is
                   13491: present then the current value is zero.</li>
                   13492: <li>Otherwise, if neither attribute is present, then the current
                   13493: value is the lower of the one or two numbers that were found in the
                   13494: <code><a href="#textcontent">textContent</a></code> of the
                   13495: element.</li>
                   13496: <li>If the maximum value is less than or equal to zero, then it is
                   13497: reset to 1.</li>
                   13498: <li>If the current value is less than zero, then it is reset to
                   13499: zero.</li>
                   13500: <li>Finally, if the current value is greater than the maximum
                   13501: value, then the current value is reset to the maximum value.</li>
                   13502: </ol>
                   13503: <p><strong>UA requirements for showing the progress bar</strong> :
                   13504: When representing a <code><a href="#progress">progress</a></code>
                   13505: element to the user, the UA should indicate whether it is a
                   13506: determinate or indeterminate progress bar, and in the former case,
                   13507: should indicate the relative position of the current value relative
                   13508: to the maximum value.</p>
                   13509: <p>The <dfn id="max0" title=
                   13510: "dom-progress-max"><code>max</code></dfn> and <dfn id="value2"
                   13511: title="dom-progress-value"><code>value</code></dfn> DOM attributes
                   13512: must <a href="#reflect">reflect</a> the elements' content
                   13513: attributes of the same name. When the relevant content attributes
                   13514: are absent, the DOM attributes must return zero. The value parsed
                   13515: from the <code><a href="#textcontent">textContent</a></code> never
                   13516: affects the DOM values.</p>
                   13517: <p class="big-issue">Would be cool to have the <code title=
                   13518: "dom-progress-value"><a href="#value2">value</a></code> DOM
                   13519: attribute update the <code><a href=
                   13520: "#textcontent">textContent</a></code> in-line...</p>
                   13521: <p>If the progress bar is an indeterminate progress bar, then the
                   13522: <dfn id="position" title=
                   13523: "dom-progress-position"><code>position</code></dfn> DOM attribute
                   13524: must return <del class="diff-old">-1.</del> <ins class=
                   13525: "diff-chg">−1.</ins> Otherwise, it must return the result of
                   13526: dividing the current value by the maximum value.</p>
                   13527: <h4 id="the-meter"><span class="secno"><del class=
                   13528: "diff-old">3.12.12.</del> <ins class=
                   13529: "diff-chg">3.10.12</ins></span> The <dfn id=
                   13530: "meter"><code>meter</code></dfn> element</h4>
                   13531: <dl class="element">
                   13532: <dt>Categories</dt>
                   13533: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   13534: <dt>Contexts in which this element may be used:</dt>
                   13535: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   13536: expected.</dd>
                   13537: <dt>Content model:</dt>
                   13538: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   13539: <dt>Element-specific attributes:</dt>
                   13540: <dd><code title="attr-meter-value"><a href=
                   13541: "#value3">value</a></code></dd>
                   13542: <dd><code title="attr-meter-min"><a href="#min">min</a></code></dd>
                   13543: <dd><code title="attr-meter-low"><a href="#low">low</a></code></dd>
                   13544: <dd><code title="attr-meter-high"><a href=
                   13545: "#high">high</a></code></dd>
                   13546: <dd><code title="attr-meter-max"><a href=
                   13547: "#max1">max</a></code></dd>
                   13548: <dd><code title="attr-meter-optimum"><a href=
                   13549: "#optimum">optimum</a></code></dd>
                   13550: <dt>DOM interface:</dt>
                   13551: <dd>
                   13552: <pre class="idl">
                   13553: interface <dfn id=
                   13554: "htmlmeterelement">HTMLMeterElement</dfn> : <a href=
                   13555: "#htmlelement">HTMLElement</a> {
                   13556: <del class="diff-old">           attribute long ;
                   13557:            attribute long ;
                   13558:            attribute long ;
                   13559:            attribute long ;
                   13560:            attribute long ;
                   13561:            attribute long ;
                   13562: </del>
                   13563: <ins class="diff-chg">           attribute float <a href="#value4"
                   13564: title="dom-meter-value">value</a>;
                   13565:            attribute float <a href="#min0" title=
                   13566: "dom-meter-min">min</a>;
                   13567:            attribute float <a href="#max2" title=
                   13568: "dom-meter-max">max</a>;
                   13569:            attribute float <a href="#low0" title=
                   13570: "dom-meter-low">low</a>;
                   13571:            attribute float <a href="#high0" title=
                   13572: "dom-meter-high">high</a>;
                   13573:            attribute float <a href="#optimum0" title=
                   13574: "dom-meter-optimum">optimum</a>;
                   13575: </ins>
                   13576: };
                   13577: </pre></dd>
                   13578: </dl>
                   13579: <p>The <code><a href="#meter">meter</a></code> element represents a
                   13580: scalar measurement within a known range, or a fractional value; for
                   13581: example disk usage, the relevance of a query result, or the
                   13582: fraction of a voting population to have selected a particular
                   13583: candidate.</p>
                   13584: <p>This is also known as a gauge.</p>
                   13585: <p class="note">The <code><a href="#meter">meter</a></code> element
                   13586: should not be used to indicate progress (as in a progress bar). For
                   13587: that role, HTML provides a separate <code><a href=
                   13588: "#progress">progress</a></code> element.</p>
                   13589: <p class="note">The <code><a href="#meter">meter</a></code> element
                   13590: also does not represent a scalar value of arbitrary range — for
                   13591: example, it would be wrong to use this to report a weight, or
                   13592: height, unless there is a known maximum value.</p>
                   13593: <p>There are six attributes that determine the semantics of the
                   13594: gauge represented by the element.</p>
                   13595: <p>The <dfn id="min" title="attr-meter-min"><code>min</code></dfn>
                   13596: attribute specifies the lower bound of the range, and the <dfn id=
                   13597: "max1" title="attr-meter-max"><code>max</code></dfn> attribute
                   13598: specifies the upper bound. The <dfn id="value3" title=
                   13599: "attr-meter-value"><code>value</code></dfn> attribute specifies the
                   13600: value to have the gauge indicate as the "measured" value.</p>
                   13601: <p>The other three attributes can be used to segment the gauge's
                   13602: range into "low", "medium", and "high" parts, and to indicate which
                   13603: part of the gauge is the "optimum" part. The <dfn id="low" title=
                   13604: "attr-meter-low"><code>low</code></dfn> attribute specifies the
                   13605: range that is considered to be the "low" part, and the <dfn id=
                   13606: "high" title="attr-meter-high"><code>high</code></dfn> attribute
                   13607: specifies the range that is considered to be the "high" part. The
                   13608: <dfn id="optimum" title=
                   13609: "attr-meter-optimum"><code>optimum</code></dfn> attribute gives the
                   13610: position that is "optimum"; if that is higher than the "high" value
                   13611: then this indicates that the higher the value, the better; if it's
                   13612: lower than the "low" mark then it indicates that lower values are
                   13613: better, and naturally if it is in between then it indicates that
                   13614: neither high nor low values are good.</p>
                   13615: <p><strong>Authoring requirements</strong> : The recommended way of
                   13616: giving the value is to include it as contents of the element,
                   13617: either as two numbers (the higher number represents the maximum,
                   13618: the other number the current <del class="diff-old">value),</del>
                   13619: <ins class="diff-chg">value, and the minimum is assumed to be
                   13620: zero),</ins> or as a percentage or similar (using one of the
                   13621: characters such as "%"), or as a fraction.</p>
                   13622: <p>The <code title="attr-meter-value"><a href=
                   13623: "#value3">value</a></code> , <code title="attr-meter-min"><a href=
                   13624: "#min">min</a></code> , <code title="attr-meter-low"><a href=
                   13625: "#low">low</a></code> , <code title="attr-meter-high"><a href=
                   13626: "#high">high</a></code> , <code title="attr-meter-max"><a href=
                   13627: "#max1">max</a></code> , and <code title=
                   13628: "attr-meter-optimum"><a href="#optimum">optimum</a></code>
                   13629: attributes are all optional. When present, they must have values
                   13630: that are <a href="#valid1" title=
                   13631: "valid floating point number">valid floating point numbers
                   13632: <del class="diff-old">.</del></a> , <ins class="diff-chg">and their
                   13633: values must satisfy the following inequalities:</ins></p>
                   13634: <ul class="brief">
                   13635: <li><code title="attr-meter-min"><a href="#min"><ins class=
                   13636: "diff-chg">min</ins></a></code> <ins class="diff-chg">≤</ins>
                   13637: <code title="attr-meter-value"><a href="#value3"><ins class=
                   13638: "diff-chg">value</ins></a></code> <ins class="diff-chg">≤</ins>
                   13639: <code title="attr-meter-max"><a href="#max1"><ins class=
                   13640: "diff-chg">max</ins></a></code></li>
                   13641: <li><code title="attr-meter-min"><a href="#min"><ins class=
                   13642: "diff-chg">min</ins></a></code> <ins class="diff-chg">≤</ins>
                   13643: <code title="attr-meter-low"><a href="#low"><ins class=
                   13644: "diff-chg">low</ins></a></code> <ins class="diff-chg">≤</ins>
                   13645: <code title="attr-meter-high"><a href="#high"><ins class=
                   13646: "diff-chg">high</ins></a></code> <ins class="diff-chg">≤</ins>
                   13647: <code title="attr-meter-max"><a href="#max1"><ins class=
                   13648: "diff-chg">max</ins></a></code></li>
                   13649: <li><code title="attr-meter-min"><a href="#min"><ins class=
                   13650: "diff-chg">min</ins></a></code> <ins class="diff-chg">≤</ins>
                   13651: <code title="attr-meter-optimum"><a href="#optimum"><ins class=
                   13652: "diff-chg">optimum</ins></a></code> <ins class="diff-chg">≤</ins>
                   13653: <code title="attr-meter-max"><a href="#max1"><ins class=
                   13654: "diff-chg">max</ins></a></code></li>
                   13655: </ul>
                   13656: <div class="example">
                   13657: <p>The following examples all represent a measurement of three
                   13658: quarters (of the maximum of whatever is being measured):</p>
                   13659: <pre>
                   13660: &lt;meter&gt;75%&lt;/meter&gt;
                   13661: &lt;meter&gt;750‰&lt;/meter&gt;
                   13662: &lt;meter&gt;3/4&lt;/meter&gt;
                   13663: &lt;meter&gt;6 blocks used (out of 8 total)&lt;/meter&gt;
                   13664: &lt;meter&gt;max: 100; current: 75&lt;/meter&gt;
                   13665: &lt;meter&gt;&lt;object data="graph75.png"&gt;0.75&lt;/object&gt;&lt;/meter&gt;
                   13666: &lt;meter
                   13667: min="0"
                   13668: max="100"
                   13669: value="75"&gt;
                   13670: &lt;/meter&gt;
                   13671: </pre>
                   13672: <p>The following example is incorrect use of the element, because
                   13673: it doesn't give a range (and since the default maximum is 1, both
                   13674: of the gauges would end up looking maxed out):</p>
                   13675: <del class="diff-old"></del>
                   13676: <pre>
                   13677: <ins class=
                   13678: "diff-chg">    class=bad&gt;&lt;p&gt;The grapefruit pie had a radius of &lt;meter&gt;12cm&lt;/meter&gt;
                   13679: </ins>
                   13680: and
                   13681: a
                   13682: height
                   13683: of
                   13684: &lt;meter&gt;
                   13685: 2cm&lt;/meter&gt;.&lt;/p&gt;
                   13686: &lt;!--
                   13687: <strong>
                   13688: BAD!
                   13689: </strong>
                   13690: --&gt;
                   13691: </pre>
                   13692: <p>Instead, one would either not include the meter element, or use
                   13693: the meter element with a defined range to give the dimensions in
                   13694: context compared to other pies:</p>
                   13695: <pre>
                   13696: &lt;p&gt;The grapefruit pie had a radius of 12cm and a height of
                   13697: 2cm.&lt;/p&gt;
                   13698: &lt;dl&gt;
                   13699:  &lt;dt&gt;Radius: &lt;dd&gt; &lt;meter min=0 max=20 value=12&gt;12cm&lt;/meter&gt;
                   13700:  &lt;dt&gt;Height: &lt;dd&gt; &lt;meter min=0 max=10 value=2&gt;2cm&lt;/meter&gt;
                   13701: &lt;/dl&gt;
                   13702: </pre></div>
                   13703: <p>There is no explicit way to specify units in the <code><a href=
                   13704: "#meter">meter</a></code> element, but the units may be specified
                   13705: in the <code title="attr-title"><a href="#title">title</a></code>
                   13706: attribute in <del class="diff-old">freeform</del> <ins class=
                   13707: "diff-chg">free-form</ins> text.</p>
                   13708: <div class="example">
                   13709: <p>The example above could be extended to mention the units:</p>
                   13710: <pre>
                   13711: &lt;dl&gt;
                   13712:  &lt;dt&gt;Radius: &lt;dd&gt; &lt;meter min=0 max=20 value=12 title="centimeters"&gt;12cm&lt;/meter&gt;
                   13713:  &lt;dt&gt;Height: &lt;dd&gt; &lt;meter min=0 max=10 value=2 title="centimeters"&gt;2cm&lt;/meter&gt;
                   13714: &lt;/dl&gt;
                   13715: </pre></div>
                   13716: <p><strong>User agent requirements</strong> : User agents must
                   13717: parse the <code title="attr-meter-min"><a href=
                   13718: "#min">min</a></code> , <code title="attr-meter-max"><a href=
                   13719: "#max1">max</a></code> , <code title="attr-meter-value"><a href=
                   13720: "#value3">value</a></code> , <code title="attr-meter-low"><a href=
                   13721: "#low">low</a></code> , <code title="attr-meter-high"><a href=
                   13722: "#high">high</a></code> , and <code title=
                   13723: "attr-meter-optimum"><a href="#optimum">optimum</a></code>
                   13724: attributes using the <a href="#rules1">rules for parsing floating
                   13725: point number values</a> .</p>
                   13726: <p>If the <code title="attr-meter-value"><a href=
                   13727: "#value3">value</a></code> attribute has been omitted, the user
                   13728: agent must also process the <code><a href=
                   13729: "#textcontent">textContent</a></code> of the element according to
                   13730: the <a href="#steps">steps for finding one or two numbers of a
                   13731: ratio in a string</a> . These steps will return nothing, one
                   13732: number, one number with a denominator punctuation character, or two
                   13733: numbers.</p>
                   13734: <p>User agents must then use all these numbers to obtain values for
                   13735: six points on the gauge, as follows. (The order in which these are
                   13736: evaluated is important, as some of the values refer to earlier
                   13737: ones.)</p>
                   13738: <dl>
                   13739: <dt>The minimum value</dt>
                   13740: <dd>
                   13741: <p>If the <code title="attr-meter-min"><a href=
                   13742: "#min">min</a></code> attribute is specified and a value could be
                   13743: parsed out of it, then the minimum value is that value. Otherwise,
                   13744: the minimum value is zero.</p>
                   13745: </dd>
                   13746: <dt>The maximum value</dt>
                   13747: <dd>
                   13748: <p>If the <code title="attr-meter-max"><a href=
                   13749: "#max1">max</a></code> attribute is specified and a value could be
                   13750: parsed out of it, the maximum value is that value.</p>
                   13751: <p>Otherwise, if the <code title="attr-meter-max"><a href=
                   13752: "#max1">max</a></code> attribute is specified but no value could be
                   13753: parsed out of it, or if it was not specified, but either or both of
                   13754: the <code title="attr-meter-min"><a href="#min">min</a></code> or
                   13755: <code title="attr-meter-value"><a href="#value3">value</a></code>
                   13756: attributes <em>were</em> specified, then the maximum value is
                   13757: 1.</p>
                   13758: <p>Otherwise, none of the <code title="attr-meter-max"><a href=
                   13759: "#max1">max</a></code> , <code title="attr-meter-min"><a href=
                   13760: "#min">min</a></code> , and <code title="attr-meter-value"><a href=
                   13761: "#value3">value</a></code> attributes were specified. If the result
                   13762: of processing the <code><a href=
                   13763: "#textcontent">textContent</a></code> of the element was either
                   13764: nothing or just one number with no denominator punctuation
                   13765: character, then the maximum value is 1; if the result was one
                   13766: number but it had an associated denominator punctuation character,
                   13767: then the maximum value is the <a href="#a-value" title=
                   13768: "values associated with denominator punctuation characters">value
                   13769: associated with that denominator punctuation character</a> ; and
                   13770: finally, if there were two numbers parsed out of the <code><a href=
                   13771: "#textcontent">textContent</a></code> , then the maximum is the
                   13772: higher of those two numbers.</p>
                   13773: <p>If the above machinations result in a maximum value less than
                   13774: the minimum value, then the maximum value is actually the same as
                   13775: the minimum value.</p>
                   13776: </dd>
                   13777: <dt>The actual value</dt>
                   13778: <dd>
                   13779: <p>If the <code title="attr-meter-value"><a href=
                   13780: "#value3">value</a></code> attribute is specified and a value could
                   13781: be parsed out of it, then that value is the actual value.</p>
                   13782: <p>If the <code title="attr-meter-value"><a href=
                   13783: "#value3">value</a></code> attribute is not specified but the
                   13784: <code title="attr-meter-max"><a href="#max1">max</a></code>
                   13785: attribute <em>is</em> specified and the result of processing the
                   13786: <code><a href="#textcontent">textContent</a></code> of the element
                   13787: was one number with no associated denominator punctuation
                   13788: character, then that number is the actual value.</p>
                   13789: <p>If neither of the <code title="attr-meter-value"><a href=
                   13790: "#value3">value</a></code> and <code title=
                   13791: "attr-meter-max"><a href="#max1">max</a></code> attributes are
                   13792: specified, then, if the result of processing the <code><a href=
                   13793: "#textcontent">textContent</a></code> of the element was one number
                   13794: (with or without an associated denominator punctuation character),
                   13795: then that is the actual value, and if the result of processing the
                   13796: <code><a href="#textcontent">textContent</a></code> of the element
                   13797: was two numbers, then the actual value is the lower of the two
                   13798: numbers found.</p>
                   13799: <p>Otherwise, if none of the above apply, the actual value is
                   13800: zero.</p>
                   13801: <p>If the above procedure results in an actual value less than the
                   13802: minimum value, then the actual value is actually the same as the
                   13803: minimum value.</p>
                   13804: <p>If, on the other hand, the result is an actual value greater
                   13805: than the maximum value, then the actual value is the maximum
                   13806: value.</p>
                   13807: </dd>
                   13808: <dt>The low boundary</dt>
                   13809: <dd>
                   13810: <p>If the <code title="attr-meter-low"><a href=
                   13811: "#low">low</a></code> attribute is specified and a value could be
                   13812: parsed out of it, then the low boundary is that value. Otherwise,
                   13813: the low boundary is the same as the minimum value.</p>
                   13814: <p>If the above results in a low boundary that is less than the
                   13815: minimum value, the low boundary is the minimum value.</p>
                   13816: </dd>
                   13817: <dt>The high boundary</dt>
                   13818: <dd>
                   13819: <p>If the <code title="attr-meter-high"><a href=
                   13820: "#high">high</a></code> attribute is specified and a value could be
                   13821: parsed out of it, then the high boundary is that value. Otherwise,
                   13822: the high boundary is the same as the maximum value.</p>
                   13823: <p>If the above results in a high boundary that is higher than the
                   13824: maximum value, the high boundary is the maximum value.</p>
                   13825: </dd>
                   13826: <dt>The optimum point</dt>
                   13827: <dd>
                   13828: <p>If the <code title="attr-meter-optimum"><a href=
                   13829: "#optimum">optimum</a></code> attribute is specified and a value
                   13830: could be parsed out of it, then the optimum point is that value.
                   13831: Otherwise, the optimum point is the midpoint between the minimum
                   13832: value and the maximum value.</p>
                   13833: <p>If the optimum point is then less than the minimum value, then
                   13834: the optimum point is actually the same as the minimum value.
                   13835: Similarly, if the optimum point is greater than the maximum value,
                   13836: then it is actually the maximum value instead.</p>
                   13837: </dd>
                   13838: </dl>
                   13839: <p>All of which should result in the following inequalities all
                   13840: being true:</p>
                   13841: <ul class="brief">
                   13842: <li>minimum value ≤ actual value ≤ maximum value</li>
                   13843: <li>minimum value ≤ low boundary ≤ high boundary ≤ maximum
                   13844: value</li>
                   13845: <li>minimum value ≤ optimum point ≤ maximum value</li>
                   13846: </ul>
                   13847: <p><strong>UA requirements for regions of the gauge</strong> : If
                   13848: the optimum point is equal to the low boundary or the high
                   13849: boundary, or anywhere in between them, then the region between the
                   13850: low and high boundaries of the gauge must be treated as the optimum
                   13851: region, and the low and high parts, if any, must be treated as
                   13852: suboptimal. Otherwise, if the optimum point is less than the low
                   13853: boundary, then the region between the minimum value and the low
                   13854: boundary must be treated as the optimum region, the region between
                   13855: the low boundary and the high boundary must be treated as a
                   13856: suboptimal region, and the region between the high boundary and the
                   13857: maximum value must be treated as an even less good region. Finally,
                   13858: if the optimum point is higher than the high boundary, then the
                   13859: situation is reversed; the region between the high boundary and the
                   13860: maximum value must be treated as the optimum region, the region
                   13861: between the high boundary and the low boundary must be treated as a
                   13862: suboptimal region, and the remaining region between the low
                   13863: boundary and the minimum value must be treated as an even less good
                   13864: region.</p>
                   13865: <p><strong>UA requirements for showing the gauge</strong> : When
                   13866: representing a <code><a href="#meter">meter</a></code> element to
                   13867: the user, the UA should indicate the relative position of the
                   13868: actual value to the minimum and maximum values, and the
                   13869: relationship between the actual value and the three regions of the
                   13870: gauge.</p>
                   13871: <div class="example">
                   13872: <p>The following markup:</p>
                   13873: <pre>
                   13874: &lt;h3&gt;Suggested groups&lt;/h3&gt;
                   13875: &lt;menu type="toolbar"&gt;
                   13876:  &lt;a href="?cmd=hsg" onclick="hideSuggestedGroups()"&gt;Hide suggested groups&lt;/a&gt;
                   13877: &lt;/menu&gt;
                   13878: &lt;ul&gt;
                   13879:  &lt;li&gt;
                   13880:   &lt;p&gt;&lt;a href="/group/comp.infosystems.www.authoring.stylesheets/view"&gt;comp.infosystems.www.authoring.stylesheets&lt;/a&gt; -
                   13881:      &lt;a href="/group/comp.infosystems.www.authoring.stylesheets/subscribe"&gt;join&lt;/a&gt;&lt;/p&gt;
                   13882:   &lt;p&gt;Group description: &lt;strong&gt;Layout/presentation on the WWW.&lt;/strong&gt;&lt;/p&gt;
                   13883:   &lt;p&gt;<strong>&lt;meter value="0.5"&gt;Moderate activity,&lt;/meter&gt;</strong> Usenet, 618 subscribers&lt;/p&gt;
                   13884:  &lt;/li&gt;
                   13885:  &lt;li&gt;
                   13886:   &lt;p&gt;&lt;a href="/group/netscape.public.mozilla.xpinstall/view"&gt;netscape.public.mozilla.xpinstall&lt;/a&gt; -
                   13887:      &lt;a href="/group/netscape.public.mozilla.xpinstall/subscribe"&gt;join&lt;/a&gt;&lt;/p&gt;
                   13888:   &lt;p&gt;Group description: &lt;strong&gt;Mozilla XPInstall discussion.&lt;/strong&gt;&lt;/p&gt;
                   13889:   &lt;p&gt;<strong>&lt;meter value="0.25"&gt;Low activity,&lt;/meter&gt;</strong> Usenet, 22 subscribers&lt;/p&gt;
                   13890:  &lt;/li&gt;
                   13891:  &lt;li&gt;
                   13892:   &lt;p&gt;&lt;a href="/group/mozilla.dev.general/view"&gt;mozilla.dev.general&lt;/a&gt; -
                   13893:      &lt;a href="/group/mozilla.dev.general/subscribe"&gt;join&lt;/a&gt;&lt;/p&gt;
                   13894:   &lt;p&gt;<strong>&lt;meter value="0.25"&gt;Low activity,&lt;/meter&gt;</strong> Usenet, 66 subscribers&lt;/p&gt;
                   13895:  &lt;/li&gt;
                   13896: &lt;/ul&gt;
                   13897: </pre>
                   13898: <p>Might be rendered as follows:</p>
                   13899: <p><img alt=
                   13900: "With the &lt;meter&gt; elements rendered as inline green bars of varying lengths."
                   13901: src="images/sample-meter.png"></p>
                   13902: </div>
                   13903: <p>User agents may combine the value of the <code title=
                   13904: "attr-title"><a href="#title">title</a></code> attribute and the
                   13905: other attributes to provide context-sensitive help or inline text
                   13906: detailing the actual values.</p>
                   13907: <div class="example">
                   13908: <p>For example, the following snippet:</p>
                   13909: <pre>
                   13910: &lt;meter
                   13911: min=0
                   13912: max=60
                   13913: value=23.2
                   13914: title=seconds&gt;
                   13915: &lt;/meter&gt;
                   13916: </pre>
                   13917: <p>...might cause the user agent to display a gauge with a tooltip
                   13918: saying "Value: 23.2 out of 60." on one line and "seconds" on a
                   13919: second line.</p>
                   13920: </div>
                   13921: <p>The <dfn id="min0" title="dom-meter-min"><code>min</code></dfn>
                   13922: , <dfn id="max2" title="dom-meter-max"><code>max</code></dfn> ,
                   13923: <dfn id="value4" title="dom-meter-value"><code>value</code></dfn> ,
                   13924: <dfn id="low0" title="dom-meter-low"><code>low</code></dfn> ,
                   13925: <dfn id="high0" title="dom-meter-high"><code>high</code></dfn> ,
                   13926: and <dfn id="optimum0" title=
                   13927: "dom-meter-optimum"><code>optimum</code></dfn> DOM attributes must
                   13928: <a href="#reflect">reflect</a> the elements' content attributes of
                   13929: the same name. When the relevant content attributes are absent, the
                   13930: DOM attributes must return zero. The value parsed from the
                   13931: <code><a href="#textcontent">textContent</a></code> never affects
                   13932: the DOM values.</p>
                   13933: <p class="big-issue">Would be cool to have the <code title=
                   13934: "dom-meter-value"><a href="#value4">value</a></code> DOM attribute
                   13935: update the <code><a href="#textcontent">textContent</a></code>
                   13936: in-line...</p>
                   13937: <h4 id="the-code"><span class="secno"><del class=
                   13938: "diff-old">3.12.13.</del> <ins class=
                   13939: "diff-chg">3.10.13</ins></span> The <dfn id=
                   13940: "code"><code>code</code></dfn> element</h4>
                   13941: <dl class="element">
                   13942: <dt>Categories</dt>
                   13943: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   13944: <dt>Contexts in which this element may be used:</dt>
                   13945: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   13946: expected.</dd>
                   13947: <dt>Content model:</dt>
                   13948: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   13949: <dt>Element-specific attributes:</dt>
                   13950: <dd><del class="diff-old">None, but the title attribute has special
                   13951: semantics on this element when used with the dfn element.</del>
                   13952: <ins class="diff-chg">None.</ins></dd>
                   13953: <dt>DOM interface:</dt>
                   13954: <dd><del class="diff-old">No difference from</del> <ins class=
                   13955: "diff-chg">Uses</ins> <code><a href=
                   13956: "#htmlelement">HTMLElement</a></code> .</dd>
                   13957: </dl>
                   13958: <p>The <code><a href="#code">code</a></code> element represents a
                   13959: fragment of computer code. This could be an XML element name, a
                   13960: filename, a computer program, or any other string that a computer
                   13961: would <del class="diff-old">recognise.</del> <ins class=
                   13962: "diff-chg">recognize.</ins></p>
                   13963: <p>Although there is no formal way to indicate the language of
                   13964: computer code being marked up, authors who wish to mark
                   13965: <code><a href="#code">code</a></code> elements with the language
                   13966: used, e.g. so that syntax highlighting scripts can use the right
                   13967: rules, may do so by adding a class prefixed with " <code title=
                   13968: "">language-</code> " to the element.</p>
                   13969: <div class="example">
                   13970: <p>The following example shows how <ins class="diff-new">the
                   13971: element can be used in a paragraph to mark up element names and
                   13972: computer code, including punctuation.</ins></p>
                   13973: <pre>
                   13974: &lt;p&gt;The &lt;code&gt;code&lt;/code&gt; element represents a fragment of computer<ins class="diff-new">
                   13975: code.&lt;/p&gt;
                   13976: &lt;p&gt;When you call the &lt;code&gt;activate()&lt;/code&gt; method on the
                   13977: &lt;code&gt;robotSnowman&lt;/code&gt; object, the eyes glow.&lt;/p&gt;
                   13978: &lt;p&gt;The example below uses the &lt;code&gt;begin&lt;/code&gt; keyword to indicate
                   13979: the start of a statement block. It is paired with an &lt;code&gt;end&lt;/code&gt;
                   13980: keyword, which is followed by the &lt;code&gt;.&lt;/code&gt; punctuation character
                   13981: (full
                   13982: stop)
                   13983: to
                   13984: indicate
                   13985: the
                   13986: end
                   13987: of
                   13988: the
                   13989: program.&lt;/p&gt;
                   13990: </ins>
                   13991: </pre></div>
                   13992: <div class="example">
                   13993: <p><ins class="diff-new">The following example shows how</ins> a
                   13994: block of code could be marked up using the <code><a href=
                   13995: "#pre">pre</a></code> and <code><a href="#code">code</a></code>
                   13996: elements.</p>
                   13997: <pre>
                   13998: &lt;pre&gt;&lt;code class="language-pascal"&gt;var i: Integer;
                   13999: begin
                   14000:    i := 1;
                   14001: end.&lt;/code&gt;
                   14002: &lt;/pre&gt;
                   14003: </pre>
                   14004: <p>A class is used in that example to indicate the language
                   14005: used.</p>
                   14006: </div>
                   14007: <p class="note">See the <code><a href="#pre">pre</a></code> element
                   14008: for more <del class="diff-old">detais.</del> <ins class=
                   14009: "diff-chg">details.</ins></p>
                   14010: <h4 id="the-var"><span class="secno"><del class=
                   14011: "diff-old">3.12.14.</del> <ins class=
                   14012: "diff-chg">3.10.14</ins></span> The <dfn id=
                   14013: "var"><code>var</code></dfn> element</h4>
                   14014: <dl class="element">
                   14015: <dt>Categories</dt>
                   14016: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   14017: <dt>Contexts in which this element may be used:</dt>
                   14018: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   14019: expected.</dd>
                   14020: <dt>Content model:</dt>
                   14021: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   14022: <dt>Element-specific attributes:</dt>
                   14023: <dd><del class="diff-old">None, but the title attribute has special
                   14024: semantics on this element when used with the dfn element.</del>
                   14025: <ins class="diff-chg">None.</ins></dd>
                   14026: <dt>DOM interface:</dt>
                   14027: <dd><del class="diff-old">No difference from</del> <ins class=
                   14028: "diff-chg">Uses</ins> <code><a href=
                   14029: "#htmlelement">HTMLElement</a></code> .</dd>
                   14030: </dl>
                   14031: <p>The <code><a href="#var">var</a></code> element represents a
                   14032: variable. This could be an actual variable in a mathematical
                   14033: expression or programming context, or it could just be a term used
                   14034: as a placeholder in prose.</p>
                   14035: <div class="example">
                   14036: <p>In the paragraph below, the letter "n" is being used as a
                   14037: variable in prose:</p>
                   14038: <pre>
                   14039: &lt;p&gt;If there are &lt;var&gt;n&lt;/var&gt; pipes leading to the ice
                   14040: cream factory then I expect at &lt;em&gt;least&lt;/em&gt; &lt;var&gt;n&lt;/var&gt;
                   14041: flavours
                   14042: of
                   14043: ice
                   14044: cream
                   14045: to
                   14046: be
                   14047: available
                   14048: for
                   14049: purchase!&lt;/p&gt;
                   14050: </pre></div>
                   14051: <h4 id="the-samp"><span class="secno"><del class=
                   14052: "diff-old">3.12.15.</del> <ins class=
                   14053: "diff-chg">3.10.15</ins></span> The <dfn id=
                   14054: "samp"><code>samp</code></dfn> element</h4>
                   14055: <dl class="element">
                   14056: <dt>Categories</dt>
                   14057: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   14058: <dt>Contexts in which this element may be used:</dt>
                   14059: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   14060: expected.</dd>
                   14061: <dt>Content model:</dt>
                   14062: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   14063: <dt>Element-specific attributes:</dt>
                   14064: <dd><del class="diff-old">None, but the title attribute has special
                   14065: semantics on this element when used with the dfn element.</del>
                   14066: <ins class="diff-chg">None.</ins></dd>
                   14067: <dt>DOM interface:</dt>
                   14068: <dd><del class="diff-old">No difference from</del> <ins class=
                   14069: "diff-chg">Uses</ins> <code><a href=
                   14070: "#htmlelement">HTMLElement</a></code> .</dd>
                   14071: </dl>
                   14072: <p>The <code><a href="#samp">samp</a></code> element represents
                   14073: (sample) output from a program or computing system.</p>
                   14074: <p class="note">See the <code><a href="#pre">pre</a></code> and
                   14075: <code><a href="#kbd">kbd</a></code> elements for more <del class=
                   14076: "diff-old">detais.</del> <ins class="diff-chg">details.</ins></p>
                   14077: <div class="example">
                   14078: <p>This example shows the <code><a href="#samp">samp</a></code>
                   14079: element being used inline:</p>
                   14080: <pre>
                   14081: &lt;p&gt;The computer said &lt;samp&gt;Too much cheese in tray
                   14082: two&lt;/samp&gt;
                   14083: but
                   14084: I
                   14085: didn't
                   14086: know
                   14087: what
                   14088: that
                   14089: meant.&lt;/p&gt;
                   14090: </pre>
                   14091: <p>This second example shows a block of sample output. Nested
                   14092: <code><a href="#samp">samp</a></code> and <code><a href=
                   14093: "#kbd">kbd</a></code> elements allow for the styling of specific
                   14094: elements of the sample output using a style sheet.</p>
                   14095: <pre>
                   14096: &lt;pre&gt;&lt;samp&gt;&lt;samp class="prompt"&gt;jdoe@mowmow:~$&lt;/samp&gt; &lt;kbd&gt;ssh demo.example.com&lt;/kbd&gt;
                   14097: Last login: Tue Apr 12 09:10:17 2005 from mowmow.example.com on pts/1
                   14098: Linux demo 2.6.10-grsec+gg3+e+fhs6b+nfs+gr0501+++p3+c4a+gr2b-reslog-v6.189 #1 SMP Tue Feb 1 11:22:36 PST 2005 i686 unknown
                   14099: &lt;samp
                   14100: class="prompt"&gt;
                   14101: jdoe@demo:~$&lt;/samp&gt;
                   14102: &lt;samp
                   14103: class="cursor"&gt;
                   14104: _&lt;/samp&gt;
                   14105: &lt;/samp&gt;
                   14106: &lt;/pre&gt;
                   14107: </pre></div>
                   14108: <h4 id="the-kbd"><span class="secno"><del class=
                   14109: "diff-old">3.12.16.</del> <ins class=
                   14110: "diff-chg">3.10.16</ins></span> The <dfn id=
                   14111: "kbd"><code>kbd</code></dfn> element</h4>
                   14112: <dl class="element">
                   14113: <dt>Categories</dt>
                   14114: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   14115: <dt>Contexts in which this element may be used:</dt>
                   14116: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   14117: expected.</dd>
                   14118: <dt>Content model:</dt>
                   14119: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   14120: <dt>Element-specific attributes:</dt>
                   14121: <dd>None.</dd>
                   14122: <dt>DOM interface:</dt>
                   14123: <dd><del class="diff-old">No difference from</del> <ins class=
                   14124: "diff-chg">Uses</ins> <code><a href=
                   14125: "#htmlelement">HTMLElement</a></code> .</dd>
                   14126: </dl>
                   14127: <p>The <code><a href="#kbd">kbd</a></code> element represents user
                   14128: input (typically keyboard input, although it may also be used to
                   14129: represent other input, such as voice commands).</p>
                   14130: <p>When the <code><a href="#kbd">kbd</a></code> element is nested
                   14131: inside a <code><a href="#samp">samp</a></code> element, it
                   14132: represents the input as it was echoed by the system.</p>
                   14133: <p>When the <code><a href="#kbd">kbd</a></code> element
                   14134: <em>contains</em> a <code><a href="#samp">samp</a></code> element,
                   14135: it represents input based on system output, for example invoking a
                   14136: menu item.</p>
                   14137: <p>When the <code><a href="#kbd">kbd</a></code> element is nested
                   14138: inside another <code><a href="#kbd">kbd</a></code> element, it
                   14139: represents an actual key or other single unit of input as
                   14140: appropriate for the input mechanism.</p>
                   14141: <div class="example">
                   14142: <p>Here the <code><a href="#kbd">kbd</a></code> element is used to
                   14143: indicate keys to press:</p>
                   14144: <pre>
                   14145: &lt;p&gt;
                   14146: To
                   14147: make
                   14148: George
                   14149: eat
                   14150: an
                   14151: apple,
                   14152: press
                   14153: &lt;kbd&gt;
                   14154: &lt;kbd&gt;
                   14155: Shift&lt;/kbd&gt;
                   14156: +&lt;kbd&gt;
                   14157: F3&lt;/kbd&gt;
                   14158: &lt;/kbd&gt;
                   14159: &lt;/p&gt;
                   14160: </pre>
                   14161: <p>In this second example, the user is told to pick a particular
                   14162: menu item. The outer <code><a href="#kbd">kbd</a></code> element
                   14163: marks up a block of input, with the inner <code><a href=
                   14164: "#kbd">kbd</a></code> elements representing each individual step of
                   14165: the input, and the <code><a href="#samp">samp</a></code> elements
                   14166: inside them indicating that the steps are input based on something
                   14167: being displayed by the system, in this case menu labels:</p>
                   14168: <pre>
                   14169: &lt;p&gt;To make George eat an apple, select
                   14170:     &lt;kbd&gt;&lt;kbd&gt;&lt;samp&gt;File&lt;/samp&gt;&lt;/kbd&gt;|&lt;kbd&gt;&lt;samp&gt;Eat Apple...&lt;/samp&gt;&lt;/kbd&gt;&lt;/kbd&gt;
                   14171: &lt;/p&gt;
                   14172: </pre></div>
                   14173: <h4 id="the-sub"><span class="secno"><del class=
                   14174: "diff-old">3.12.17.</del> <ins class=
                   14175: "diff-chg">3.10.17</ins></span> The <dfn id=
                   14176: "sub"><code>sub</code></dfn> and <dfn id=
                   14177: "sup"><code>sup</code></dfn> elements</h4>
                   14178: <dl class="element">
                   14179: <dt>Categories</dt>
                   14180: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   14181: <dt>Contexts in which these elements may be used:</dt>
                   14182: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   14183: expected.</dd>
                   14184: <dt>Content model:</dt>
                   14185: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   14186: <dt>Element-specific attributes:</dt>
                   14187: <dd>None.</dd>
                   14188: <dt>DOM interface:</dt>
                   14189: <dd><del class="diff-old">No difference from</del> <ins class=
                   14190: "diff-chg">Uses</ins> <code><a href=
                   14191: "#htmlelement">HTMLElement</a></code> .</dd>
                   14192: </dl>
                   14193: <p>The <code><a href="#sup">sup</a></code> element represents a
                   14194: superscript and the <code><a href="#sub">sub</a></code> element
                   14195: represents a subscript.</p>
                   14196: <p>These elements must <del class="diff-old">only</del> be used
                   14197: <ins class="diff-new">only</ins> to mark up typographical
                   14198: conventions with specific meanings, not for typographical
                   14199: presentation for presentation's sake. For example, it would be
                   14200: inappropriate for the <code><a href="#sub">sub</a></code> and
                   14201: <code><a href="#sup">sup</a></code> elements to be used in the name
                   14202: of the LaTeX document preparation system. In general, authors
                   14203: should <del class="diff-old">only</del> use these elements
                   14204: <ins class="diff-new">only</ins> if the <em>absence</em> of those
                   14205: elements would change the meaning of the content.</p>
                   14206: <p>When the <code><a href="#sub">sub</a></code> element is used
                   14207: inside a <code><a href="#var">var</a></code> element, it represents
                   14208: the subscript that identifies the variable in a family of
                   14209: variables.</p>
                   14210: <div class="example">
                   14211: <pre>
                   14212: &lt;p&gt;The coordinate of the &lt;var&gt;i&lt;/var&gt;th point is
                   14213: (&lt;var&gt;x&lt;sub&gt;&lt;var&gt;i&lt;/var&gt;&lt;/sub&gt;&lt;/var&gt;, &lt;var&gt;y&lt;sub&gt;&lt;var&gt;i&lt;/var&gt;&lt;/sub&gt;&lt;/var&gt;).
                   14214: For example, the 10th point has coordinate
                   14215: (&lt;var&gt;
                   14216: x&lt;sub&gt;
                   14217: 10&lt;/sub&gt;
                   14218: &lt;/var&gt;,
                   14219: &lt;var&gt;
                   14220: y&lt;sub&gt;
                   14221: 10&lt;/sub&gt;
                   14222: &lt;/var&gt;
                   14223: ).&lt;/p&gt;
                   14224: </pre></div>
                   14225: <p>In certain languages, superscripts are part of the typographical
                   14226: conventions for some abbreviations.</p>
                   14227: <div class="example">
                   14228: <pre>
                   14229: &lt;p&gt;The most beautiful women are
                   14230: &lt;span lang="fr"&gt;&lt;abbr&gt;M&lt;sup&gt;lle&lt;/sup&gt;&lt;/abbr&gt; Gwendoline&lt;/span&gt; and 
                   14231: &lt;span
                   14232: lang="fr"&gt;
                   14233: &lt;abbr&gt;
                   14234: M&lt;sup&gt;
                   14235: me&lt;/sup&gt;
                   14236: &lt;/abbr&gt;
                   14237: Denise&lt;/span&gt;.&lt;/p&gt;
                   14238: </pre></div>
                   14239: <p>Mathematical expressions often use subscripts and superscripts.
                   14240: <ins class="diff-chg">Authors are encouraged to use MathML for
                   14241: marking up mathematics, but authors may opt to use</ins>
                   14242: <code><a href="#sub"><ins class="diff-chg">sub</ins></a></code>
                   14243: <ins class="diff-chg">and</ins> <code><a href="#sup"><ins class=
                   14244: "diff-chg">sup</ins></a></code> <ins class="diff-chg">if detailed
                   14245: mathematical markup is not desired.</ins> <a href=
                   14246: "#references"><ins class="diff-chg">[MathML]</ins></a></p>
                   14247: <div class="example">
                   14248: <pre>
                   14249: &lt;var&gt;
                   14250: E&lt;/var&gt;
                   14251: =&lt;var&gt;
                   14252: m&lt;/var&gt;
                   14253: &lt;var&gt;
                   14254: c&lt;/var&gt;
                   14255: &lt;sup&gt;
                   14256: 2&lt;/sup&gt;
                   14257: </pre>
                   14258: <pre>
                   14259: f(&lt;var&gt;
                   14260: x&lt;/var&gt;,
                   14261: &lt;var&gt;
                   14262: n&lt;/var&gt;
                   14263: )
                   14264: =
                   14265: log&lt;sub&gt;
                   14266: 4&lt;/sub&gt;
                   14267: &lt;var&gt;
                   14268: x&lt;/var&gt;
                   14269: &lt;sup&gt;
                   14270: &lt;var&gt;
                   14271: n&lt;/var&gt;
                   14272: &lt;/sup&gt;
                   14273: </pre></div>
                   14274: <h4 id="the-span"><span class="secno"><del class=
                   14275: "diff-old">3.12.18.</del> <ins class=
                   14276: "diff-chg">3.10.18</ins></span> The <dfn id=
                   14277: "span"><code>span</code></dfn> element</h4>
                   14278: <dl class="element">
                   14279: <dt>Categories</dt>
                   14280: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   14281: <dt>Contexts in which this element may be used:</dt>
                   14282: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   14283: expected.</dd>
                   14284: <dt>Content model:</dt>
                   14285: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   14286: <dt>Element-specific attributes:</dt>
                   14287: <dd><del class="diff-old">None, but the title attribute has special
                   14288: semantics on this element when used with the dfn element.</del>
                   14289: <ins class="diff-chg">None.</ins></dd>
                   14290: <dt>DOM interface:</dt>
                   14291: <dd><del class="diff-old">No difference from</del> <ins class=
                   14292: "diff-chg">Uses</ins> <code><a href=
                   14293: "#htmlelement">HTMLElement</a></code> .</dd>
                   14294: </dl>
                   14295: <p>The <code><a href="#span">span</a></code> element doesn't mean
                   14296: anything on its own, but can be useful when used together with
                   14297: other attributes, e.g. <code title="attr-class"><a href=
                   14298: "#class">class</a></code> , <code title="attr-lang"><a href=
                   14299: "#lang">lang</a></code> , or <code title="attr-dir"><a href=
                   14300: "#dir">dir</a> <del class="diff-old">, or when used in conjunction
                   14301: with the dfn element.</del></code> .</p>
                   14302: <h4 id="the-i"><span class="secno"><del class=
                   14303: "diff-old">3.12.19.</del> <ins class=
                   14304: "diff-chg">3.10.19</ins></span> The <dfn id=
                   14305: "i"><code>i</code></dfn> element</h4>
                   14306: <dl class="element">
                   14307: <dt>Categories</dt>
                   14308: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   14309: <dt>Contexts in which this element may be used:</dt>
                   14310: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   14311: expected.</dd>
                   14312: <dt>Content model:</dt>
                   14313: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   14314: <dt>Element-specific attributes:</dt>
                   14315: <dd><del class="diff-old">None, but the title attribute has special
                   14316: semantics on this element when used with the dfn element.</del>
                   14317: <ins class="diff-chg">None.</ins></dd>
                   14318: <dt>DOM interface:</dt>
                   14319: <dd><del class="diff-old">No difference from</del> <ins class=
                   14320: "diff-chg">Uses</ins> <code><a href=
                   14321: "#htmlelement">HTMLElement</a></code> .</dd>
                   14322: </dl>
                   14323: <p>The <code><a href="#i">i</a></code> element represents a span of
                   14324: text in an alternate voice or mood, or otherwise offset from the
                   14325: normal prose, such as a taxonomic designation, a technical term, an
                   14326: idiomatic phrase from another language, a thought, a ship name, or
                   14327: some other prose whose typical typographic presentation is
                   14328: italicized.</p>
                   14329: <p>Terms in languages different from the main text should be
                   14330: annotated with <code title="attr-lang"><a href=
                   14331: "#lang">lang</a></code> attributes ( <code title=
                   14332: "attr-xml-lang"><a href="#xmllang">xml:lang</a></code> in XML).</p>
                   14333: <div class="example">
                   14334: <p>The examples below show uses of the <code><a href=
                   14335: "#i">i</a></code> element:</p>
                   14336: <del class="diff-old"></del>
                   14337: <pre>
                   14338: &lt;p&gt;The &lt;i class="taxonomy"&gt;Felis silvestris catus&lt;/i&gt; is cute.&lt;/p&gt;
                   14339: &lt;p&gt;The term &lt;i&gt;prose content&lt;/i&gt; is defined above.&lt;/p&gt;
                   14340: &lt;p&gt;
                   14341: There
                   14342: is
                   14343: a
                   14344: certain
                   14345: &lt;i
                   14346: lang="fr"&gt;
                   14347: je
                   14348: ne
                   14349: sais
                   14350: quoi&lt;/i&gt;
                   14351: in
                   14352: the
                   14353: air.&lt;/p&gt;
                   14354: </pre>
                   14355: <p>In the following example, a dream sequence is marked up using
                   14356: <code><a href="#i">i</a></code> elements.</p>
                   14357: <pre>
                   14358: &lt;p&gt;Raymond tried to sleep.&lt;/p&gt;
                   14359: &lt;p&gt;&lt;i&gt;The ship sailed away on Thursday&lt;/i&gt;, he
                   14360: dreamt. &lt;i&gt;The ship had many people aboard, including a beautiful
                   14361: princess called Carey. He watched her, day-in, day-out, hoping she
                   14362: would notice him, but she never did.&lt;/i&gt;&lt;/p&gt;
                   14363: &lt;p&gt;&lt;i&gt;Finally one night he picked up the courage to speak with
                   14364: her—&lt;/i&gt;&lt;/p&gt;
                   14365: &lt;p&gt;
                   14366: Raymond
                   14367: woke
                   14368: with
                   14369: a
                   14370: start
                   14371: as
                   14372: the
                   14373: fire
                   14374: alarm
                   14375: rang
                   14376: out.&lt;/p&gt;
                   14377: </pre></div>
                   14378: <p>The <code><a href="#i">i</a></code> element should be used as a
                   14379: last resort when no other element is more appropriate. In
                   14380: particular, citations should use the <code><a href=
                   14381: "#cite2">cite</a></code> element, defining instances of terms
                   14382: should use the <code><a href="#dfn">dfn</a></code> element, stress
                   14383: emphasis should use the <code><a href="#em">em</a></code> element,
                   14384: importance should be denoted with the <code><a href=
                   14385: "#strong">strong</a></code> element, quotes should be marked up
                   14386: with the <code><a href="#q">q</a></code> element, and small print
                   14387: should use the <code><a href="#small">small</a></code> element.</p>
                   14388: <p><ins class="diff-new">Authors are encouraged to use the</ins>
                   14389: <code title="attr-class"><a href="#class"><ins class=
                   14390: "diff-new">class</ins></a></code> <ins class="diff-new">attribute
                   14391: on the</ins> <code><a href="#i"><ins class=
                   14392: "diff-new">i</ins></a></code> <ins class="diff-new">element to
                   14393: identify why the element is being used, so that if the style of a
                   14394: particular use (e.g. dream sequences as opposed to taxonomic terms)
                   14395: is to be changed at a later date, the author doesn't have to go
                   14396: through the entire document (or series of related documents)
                   14397: annotating each use.</ins></p>
                   14398: <p class="note">Style sheets can be used to format <code><a href=
                   14399: "#i">i</a></code> elements, just like any other element can be
                   14400: restyled. Thus, it is not the case that content in <code><a href=
                   14401: "#i">i</a></code> elements will necessarily be <del class=
                   14402: "diff-old">italicised.</del> <ins class=
                   14403: "diff-chg">italicized.</ins></p>
                   14404: <h4 id="the-b"><span class="secno"><del class=
                   14405: "diff-old">3.12.20.</del> <ins class=
                   14406: "diff-chg">3.10.20</ins></span> The <dfn id=
                   14407: "b"><code>b</code></dfn> element</h4>
                   14408: <dl class="element">
                   14409: <dt>Categories</dt>
                   14410: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   14411: <dt>Contexts in which this element may be used:</dt>
                   14412: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   14413: expected.</dd>
                   14414: <dt>Content model:</dt>
                   14415: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   14416: <dt>Element-specific attributes:</dt>
                   14417: <dd>None.</dd>
                   14418: <dt>DOM interface:</dt>
                   14419: <dd><del class="diff-old">No difference from</del> <ins class=
                   14420: "diff-chg">Uses</ins> <code><a href=
                   14421: "#htmlelement">HTMLElement</a></code> .</dd>
                   14422: </dl>
                   14423: <p>The <code><a href="#b">b</a></code> element represents a span of
                   14424: text to be stylistically offset from the normal prose without
                   14425: conveying any extra importance, such as key words in a document
                   14426: abstract, product names in a review, or other spans of text whose
                   14427: typical typographic presentation is boldened.</p>
                   14428: <div class="example">
                   14429: <p>The following example shows a use of the <code><a href=
                   14430: "#b">b</a></code> element to highlight key words without marking
                   14431: them up as important:</p>
                   14432: <pre>
                   14433: &lt;p&gt;
                   14434: The
                   14435: &lt;b&gt;
                   14436: frobonitor&lt;/b&gt;
                   14437: and
                   14438: &lt;b&gt;
                   14439: barbinator&lt;/b&gt;
                   14440: components
                   14441: are
                   14442: fried.&lt;/p&gt;
                   14443: </pre></div>
                   14444: <div class="example">
                   14445: <p><del class="diff-old">The following would be incorrect usage:
                   14446: &lt;p&gt; &lt;b&gt; WARNING!&lt;/b&gt; Do not frob the
                   14447: barbinator!&lt;/p&gt; In the previous example, the correct element
                   14448: to use would have been strong , not b .</del> In the following
                   14449: example, objects in a text adventure are highlighted as being
                   14450: special by use of the <code><a href="#b">b</a></code> element.</p>
                   14451: <pre>
                   14452: &lt;p&gt;You enter a small room. Your &lt;b&gt;sword&lt;/b&gt; glows
                   14453: brighter.
                   14454: A
                   14455: &lt;b&gt;
                   14456: rat&lt;/b&gt;
                   14457: scurries
                   14458: past
                   14459: the
                   14460: corner
                   14461: wall.&lt;/p&gt;
                   14462: </pre></div>
                   14463: <div class="example">
                   14464: <p>Another case where the <code><a href="#b">b</a></code> element
                   14465: is appropriate is in marking up the lede (or lead) sentence or
                   14466: paragraph. The following example shows how a <a href=
                   14467: "http://news.bbc.co.uk/2/hi/uk_news/scotland/north_east/7101506.stm">
                   14468: BBC article about kittens adopting a rabbit as their own</a> could
                   14469: be marked up using HTML5 elements:</p>
                   14470: <pre>
                   14471: &lt;article&gt;
                   14472:  &lt;h2&gt;Kittens 'adopted' by pet rabbit&lt;/h2&gt;
                   14473:  &lt;p&gt;&lt;b&gt;Six abandoned kittens have found an unexpected new
                   14474:  mother figure — a pet rabbit.&lt;/b&gt;&lt;/p&gt;
                   14475:  &lt;p&gt;Veterinary nurse Melanie Humble took the three-week-old
                   14476:  kittens to her Aberdeen home.&lt;/p&gt;
                   14477: <i>
                   14478: [...]
                   14479: </i>
                   14480: </pre></div>
                   14481: <p>The <code><a href="#b">b</a></code> element should be used as a
                   14482: last resort when no other element is more appropriate. In
                   14483: particular, headers should use the <code><a href=
                   14484: "#h1">h1</a></code> to <code><a href="#h6">h6</a></code> elements,
                   14485: stress emphasis should use the <code><a href="#em">em</a></code>
                   14486: element, importance should be denoted with the <code><a href=
                   14487: "#strong">strong</a></code> element, and text marked or highlighted
                   14488: should use the <code><del class="diff-old">m</del> <a href=
                   14489: "#mark"><ins class="diff-chg">mark</ins></a></code> element.</p>
                   14490: <div class="example">
                   14491: <p><ins class="diff-new">The following would be</ins>
                   14492: <em><ins class="diff-new">incorrect</ins></em> <ins class=
                   14493: "diff-new">usage:</ins></p>
                   14494: <pre>
                   14495: <ins class="diff-new">
                   14496: &lt;p&gt;
                   14497: &lt;b&gt;
                   14498: WARNING!&lt;/b&gt;
                   14499: Do
                   14500: not
                   14501: frob
                   14502: the
                   14503: barbinator!&lt;/p&gt;
                   14504: </ins>
                   14505: </pre>
                   14506: <p><ins class="diff-new">In the previous example, the correct
                   14507: element to use would have been</ins> <code><a href=
                   14508: "#strong"><ins class="diff-new">strong</ins></a></code>
                   14509: ,<ins class="diff-new">not</ins> <code><a href="#b"><ins class=
                   14510: "diff-new">b</ins></a></code> .</p>
                   14511: </div>
                   14512: <p class="note">Style sheets can be used to format <code><a href=
                   14513: "#b">b</a></code> elements, just like any other element can be
                   14514: restyled. Thus, it is not the case that content in <code><a href=
                   14515: "#b">b</a></code> elements will necessarily be boldened.</p>
                   14516: <h4 id="the-bdo"><span class="secno"><del class=
                   14517: "diff-old">3.12.21.</del> <ins class=
                   14518: "diff-chg">3.10.21</ins></span> The <dfn id=
                   14519: "bdo"><code>bdo</code></dfn> element</h4>
                   14520: <dl class="element">
                   14521: <dt>Categories</dt>
                   14522: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   14523: <dt>Contexts in which this element may be used:</dt>
                   14524: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   14525: expected.</dd>
                   14526: <dt>Content model:</dt>
                   14527: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   14528: <dt>Element-specific attributes:</dt>
                   14529: <dd>None, but the <code title="attr-dir"><a href=
                   14530: "#dir">dir</a></code> global attribute has special requirements on
                   14531: this element.</dd>
                   14532: <dt>DOM interface:</dt>
                   14533: <dd><del class="diff-old">No difference from</del> <ins class=
                   14534: "diff-chg">Uses</ins> <code><a href=
                   14535: "#htmlelement">HTMLElement</a></code> .</dd>
                   14536: </dl>
                   14537: <p>The <code><a href="#bdo">bdo</a></code> element allows authors
                   14538: to override the Unicode bidi algorithm by explicitly specifying a
                   14539: direction override. <a href="#references">[BIDI]</a></p>
                   14540: <p>Authors must specify the <code title="attr-dir"><a href=
                   14541: "#dir">dir</a></code> attribute on this element, with the value
                   14542: <code>ltr</code> to specify a left-to-right override and with the
                   14543: value <code>rtl</code> to specify a right-to-left override.</p>
                   14544: <p>If the element has the <code title="attr-dir"><a href=
                   14545: "#dir">dir</a></code> attribute set to the exact value
                   14546: <code>ltr</code> , then for the purposes of the bidi algorithm, the
                   14547: user agent must act as if there was a U+202D LEFT-TO-RIGHT OVERRIDE
                   14548: character at the start of the element, and a U+202C POP DIRECTIONAL
                   14549: FORMATTING at the end of the element.</p>
                   14550: <p>If the element has the <code title="attr-dir"><a href=
                   14551: "#dir">dir</a></code> attribute set to the exact value
                   14552: <code>rtl</code> , then for the purposes of the bidi algorithm, the
                   14553: user agent must act as if there was a U+202E RIGHT-TO-LEFT OVERRIDE
                   14554: character at the start of the element, and a U+202C POP DIRECTIONAL
                   14555: FORMATTING at the end of the element.</p>
                   14556: <p>The requirements on handling the <code><a href=
                   14557: "#bdo">bdo</a></code> element for the bidi algorithm may be
                   14558: implemented indirectly through the style layer. For example, an
                   14559: HTML+CSS user agent should implement these requirements by
                   14560: implementing the CSS <code>unicode-bidi</code> property. <a href=
                   14561: "#references">[CSS21]</a></p>
                   14562: <h4 id="the-ruby"><span class="secno"><del class=
                   14563: "diff-old">3.13.</del> <ins class="diff-chg">3.10.22</ins></span>
                   14564: <del class="diff-old">Edits</del> The <dfn id=
                   14565: "ruby"><code><ins class="diff-new">ruby</ins></code> <del class=
                   14566: "diff-old">ins</del></dfn> <ins class="diff-chg">element</ins></h4>
                   14567: <dl class="element">
                   14568: <dt><ins class="diff-chg">Categories</ins></dt>
                   14569: <dd><a href="#phrasing0"><ins class="diff-chg">Phrasing
                   14570: content</ins></a> .</dd>
                   14571: <dt><ins class="diff-chg">Contexts in which this element may be
                   14572: used:</ins></dt>
                   14573: <dd><ins class="diff-chg">Where</ins> <a href=
                   14574: "#phrasing0"><ins class="diff-chg">phrasing content</ins></a>
                   14575: <ins class="diff-chg">is expected.</ins></dd>
                   14576: <dt><ins class="diff-chg">Content model:</ins></dt>
                   14577: <dd><ins class="diff-chg">One or more groups of:</ins> <a href=
                   14578: "#phrasing0"><ins class="diff-chg">phrasing content</ins></a>
                   14579: <ins class="diff-chg">followed either by a single</ins>
                   14580: <code><a href="#rt"><ins class="diff-chg">rt</ins></a></code>
                   14581: <ins class="diff-chg">element, or an</ins> <code><a href=
                   14582: "#rp"><ins class="diff-chg">rp</ins></a></code> <ins class=
                   14583: "diff-chg">element, an</ins> <code><a href="#rt"><ins class=
                   14584: "diff-chg">rt</ins></a></code> <ins class="diff-new">element,</ins>
                   14585: and <ins class="diff-new">another</ins> <code><del class=
                   14586: "diff-old">del</del> <a href="#rp"><ins class=
                   14587: "diff-chg">rp</ins></a></code> <del class="diff-old">elements
                   14588: represent edits</del> <ins class="diff-chg">element.</ins></dd>
                   14589: <dt><ins class="diff-chg">Element-specific attributes:</ins></dt>
                   14590: <dd><ins class="diff-chg">None.</ins></dd>
                   14591: <dt><ins class="diff-chg">DOM interface:</ins></dt>
                   14592: <dd><ins class="diff-chg">Uses</ins> <code><a href=
                   14593: "#htmlelement"><ins class="diff-chg">HTMLElement</ins></a></code>
                   14594: .</dd>
                   14595: </dl>
                   14596: <p><ins class="diff-chg">The</ins> <code><a href=
                   14597: "#ruby"><ins class="diff-chg">ruby</ins></a></code> <ins class=
                   14598: "diff-chg">element allows one or more spans of phrasing
                   14599: content</ins> to <del class="diff-old">the document.</del>
                   14600: <ins class="diff-chg">be marked with ruby annotations.</ins></p>
                   14601: <p><del class="diff-old">Since</del> <ins class="diff-chg">A</ins>
                   14602: <code><a href="#ruby"><ins class="diff-chg">ruby</ins></a></code>
                   14603: <ins class="diff-chg">element represents the spans of phrasing
                   14604: content it contains, ignoring all</ins> the <ins class=
                   14605: "diff-new">child</ins> <code><del class="diff-old">ins</del>
                   14606: <a href="#rt"><ins class="diff-chg">rt</ins></a></code> and
                   14607: <code><del class="diff-old">del</del> <a href="#rp"><ins class=
                   14608: "diff-chg">rp</ins></a></code> elements <del class="diff-old">do
                   14609: not affect paragraphing , it</del> <ins class="diff-chg">and their
                   14610: descendants. Those spans of phrasing content have associated
                   14611: annotations created using the</ins> <code><a href="#rt"><ins class=
                   14612: "diff-chg">rt</ins></a></code> <ins class=
                   14613: "diff-chg">element.</ins></p>
                   14614: <div class="example">
                   14615: <p><ins class="diff-chg">In this example, each ideograph in the
                   14616: text</ins> <span lang="ja"><ins class="diff-chg">斎藤信男</ins></span>
                   14617: is <del class="diff-old">possible,</del> <ins class=
                   14618: "diff-chg">annotated with its reading.</ins></p>
                   14619: <pre lang="ja">
                   14620: ... &lt;ruby&gt;<ins class="diff-chg">
                   14621:  斎 &lt;rt&gt; さい &lt;/rt&gt;
                   14622:  藤 &lt;rt&gt; とう &lt;/rt&gt;
                   14623:  信 &lt;rt&gt; のぶ &lt;/rt&gt;
                   14624:  男 &lt;rt&gt; お         &lt;/rt&gt;
                   14625: &lt;/ruby&gt;
                   14626: ...
                   14627: </ins>
                   14628: </pre>
                   14629: <p><ins class="diff-chg">This might be rendered as:</ins></p>
                   14630: <p><img alt=
                   14631: "The four main ideographs, each with its reading annotation rendered in a smaller font above it."
                   14632: src="images/sample-ruby.png"></p>
                   14633: </div>
                   14634: <h4 id="the-rt"><span class="secno"><ins class=
                   14635: "diff-chg">3.10.23</ins></span> <ins class="diff-chg">The</ins>
                   14636: <dfn id="rt"><code><ins class="diff-chg">rt</ins></code></dfn>
                   14637: <ins class="diff-chg">element</ins></h4>
                   14638: <dl class="element">
                   14639: <dt><ins class="diff-chg">Categories</ins></dt>
                   14640: <dd><ins class="diff-chg">None.</ins></dd>
                   14641: <dt><ins class="diff-chg">Contexts</ins> in <del class=
                   14642: "diff-old">some cases where paragraphs are implied</del>
                   14643: <ins class="diff-chg">which this element may be used:</ins></dt>
                   14644: <dd><ins class="diff-chg">As a child of a</ins> <code><a href=
                   14645: "#ruby"><ins class="diff-chg">ruby</ins></a> <del class=
                   14646: "diff-old">(without explicit</del></code> <ins class=
                   14647: "diff-chg">element.</ins></dd>
                   14648: <dt><ins class="diff-chg">Content model:</ins></dt>
                   14649: <dd><a href="#phrasing0"><ins class="diff-chg">Phrasing
                   14650: content</ins></a> .</dd>
                   14651: <dt><ins class="diff-chg">Element-specific attributes:</ins></dt>
                   14652: <dd><ins class="diff-chg">None.</ins></dd>
                   14653: <dt><ins class="diff-chg">DOM interface:</ins></dt>
                   14654: <dd><ins class="diff-chg">Uses</ins> <code><del class=
                   14655: "diff-old">p</del> <a href="#htmlelement"><ins class=
                   14656: "diff-chg">HTMLElement</ins></a></code> .</dd>
                   14657: </dl>
                   14658: <p><ins class="diff-chg">The</ins> <code><a href="#rt"><ins class=
                   14659: "diff-chg">rt</ins></a></code> <del class="diff-old">elements), for
                   14660: an</del> <ins class="diff-chg">element marks the ruby text
                   14661: component of a ruby annotation.</ins></p>
                   14662: <p><ins class="diff-chg">An</ins> <code><del class=
                   14663: "diff-old">ins</del> <a href="#rt"><ins class=
                   14664: "diff-chg">rt</ins></a></code> <del class="diff-old">or</del>
                   14665: <ins class="diff-chg">element that is a child of a</ins>
                   14666: <code><del class="diff-old">del</del> <a href="#ruby"><ins class=
                   14667: "diff-chg">ruby</ins></a></code> element <del class="diff-old">to
                   14668: span both</del> <ins class="diff-chg">represents</ins> an
                   14669: <del class="diff-old">entire paragraph</del> <ins class=
                   14670: "diff-chg">annotation (given by its children) for the zero</ins> or
                   14671: <del class="diff-old">other non-</del> <ins class="diff-chg">more
                   14672: nodes of</ins> phrasing content <ins class="diff-new">that
                   14673: immediately precedes it in the</ins> <code><a href=
                   14674: "#ruby"><ins class="diff-new">ruby</ins></a> <del class=
                   14675: "diff-old">elements and part of another paragraph. For example:
                   14676: &lt;ins&gt; &lt;p&gt; This is a paragraph that was inserted.
                   14677: &lt;/p&gt; This is another paragraph whose first sentence was
                   14678: inserted at the same time as the paragraph above. &lt;/ins&gt; This
                   14679: is a second sentence, which was there all along.
                   14680: &lt;/section&gt;</del></code> <ins class="diff-chg">element,
                   14681: ignoring</ins> <code><a href="#rp"><ins class=
                   14682: "diff-chg">rp</ins></a></code> <ins class=
                   14683: "diff-chg">elements.</ins></p>
                   14684: <p><del class="diff-old">By only wrapping some paragraphs in</del>
                   14685: <ins class="diff-chg">An</ins> <code><del class="diff-old">p</del>
                   14686: <a href="#rt"><ins class="diff-chg">rt</ins></a></code> <del class=
                   14687: "diff-old">elements, one can even get the end of one
                   14688: paragraph,</del> <ins class="diff-chg">element that is not</ins> a
                   14689: <del class="diff-old">whole second paragraph, and the start</del>
                   14690: <ins class="diff-chg">child</ins> of a <del class="diff-old">third
                   14691: paragraph to be covered by</del> <code><a href="#ruby"><ins class=
                   14692: "diff-chg">ruby</ins></a></code> <ins class="diff-chg">element
                   14693: represents</ins> the same <ins class="diff-new">thing as its
                   14694: children.</ins></p>
                   14695: <h4 id="the-rp"><span class="secno"><ins class=
                   14696: "diff-new">3.10.24</ins></span> <ins class="diff-new">The</ins>
                   14697: <dfn id="rp"><code><ins class="diff-new">rp</ins></code>
                   14698: <del class="diff-old">ins</del></dfn> <ins class=
                   14699: "diff-chg">element</ins></h4>
                   14700: <dl class="element">
                   14701: <dt><ins class="diff-chg">Categories</ins></dt>
                   14702: <dd><ins class="diff-chg">None.</ins></dd>
                   14703: <dt><ins class="diff-chg">Contexts in which this element may be
                   14704: used:</ins></dt>
                   14705: <dd><ins class="diff-chg">As a child of a</ins> <code><a href=
                   14706: "#ruby"><ins class="diff-chg">ruby</ins></a></code> <ins class=
                   14707: "diff-new">element, either immediately before</ins> or <ins class=
                   14708: "diff-new">immediately after an</ins> <code><del class=
                   14709: "diff-old">del</del> <a href="#rt"><ins class=
                   14710: "diff-chg">rt</ins></a></code> <ins class=
                   14711: "diff-chg">element.</ins></dd>
                   14712: <dt><ins class="diff-chg">Content model:</ins></dt>
                   14713: <dd><ins class="diff-chg">If the</ins> <code><a href=
                   14714: "#rp"><ins class="diff-chg">rp</ins></a></code> element <del class=
                   14715: "diff-old">(though this</del> is <del class="diff-old">very
                   14716: confusing, and not considered good practice): This is the first
                   14717: paragraph. &lt;ins&gt;This sentence was inserted. &lt;p&gt;This
                   14718: second paragraph was inserted.&lt;/p&gt; This sentence was inserted
                   14719: too.&lt;/ins&gt; This is the third paragraph in this
                   14720: example.&lt;/p&gt; &lt;/section&gt;</del> <ins class=
                   14721: "diff-chg">immediately after an</ins> <code><a href=
                   14722: "#rt"><ins class="diff-chg">rt</ins></a></code> <ins class=
                   14723: "diff-chg">element that is immediately preceded by another</ins>
                   14724: <code><a href="#rp"><ins class="diff-chg">rp</ins></a></code>
                   14725: <ins class="diff-chg">element: a single character from Unicode
                   14726: character class Pe.</ins></dd>
                   14727: <dd><ins class="diff-chg">Otherwise: a single character from
                   14728: Unicode character class Ps.</ins></dd>
                   14729: <dt><ins class="diff-chg">Element-specific attributes:</ins></dt>
                   14730: <dd><ins class="diff-chg">None.</ins></dd>
                   14731: <dt><ins class="diff-chg">DOM interface:</ins></dt>
                   14732: <dd><ins class="diff-chg">Uses</ins> <code><a href=
                   14733: "#htmlelement"><ins class="diff-chg">HTMLElement</ins></a></code>
                   14734: .</dd>
                   14735: </dl>
                   14736: <p><del class="diff-old">However, due</del> <ins class=
                   14737: "diff-chg">The</ins> <code><a href="#rp"><ins class=
                   14738: "diff-chg">rp</ins></a></code> <ins class="diff-chg">element can be
                   14739: used</ins> to <del class="diff-old">the way implied
                   14740: paragraphs</del> <ins class="diff-chg">provide parentheses around a
                   14741: ruby text component of a ruby annotation, to be shown by user
                   14742: agents that don't support ruby annotations.</ins></p>
                   14743: <p><ins class="diff-chg">An</ins> <code><a href="#rp"><ins class=
                   14744: "diff-chg">rp</ins></a> <del class="diff-old">are defined,
                   14745: it</del></code> <ins class="diff-chg">element that</ins> is
                   14746: <del class="diff-old">not possible to mark up the end</del>
                   14747: <ins class="diff-chg">a child</ins> of <del class="diff-old">one
                   14748: paragraph</del> <ins class="diff-chg">a</ins> <code><a href=
                   14749: "#ruby"><ins class="diff-chg">ruby</ins></a></code> <ins class=
                   14750: "diff-chg">element represents nothing</ins> and <del class=
                   14751: "diff-old">the start of the very next one using the same</del>
                   14752: <ins class="diff-chg">it and its contents must be ignored. An</ins>
                   14753: <code><del class="diff-old">ins</del> <a href="#rp"><ins class=
                   14754: "diff-chg">rp</ins></a></code> <del class="diff-old">or</del>
                   14755: <ins class="diff-chg">element whose parent element is not a</ins>
                   14756: <code><del class="diff-old">del</del> <a href="#ruby"><ins class=
                   14757: "diff-chg">ruby</ins></a></code> <del class="diff-old">element. You
                   14758: instead have</del> <ins class="diff-chg">element represents the
                   14759: same thing as its children.</ins></p>
                   14760: <div class="example">
                   14761: <p><ins class="diff-chg">The example above, in which each ideograph
                   14762: in the text</ins> <span lang="ja"><ins class=
                   14763: "diff-chg">斎藤信男</ins></span> <ins class="diff-chg">is annotated
                   14764: with its reading, could be expanded</ins> to use <del class=
                   14765: "diff-old">one (or two)</del> <code><del class="diff-old">p</del>
                   14766: <a href="#rp"><ins class="diff-chg">rp</ins></a></code> <del class=
                   14767: "diff-old">element(s) and two</del> <ins class="diff-chg">so that
                   14768: in legacy user agentthe readings are in parentheses:</ins></p>
                   14769: <pre lang="ja">
                   14770: ... &lt;ruby&gt;<ins class="diff-chg">
                   14771:  斎 &lt;rp&gt;(&lt;/rp&gt;&lt;rt&gt;さい&lt;/rt&gt;&lt;rp&gt;)&lt;/rp&gt;
                   14772:  藤 &lt;rp&gt;(&lt;/rp&gt;&lt;rt&gt;とう&lt;/rt&gt;&lt;rp&gt;)&lt;/rp&gt;
                   14773:  信 &lt;rp&gt;(&lt;/rp&gt;&lt;rt&gt;のぶ&lt;/rt&gt;&lt;rp&gt;)&lt;/rp&gt;
                   14774:  男 &lt;rp&gt;(&lt;/rp&gt;&lt;rt&gt;お&lt;/rt&gt;&lt;rp&gt;)&lt;/rp&gt;
                   14775: &lt;/ruby&gt;
                   14776: ...
                   14777: </ins>
                   14778: </pre>
                   14779: <p><ins class="diff-chg">In conforming user agents the rendering
                   14780: would be as above, but in user agents that do not support ruby, the
                   14781: rendering would be:</ins></p>
                   14782: <pre ins="" class="diff-chg">
                   14783: lang=ja&gt;...
                   14784: 斎
                   14785: (さい)
                   14786: 藤
                   14787: (とう)
                   14788: 信
                   14789: (のぶ)
                   14790: 男
                   14791: (お)
                   14792: ...
                   14793: </pre></div>
                   14794: <h4 id="usage"><del class="diff-old">ins</del> <span class=
                   14795: "secno"><ins class="diff-chg">3.10.25</ins></span> <ins class=
                   14796: "diff-chg">Usage summary</ins></h4>
                   14797: <p class="big-issue"><ins class="diff-chg">We need to summarize the
                   14798: various elements, in particular to distinguish
                   14799: b/i/em/strong/var/q/mark/cite.</ins></p>
                   14800: <h4 id="footnotes"><span class="secno"><ins class=
                   14801: "diff-chg">3.10.26</ins></span> <ins class=
                   14802: "diff-chg">Footnotes</ins></h4>
                   14803: <p><ins class="diff-chg">HTML does not have a dedicated mechanism
                   14804: for marking up footnotes. Here are the recommended
                   14805: alternatives.</ins></p>
                   14806: <p><ins class="diff-chg">For short inline annotations, the</ins>
                   14807: <code title="attr-title"><a href="#title"><ins class=
                   14808: "diff-chg">title</ins></a></code> <del class="diff-old">or</del>
                   14809: <ins class="diff-chg">attribute should be used.</ins></p>
                   14810: <div class="example">
                   14811: <p><ins class="diff-chg">In this example, two parts of a dialog are
                   14812: annotated.</ins></p>
                   14813: <pre>
                   14814: &lt;dialog&gt;<ins class="diff-chg">
                   14815:  &lt;dt&gt;Customer
                   14816:  &lt;dd&gt;Hello! I wish to register a complaint. Hello. Miss?
                   14817:  &lt;dt&gt;Shopkeeper
                   14818:  &lt;dd&gt;&lt;span title="Colloquial pronunciation of 'What do you'"
                   14819:  &gt;Watcha&lt;/span&gt; mean, miss?
                   14820:  &lt;dt&gt;Customer
                   14821:  &lt;dd&gt;Uh, I'm sorry, I have a cold. I wish to make a complaint.
                   14822:  &lt;dt&gt;Shopkeeper
                   14823:  &lt;dd&gt;Sorry, &lt;span title="This is, of course, a lie."&gt;we're
                   14824:  closing for lunch&lt;/span&gt;.
                   14825: &lt;/dialog&gt;
                   14826: </ins>
                   14827: </pre></div>
                   14828: <p><ins class="diff-chg">For longer annotations, the</ins>
                   14829: <code><del class="diff-old">del</del> <a href="#a"><ins class=
                   14830: "diff-chg">a</ins></a></code> <del class="diff-old">elements:</del>
                   14831: <ins class="diff-chg">element should be used, pointing to an
                   14832: element later in the document. The convention is that the contents
                   14833: of the link be a number in square brackets.</ins></p>
                   14834: <div class="example">
                   14835: <p><del class="diff-old">For example:</del> <ins class=
                   14836: "diff-chg">In this example, a footnote in the dialog links to a
                   14837: paragraph below the dialog. The paragraph then reciprocally links
                   14838: back to the dialog, allowing the user to return to the location of
                   14839: the footnote.</ins></p>
                   14840: <del class="diff-old">&lt;p&gt;This is the first paragraph.
                   14841: &lt;del&gt;This sentence was deleted.&lt;/p&gt;
                   14842: &lt;p&gt;&lt;del&gt;This sentence was deleted too.&lt;/del&gt; That
                   14843: sentence needed a separate &amp;lt;del&gt; element.&lt;/p&gt;</del>
                   14844: <pre>
                   14845: &lt;dialog&gt;
                   14846: <ins class="diff-chg"> &lt;dt&gt;Announcer
                   14847:  &lt;dd&gt;Number 16: The &lt;i&gt;hand&lt;/i&gt;.
                   14848:  &lt;dt&gt;Interviewer
                   14849:  &lt;dd&gt;Good evening. I have with me in the studio tonight Mr
                   14850:  Norman St John Polevaulter, who for the past few years has
                   14851:  been contradicting people. Mr Polevaulter, why &lt;em&gt;do&lt;/em&gt;
                   14852:  you contradict people?
                   14853:  &lt;dt&gt;Norman
                   14854:  &lt;dd&gt;I don't. &lt;a href="#fn1" id="r1"&gt;[1]&lt;/a&gt;
                   14855:  &lt;dt&gt;Interviewer
                   14856:  &lt;dd&gt;You told me you did!
                   14857: &lt;/dialog&gt;
                   14858: &lt;section&gt;
                   14859:  &lt;p id="fn1"&gt;&lt;a href="#r1"&gt;[1]&lt;/a&gt; This is, naturally, a lie,
                   14860:  but paradoxically if it were true he could not say so without
                   14861:  contradicting the interviewer and thus making it false.&lt;/p&gt;
                   14862: </ins>
                   14863: &lt;/section&gt;
                   14864: </pre></div>
                   14865: <p><del class="diff-old">Partly because</del> <ins class=
                   14866: "diff-chg">For side notes, longer annotations that apply to entire
                   14867: sections</ins> of the <del class="diff-old">confusion described
                   14868: above, authors are strongly recommended to always mark up all
                   14869: paragraphs with</del> <ins class="diff-chg">text rather than just
                   14870: specific words or sentences,</ins> the <code><del class=
                   14871: "diff-old">p</del> <a href="#aside"><ins class=
                   14872: "diff-chg">aside</ins></a></code> <del class="diff-old">element,
                   14873: and</del> <ins class="diff-chg">element should be used.</ins></p>
                   14874: <div class="example">
                   14875: <p><ins class="diff-chg">In this example, a sidebar is given after
                   14876: a dialog, giving some context</ins> to <del class="diff-old">not
                   14877: have any</del> <ins class="diff-chg">the dialog.</ins></p>
                   14878: <pre>
                   14879: &lt;dialog&gt;<ins class="diff-chg">
                   14880:  &lt;dt&gt;Customer
                   14881:  &lt;dd&gt;I will not buy this record, it is scratched.
                   14882:  &lt;dt&gt;Shopkeeper
                   14883:  &lt;dd&gt;I'm sorry?
                   14884:  &lt;dt&gt;Customer
                   14885:  &lt;dd&gt;I will not buy this record, it is scratched.
                   14886:  &lt;dt&gt;Shopkeeper
                   14887:  &lt;dd&gt;No no no, this's'a tobacconist's.
                   14888: &lt;/dialog&gt;
                   14889: &lt;aside&gt;
                   14890:  &lt;p&gt;In 1970, the British Empire lay in ruins, and foreign
                   14891:  nationalists frequented the streets — many of them Hungarians
                   14892:  (not the streets — the foreign nationals). Sadly, Alexander
                   14893:  Yalt has been publishing incompetently-written phrase books.
                   14894: &lt;/aside&gt;
                   14895: </ins>
                   14896: </pre></div>
                   14897: <h3 id="edits"><span class="secno"><ins class=
                   14898: "diff-chg">3.11</ins></span> <ins class="diff-chg">Edits</ins></h3>
                   14899: <p><ins class="diff-chg">The</ins> <code><a href=
                   14900: "#ins">ins</a></code> <del class="diff-old">or</del> <ins class=
                   14901: "diff-chg">and</ins> <code><a href="#del">del</a></code> elements
                   14902: <del class="diff-old">that cross across any implied paragraphs
                   14903: .</del> <ins class="diff-chg">represent edits to the
                   14904: document.</ins></p>
                   14905: <h4 id="the-ins"><span class="secno"><del class=
                   14906: "diff-old">3.13.1.</del> <ins class="diff-chg">3.11.1</ins></span>
                   14907: The <dfn id="ins"><code>ins</code></dfn> element</h4>
                   14908: <dl class="element">
                   14909: <dt>Categories</dt>
                   14910: <dd>When the element only contains <a href="#phrasing0">phrasing
                   14911: content</a> : <a href="#phrasing0">phrasing content</a> .</dd>
                   14912: <dd>Otherwise: <del class="diff-old">prose</del> <a href=
                   14913: "#flow-content0"><ins class="diff-chg">flow</ins> content</a>
                   14914: .</dd>
                   14915: <dt>Contexts in which this element may be used:</dt>
                   14916: <dd>When the element only contains <a href="#phrasing0">phrasing
                   14917: content</a> : where <a href="#phrasing0">phrasing content</a> is
                   14918: expected.</dd>
                   14919: <dd>Otherwise: where <del class="diff-old">prose</del> <a href=
                   14920: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   14921: expected.</dd>
                   14922: <dt>Content model:</dt>
                   14923: <dd><a href="#transparent0">Transparent</a> .</dd>
                   14924: <dt>Element-specific attributes:</dt>
                   14925: <dd><code title="attr-mod-cite"><a href=
                   14926: "#cite3">cite</a></code></dd>
                   14927: <dd><code title="attr-mod-datetime"><a href=
                   14928: "#datetime1">datetime</a></code></dd>
                   14929: <dt>DOM interface:</dt>
                   14930: <dd>Uses the <code><a href=
                   14931: "#htmlmodelement">HTMLModElement</a></code> interface.</dd>
                   14932: </dl>
                   14933: <p>The <code><a href="#ins">ins</a></code> element represents an
                   14934: addition to the document.</p>
                   14935: <div class="example">
                   14936: <p>The following represents the addition of a single paragraph:</p>
                   14937: <pre>
                   14938: &lt;aside&gt;
                   14939:  &lt;ins&gt;
                   14940:   &lt;p&gt; I like fruit. &lt;/p&gt;
                   14941:  &lt;/ins&gt;
                   14942: &lt;/aside&gt;
                   14943: </pre>
                   14944: <p>As does this, because everything in the <code><a href=
                   14945: "#aside">aside</a></code> element here counts as <a href=
                   14946: "#phrasing0">phrasing content</a> and therefore there is just one
                   14947: <a href="#paragraph">paragraph</a> :</p>
                   14948: <pre>
                   14949: &lt;aside&gt;
                   14950:  &lt;ins&gt;
                   14951:   Apples are &lt;em&gt;tasty&lt;/em&gt;.
                   14952:  &lt;/ins&gt;
                   14953:  &lt;ins&gt;
                   14954:   So are pears.
                   14955:  &lt;/ins&gt;
                   14956: &lt;/aside&gt;
                   14957: </pre></div>
                   14958: <p><code><a href="#ins">ins</a></code> elements should not cross
                   14959: <a href="#paragraph" title="paragraph">implied paragraph</a>
                   14960: boundaries.</p>
                   14961: <div class="example">
                   14962: <p>The following example represents the addition of two paragraphs,
                   14963: the second of which was inserted in two parts. The first
                   14964: <code><a href="#ins">ins</a></code> element in this example thus
                   14965: crosses a paragraph boundary, which is considered poor form.</p>
                   14966: <pre>
                   14967: &lt;aside&gt;
                   14968:  &lt;ins datetime="2005-03-16T00:00Z"&gt;
                   14969:   &lt;p&gt; I like fruit. &lt;/p&gt;
                   14970:   Apples are &lt;em&gt;tasty&lt;/em&gt;.
                   14971:  &lt;/ins&gt;
                   14972:  &lt;ins datetime="2007-12-19T00:00Z"&gt;
                   14973:   So are pears.
                   14974:  &lt;/ins&gt;
                   14975: &lt;/aside&gt;
                   14976: </pre>
                   14977: <p>Here is a better way of marking this up. It uses more elements,
                   14978: but none of the elements cross implied paragraph boundaries.</p>
                   14979: <pre>
                   14980: &lt;aside&gt;
                   14981:  &lt;ins datetime="2005-03-16T00:00Z"&gt;
                   14982:   &lt;p&gt; I like fruit. &lt;/p&gt;
                   14983:  &lt;/ins&gt;
                   14984:  &lt;ins datetime="2005-03-16T00:00Z"&gt;
                   14985:   Apples are &lt;em&gt;tasty&lt;/em&gt;.
                   14986:  &lt;/ins&gt;
                   14987:  &lt;ins datetime="2007-12-19T00:00Z"&gt;
                   14988:   So are pears.
                   14989:  &lt;/ins&gt;
                   14990: &lt;/aside&gt;
                   14991: </pre></div>
                   14992: <h4 id="the-del"><span class="secno"><del class=
                   14993: "diff-old">3.13.2.</del> <ins class="diff-chg">3.11.2</ins></span>
                   14994: The <dfn id="del"><code>del</code></dfn> element</h4>
                   14995: <dl class="element">
                   14996: <dt>Categories</dt>
                   14997: <dd>When the element only contains <a href="#phrasing0">phrasing
                   14998: content</a> : <a href="#phrasing0">phrasing content</a> .</dd>
                   14999: <dd>Otherwise: <del class="diff-old">prose</del> <a href=
                   15000: "#flow-content0"><ins class="diff-chg">flow</ins> content</a>
                   15001: .</dd>
                   15002: <dt>Contexts in which this element may be used:</dt>
                   15003: <dd>When the element only contains <a href="#phrasing0">phrasing
                   15004: content</a> : where <a href="#phrasing0">phrasing content</a> is
                   15005: expected.</dd>
                   15006: <dd>Otherwise: where <del class="diff-old">prose</del> <a href=
                   15007: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   15008: expected.</dd>
                   15009: <dt>Content model:</dt>
                   15010: <dd><a href="#transparent0">Transparent</a> .</dd>
                   15011: <dt>Element-specific attributes:</dt>
                   15012: <dd><code title="attr-mod-cite"><a href=
                   15013: "#cite3">cite</a></code></dd>
                   15014: <dd><code title="attr-mod-datetime"><a href=
                   15015: "#datetime1">datetime</a></code></dd>
                   15016: <dt>DOM interface:</dt>
                   15017: <dd>Uses the <code><a href=
                   15018: "#htmlmodelement">HTMLModElement</a></code> interface.</dd>
                   15019: </dl>
                   15020: <p>The <code><a href="#del">del</a></code> element represents a
                   15021: removal from the document.</p>
                   15022: <p><code><a href="#del">del</a></code> elements should not cross
                   15023: <a href="#paragraph" title="paragraph">implied paragraph</a>
                   15024: boundaries.</p>
                   15025: <h4 id="attributes"><span class="secno"><del class=
                   15026: "diff-old">3.13.3.</del> <ins class="diff-chg">3.11.3</ins></span>
                   15027: Attributes common to <code><a href="#ins">ins</a></code> and
                   15028: <code><a href="#del">del</a></code> elements</h4>
                   15029: <p>The <dfn id="cite3" title=
                   15030: "attr-mod-cite"><code>cite</code></dfn> attribute may be used to
                   15031: specify a URI that explains the change. When that document is long,
                   15032: for instance the minutes of a meeting, authors are encouraged to
                   15033: include a fragment identifier pointing to the specific part of that
                   15034: document that discusses the change.</p>
                   15035: <p>If the <code title="attr-mod-cite"><a href=
                   15036: "#cite3">cite</a></code> attribute is present, it must be a URI (or
                   15037: IRI) that explains the change. User agents should allow users to
                   15038: follow such citation links.</p>
                   15039: <p>The <dfn id="datetime1" title=
                   15040: "attr-mod-datetime"><code>datetime</code></dfn> attribute may be
                   15041: used to specify the time and date of the change.</p>
                   15042: <p>If present, the <code title="attr-mod-datetime"><a href=
                   15043: "#datetime1">datetime</a></code> attribute must be a <a href=
                   15044: "#valid5">valid datetime</a> value.</p>
                   15045: <p>User agents must parse the <code title=
                   15046: "attr-mod-datetime"><a href="#datetime1">datetime</a></code>
                   15047: attribute according to the <a href="#datetime-parser">parse a
                   15048: string as a datetime value</a> algorithm. If that doesn't return a
                   15049: time, then the modification has no associated timestamp (the value
                   15050: is non-conforming; it is not a <a href="#valid5">valid datetime</a>
                   15051: ). Otherwise, the modification is marked as having been made at the
                   15052: given datetime. User agents should use the associated timezone
                   15053: information to determine which timezone to present the given
                   15054: datetime in.</p>
                   15055: <p>The <code><a href="#ins">ins</a></code> and <code><a href=
                   15056: "#del">del</a></code> elements must implement the <code><a href=
                   15057: "#htmlmodelement">HTMLModElement</a></code> interface:</p>
                   15058: <pre class="idl">
                   15059: interface <dfn id="htmlmodelement">HTMLModElement</dfn> : <a href=
                   15060: "#htmlelement">HTMLElement</a> {
                   15061:            attribute DOMString <a href="#cite4" title=
                   15062: "dom-mod-cite">cite</a>;
                   15063:            attribute DOMString <a href="#datetime2" title=
                   15064: "dom-mod-datetime">dateTime</a>;
                   15065: };
                   15066: </pre>
                   15067: <p>The <dfn id="cite4" title="dom-mod-cite"><code>cite</code></dfn>
                   15068: DOM attribute must <a href="#reflect">reflect</a> the element's
                   15069: <del class="diff-old">&gt; &lt;code title=attr-mod-cite&gt;</del>
                   15070: <code title="attr-mod-cite"><del class="diff-old">&lt;a
                   15071: href="#cite3"&gt;</del> <a href="#cite3">cite</a></code> content
                   15072: attribute. The <dfn id="datetime2" title=
                   15073: "dom-mod-datetime"><code>dateTime</code></dfn> DOM attribute must
                   15074: <a href="#reflect">reflect</a> the element's <code title=
                   15075: "">datetime</code> content attribute.</p>
                   15076: <h4 id="edits0"><span class="secno"><ins class=
                   15077: "diff-new">3.11.4</ins></span> <ins class="diff-new">Edits and
                   15078: paragraphs</ins></h4>
                   15079: <p><ins class="diff-new">Since the</ins> <code><a href=
                   15080: "#ins"><ins class="diff-new">ins</ins></a></code> <ins class=
                   15081: "diff-new">and</ins> <code><a href="#del"><ins class=
                   15082: "diff-new">del</ins></a></code> <ins class="diff-new">elements do
                   15083: not affect</ins> <a href="#paragraph" title="paragraph"><ins class=
                   15084: "diff-new">paragraphing</ins></a> ,<ins class="diff-new">it is
                   15085: possible, in some cases where paragraphs are</ins> <a href=
                   15086: "#paragraph" title="paragraph"><ins class=
                   15087: "diff-new">implied</ins></a> <ins class="diff-new">(without
                   15088: explicit</ins> <code><a href="#p"><ins class=
                   15089: "diff-new">p</ins></a></code> <ins class="diff-new">elements), for
                   15090: an</ins> <code><a href="#ins"><ins class=
                   15091: "diff-new">ins</ins></a></code> <ins class="diff-new">or</ins>
                   15092: <code><a href="#del"><ins class="diff-new">del</ins></a></code>
                   15093: <ins class="diff-new">element to span both an entire paragraph or
                   15094: other non-</ins> <a href="#phrasing0"><ins class=
                   15095: "diff-new">phrasing content</ins></a> <ins class=
                   15096: "diff-new">elements and part of another paragraph.</ins></p>
                   15097: <p><ins class="diff-new">For example:</ins></p>
                   15098: <pre>
                   15099: &lt;section&gt;<ins class="diff-new">
                   15100:  &lt;ins&gt;
                   15101:   &lt;p&gt;
                   15102:    This is a paragraph that was inserted.
                   15103:   &lt;/p&gt;
                   15104:   This is another paragraph whose first sentence was inserted
                   15105:   at the same time as the paragraph above.
                   15106:  &lt;/ins&gt;
                   15107:  This is a second sentence, which was there all along.
                   15108: &lt;/section&gt;
                   15109: </ins>
                   15110: </pre>
                   15111: <p><ins class="diff-new">By only wrapping some paragraphs in</ins>
                   15112: <code><a href="#p"><ins class="diff-new">p</ins></a></code>
                   15113: <ins class="diff-new">elements, one can even get the end of one
                   15114: paragraph, a whole second paragraph, and the start of a third
                   15115: paragraph to be covered by the same</ins> <code><a href=
                   15116: "#ins"><ins class="diff-new">ins</ins></a></code> <ins class=
                   15117: "diff-new">or</ins> <code><a href="#del"><ins class=
                   15118: "diff-new">del</ins></a></code> <ins class="diff-new">element
                   15119: (though this is very confusing, and not considered good
                   15120: practice):</ins></p>
                   15121: <pre>
                   15122: &lt;section&gt;<ins class="diff-new">
                   15123:  This is the first paragraph. &lt;ins&gt;This sentence was
                   15124:  inserted.
                   15125:  &lt;p&gt;This second paragraph was inserted.&lt;/p&gt;
                   15126:  This sentence was inserted too.&lt;/ins&gt; This is the
                   15127:  third paragraph in this example.
                   15128: &lt;/section&gt;
                   15129: </ins>
                   15130: </pre>
                   15131: <p><ins class="diff-new">However, due to the way</ins> <a href=
                   15132: "#paragraph" title="paragraph"><ins class="diff-new">implied
                   15133: paragraphs</ins></a> <ins class="diff-new">are defined, it is not
                   15134: possible to mark up the end of one paragraph and the start of the
                   15135: very next one using the same</ins> <code><a href="#ins"><ins class=
                   15136: "diff-new">ins</ins></a></code> <ins class="diff-new">or</ins>
                   15137: <code><a href="#del"><ins class="diff-new">del</ins></a></code>
                   15138: <ins class="diff-new">element. You instead have to use one (or
                   15139: two)</ins> <code><a href="#p"><ins class=
                   15140: "diff-new">p</ins></a></code> <ins class="diff-new">element(s) and
                   15141: two</ins> <code><a href="#ins"><ins class=
                   15142: "diff-new">ins</ins></a></code> <ins class="diff-new">or</ins>
                   15143: <code><a href="#del"><ins class="diff-new">del</ins></a></code>
                   15144: <ins class="diff-new">elements:</ins></p>
                   15145: <p><ins class="diff-new">For example:</ins></p>
                   15146: <pre>
                   15147: &lt;section&gt;<ins class="diff-new">
                   15148:  &lt;p&gt;This is the first paragraph. &lt;del&gt;This sentence was
                   15149:  deleted.&lt;/del&gt;&lt;/p&gt;
                   15150:  &lt;p&gt;&lt;del&gt;This sentence was deleted too.&lt;/del&gt; That
                   15151:  sentence needed a separate &amp;lt;del&amp;gt; element.&lt;/p&gt;
                   15152: &lt;/section&gt;
                   15153: </ins>
                   15154: </pre>
                   15155: <p><ins class="diff-new">Partly because of the confusion described
                   15156: above, authors are strongly recommended to always mark up all
                   15157: paragraphs with the</ins> <code><a href="#p"><ins class=
                   15158: "diff-new">p</ins></a></code> <ins class="diff-new">element, and to
                   15159: not have any</ins> <code><a href="#ins"><ins class=
                   15160: "diff-new">ins</ins></a></code> <ins class="diff-new">or</ins>
                   15161: <code><a href="#del"><ins class="diff-new">del</ins></a></code>
                   15162: <ins class="diff-new">elements that cross across any</ins> <a href=
                   15163: "#paragraph" title="paragraph"><ins class="diff-new">implied
                   15164: paragraphs</ins></a> .</p>
                   15165: <h4 id="edits1"><span class="secno"><ins class=
                   15166: "diff-new">3.11.5</ins></span> <ins class="diff-new">Edits and
                   15167: lists</ins></h4>
                   15168: <p><ins class="diff-new">The content models of the</ins>
                   15169: <code><a href="#ol"><ins class="diff-new">ol</ins></a></code>
                   15170: <ins class="diff-new">and</ins> <code><a href="#ul"><ins class=
                   15171: "diff-new">ul</ins></a></code> <ins class="diff-new">elements do
                   15172: not allow</ins> <code><a href="#ins"><ins class=
                   15173: "diff-new">ins</ins></a></code> <ins class="diff-new">and</ins>
                   15174: <code><a href="#del"><ins class="diff-new">del</ins></a></code>
                   15175: <ins class="diff-new">elements as children. Lists always represent
                   15176: all their items, including items that would otherwise have been
                   15177: marked as deleted.</ins></p>
                   15178: <p><ins class="diff-new">To indicate that an item is inserted or
                   15179: deleted, an</ins> <code><a href="#ins"><ins class=
                   15180: "diff-new">ins</ins></a></code> <ins class="diff-new">or</ins>
                   15181: <code><a href="#del"><ins class="diff-new">del</ins></a></code>
                   15182: <ins class="diff-new">element can be wrapped around the contents of
                   15183: the</ins> <code><a href="#li"><ins class=
                   15184: "diff-new">li</ins></a></code> <ins class="diff-new">element. To
                   15185: indicate that an item has been replaced by another, a single</ins>
                   15186: <code><a href="#li"><ins class="diff-new">li</ins></a></code>
                   15187: <ins class="diff-new">element can have one or more</ins>
                   15188: <code><a href="#del"><ins class="diff-new">del</ins></a></code>
                   15189: <ins class="diff-new">elements followed by one or more</ins>
                   15190: <code><a href="#ins"><ins class="diff-new">ins</ins></a></code>
                   15191: <ins class="diff-new">elements.</ins></p>
                   15192: <div class="example">
                   15193: <p><ins class="diff-new">In the following example, a list that
                   15194: started empty had items added and removed from it over time. The
                   15195: bits in the example that have been emphasised show the parts that
                   15196: are the "current" state of the list. The list item numbers don't
                   15197: take into account the edits, though.</ins></p>
                   15198: <pre>
                   15199: &lt;h1&gt;Stop-ship bugs&lt;/h1&gt;<ins class="diff-new">
                   15200: &lt;ol&gt;
                   15201:  &lt;li&gt;&lt;ins datetime="2008-02-12 15:20 Z"&gt;<em>Bug 225: Rain detector
                   15202:  doesn't work in snow</em>&lt;/ins&gt;&lt;/li&gt;
                   15203:  &lt;li&gt;&lt;del datetime="2008-03-01 20:22 Z"&gt;&lt;ins datetime="2008-02-14 
                   15204:  12:02 Z"&gt;Bug 228: Water buffer overflows in April&lt;/ins&gt;&lt;/del&gt;&lt;/li&gt;
                   15205:  &lt;li&gt;&lt;ins datetime="2008-02-16 13:50 Z"&gt;<em>Bug 230: Water heater
                   15206:  doesn't use renewable fuels</em>&lt;/ins&gt;&lt;/li&gt;
                   15207:  &lt;li&gt;&lt;del datetime="2008-02-20 21:15 Z"&gt;&lt;ins datetime="2008-02-16
                   15208:  14:25 Z"&gt;Bug 232: Carbon dioxide emissions detected after
                   15209:  startup&lt;/ins&gt;&lt;/del&gt;&lt;/li&gt;
                   15210: &lt;/ol&gt;
                   15211: </ins>
                   15212: </pre></div>
                   15213: <div class="example">
                   15214: <p><ins class="diff-new">In the following example, a list that
                   15215: started with just fruit was replaced by a list with just
                   15216: colors.</ins></p>
                   15217: <pre>
                   15218: &lt;h1&gt;List of &lt;del&gt;fruits&lt;/del&gt;&lt;ins&gt;colors&lt;/ins&gt;&lt;/h1&gt;<ins class="diff-new">
                   15219: &lt;ul&gt;
                   15220:  &lt;li&gt;&lt;del&gt;Lime&lt;/del&gt;&lt;ins&gt;Green&lt;/ins&gt;&lt;/li&gt;
                   15221:  &lt;li&gt;&lt;del&gt;Apple&lt;/del&gt;&lt;/li&gt;
                   15222:  &lt;li&gt;Orange&lt;/li&gt;
                   15223:  &lt;li&gt;&lt;del&gt;Pear&lt;/del&gt;&lt;/li&gt;
                   15224:  &lt;li&gt;&lt;ins&gt;Teal&lt;/ins&gt;&lt;/li&gt;
                   15225:  &lt;li&gt;&lt;del&gt;Lemon&lt;/del&gt;&lt;ins&gt;Yellow&lt;/ins&gt;&lt;/li&gt;
                   15226:  &lt;li&gt;Olive&lt;/li&gt;
                   15227:  &lt;li&gt;&lt;ins&gt;Purple&lt;/ins&gt;
                   15228: &lt;/ul&gt;
                   15229: </ins>
                   15230: </pre></div>
                   15231: <h3 id="embedded0"><span class="secno"><del class=
                   15232: "diff-old">3.14.</del> <ins class="diff-chg">3.12</ins></span>
                   15233: Embedded content</h3>
                   15234: <h4 id="the-figure"><span class="secno"><del class=
                   15235: "diff-old">3.14.1.</del> <ins class="diff-chg">3.12.1</ins></span>
                   15236: The <dfn id="figure"><code>figure</code></dfn> element</h4>
                   15237: <dl class="element">
                   15238: <dt>Categories</dt>
                   15239: <dd><del class="diff-old">Prose</del> <a href=
                   15240: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   15241: .</dd>
                   15242: <dd><a href="#sectioning1"><ins class="diff-new">Sectioning
                   15243: root</ins></a> .</dd>
                   15244: <dt>Contexts in which this element may be used:</dt>
                   15245: <dd>Where <del class="diff-old">prose</del> <a href=
                   15246: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   15247: expected.</dd>
                   15248: <dt>Content model:</dt>
                   15249: <dd><del class="diff-old">Either</del> <ins class=
                   15250: "diff-chg">Either:</ins> one <code><a href=
                   15251: "#legend">legend</a></code> element followed by <del class=
                   15252: "diff-old">prose</del> <a href="#flow-content0"><ins class=
                   15253: "diff-chg">flow</ins> content</a> .</dd>
                   15254: <dd>Or: <del class="diff-old">Prose</del> <a href=
                   15255: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   15256: followed by one <code><a href="#legend">legend</a></code>
                   15257: element.</dd>
                   15258: <dd><ins class="diff-new">Or:</ins> <a href=
                   15259: "#flow-content0"><ins class="diff-new">Flow content</ins></a>
                   15260: .</dd>
                   15261: <dt>Element-specific attributes:</dt>
                   15262: <dd>None.</dd>
                   15263: <dt>DOM interface:</dt>
                   15264: <dd><del class="diff-old">No difference from</del> <ins class=
                   15265: "diff-chg">Uses</ins> <code><a href=
                   15266: "#htmlelement">HTMLElement</a></code> .</dd>
                   15267: </dl>
                   15268: <p>The <code><a href="#figure">figure</a></code> element represents
                   15269: some <del class="diff-old">prose</del> <a href=
                   15270: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> ,
                   15271: <ins class="diff-chg">optionally</ins> with a <del class=
                   15272: "diff-old">caption.</del> <ins class="diff-chg">caption, which can
                   15273: be moved away from the main flow of the document without affecting
                   15274: the document's meaning.</ins></p>
                   15275: <p><ins class="diff-chg">The element can thus be used to annotate
                   15276: illustrations, diagrams, photos, code listings, etc, that are
                   15277: referred to from the main content of the document, but that could,
                   15278: without affecting the flow of the document, be moved away from that
                   15279: primary content, e.g. to the side of the page, to dedicated pages,
                   15280: or to an appendix.</ins></p>
                   15281: <p>The first <code><a href="#legend">legend</a></code> element
                   15282: child of the element, if any, represents the caption of the
                   15283: <code><a href="#figure">figure</a></code> element's contents. If
                   15284: there is no child <code><a href="#legend">legend</a></code>
                   15285: element, then there is no caption.</p>
                   15286: <p>The remainder of the element's contents, if any, represents the
                   15287: <del class="diff-old">captioned</del> content.</p>
                   15288: <div class="example">
                   15289: <p><ins class="diff-new">This example shows the</ins>
                   15290: <code><a href="#figure"><ins class=
                   15291: "diff-new">figure</ins></a></code> <ins class="diff-new">element to
                   15292: mark up a code listing.</ins></p>
                   15293: <pre>
                   15294: &lt;p&gt;In &lt;a href="#l4"&gt;listing 4&lt;/a&gt; we see the primary core interface<ins class="diff-new">
                   15295: API declaration.&lt;/p&gt;
                   15296: &lt;figure id="l4"&gt;
                   15297:  &lt;legend&gt;Listing 4. The primary core interface API declaration.&lt;/legend&gt;
                   15298:  &lt;pre&gt;&lt;code&gt;interface PrimaryCore {
                   15299:   boolean verifyDataLine();
                   15300:   void sendData(in sequence&amp;lt;byte&gt; data);
                   15301:   void initSelfDestruct();
                   15302: }&lt;/code&gt;&lt;/pre&gt;
                   15303: &lt;/figure&gt;
                   15304: &lt;p&gt;
                   15305: The
                   15306: API
                   15307: is
                   15308: designed
                   15309: to
                   15310: use
                   15311: UTF-8.&lt;/p&gt;
                   15312: </ins>
                   15313: </pre></div>
                   15314: <div class="example">
                   15315: <p><ins class="diff-new">Here we see a</ins> <code><a href=
                   15316: "#figure"><ins class="diff-new">figure</ins></a></code> <ins class=
                   15317: "diff-new">element to mark up a photo.</ins></p>
                   15318: <pre>
                   15319: &lt;figure&gt;<ins class="diff-new">
                   15320:  &lt;img src="bubbles-work.jpeg"
                   15321:       alt="Bubbles, sitting in his office chair, works on his
                   15322:            latest project intently."&gt;
                   15323:  &lt;legend&gt;Bubbles at work&lt;/legend&gt;
                   15324: &lt;/figure&gt;
                   15325: </ins>
                   15326: </pre></div>
                   15327: <div class="example">
                   15328: <p><ins class="diff-new">In this example, we see an image that
                   15329: is</ins> <em><ins class="diff-new">not</ins></em> <ins class=
                   15330: "diff-new">a figure, as well as an image and a video that
                   15331: are.</ins></p>
                   15332: <pre>
                   15333: &lt;h2&gt;Malinko's comics&lt;/h2&gt;<ins class="diff-new">
                   15334: &lt;p&gt;This case centered on some sort of "intellectual property"
                   15335: infringement related to a comic (see Exhibit A). The suit started
                   15336: after a trailer ending with these words:&lt;/p&gt;
                   15337: &lt;img src="promblem-packed-action.png" alt="ROUGH COPY! Promblem-Packed Action!"&gt;
                   15338: &lt;p&gt;...was aired. A lawyer, armed with a Bigger Notebook, launched a
                   15339: preemptive strike using snowballs. A complete copy of the trailer is
                   15340: included with Exhibit B.&lt;/p&gt;
                   15341: &lt;figure&gt;
                   15342:  &lt;img src="ex-a.png" alt="Two squiggles on a dirty piece of paper."&gt;
                   15343:  &lt;legend&gt;Exhibit A. The alleged &lt;cite&gt;rough copy&lt;/cite&gt; comic.&lt;/legend&gt;
                   15344: &lt;/figure&gt;
                   15345: &lt;figure&gt;
                   15346:  &lt;video src="ex-b.mov"&gt;&lt;/video&gt;
                   15347:  &lt;legend&gt;Exhibit A. The alleged &lt;cite&gt;rough copy&lt;/cite&gt; comic.&lt;/legend&gt;
                   15348: &lt;/figure&gt;
                   15349: &lt;p&gt;
                   15350: The
                   15351: case
                   15352: was
                   15353: resolved
                   15354: out
                   15355: of
                   15356: court.&lt;/p&gt;
                   15357: </ins>
                   15358: </pre></div>
                   15359: <div class="example">
                   15360: <p><ins class="diff-new">Here, a part of a poem is marked up
                   15361: using</ins> <code><a href="#figure"><ins class=
                   15362: "diff-new">figure</ins></a></code> .</p>
                   15363: <pre>
                   15364: &lt;figure&gt;<ins class="diff-new">
                   15365:  &lt;p&gt;'Twas brillig, and the slithy toves&lt;br&gt;
                   15366: Did gyre and gimble in the wabe;&lt;br&gt;
                   15367: All mimsy were the borogoves,&lt;br&gt;
                   15368: And the mome raths outgrabe.&lt;/p&gt;
                   15369:  &lt;legend&gt;&lt;cite&gt;Jabberwocky&lt;/cite&gt; (first verse). Lewis Carroll, 1832-98&lt;/legend&gt;
                   15370: &lt;/figure&gt;
                   15371: </ins>
                   15372: </pre></div>
                   15373: <div class="example">
                   15374: <p><ins class="diff-new">In this example, which could be part of a
                   15375: much larger work discussing a castle, the figure has three images
                   15376: in it.</ins></p>
                   15377: <pre>
                   15378: &lt;figure&gt;<ins class="diff-new">
                   15379:  &lt;img src="castle1423.jpeg" title="Etching. Anonymous, ca. 1423."
                   15380:       alt="The castle has one tower, and a tall wall around it."&gt;
                   15381:  &lt;img src="castle1858.jpeg" title="Oil-based paint on canvas. Maria Towle, 1858."
                   15382:       alt="The castle now has two towers and two walls."&gt;
                   15383:  &lt;img src="castle1999.jpeg" title="Film photograph. Peter Jankle, 1999."
                   15384:       alt="The castle lies in ruins, the original tower all that remains in one piece."&gt;
                   15385:  &lt;legend&gt;The castle through the ages: 1423, 1858, and 1999 respectively.&lt;/legend&gt;
                   15386: &lt;/figure&gt;
                   15387: </ins>
                   15388: </pre></div>
                   15389: <h4 id="the-img"><span class="secno"><del class=
                   15390: "diff-old">3.14.2.</del> <ins class="diff-chg">3.12.2</ins></span>
                   15391: The <dfn id="img"><code>img</code></dfn> element</h4>
                   15392: <dl class="element">
                   15393: <dt>Categories</dt>
                   15394: <dd><a href="#embedded1">Embedded content</a> .</dd>
                   15395: <dt>Contexts in which this element may be used:</dt>
                   15396: <dd>Where <a href="#embedded1">embedded content</a> is
                   15397: expected.</dd>
                   15398: <dt>Content model:</dt>
                   15399: <dd>Empty.</dd>
                   15400: <dt>Element-specific attributes:</dt>
                   15401: <dd><code title="attr-img-alt"><a href="#alt">alt</a></code></dd>
                   15402: <dd><code title="attr-img-src"><a href="#src">src</a></code></dd>
                   15403: <dd><code title="attr-hyperlink-usemap"><a href=
                   15404: "#usemap1">usemap</a></code></dd>
                   15405: <dd><code title="attr-img-ismap"><a href=
                   15406: "#ismap">ismap</a></code></dd>
                   15407: <dd><code title="attr-dim-width"><a href=
                   15408: "#width4">width</a></code></dd>
                   15409: <dd><code title="attr-dim-height"><a href=
                   15410: "#height3">height</a></code></dd>
                   15411: <dt>DOM interface:</dt>
                   15412: <dd>
                   15413: <pre class="idl">
                   15414: interface <dfn id=
                   15415: "htmlimageelement">HTMLImageElement</dfn> : <a href=
                   15416: "#htmlelement">HTMLElement</a> {
                   15417:            attribute DOMString <a href="#alt0" title=
                   15418: "dom-img-alt">alt</a>;
                   15419:            attribute DOMString <a href="#src0" title=
                   15420: "dom-img-src">src</a>;
                   15421:            attribute DOMString <a href="#usemap" title=
                   15422: "dom-img-useMap">useMap</a>;
                   15423:            attribute boolean <a href="#ismap0" title=
                   15424: "dom-img-isMap">isMap</a>;
                   15425:            attribute long <a href="#width" title=
                   15426: "dom-img-width">width</a>;
                   15427:            attribute long <a href="#height" title=
                   15428: "dom-img-height">height</a>;
                   15429:   readonly attribute boolean <a href="#complete" title=
                   15430: "dom-img-complete">complete</a>;
                   15431: };
                   15432: </pre>
                   15433: <p class="note">An instance of <code><a href=
                   15434: "#htmlimageelement">HTMLImageElement</a></code> can be obtained
                   15435: using the <code title="dom-image"><a href=
                   15436: "#image0">Image</a></code> constructor.</p>
                   15437: </dd>
                   15438: </dl>
                   15439: <p>An <code><a href="#img">img</a></code> element represents an
                   15440: image.</p>
                   15441: <p>The image given by the <dfn id="src" title=
                   15442: "attr-img-src"><code>src</code></dfn> attribute is the embedded
                   15443: content, and the value of the <dfn id="alt" title=
                   15444: "attr-img-alt"><code>alt</code></dfn> attribute is the
                   15445: <code><a href="#img">img</a></code> element's <a href=
                   15446: "#fallback">fallback content</a> .</p>
                   15447: <p><strong>Authoring requirements</strong> : The <code title=
                   15448: "attr-img-src"><a href="#src">src</a></code> attribute must be
                   15449: present, and must contain a URI (or IRI).</p>
                   15450: <p class="big-issue">Should we restrict the URI to pointing to an
                   15451: image? What's an image? Is PDF an image? (Safari supports PDFs in
                   15452: &lt;img&gt; elements.) How about SVG? (Opera supports those). WMFs?
                   15453: XPMs? HTML?</p>
                   15454: <p>The requirements for the <code title="attr-img-alt"><a href=
                   15455: "#alt">alt</a></code> attribute depend on what the image is
                   15456: intended to represent:</p>
                   15457: <dl>
                   15458: <dt>A phrase or paragraph with an alternative graphical
                   15459: representation</dt>
                   15460: <dd>
                   15461: <p>Sometimes something can be more clearly stated in graphical
                   15462: form, for example as a flowchart, a diagram, a graph, or a simple
                   15463: map showing directions. In such cases, an image can be given using
                   15464: the <code><a href="#img">img</a></code> element, but the lesser
                   15465: textual version must still be given, so that users who are unable
                   15466: to view the image (e.g. because they have a very slow connection,
                   15467: or because they are using a text-only browser, or because they are
                   15468: listening to the page being read out by a hands-free automobile
                   15469: voice Web browser, or simply because they are blind) are still able
                   15470: to understand the message being conveyed.</p>
                   15471: <p>The text must be given in the <code title=
                   15472: "attr-img-alt"><a href="#alt">alt</a></code> attribute, and must
                   15473: convey the same message as the <del class="diff-old">the</del>
                   15474: image specified in the <code title="attr-img-src"><a href=
                   15475: "#src">src</a></code> attribute.</p>
                   15476: <div class="example">
                   15477: <p>In the following example we have <a href=
                   15478: "images/parsing-model-overview.png">a flowchart</a> in image form,
                   15479: with text in the <code title="attr-img-alt"><a href=
                   15480: "#alt">alt</a></code> attribute rephrasing the flowchart in prose
                   15481: form:</p>
                   15482: <pre>
                   15483: &lt;p&gt;In the common case, the data handled by the tokenisation stage
                   15484: comes from the network, but it can also come from script.&lt;/p&gt;
                   15485: &lt;p&gt;<strong>&lt;img src="images/parsing-model-overview.png" alt="The network
                   15486: passes data to the Tokeniser stage, which passes data to the Tree
                   15487: Construction stage. From there, data goes to both the DOM and to
                   15488: Script Execution. Script Execution is linked to the DOM, and, using
                   15489: document.write(),
                   15490: passes
                   15491: data
                   15492: to
                   15493: the
                   15494: Tokeniser."&gt;
                   15495: </strong>
                   15496: &lt;/p&gt;
                   15497: </pre></div>
                   15498: <div class="example">
                   15499: <p>Here's another example, showing a good solution and a bad
                   15500: solution to the problem of including an image in a description.</p>
                   15501: <p>First, here's the good solution. This sample shows how the
                   15502: alternative text should just be what you would have put in the
                   15503: prose if the image had never existed.</p>
                   15504: <pre>
                   15505: &lt;!-- This is the correct way to do things. --&gt;
                   15506: &lt;p&gt;
                   15507:  You are standing in an open field west of a house.
                   15508:  <strong>&lt;img src="house.jpeg" alt="The house is white, with a boarded front door."&gt;</strong>
                   15509:  There is a small mailbox here.
                   15510: &lt;/p&gt;
                   15511: </pre>
                   15512: <p>Second, here's the bad solution. In this incorrect way of doing
                   15513: things, the alternative text is simply a description of the image,
                   15514: instead of a textual replacement for the image. It's bad because
                   15515: when the image isn't shown, the text doesn't flow as well as in the
                   15516: first example.</p>
                   15517: <del class="diff-old"></del>
                   15518: <pre class="bad">
                   15519: &lt;!-- <em>This is the wrong way to do things.</em> --&gt;
                   15520: &lt;p&gt;
                   15521:  You are standing in an open field west of a house.
                   15522:  &lt;img src="house.jpeg" alt="A white house, with a boarded front door."&gt;
                   15523:  There is a small mailbox here.
                   15524: &lt;/p&gt;
                   15525: </pre></div>
                   15526: <p>It is important to <del class="diff-old">realise</del>
                   15527: <ins class="diff-chg">realize</ins> that the alternative text is a
                   15528: <em>replacement</em> for the image, not a description of the
                   15529: image.</p>
                   15530: </dd>
                   15531: <dt>Icons: a short phrase or label with an alternative graphical
                   15532: representation</dt>
                   15533: <dd>
                   15534: <p>A document can contain information in iconic form. The icon is
                   15535: intended to help users of visual browsers to <del class=
                   15536: "diff-old">recognise</del> <ins class="diff-chg">recognize</ins>
                   15537: features at a glance.</p>
                   15538: <p>In some cases, the icon is supplemental to a text label
                   15539: conveying the same meaning. In those cases, the <code title=
                   15540: "attr-img-alt"><a href="#alt">alt</a></code> attribute must be
                   15541: present but must be empty.</p>
                   15542: <div class="example">
                   15543: <p>Here the icons are next to text that conveys the same meaning,
                   15544: so they have an empty <code title="attr-img-alt"><a href=
                   15545: "#alt">alt</a></code> attribute:</p>
                   15546: <pre>
                   15547: &lt;nav&gt;
                   15548:  &lt;p&gt;&lt;a href="/help/"&gt;<strong>&lt;img src="/icons/help.png" alt=""&gt;</strong> Help&lt;/a&gt;&lt;/p&gt;
                   15549:  &lt;p&gt;&lt;a href="/configure/"&gt;<strong>&lt;img src="/icons/configuration.png" alt=""&gt;</strong>
                   15550:  Configuration Tools&lt;/a&gt;&lt;/p&gt;
                   15551: &lt;/nav&gt;
                   15552: </pre></div>
                   15553: <p>In other cases, the icon has no text next to it describing what
                   15554: it means; the icon is supposed to be self-explanatory. In those
                   15555: cases, an equivalent textual label must be given in the
                   15556: <code title="attr-img-alt"><a href="#alt">alt</a></code>
                   15557: attribute.</p>
                   15558: <div class="example">
                   15559: <p>Here, posts on a news site are <del class=
                   15560: "diff-old">labelled</del> <ins class="diff-chg">labeled</ins> with
                   15561: an icon indicating their topic.</p>
                   15562: <pre>
                   15563: &lt;body&gt;
                   15564:  &lt;article&gt;
                   15565:   &lt;header&gt;
                   15566:    &lt;h1&gt;Ratatouille wins &lt;i&gt;Best Movie of the Year&lt;/i&gt; award&lt;/h1&gt;
                   15567:    &lt;p&gt;<strong>&lt;img src="movies.png" alt="Movies"&gt;</strong>&lt;/p&gt;
                   15568:   &lt;/header&gt;
                   15569:   &lt;p&gt;Pixar has won yet another &lt;i&gt;Best Movie of the Year&lt;/i&gt; award,
                   15570:   making this its 8th win in the last 12 years.&lt;/p&gt;
                   15571:  &lt;/article&gt;
                   15572:  &lt;article&gt;
                   15573:   &lt;header&gt;
                   15574:    &lt;h1&gt;Latest TWiT episode is online&lt;/h1&gt;
                   15575:    &lt;p&gt;<strong>&lt;img src="podcasts.png" alt="Podcasts"&gt;</strong>&lt;/p&gt;
                   15576:   &lt;/header&gt;
                   15577:   &lt;p&gt;The latest TWiT episode has been posted, in which we hear
                   15578:   several tech news stories as well as learning much more about the
                   15579:   iPhone. This week, the panelists compare how reflective their
                   15580:   iPhones' Apple logos are.&lt;/p&gt;
                   15581:  &lt;/article&gt;
                   15582: &lt;/body&gt;
                   15583: </pre></div>
                   15584: <p>Many pages include logos, insignia, flags, or emblems, which
                   15585: stand for a particular entity such as a company, <del class=
                   15586: "diff-old">organisation,</del> <ins class=
                   15587: "diff-chg">organization,</ins> project, band, software package,
                   15588: country, or some such.</p>
                   15589: <p>If the logo is being used to represent the entity, the
                   15590: <code title="attr-img-alt"><a href="#alt">alt</a></code> attribute
                   15591: must contain the name of the entity being represented by the logo.
                   15592: The <code title="attr-img-alt"><a href="#alt">alt</a></code>
                   15593: attribute must <em>not</em> contain text like the word "logo", as
                   15594: it is not the fact that it is a logo that is being conveyed, it's
                   15595: the entity itself.</p>
                   15596: <p>If the logo is being used next to the name of the entity that it
                   15597: represents, then the logo is supplemental, and its <code title=
                   15598: "attr-img-alt"><a href="#alt">alt</a></code> attribute must instead
                   15599: be empty.</p>
                   15600: <p>If the logo is merely used as decorative material (as branding,
                   15601: or, for example, as a side image in an article that mentions the
                   15602: entity to which the logo belongs), then the entry below on purely
                   15603: decorative images applies. If the logo is actually being discussed,
                   15604: then it is being used as a phrase or paragraph (the description of
                   15605: the logo) with an alternative graphical representation (the logo
                   15606: itself), and the first entry above applies.</p>
                   15607: <div class="example">
                   15608: <p>In the following snippets, all four of the above cases are
                   15609: present. First, we see a logo used to represent a company:</p>
                   15610: <pre>
                   15611: &lt;h1&gt;
                   15612: <strong>
                   15613: &lt;img
                   15614: src="XYZ.gif"
                   15615: alt="The
                   15616: XYZ
                   15617: company"&gt;
                   15618: </strong>
                   15619: &lt;/h1&gt;
                   15620: </pre>
                   15621: <p>Next, we see a paragraph which uses a logo right next to the
                   15622: company name, and so doesn't have any alternative text:</p>
                   15623: <pre>
                   15624: &lt;article&gt;
                   15625:  &lt;h2&gt;News&lt;/h2&gt;
                   15626:  &lt;p&gt;We have recently been looking at buying the <strong>&lt;img src="alpha.gif"
                   15627:  alt=""&gt; ΑΒΓ company</strong>, a small Greek company
                   15628: <del class="diff-old">specialising
                   15629: </del>
                   15630: <ins class="diff-chg">specializing
                   15631: </ins>
                   15632: in
                   15633: our
                   15634: type
                   15635: of
                   15636: product.&lt;/p&gt;
                   15637: </pre>
                   15638: <p>In this third snippet, we have a logo being used in an aside, as
                   15639: part of the larger article discussing the acquisition:</p>
                   15640: <pre>
                   15641:  <strong>&lt;aside&gt;&lt;p&gt;&lt;img src="alpha-large.gif" alt=""&gt;&lt;/p&gt;&lt;/aside&gt;</strong>
                   15642:  &lt;p&gt;The ΑΒΓ company has had a good quarter, and our
                   15643:  pie chart studies of their accounts suggest a much bigger blue slice
                   15644:  than its green and orange slices, which is always a good sign.&lt;/p&gt;
                   15645: &lt;/article&gt;
                   15646: </pre>
                   15647: <p>Finally, we have an opinion piece talking about a logo, and the
                   15648: logo is therefore described in detail in the alternative text.</p>
                   15649: <pre>
                   15650: &lt;p&gt;Consider for a moment their logo:&lt;/p&gt;
                   15651: <strong>&lt;p&gt;&lt;img src="/images/logo" alt="It consists of a green circle with a
                   15652: green question mark centered inside it."&gt;&lt;/p&gt;</strong>
                   15653: &lt;p&gt;How unoriginal can you get? I mean, oooooh, a question mark, how
                   15654: &lt;em&gt;revolutionary&lt;/em&gt;, how utterly &lt;em&gt;ground-breaking&lt;/em&gt;, I'm
                   15655: sure everyone will rush to adopt those specifications now! They could
                   15656: at least have tried for some sort of, I don't know, sequence of
                   15657: rounded squares with varying shades of green and bold white outlines,
                   15658: at
                   15659: least
                   15660: that
                   15661: would
                   15662: look
                   15663: good
                   15664: on
                   15665: the
                   15666: cover
                   15667: of
                   15668: a
                   15669: blue
                   15670: book.&lt;/p&gt;
                   15671: </pre>
                   15672: <p>This example shows how the alternative text should be written
                   15673: such that if the image isn't available, and the text is used
                   15674: instead, the text flows seamlessly into the surrounding text, as if
                   15675: the image had never been there in the first place.</p>
                   15676: </div>
                   15677: </dd>
                   15678: <dt>A graphical representation of some of the surrounding text</dt>
                   15679: <dd>
                   15680: <p>In many cases, the image is actually just supplementary, and its
                   15681: presence merely reinforces the surrounding text. In these cases,
                   15682: the <code title="attr-img-alt"><a href="#alt">alt</a></code>
                   15683: attribute must be present but its value must be the empty
                   15684: string.</p>
                   15685: <div class="example">
                   15686: <p>A flowchart that repeats the previous paragraph in graphical
                   15687: form:</p>
                   15688: <pre>
                   15689: &lt;p&gt;The network passes data to the Tokeniser stage, which
                   15690: passes data to the Tree Construction stage. From there, data goes
                   15691: to both the DOM and to Script Execution. Script Execution is
                   15692: linked to the DOM, and, using document.write(), passes data to
                   15693: the Tokeniser.&lt;/p&gt;
                   15694: <strong>
                   15695: &lt;p&gt;
                   15696: &lt;img
                   15697: src="images/parsing-model-overview.png"
                   15698: alt=""&gt;
                   15699: &lt;/p&gt;
                   15700: </strong>
                   15701: </pre></div>
                   15702: <div class="example">
                   15703: <p>A graph that repeats the previous paragraph in graphical
                   15704: form:</p>
                   15705: <pre>
                   15706: &lt;p&gt;According to a study covering several billion pages,
                   15707: about 62% of documents on the Web in 2007 triggered the Quirks
                   15708: rendering mode of Web browsers, about 30% triggered the Almost
                   15709: Standards mode, and about 9% triggered the Standards mode.&lt;/p&gt;
                   15710: <strong>
                   15711: &lt;p&gt;
                   15712: &lt;img
                   15713: src="rendering-mode-pie-chart.png"
                   15714: alt=""&gt;
                   15715: &lt;/p&gt;
                   15716: </strong>
                   15717: </pre></div>
                   15718: <p>In general, an image falls into this category if removing the
                   15719: image doesn't make the page any less useful, but including the
                   15720: image makes it a lot easier for users of visual browsers to
                   15721: understand the concept.</p>
                   15722: </dd>
                   15723: <dt>A purely decorative image that doesn't add any information but
                   15724: is still specific to the surrounding content</dt>
                   15725: <dd>
                   15726: <p>In some cases, the image isn't discussed by the surrounding
                   15727: text, but it has some relevance. Such images are decorative, but
                   15728: still form part of the content. In these cases, the <code title=
                   15729: "attr-img-alt"><a href="#alt">alt</a></code> attribute must be
                   15730: present but its value must be the empty string.</p>
                   15731: <div class="example">
                   15732: <p>Examples where the image is purely decorative despite being
                   15733: relevant would include things like a photo of the Black Rock City
                   15734: landscape in a blog post about an event at Burning Man, or an image
                   15735: of a painting inspired by a poem, on a page reciting that poem. The
                   15736: following snippet shows an example of the latter case (only the
                   15737: first verse is included in this snippet):</p>
                   15738: <pre>
                   15739: &lt;h1&gt;The Lady of Shalott&lt;/h1&gt;
                   15740: <strong>&lt;p&gt;&lt;img src="shalott.jpeg" alt=""&gt;&lt;/p&gt;</strong>
                   15741: &lt;p&gt;On either side the river lie&lt;br&gt;
                   15742: Long fields of barley and of rye,&lt;br&gt;
                   15743: That clothe the wold and meet the sky;&lt;br&gt;
                   15744: And through the field the road run by&lt;br&gt;
                   15745: To many-tower'd Camelot;&lt;br&gt;
                   15746: And up and down the people go,&lt;br&gt;
                   15747: Gazing where the lilies blow&lt;br&gt;
                   15748: Round an island there below,&lt;br&gt;
                   15749: The
                   15750: island
                   15751: of
                   15752: Shalott.&lt;/p&gt;
                   15753: </pre></div>
                   15754: <p>In general, if an image is decorative but isn't especially
                   15755: page-specific, for example an image that forms part of a site-wide
                   15756: design scheme, the image should be specified in the site's CSS, not
                   15757: in the markup of the document.</p>
                   15758: </dd>
                   15759: <dt>A key part of the content <del class="diff-old">that doesn't
                   15760: have an obvious textual alternative</del></dt>
                   15761: <dd>
                   15762: <p>In <del class="diff-old">certain rare</del> <ins class=
                   15763: "diff-chg">some</ins> cases, the image is <del class=
                   15764: "diff-old">simply</del> a critical part of the <del class=
                   15765: "diff-old">content, and</del> <ins class="diff-chg">content. This
                   15766: could be the case, for instance, on a page that is part of a photo
                   15767: gallery. The image is the whole</ins> <em><ins class=
                   15768: "diff-chg">point</ins></em> <ins class="diff-chg">of the page
                   15769: containing it.</ins></p>
                   15770: <p><ins class="diff-chg">When it is possible for alternative text
                   15771: to be provided, for example if the image is part of a series of
                   15772: screenshots in a magazine review, or part of a comic strip, or is a
                   15773: photograph in a blog entry about that photograph, text that conveys
                   15774: can serve as a substitute for the image must be given as the
                   15775: contents of the</ins> <code title="attr-img-alt"><a href=
                   15776: "#alt"><ins class="diff-chg">alt</ins></a></code> <ins class=
                   15777: "diff-chg">attribute.</ins></p>
                   15778: <p><ins class="diff-chg">In a rare subset of these cases,</ins>
                   15779: there might <del class="diff-old">even</del> be no alternative text
                   15780: available. This could be the case, for instance, <del class=
                   15781: "diff-old">in</del> <ins class="diff-chg">on</ins> a photo
                   15782: <del class="diff-old">gallery, where a user</del> <ins class=
                   15783: "diff-chg">upload site, if the site</ins> has <del class=
                   15784: "diff-old">uploaded 3000</del> <ins class="diff-chg">received
                   15785: 8000</ins> photos from a <del class="diff-old">vacation trip,</del>
                   15786: <ins class="diff-chg">user</ins> without <del class=
1.2     ! mike     15787: "diff-old">providing any descriptions of</del> the <del class=
        !          15788: "diff-old">images. The images are the whole point</del> <ins class=
1.1       mike     15789: "diff-chg">user annotating any</ins> of <del class="diff-old">the
                   15790: pages containing</del> them. In such cases, the <code title=
                   15791: "attr-img-alt"><a href="#alt">alt</a></code> attribute may be
                   15792: omitted, but the <code title="attr-img-alt"><a href=
                   15793: "#alt">alt</a></code> attribute should be included, with a useful
                   15794: value, if at all possible. <del class="diff-old">If</del></p>
                   15795: <p><ins class="diff-chg">In any case, if</ins> an image is a key
                   15796: part of the content, the <code title="attr-img-alt"><a href=
                   15797: "#alt">alt</a></code> attribute must not be specified with an empty
                   15798: value.</p>
                   15799: <div class="example">
                   15800: <p>A <del class="diff-old">photo on a photo-sharing site:
                   15801: &lt;legend&gt;Bubbles traveled everywhere with us.&lt;/legend&gt;
                   15802: &lt;/figure&gt; A</del> screenshot in a gallery of screenshots for
                   15803: a new <del class="diff-old">OS:</del> <ins class="diff-chg">OS,
                   15804: with some alternative text:</ins></p>
                   15805: <pre>
                   15806: &lt;figure&gt;
                   15807: <del class="diff-old"> 
                   15808: </del>
                   15809:  <strong>&lt;img src="KDE%20Light%20desktop.png"
                   15810: <ins class=
                   15811: "diff-chg">      alt="The desktop is blue, with icons along the left hand side in
                   15812:            two columns, reading System, Home, K-Mail, etc. A window is
                   15813:            open showing that menus wrap to a second line if they
                   15814:            cannot fit in the window. The window has a list of icons
                   15815:            along the top, with an address bar below it, a list of
                   15816:            icons for tabs along the left edge, a status bar on the
                   15817:            bottom, and two panes in the middle. The desktop has a bar
                   15818:            at the bottom of the screen with a few buttons, a pager, a
                   15819:            list of open applications, and a clock."&gt;</ins>
                   15820: </strong>
                   15821:  &lt;legend&gt;Screenshot of a KDE desktop.&lt;/legend&gt;
                   15822: &lt;/figure&gt;
                   15823: </pre>
                   15824: <p><ins class="diff-new">A photo on a photo-sharing site, if the
                   15825: site received the image with no metadata other than the
                   15826: caption:</ins></p>
                   15827: <pre>
                   15828: &lt;figure&gt; <strong>&lt;img src="1100670787_6a7c664aef.jpg"&gt;</strong><ins class="diff-new">
                   15829:  &lt;legend&gt;Bubbles traveled everywhere with us.&lt;/legend&gt;
                   15830: &lt;/figure&gt;
                   15831: </ins>
                   15832: </pre>
                   15833: <p>In <del class="diff-old">both cases,</del> <ins class=
                   15834: "diff-chg">this case,</ins> though, it would be better if a
                   15835: detailed description of the important parts of the image
                   15836: <del class="diff-old">were included.</del> <ins class=
                   15837: "diff-chg">obtained from the user and included on the
                   15838: page.</ins></p>
                   15839: </div>
                   15840: <div class="example">
                   15841: <p>Sometimes there simply is no text that can do justice to an
                   15842: image. For example, there is little that can be said to usefully
                   15843: describe a Rorschach inkblot test.</p>
                   15844: <pre>
                   15845: &lt;figure&gt;
                   15846:  <strong>&lt;img src="/commons/a/a7/Rorschach1.jpg"&gt;</strong>
                   15847:  &lt;legend&gt;A black outline of the first of the ten cards
                   15848:  in the Rorschach inkblot test.&lt;/legend&gt;
                   15849: &lt;/figure&gt;
                   15850: </pre>
                   15851: <p>Note that the following would be a very bad use of alternative
                   15852: text:</p>
                   15853: <del class="diff-old"></del>
                   15854: <pre class="bad">
                   15855: &lt;!-- This example is wrong. Do not copy it. --&gt;
                   15856: &lt;figure&gt;
                   15857:  &lt;img src="/commons/a/a7/Rorschach1.jpg" alt="A black outline
                   15858:  of the first of the ten cards in the Rorschach inkblot test."&gt;
                   15859:  &lt;legend&gt;A black outline of the first of the ten cards
                   15860:  in the Rorschach inkblot test.&lt;/legend&gt;
                   15861: &lt;/figure&gt;
                   15862: </pre>
                   15863: <p>Including the caption in the alternative text like this isn't
                   15864: useful because it effectively duplicates the caption for users who
                   15865: don't have images, taunting them twice yet not helping them any
                   15866: more than if they had only read or heard the caption once.</p>
                   15867: </div>
                   15868: <p class="note">Since some users cannot use images at all (e.g.
                   15869: because they have a very slow connection, or because they are using
                   15870: a text-only browser, or because they are listening to the page
                   15871: being read out by a hands-free automobile voice Web browser, or
                   15872: simply because they are blind), the <code title=
                   15873: "attr-img-alt"><a href="#alt">alt</a></code> attribute <del class=
                   15874: "diff-old">should</del> <ins class="diff-chg">is</ins> only
                   15875: <ins class="diff-new">allowed to</ins> be omitted when no
                   15876: alternative text is available and none can be made available, e.g.
                   15877: on automated image gallery sites.</p>
                   15878: </dd>
                   15879: <dt>An image in an e-mail or document intended for a specific
                   15880: person who is known to be able to view images</dt>
                   15881: <dd>
                   15882: <p>When an image is included in a communication (such as an HTML
                   15883: e-mail) aimed at someone who is known to be able to view images,
                   15884: the <code title="attr-img-alt"><a href="#alt">alt</a></code>
                   15885: attribute may be omitted. However, even in such cases it is
                   15886: <del class="diff-old">stongly</del> <ins class=
                   15887: "diff-chg">strongly</ins> recommended that alternative text be
                   15888: included (as appropriate according to the kind of image involved,
                   15889: as described in the above entries), so that the e-mail is still
                   15890: usable should the user use a mail client that does not support
                   15891: images, or should the e-mail be forwarded on to other users whose
                   15892: abilities might not include easily seeing images.</p>
                   15893: </dd>
                   15894: </dl>
                   15895: <p>The <code><a href="#img">img</a></code> must not be used as a
                   15896: layout tool. In particular, <code><a href="#img">img</a></code>
                   15897: elements should not be used to display fully transparent images, as
                   15898: they rarely convey meaning and rarely add anything useful to the
                   15899: document.</p>
                   15900: <p class="big-issue">There has been some suggestion that the
                   15901: <code title="">longdesc</code> attribute from HTML4, or some other
                   15902: mechanism that is more powerful than <code title="">alt=""</code> ,
                   15903: should be included. This has not yet been considered.</p>
                   15904: <p><strong>User agent requirements</strong> : When the <code title=
                   15905: "attr-img-alt"><a href="#alt">alt</a></code> attribute is present
                   15906: and its value is the empty string, the image supplements the
                   15907: surrounding content. In such cases, the image may be omitted
                   15908: without affecting the meaning of the document.</p>
                   15909: <p>When the <code title="attr-img-alt"><a href=
                   15910: "#alt">alt</a></code> attribute is present and its value is not the
                   15911: empty string, the image is a graphical equivalent of the string
                   15912: given in the <code title="attr-img-alt"><a href=
                   15913: "#alt">alt</a></code> attribute. In such cases, the image may be
                   15914: replaced in the rendering by the string given in the attribute
                   15915: without significantly affecting the meaning of the document.</p>
                   15916: <p>When the <code title="attr-img-alt"><a href=
                   15917: "#alt">alt</a></code> attribute is missing, the image represents a
                   15918: key part of the content. Non-visual user agents should apply image
                   15919: analysis heuristics to help the user make sense of the image.</p>
                   15920: <p>The <code title="attr-img-alt"><a href="#alt">alt</a></code>
                   15921: attribute does not represent advisory information. User agents must
                   15922: not present the contents of the <code title="attr-img-alt"><a href=
                   15923: "#alt">alt</a></code> attribute in the same way as content of the
                   15924: <code title="attr-title"><a href="#title">title</a></code>
                   15925: attribute.</p>
                   15926: <p>If the <code title="attr-img-src"><a href="#src">src</a></code>
                   15927: attribute is omitted, the image represents whatever string is given
                   15928: by the element's <code title="attr-img-alt"><a href=
                   15929: "#alt">alt</a></code> attribute, if any, or nothing, if that
                   15930: attribute is empty or absent.</p>
                   15931: <p><del class="diff-old">When the</del> <ins class=
                   15932: "diff-chg">The</ins> <code title="attr-img-src"><a href=
                   15933: "#src">src</a></code> <del class="diff-old">attribute is set,</del>
                   15934: <ins class="diff-chg">attribute, on setting, must cause</ins> the
                   15935: user agent <del class="diff-old">must</del> <ins class=
                   15936: "diff-chg">to</ins> immediately begin to download the specified
                   15937: resource , unless the user agent cannot support images, or its
                   15938: support for images has been disabled.</p>
                   15939: <p>The download of the image must <a href="#delays">delay the
                   15940: <code title="event-load">load</code> event</a> .</p>
                   15941: <p class="warning">This, unfortunately, can be used to perform a
                   15942: rudimentary port scan of the user's local network (especially in
                   15943: conjunction with scripting, though scripting isn't actually
                   15944: necessary to carry out such an attack). User agents may implement
                   15945: <a href="#origin0" title="origin">cross-origin</a> access control
                   15946: policies that mitigate this attack.</p>
                   15947: <p>Once the download has completed, if the image is a valid image,
                   15948: the user agent must <a href="#firing4">fire a <code title=
                   15949: "event-load">load</code> event</a> on the <code><a href=
                   15950: "#img">img</a></code> <del class="diff-old">element.</del>
                   15951: <ins class="diff-chg">element (this happens after</ins>
                   15952: <code title="dom-img-complete"><a href="#complete"><ins class=
                   15953: "diff-chg">complete</ins></a></code> <ins class="diff-chg">starts
                   15954: returning true).</ins> If the download fails or it completes but
                   15955: the image is not a valid or supported image, the user agent must
                   15956: <a href="#firing5">fire an <code title="event-error">error</code>
                   15957: event</a> on the <code><a href="#img">img</a></code> element.</p>
                   15958: <p>The remote server's response metadata (e.g. an HTTP 404 status
                   15959: code, or <a href="#content-type8" title="Content-Type">associated
                   15960: Content-Type headers</a> ) must be ignored when determining whether
                   15961: the resource obtained is a valid image or not.</p>
                   15962: <p class="note">This allows servers to return images with error
                   15963: responses.</p>
                   15964: <p>User agents must not support non-image resources with the
                   15965: <code><a href="#img">img</a></code> element.</p>
                   15966: <p>The <code title="attr-hyperlink-usemap"><a href=
                   15967: "#usemap1">usemap</a></code> attribute, if present, can indicate
                   15968: that the image has an associated <a href="#image">image map</a>
                   15969: .</p>
                   15970: <p>The <dfn id="ismap" title=
                   15971: "attr-img-ismap"><code>ismap</code></dfn> attribute, when used on
                   15972: an element that is a descendant of an <code><a href=
                   15973: "#a">a</a></code> element with an <code title=
                   15974: "attr-hyperlink-href"><a href="#href6">href</a></code> attribute,
                   15975: indicates by its presence that the element provides access to a
                   15976: server-side image map. This affects how events are handled on the
                   15977: corresponding <code><a href="#a">a</a></code> element.</p>
                   15978: <p>The <code title="attr-img-ismap"><a href=
                   15979: "#ismap">ismap</a></code> attribute is a <a href=
                   15980: "#boolean0">boolean attribute</a> . The attribute must not be
                   15981: specified on an element that does not have an ancestor
                   15982: <code><a href="#a">a</a></code> element with an <code title=
                   15983: "attr-hyperlink-href"><a href="#href6">href</a></code>
                   15984: attribute.</p>
                   15985: <p>The <code><a href="#img">img</a></code> element supports
                   15986: <a href="#dimension0">dimension attributes</a> .</p>
                   15987: <p>The DOM attributes <dfn id="alt0" title=
                   15988: "dom-img-alt"><code>alt</code></dfn> , <dfn id="src0" title=
                   15989: "dom-img-src"><code>src</code></dfn> , <dfn id="usemap" title=
                   15990: "dom-img-useMap"><code>useMap</code></dfn> , and <dfn id="ismap0"
                   15991: title="dom-img-isMap"><code>isMap</code></dfn> each must <a href=
                   15992: "#reflect">reflect</a> the respective content attributes of the
                   15993: same name.</p>
                   15994: <p>The DOM attributes <dfn id="height" title=
                   15995: "dom-img-height"><code>height</code></dfn> and <dfn id="width"
                   15996: title="dom-img-width"><code>width</code></dfn> must return the
                   15997: rendered height and width of the image, in CSS pixels, if the image
                   15998: is being rendered, and is being rendered to a visual medium, or 0
                   15999: otherwise. <a href="#references">[CSS21]</a></p>
                   16000: <p>The DOM attribute <dfn id="complete" title=
                   16001: "dom-img-complete"><code>complete</code></dfn> must return true if
                   16002: the user agent has downloaded the image specified in the
                   16003: <code title="attr-img-src"><a href="#src">src</a></code> attribute,
                   16004: and it is a valid image, and false otherwise.</p>
                   16005: <p class="note"><ins class="diff-new">The value of</ins>
                   16006: <code title="dom-img-complete"><a href="#complete"><ins class=
                   16007: "diff-new">complete</ins></a></code> <ins class="diff-new">can
                   16008: change while a script is executing.</ins></p>
                   16009: <div class="example">
                   16010: <p><ins class="diff-new">A single image can have different
                   16011: appropriate alternative text depending on the context.</ins></p>
                   16012: <p><ins class="diff-new">In each of the following cases, the same
                   16013: image is used, yet the</ins> <code title="attr-img-alt"><a href=
                   16014: "#alt"><ins class="diff-new">alt</ins></a></code> <ins class=
                   16015: "diff-new">text is different each time. The image is the coat of
                   16016: arms of the Canton Geneva in Switzerland.</ins></p>
                   16017: <p><ins class="diff-new">Here it is used as a supplementary
                   16018: icon:</ins></p>
                   16019: <pre>
                   16020: <ins class="diff-new">
                   16021: &lt;p&gt;
                   16022: I
                   16023: lived
                   16024: in
                   16025: &lt;img
                   16026: src="carouge.svg"
                   16027: alt=""&gt;
                   16028: Carouge.&lt;/p&gt;
                   16029: </ins>
                   16030: </pre>
                   16031: <p><ins class="diff-new">Here it is used as an icon representing
                   16032: the town:</ins></p>
                   16033: <pre>
                   16034: <ins class="diff-new">
                   16035: &lt;p&gt;
                   16036: Home
                   16037: town:
                   16038: &lt;img
                   16039: src="carouge.svg"
                   16040: alt="Carouge"&gt;
                   16041: &lt;/p&gt;
                   16042: </ins>
                   16043: </pre>
                   16044: <p><ins class="diff-new">Here it is used as part of a text on the
                   16045: town:</ins></p>
                   16046: <pre>
                   16047: &lt;p&gt;Carouge has a coat of arms.&lt;/p&gt;<ins class=
                   16048: "diff-new">
                   16049: &lt;p&gt;&lt;img src="carouge.svg" alt="The coat of arms depicts a lion, sitting in front of a tree."&gt;&lt;/p&gt;
                   16050: &lt;p&gt;
                   16051: It
                   16052: is
                   16053: used
                   16054: as
                   16055: decoration
                   16056: all
                   16057: over
                   16058: the
                   16059: town.&lt;/p&gt;
                   16060: </ins>
                   16061: </pre>
                   16062: <p><ins class="diff-new">Here it is used as a way to support a
                   16063: similar text where the description is given as well as, instead of
                   16064: as an alternative to, the image:</ins></p>
                   16065: <pre>
                   16066: &lt;p&gt;Carouge has a coat of arms.&lt;/p&gt;<ins class=
                   16067: "diff-new">
                   16068: &lt;p&gt;&lt;img src="carouge.svg" alt=""&gt;&lt;/p&gt;
                   16069: &lt;p&gt;The coat of arms depicts a lion, sitting in front of a tree.
                   16070: It
                   16071: is
                   16072: used
                   16073: as
                   16074: decoration
                   16075: all
                   16076: over
                   16077: the
                   16078: town.&lt;/p&gt;
                   16079: </ins>
                   16080: </pre>
                   16081: <p><ins class="diff-new">Here it is used as part of a
                   16082: story:</ins></p>
                   16083: <pre>
                   16084: &lt;p&gt;He picked up the folder and a piece of paper fell out.&lt;/p&gt;<ins class="diff-new">
                   16085: &lt;p&gt;&lt;img src="carouge.svg" alt="Shaped like a shield, the paper had a
                   16086: red background, a green tree, and a yellow lion with its tongue
                   16087: hanging out and whose tail was shaped like an S."&gt;&lt;/p&gt;
                   16088: &lt;p&gt;He stared at the folder. S! The answer he had been looking for all
                   16089: this time was simply the letter S! How had he not seen that before? It all
                   16090: came together now. The phone call where Hector had referred to a lion's tail,
                   16091: the
                   16092: time
                   16093: Marco
                   16094: had
                   16095: stuck
                   16096: his
                   16097: tongue
                   16098: out...&lt;/p&gt;
                   16099: </ins>
                   16100: </pre></div>
                   16101: <div class="example">
                   16102: <p><ins class="diff-new">Here are some more examples showing the
                   16103: same picture used in different contexts, with different appropriate
                   16104: alternate texts each time.</ins></p>
                   16105: <pre>
                   16106: &lt;article&gt;<ins class="diff-new">
                   16107:  &lt;h1&gt;My cats&lt;/h1&gt;
                   16108:  &lt;h2&gt;Fluffy&lt;/h2&gt;
                   16109:  &lt;p&gt;Fluffy is my favourite.&lt;/p&gt;
                   16110:  &lt;img src="fluffy.jpg" alt="She likes playing with a ball of yarn."&gt;
                   16111:  &lt;p&gt;She's just too cute.&lt;/p&gt;
                   16112:  &lt;h2&gt;Miles&lt;/h2&gt;
                   16113:  &lt;p&gt;My other cat, Miles just eats and sleeps.&lt;/p&gt;
                   16114: &lt;/article&gt;
                   16115: </ins>
                   16116: </pre>
                   16117: <pre>
                   16118: &lt;article&gt;<ins class="diff-new">
                   16119:  &lt;h1&gt;Photography&lt;/h1&gt;
                   16120:  &lt;h2&gt;Shooting moving targets indoors&lt;/h2&gt;
                   16121:  &lt;p&gt;The trick here is to know how to anticipate; to know at what speed and
                   16122:  what distance the subject will pass by.&lt;/p&gt;
                   16123:  &lt;img src="fluffy.jpg" alt="A cat flying by, chasing a ball of yarn, can be
                   16124:  photographed quite nicely using this technique."&gt;
                   16125:  &lt;h2&gt;Nature by night&lt;/h2&gt;
                   16126:  &lt;p&gt;To achieve this, you'll need either an extremely sensitive film, or
                   16127:  immense flash lights.&lt;/p&gt;
                   16128: &lt;/article&gt;
                   16129: </ins>
                   16130: </pre>
                   16131: <pre>
                   16132: &lt;article&gt;<ins class="diff-new">
                   16133:  &lt;h1&gt;About me&lt;/h1&gt;
                   16134:  &lt;h2&gt;My pets&lt;/h2&gt;
                   16135:  &lt;p&gt;I've got a cat named Fluffy and a dog named Miles.&lt;/p&gt;
                   16136:  &lt;img src="fluffy.jpg" alt="Fluffy, my cat, tends to keep itself busy."&gt;
                   16137:  &lt;p&gt;My dog Miles and I like go on long walks together.&lt;/p&gt;
                   16138:  &lt;h2&gt;music&lt;/h2&gt;
                   16139:  &lt;p&gt;After our walks, having emptied my mind, I like listening to Bach.&lt;/p&gt;
                   16140: &lt;/article&gt;
                   16141: </ins>
                   16142: </pre>
                   16143: <pre>
                   16144: &lt;article&gt;<ins class="diff-new">
                   16145:  &lt;h1&gt;Fluffy and the Yarn&lt;/h1&gt;
                   16146:  &lt;p&gt;Fluffy was a cat who liked to play with yarn. He also liked to jump.&lt;/p&gt;
                   16147:  &lt;aside&gt;&lt;img src="fluffy.jpg" alt="" title="Fluffy"&gt;&lt;/aside&gt;
                   16148:  &lt;p&gt;He would play in the morning, he would play in the evening.&lt;/p&gt;
                   16149: &lt;/article&gt;
                   16150: </ins>
                   16151: </pre></div>
                   16152: <h4 id="the-iframe"><span class="secno"><del class=
                   16153: "diff-old">3.14.3.</del> <ins class="diff-chg">3.12.3</ins></span>
                   16154: The <dfn id="iframe"><code>iframe</code></dfn> element</h4>
                   16155: <dl class="element">
                   16156: <dt>Categories</dt>
                   16157: <dd><a href="#embedded1">Embedded content</a> .</dd>
                   16158: <dt>Contexts in which this element may be used:</dt>
                   16159: <dd>Where <a href="#embedded1">embedded content</a> is
                   16160: expected.</dd>
                   16161: <dt>Content model:</dt>
                   16162: <dd>Text that conforms to the requirements given in the prose.</dd>
                   16163: <dt>Element-specific attributes:</dt>
                   16164: <dd><code title="attr-iframe-src"><a href=
                   16165: "#src1">src</a></code></dd>
                   16166: <dd><code title="attr-iframe-name"><a href="#name1"><ins class=
                   16167: "diff-new">name</ins></a></code></dd>
                   16168: <dd><code title="attr-iframe-sandbox"><a href=
                   16169: "#sandbox"><ins class="diff-new">sandbox</ins></a></code></dd>
                   16170: <dd><code title="attr-iframe-seamless"><a href=
                   16171: "#seamless"><ins class="diff-new">seamless</ins></a></code></dd>
                   16172: <dd><code title="attr-dim-width"><a href="#width4"><ins class=
                   16173: "diff-new">width</ins></a></code></dd>
                   16174: <dd><code title="attr-dim-height"><a href="#height3"><ins class=
                   16175: "diff-new">height</ins></a></code></dd>
                   16176: <dt>DOM interface:</dt>
                   16177: <dd>
                   16178: <pre class="idl">
                   16179: interface <dfn id=
                   16180: "htmliframeelement">HTMLIFrameElement</dfn> : <a href=
                   16181: "#htmlelement">HTMLElement</a> {
                   16182:            attribute DOMString <a href="#src2" title=
                   16183: "dom-iframe-src">src</a>;
                   16184: <ins class="diff-new">           attribute DOMString <a href=
                   16185: "#name2" title="dom-iframe-name">name</a>;
                   16186:            attribute DOMString <a href="#sandbox0" title=
                   16187: "dom-iframe-sandbox">sandbox</a>;
                   16188:            attribute boolean <a href="#seamless1" title=
                   16189: "dom-iframe-seamless">seamless</a>;
                   16190:            attribute long <a href="#width5" title=
                   16191: "dom-dim-width">width</a>;
                   16192:            attribute long <a href="#height4" title=
                   16193: "dom-dim-height">height</a>;
                   16194: </ins>
                   16195: };
                   16196: </pre>
                   16197: <p>Objects implementing the <code><a href=
                   16198: "#htmliframeelement">HTMLIFrameElement</a></code> interface must
                   16199: also implement the <code>EmbeddingElement</code> interface defined
                   16200: in the Window Object specification. <a href=
                   16201: "#references">[WINDOW]</a></p>
                   16202: </dd>
                   16203: </dl>
                   16204: <p>The <code><a href="#iframe">iframe</a></code> element introduces
                   16205: a new nested <a href="#browsing1">browsing context</a> .</p>
                   16206: <p>The <dfn id="src1" title=
                   16207: "attr-iframe-src"><code>src</code></dfn> attribute, if present,
                   16208: must be a URI (or IRI) to a page that the nested <a href=
                   16209: "#browsing1">browsing context</a> is to contain. When the browsing
                   16210: context is created, if the attribute is present, the user agent
                   16211: must <a href="#navigate">navigate</a> this browsing context to the
                   16212: given URI, with <a href="#replacement">replacement enabled</a> ,
                   16213: <ins class="diff-new">and with the</ins> <code><a href=
                   16214: "#iframe"><ins class="diff-new">iframe</ins></a></code> <ins class=
                   16215: "diff-new">element's document's</ins> <a href=
                   16216: "#browsing1"><ins class="diff-new">browsing context</ins></a>
                   16217: <ins class="diff-new">as the</ins> <a href="#source0"><ins class=
                   16218: "diff-new">source browsing context</ins></a> . If the user <a href=
                   16219: "#navigate" title="navigate">navigates</a> away from this page, the
                   16220: <code><a href="#iframe">iframe</a></code> 's corresponding
                   16221: <code><a href="#window">Window</a></code> object will reference new
                   16222: <code>Document</code> objects, but the <code title=
                   16223: "attr-iframe-src"><a href="#src1">src</a></code> attribute will not
                   16224: change.</p>
                   16225: <p>Whenever the <code title="attr-iframe-src"><a href=
                   16226: "#src1">src</a></code> attribute is set, the nested <a href=
                   16227: "#browsing1">browsing context</a> must be <a href="#navigate"
                   16228: title="navigate">navigated</a> to the given <del class=
                   16229: "diff-old">URI.</del> <ins class="diff-chg">URI, with the</ins>
                   16230: <code><a href="#iframe"><ins class=
                   16231: "diff-chg">iframe</ins></a></code> <ins class="diff-chg">element's
                   16232: document's</ins> <a href="#browsing1"><ins class=
                   16233: "diff-chg">browsing context</ins></a> <ins class="diff-chg">as
                   16234: the</ins> <a href="#source0"><ins class="diff-chg">source browsing
                   16235: context</ins></a> .</p>
                   16236: <p>If the <code title="attr-iframe-src"><a href=
                   16237: "#src1">src</a></code> attribute is not set when the element is
                   16238: created, the browsing context will remain at the initial
                   16239: <code>about:blank</code> page.</p>
                   16240: <p><ins class="diff-new">The</ins> <dfn id="name1" title=
                   16241: "attr-iframe-name"><code><ins class=
                   16242: "diff-new">name</ins></code></dfn> <ins class="diff-new">attribute,
                   16243: if present, must be a</ins> <a href="#valid8"><ins class=
                   16244: "diff-new">valid browsing context name</ins></a> .<ins class=
                   16245: "diff-new">When the browsing context is created, if the attribute
                   16246: is present, the</ins> <a href="#browsing2"><ins class=
                   16247: "diff-new">browsing context name</ins></a> <ins class=
                   16248: "diff-new">must be set to the value of this attribute; otherwise,
                   16249: the</ins> <a href="#browsing2"><ins class="diff-new">browsing
                   16250: context name</ins></a> <ins class="diff-new">must be set to the
                   16251: empty string.</ins></p>
                   16252: <p><ins class="diff-new">Whenever the</ins> <code title=
                   16253: "attr-iframe-name"><a href="#name1"><ins class=
                   16254: "diff-new">name</ins></a></code> <ins class="diff-new">attribute is
                   16255: set, the nested</ins> <a href="#browsing1"><ins class=
                   16256: "diff-new">browsing context</ins></a> <ins class=
                   16257: "diff-new">'s</ins> <a href="#browsing2" title=
                   16258: "browsing context name"><ins class="diff-new">name</ins></a>
                   16259: <ins class="diff-new">must be changed to the new value. If the
                   16260: attribute is removed, the</ins> <a href="#browsing2"><ins class=
                   16261: "diff-new">browsing context name</ins></a> <ins class=
                   16262: "diff-new">must be set to the empty string.</ins></p>
                   16263: <p>When content loads in an <code><a href=
                   16264: "#iframe">iframe</a></code> , after any <code title=
                   16265: "event-load"><a href="#load0">load</a></code> events are fired
                   16266: within the content itself, the user agent must <a href=
                   16267: "#firing4">fire a <code title="event-load">load</code> event</a> at
                   16268: the <code><a href="#iframe">iframe</a></code> element. When content
                   16269: fails to load (e.g. due to a network error), then the user agent
                   16270: must <a href="#firing5">fire an <code title=
                   16271: "event-error">error</code> event</a> at the element instead.</p>
                   16272: <p>When there is an active parser in the <code><a href=
                   16273: "#iframe">iframe</a></code> , and when anything in the
                   16274: <code><a href="#iframe">iframe</a></code> that is <a href="#delays"
                   16275: title="delay the load event">delaying the <code title=
                   16276: "event-load">load</code> event</a> in the <code><a href=
                   16277: "#iframe">iframe</a></code> 's <a href="#browsing1">browsing
                   16278: context</a> , the <code><a href="#iframe">iframe</a></code> must
                   16279: <a href="#delays">delay the <code title="event-load">load</code>
                   16280: event</a> .</p>
                   16281: <p class="note">If, during the handling of the <code title=
                   16282: "event-load"><a href="#load0">load</a></code> event, the <a href=
                   16283: "#browsing1">browsing context</a> in the <code><a href=
                   16284: "#iframe">iframe</a></code> is again <a href="#navigate" title=
                   16285: "navigate">navigated</a> , that will further <a href=
                   16286: "#delays">delay the <code title="event-load">load</code> event</a>
                   16287: .</p>
                   16288: <hr>
                   16289: <p><ins class="diff-new">The</ins> <dfn id="sandbox" title=
                   16290: "attr-iframe-sandbox"><code><ins class=
                   16291: "diff-new">sandbox</ins></code></dfn> <ins class=
                   16292: "diff-new">attribute, when specified, enables a set of extra
                   16293: restrictions on any content hosted by the</ins> <code><a href=
                   16294: "#iframe"><ins class="diff-new">iframe</ins></a></code>
                   16295: .<ins class="diff-new">Its value must be an</ins> <a href=
                   16296: "#unordered"><ins class="diff-new">unordered set of unique
                   16297: space-separated tokens</ins></a> .<ins class="diff-new">The allowed
                   16298: values are</ins> <code title=
                   16299: "attr-iframe-sandbox-allow-same-origin"><a href=
                   16300: "#allow-same-origin"><ins class=
                   16301: "diff-new">allow-same-origin</ins></a></code> ,<code title=
                   16302: "attr-iframe-sandbox-allow-forms"><a href=
                   16303: "#allow-forms"><ins class="diff-new">allow-forms</ins></a></code>
                   16304: ,<ins class="diff-new">and</ins> <code title=
                   16305: "attr-iframe-sandbox-allow-scripts"><a href=
                   16306: "#allow-scripts"><ins class=
                   16307: "diff-new">allow-scripts</ins></a></code> .</p>
                   16308: <p><ins class="diff-new">While the</ins> <code title=
                   16309: "attr-iframe-sandbox"><a href="#sandbox"><ins class=
                   16310: "diff-new">sandbox</ins></a></code> <ins class="diff-new">attribute
                   16311: is specified, the</ins> <code><a href="#iframe"><ins class=
                   16312: "diff-new">iframe</ins></a></code> <ins class=
                   16313: "diff-new">element's</ins> <a href="#nested0"><ins class=
                   16314: "diff-new">nested browsing context</ins></a> ,<ins class=
                   16315: "diff-new">and all the browsing contexts</ins> <a href="#nested0"
                   16316: title="nested browsing context"><ins class=
                   16317: "diff-new">nested</ins></a> <ins class="diff-new">within it (either
                   16318: directly or indirectly through other nested browsing contexts) must
                   16319: have the following flags set:</ins></p>
                   16320: <dl>
                   16321: <dt><ins class="diff-new">The</ins> <dfn id="sandboxed"><ins class=
                   16322: "diff-new">sandboxed navigation browsing context
                   16323: flag</ins></dfn></dt>
                   16324: <dd>
                   16325: <p><ins class="diff-new">This flag</ins> <a href=
                   16326: "#sandboxLinks"><ins class="diff-new">prevents content from
                   16327: navigating browsing contexts other than the sandboxed browsing
                   16328: context itself</ins></a> <ins class="diff-new">(or browsing
                   16329: contexts further nested inside it).</ins></p>
                   16330: <p><ins class="diff-new">This flag also</ins> <a href=
                   16331: "#sandboxWindowOpen"><ins class="diff-new">prevents content from
                   16332: creating new auxiliary browsing contexts</ins></a> ,<ins class=
                   16333: "diff-new">e.g. using the</ins> <code title=
                   16334: "attr-hyperlink-target"><a href="#target3"><ins class=
                   16335: "diff-new">target</ins></a></code> <ins class="diff-new">attribute
                   16336: or the</ins> <code title="dom-open"><a href="#open2"><ins class=
                   16337: "diff-new">window.open()</ins></a></code> <ins class=
                   16338: "diff-new">method.</ins></p>
                   16339: </dd>
                   16340: <dt><ins class="diff-new">The</ins> <dfn id=
                   16341: "sandboxed0"><ins class="diff-new">sandboxed plugins browsing
                   16342: context flag</ins></dfn></dt>
                   16343: <dd>
                   16344: <p><ins class="diff-new">This flag prevents content from
                   16345: instantiating</ins> <a href="#plugin" title="plugin"><ins class=
                   16346: "diff-new">plugins</ins></a> ,<ins class="diff-new">whether
                   16347: using</ins> <a href="#sandboxPluginEmbed"><ins class=
                   16348: "diff-new">the</ins> <code><ins class="diff-new">embed</ins></code>
                   16349: <ins class="diff-new">element</ins></a> ,<a href=
                   16350: "#sandboxPluginObject"><ins class="diff-new">the</ins>
                   16351: <code><ins class="diff-new">object</ins></code> <ins class=
                   16352: "diff-new">element</ins></a> ,<a href=
                   16353: "#sandboxPluginApplet"><ins class="diff-new">the</ins>
                   16354: <code><ins class="diff-new">applet</ins></code> <ins class=
                   16355: "diff-new">element</ins></a> ,<ins class="diff-new">or
                   16356: through</ins> <a href="#sandboxPluginNavigate"><ins class=
                   16357: "diff-new">navigation</ins></a> <ins class="diff-new">of a</ins>
                   16358: <a href="#nested0"><ins class="diff-new">nested browsing
                   16359: context</ins></a> .</p>
                   16360: </dd>
                   16361: <dt><ins class="diff-new">The</ins> <dfn id=
                   16362: "sandboxed1"><ins class="diff-new">sandboxed annoyances browsing
                   16363: context flag</ins></dfn></dt>
                   16364: <dd>
                   16365: <p><ins class="diff-new">This flag prevents content from</ins>
                   16366: <a href="#sandboxNotifications"><ins class="diff-new">showing
                   16367: notifications</ins></a> <ins class="diff-new">outside of the</ins>
                   16368: <a href="#nested0"><ins class="diff-new">nested browsing
                   16369: context</ins></a> .</p>
                   16370: </dd>
                   16371: <dt><ins class="diff-new">The</ins> <dfn id=
                   16372: "sandboxed2"><ins class="diff-new">sandboxed origin browsing
                   16373: context flag</ins></dfn> ,<ins class="diff-new">unless the</ins>
                   16374: <code title="attr-iframe-sandbox"><a href="#sandbox"><ins class=
                   16375: "diff-new">sandbox</ins></a></code> <ins class=
                   16376: "diff-new">attribute's value, when</ins> <a href="#split" title=
                   16377: "split a string on spaces"><ins class="diff-new">split on
                   16378: spaces</ins></a> ,<ins class="diff-new">is found to have the</ins>
                   16379: <dfn id="allow-same-origin" title=
                   16380: "attr-iframe-sandbox-allow-same-origin"><code><ins class=
                   16381: "diff-new">allow-same-origin</ins></code></dfn> <ins class=
                   16382: "diff-new">keyword set</ins></dt>
                   16383: <dd>
                   16384: <p><ins class="diff-new">This flag</ins> <a href=
                   16385: "#sandboxOrigin"><ins class="diff-new">forces content into a unique
                   16386: origin</ins></a> <ins class="diff-new">for the purposes of
                   16387: the</ins> <a href="#origin0" title="origin"><ins class=
                   16388: "diff-new">same-origin policy</ins></a> .</p>
                   16389: <p><ins class="diff-new">This flag also</ins> <a href=
                   16390: "#sandboxCookies"><ins class="diff-new">prevents script from
                   16391: reading the</ins> <code title="dom-document-cookies"><ins class=
                   16392: "diff-new">document.cookies</ins></code> <ins class="diff-new">DOM
                   16393: attribute</ins></a> .</p>
                   16394: <div class="note">
                   16395: <p><ins class="diff-new">The</ins> <code title=
                   16396: "attr-iframe-sandbox-allow-same-origin"><a href=
                   16397: "#allow-same-origin"><ins class=
                   16398: "diff-new">allow-same-origin</ins></a></code> <ins class=
                   16399: "diff-new">attribute is intended for two cases.</ins></p>
                   16400: <p><ins class="diff-new">First, it can be used to allow content
                   16401: from the same site to be sandboxed to disable scripting, while
                   16402: still allowing access to the DOM of the sandboxed
                   16403: content.</ins></p>
                   16404: <p><ins class="diff-new">Second, it can be used to embed content
                   16405: from a third-party site, sandboxed to prevent that site from
                   16406: opening popup windows, etc, without preventing the embedded page
                   16407: from communicating back to its originating site, using the database
                   16408: APIs to store data, etc.</ins></p>
                   16409: </div>
                   16410: </dd>
                   16411: <dt><ins class="diff-new">The</ins> <dfn id=
                   16412: "sandboxed3"><ins class="diff-new">sandboxed forms browsing context
                   16413: flag</ins></dfn> ,<ins class="diff-new">unless the</ins>
                   16414: <code title="attr-iframe-sandbox"><a href="#sandbox"><ins class=
                   16415: "diff-new">sandbox</ins></a></code> <ins class=
                   16416: "diff-new">attribute's value, when</ins> <a href="#split" title=
                   16417: "split a string on spaces"><ins class="diff-new">split on
                   16418: spaces</ins></a> ,<ins class="diff-new">is found to have the</ins>
                   16419: <dfn id="allow-forms" title=
                   16420: "attr-iframe-sandbox-allow-forms"><code><ins class=
                   16421: "diff-new">allow-forms</ins></code></dfn> <ins class=
                   16422: "diff-new">keyword set</ins></dt>
                   16423: <dd>
                   16424: <p><ins class="diff-new">This flag</ins> <a href=
                   16425: "#sandboxSubmitBlocked"><ins class="diff-new">blocks form
                   16426: submission</ins></a> .</p>
                   16427: </dd>
                   16428: <dt><ins class="diff-new">The</ins> <dfn id=
                   16429: "sandboxed4"><ins class="diff-new">sandboxed scripts browsing
                   16430: context flag</ins></dfn> ,<ins class="diff-new">unless the</ins>
                   16431: <code title="attr-iframe-sandbox"><a href="#sandbox"><ins class=
                   16432: "diff-new">sandbox</ins></a></code> <ins class=
                   16433: "diff-new">attribute's value, when</ins> <a href="#split" title=
                   16434: "split a string on spaces"><ins class="diff-new">split on
                   16435: spaces</ins></a> ,<ins class="diff-new">is found to have the</ins>
                   16436: <dfn id="allow-scripts" title=
                   16437: "attr-iframe-sandbox-allow-scripts"><code><ins class=
                   16438: "diff-new">allow-scripts</ins></code></dfn> <ins class=
                   16439: "diff-new">keyword set</ins></dt>
                   16440: <dd>
                   16441: <p><ins class="diff-new">This flag</ins> <a href=
                   16442: "#sandboxScriptBlocked"><ins class="diff-new">blocks script
                   16443: execution</ins></a> .</p>
                   16444: </dd>
                   16445: </dl>
                   16446: <p><ins class="diff-new">These flags must not be set unless the
                   16447: conditions listed above define them as being set.</ins></p>
                   16448: <div class="example">
                   16449: <p><ins class="diff-new">In this example, some completely-unknown,
                   16450: potentially hostile, user-provided HTML content is embedded in a
                   16451: page. Because it is sandboxed, it is treated by the user agent as
                   16452: being from a unique origin, despite the content being served from
                   16453: the same site. Thus it is affected by all the normal cross-site
                   16454: restrictions. In addition, the embedded page has scripting
                   16455: disabled, plugins disabled, forms disabled, and it cannot navigate
                   16456: any frames or windows other than itself (or any frames or windows
                   16457: it itself embeds).</ins></p>
                   16458: <pre>
                   16459: &lt;p&gt;We're not scared of you! Here is your content, unedited:&lt;/p&gt;<ins class="diff-new">
                   16460: &lt;iframe
                   16461: sandbox
                   16462: src="getusercontent.cgi?id=12193"&gt;
                   16463: &lt;/iframe&gt;
                   16464: </ins>
                   16465: </pre>
                   16466: <p><ins class="diff-new">Note that cookies are still send to the
                   16467: server in the</ins> <code title=""><ins class=
                   16468: "diff-new">getusercontent.cgi</ins></code> <ins class=
                   16469: "diff-new">request, though they are not visible in the</ins>
                   16470: <code title="dom-document-cookies"><ins class=
                   16471: "diff-new">document.cookies</ins></code> <ins class="diff-new">DOM
                   16472: attribute.</ins></p>
                   16473: </div>
                   16474: <div class="example">
                   16475: <p><ins class="diff-new">In this example, a gadget from another
                   16476: site is embedded. The gadget has scripting and forms enabled, and
                   16477: the origin sandbox restrictions are lifted, allowing the gadget to
                   16478: communicate with its originating server. The sandbox is still
                   16479: useful, however, as it disables plugins and popups, thus reducing
                   16480: the risk of the user being exposed to malware and other
                   16481: annoyances.</ins></p>
                   16482: <pre>
                   16483: &lt;iframe sandbox="allow-same-origin allow-forms allow-scripts"<ins class="diff-new">
                   16484: src="http://maps.example.com/embedded.html"&gt;
                   16485: &lt;/iframe&gt;
                   16486: </ins>
                   16487: </pre></div>
                   16488: <hr>
                   16489: <p><ins class="diff-new">The</ins> <dfn id="seamless" title=
                   16490: "attr-iframe-seamless"><code><ins class=
                   16491: "diff-new">seamless</ins></code></dfn> <ins class=
                   16492: "diff-new">attribute is a boolean attribute. When specified, it
                   16493: indicates that the</ins> <code><a href="#iframe"><ins class=
                   16494: "diff-new">iframe</ins></a></code> <ins class=
                   16495: "diff-new">element's</ins> <a href="#browsing1"><ins class=
                   16496: "diff-new">browsing context</ins></a> <ins class="diff-new">is to
                   16497: be rendered in a manner that makes it appear to be part of the
                   16498: containing document (seamlessly included in the parent document).
                   16499: Specifically, when the attribute is set on an element and while
                   16500: the</ins> <a href="#browsing1"><ins class="diff-new">browsing
                   16501: context</ins></a> <ins class="diff-new">'s</ins> <a href=
                   16502: "#active"><ins class="diff-new">active document</ins></a>
                   16503: <ins class="diff-new">has the</ins> <a href=
                   16504: "#same-origin"><ins class="diff-new">same origin</ins></a>
                   16505: <ins class="diff-new">as the</ins> <code><a href=
                   16506: "#iframe"><ins class="diff-new">iframe</ins></a></code> <ins class=
                   16507: "diff-new">element's document, or the</ins> <a href=
                   16508: "#browsing1"><ins class="diff-new">browsing context</ins></a>
                   16509: <ins class="diff-new">'s</ins> <a href="#active"><ins class=
                   16510: "diff-new">active document</ins></a> <ins class="diff-new">'s</ins>
                   16511: <em><ins class="diff-new">URI</ins></em> <ins class="diff-new">has
                   16512: the</ins> <a href="#same-origin"><ins class="diff-new">same
                   16513: origin</ins></a> <ins class="diff-new">as the</ins> <code><a href=
                   16514: "#iframe"><ins class="diff-new">iframe</ins></a></code> <ins class=
                   16515: "diff-new">element's document, the following requirements
                   16516: apply:</ins></p>
                   16517: <ul>
                   16518: <li>
                   16519: <p><ins class="diff-new">The user agent must set the</ins> <dfn id=
                   16520: "seamless0"><ins class="diff-new">seamless browsing context
                   16521: flag</ins></dfn> <ins class="diff-new">to true for that</ins>
                   16522: <a href="#browsing1"><ins class="diff-new">browsing
                   16523: context</ins></a> .<ins class="diff-new">This will</ins> <a href=
                   16524: "#seamlessLinks"><ins class="diff-new">cause links to open in the
                   16525: parent browsing context</ins></a> .</p>
                   16526: </li>
                   16527: <li>
                   16528: <p><ins class="diff-new">In a CSS-supporting user agent: the user
                   16529: agent must add all the style sheets that apply to the</ins>
                   16530: <code><a href="#iframe"><ins class=
                   16531: "diff-new">iframe</ins></a></code> <ins class="diff-new">element to
                   16532: the cascade of the</ins> <a href="#active"><ins class=
                   16533: "diff-new">active document</ins></a> <ins class="diff-new">of
                   16534: the</ins> <code><a href="#iframe"><ins class=
                   16535: "diff-new">iframe</ins></a></code> <ins class=
                   16536: "diff-new">element's</ins> <a href="#nested0"><ins class=
                   16537: "diff-new">nested browsing context</ins></a> ,<ins class=
                   16538: "diff-new">at the appropriate cascade levels, before any style
                   16539: sheets specified by the document itself.</ins></p>
                   16540: </li>
                   16541: <li>
                   16542: <p><ins class="diff-new">In a CSS-supporting user agent: the user
                   16543: agent must, for the purpose of CSS property inheritance only, treat
                   16544: the root element of the</ins> <a href="#active"><ins class=
                   16545: "diff-new">active document</ins></a> <ins class="diff-new">of
                   16546: the</ins> <code><a href="#iframe"><ins class=
                   16547: "diff-new">iframe</ins></a></code> <ins class=
                   16548: "diff-new">element's</ins> <a href="#nested0"><ins class=
                   16549: "diff-new">nested browsing context</ins></a> <ins class=
                   16550: "diff-new">as being a child of the</ins> <code><a href=
                   16551: "#iframe"><ins class="diff-new">iframe</ins></a></code> <ins class=
                   16552: "diff-new">element. (Thus inherited properties on the root element
                   16553: of the document in the</ins> <code><a href="#iframe"><ins class=
                   16554: "diff-new">iframe</ins></a></code> <ins class="diff-new">will
                   16555: inherit the computed values of those properties on the</ins>
                   16556: <code><a href="#iframe"><ins class=
                   16557: "diff-new">iframe</ins></a></code> <ins class="diff-new">element
                   16558: instead of taking their initial values.)</ins></p>
                   16559: </li>
                   16560: <li>
                   16561: <p><ins class="diff-new">In visual media, in a CSS-supporting user
                   16562: agent: the user agent should set the intrinsic width of the</ins>
                   16563: <code><a href="#iframe"><ins class=
                   16564: "diff-new">iframe</ins></a></code> <ins class="diff-new">to the
                   16565: width that the element would have if it was a non-replaced
                   16566: block-level element with 'width: auto'.</ins></p>
                   16567: </li>
                   16568: <li>
                   16569: <p><ins class="diff-new">In visual media, in a CSS-supporting user
                   16570: agent: the user agent should set the intrinsic height of the</ins>
                   16571: <code><a href="#iframe"><ins class=
                   16572: "diff-new">iframe</ins></a></code> <ins class="diff-new">to the
                   16573: height of the bounding box around the content rendered in the</ins>
                   16574: <code><a href="#iframe"><ins class=
                   16575: "diff-new">iframe</ins></a></code> <ins class="diff-new">at its
                   16576: current width.</ins></p>
                   16577: </li>
                   16578: <li>
                   16579: <p><ins class="diff-new">In visual media, in a CSS-supporting user
                   16580: agent: the user agent must force the height of the initial
                   16581: containing block of the</ins> <a href="#active"><ins class=
                   16582: "diff-new">active document</ins></a> <ins class="diff-new">of
                   16583: the</ins> <a href="#nested0"><ins class="diff-new">nested browsing
                   16584: context</ins></a> <ins class="diff-new">of the</ins> <code><a href=
                   16585: "#iframe"><ins class="diff-new">iframe</ins></a></code> <ins class=
                   16586: "diff-new">to zero.</ins></p>
                   16587: <p class="note"><ins class="diff-new">This is intended to get
                   16588: around the otherwise circular dependency of percentage dimensions
                   16589: that depend on the height of the containing block, thus affecting
                   16590: the height of the document's bounding box, thus affecting the
                   16591: height of the viewport, thus affecting the size of the initial
                   16592: containing block.</ins></p>
                   16593: </li>
                   16594: <li>
                   16595: <p><ins class="diff-new">In speech media, the user agent should
                   16596: render the</ins> <a href="#nested0"><ins class="diff-new">nested
                   16597: browsing context</ins></a> <ins class="diff-new">without announcing
                   16598: that it is a separate document.</ins></p>
                   16599: </li>
                   16600: <li>
                   16601: <p><ins class="diff-new">User agents should, in general, act as if
                   16602: the</ins> <a href="#active"><ins class="diff-new">active
                   16603: document</ins></a> <ins class="diff-new">of the</ins>
                   16604: <code><a href="#iframe"><ins class=
                   16605: "diff-new">iframe</ins></a></code> <ins class="diff-new">'s</ins>
                   16606: <a href="#nested0"><ins class="diff-new">nested browsing
                   16607: context</ins></a> <ins class="diff-new">was part of the document
                   16608: that the</ins> <code><a href="#iframe"><ins class=
                   16609: "diff-new">iframe</ins></a></code> <ins class="diff-new">is
                   16610: in.</ins></p>
                   16611: <p class="example"><ins class="diff-new">For example if the user
                   16612: agent supports listing all the links in a document, links in
                   16613: "seamlessly" nested documents would be included in that list
                   16614: without being significantly distinguished from links in the
                   16615: document itself.</ins></p>
                   16616: </li>
                   16617: </ul>
                   16618: <p class="big-issue"><ins class="diff-new">Parts of the above might
                   16619: get moved into the rendering section at some point.</ins></p>
                   16620: <p><ins class="diff-new">If the attribute is not specified, or if
                   16621: the</ins> <a href="#origin0"><ins class="diff-new">origin</ins></a>
                   16622: <ins class="diff-new">conditions listed above are not met, then the
                   16623: user agent should render the</ins> <a href="#nested0"><ins class=
                   16624: "diff-new">nested browsing context</ins></a> <ins class=
                   16625: "diff-new">in a manner that is clearly distinguishable as a
                   16626: separate</ins> <a href="#browsing1"><ins class="diff-new">browsing
                   16627: context</ins></a> ,<ins class="diff-new">and the</ins> <a href=
                   16628: "#seamless0"><ins class="diff-new">seamless browsing context
                   16629: flag</ins></a> <ins class="diff-new">must be set to false for
                   16630: that</ins> <a href="#browsing1"><ins class="diff-new">browsing
                   16631: context</ins></a> .</p>
                   16632: <p class="warning"><ins class="diff-new">It is important that user
                   16633: agents recheck the above conditions whenever the</ins> <a href=
                   16634: "#active"><ins class="diff-new">active document</ins></a>
                   16635: <ins class="diff-new">of the</ins> <a href="#nested0"><ins class=
                   16636: "diff-new">nested browsing context</ins></a> <ins class=
                   16637: "diff-new">of the</ins> <code><a href="#iframe"><ins class=
                   16638: "diff-new">iframe</ins></a></code> <ins class="diff-new">changes,
                   16639: such that the</ins> <a href="#seamless0"><ins class=
                   16640: "diff-new">seamless browsing context flag</ins></a> <ins class=
                   16641: "diff-new">gets unset if the</ins> <a href="#nested0"><ins class=
                   16642: "diff-new">nested browsing context</ins></a> <ins class=
                   16643: "diff-new">is</ins> <a href="#navigate" title=
                   16644: "navigate"><ins class="diff-new">navigated</ins></a> <ins class=
                   16645: "diff-new">to another origin.</ins></p>
                   16646: <div class="example">
                   16647: <p><ins class="diff-new">In this example, the site's navigation is
                   16648: embedded using a client-side include using an</ins> <code><a href=
                   16649: "#iframe"><ins class="diff-new">iframe</ins></a></code>
                   16650: .<ins class="diff-new">Any links in the</ins> <code><a href=
                   16651: "#iframe"><ins class="diff-new">iframe</ins></a></code> <ins class=
                   16652: "diff-new">will, in new user agents, be automatically opened in
                   16653: the</ins> <code><a href="#iframe"><ins class=
                   16654: "diff-new">iframe</ins></a></code> <ins class="diff-new">'s parent
                   16655: browsing context; for legacy user agents, the site could also
                   16656: include a</ins> <code><a href="#base"><ins class=
                   16657: "diff-new">base</ins></a></code> <ins class="diff-new">element with
                   16658: a</ins> <code title="attr-base-target"><a href=
                   16659: "#target"><ins class="diff-new">target</ins></a></code> <ins class=
                   16660: "diff-new">attribute with the value</ins> <code title=
                   16661: ""><ins class="diff-new">_parent</ins></code> .<ins class=
                   16662: "diff-new">Similarly, in new user agents the styles of the parent
                   16663: page will be automatically applied to the contents of the frame,
                   16664: but to support legacy user agents authors might wish to include the
                   16665: styles explicitly.</ins></p>
                   16666: <pre>
                   16667: <ins class="diff-new">
                   16668: &lt;nav&gt;
                   16669: &lt;iframe
                   16670: seamless
                   16671: src="nav.include.html"&gt;
                   16672: &lt;/iframe&gt;
                   16673: &lt;/nav&gt;
                   16674: </ins>
                   16675: </pre></div>
                   16676: <hr>
                   16677: <p><ins class="diff-new">The</ins> <code><a href=
                   16678: "#iframe"><ins class="diff-new">iframe</ins></a></code> <ins class=
                   16679: "diff-new">element supports</ins> <a href="#dimension0"><ins class=
                   16680: "diff-new">dimension attributes</ins></a> <ins class="diff-new">for
                   16681: cases where the embedded content has specific dimensions (e.g. ad
                   16682: units have well-defined dimensions).</ins></p>
                   16683: <p>An <code><a href="#iframe">iframe</a></code> element never has
                   16684: <a href="#fallback">fallback content</a> , as it will always create
                   16685: a nested <a href="#browsing1">browsing context</a> , regardless of
                   16686: whether the specified initial contents are successfully used.</p>
                   16687: <p>Descendants of <code><a href="#iframe">iframe</a></code>
                   16688: elements represent nothing. (In legacy user agents that do not
                   16689: support <code><a href="#iframe">iframe</a></code> elements, the
                   16690: contents would be parsed as markup that could act as fallback
                   16691: content.)</p>
                   16692: <p>The content model of <code><a href="#iframe">iframe</a></code>
                   16693: elements is text, except that the text must be such that
                   16694: <del class="diff-old">...</del> <span class="big-issue">... anyone
                   16695: have any bright ideas?</span></p>
                   16696: <p class="note">The <a href="#html-0">HTML parser</a> treats markup
                   16697: inside <code><a href="#iframe">iframe</a></code> elements as
                   16698: text.</p>
                   16699: <p>The DOM <del class="diff-old">attribute</del> <ins class=
                   16700: "diff-chg">attributes</ins> <dfn id="src2" title=
                   16701: "dom-iframe-src"><code>src</code></dfn> , <dfn id="name2" title=
                   16702: "dom-iframe-name"><code><ins class=
                   16703: "diff-new">name</ins></code></dfn> ,<dfn id="sandbox0" title=
                   16704: "dom-iframe-sandbox"><code><ins class=
                   16705: "diff-new">sandbox</ins></code></dfn> ,<ins class=
                   16706: "diff-new">and</ins> <dfn id="seamless1" title=
                   16707: "dom-iframe-seamless"><code><ins class=
                   16708: "diff-new">seamless</ins></code></dfn> must <a href=
                   16709: "#reflect">reflect</a> the content <del class=
                   16710: "diff-old">attribute</del> <ins class="diff-chg">attributes</ins>
                   16711: of the same name.</p>
                   16712: <h4 id="the-embed"><span class="secno"><del class=
                   16713: "diff-old">3.14.4.</del> <ins class="diff-chg">3.12.4</ins></span>
                   16714: The <dfn id="embed"><code>embed</code></dfn> element</h4>
                   16715: <dl class="element">
                   16716: <dt>Categories</dt>
                   16717: <dd><a href="#embedded1">Embedded content</a> .</dd>
                   16718: <dt>Contexts in which this element may be used:</dt>
                   16719: <dd>Where <a href="#embedded1">embedded content</a> is
                   16720: expected.</dd>
                   16721: <dt>Content model:</dt>
                   16722: <dd>Empty.</dd>
                   16723: <dt>Element-specific attributes:</dt>
                   16724: <dd><code title="attr-embed-src"><a href=
                   16725: "#src3">src</a></code></dd>
                   16726: <dd><code title="attr-embed-type"><a href=
                   16727: "#type4">type</a></code></dd>
                   16728: <dd><code title="attr-dim-width"><a href=
                   16729: "#width4">width</a></code></dd>
                   16730: <dd><code title="attr-dim-height"><a href=
                   16731: "#height3">height</a></code></dd>
                   16732: <dd>Any other attribute that has no namespace (see prose).</dd>
                   16733: <dt>DOM interface:</dt>
                   16734: <dd>
                   16735: <pre class="idl">
                   16736: interface <dfn id=
                   16737: "htmlembedelement">HTMLEmbedElement</dfn> : <a href=
                   16738: "#htmlelement">HTMLElement</a> {
                   16739:            attribute DOMString <a href="#src4" title=
                   16740: "dom-embed-src">src</a>;
                   16741:            attribute DOMString <a href="#type5" title=
                   16742: "dom-embed-type">type</a>;
                   16743: <del class="diff-old">           attribute long ;
                   16744: </del>
                   16745: <ins class="diff-chg">           attribute long <a href="#width5"
                   16746: title="dom-dim-width">width</a>;
                   16747: </ins>
                   16748:            attribute long <a href="#height4" title=
                   16749: "dom-dim-height">height</a>;
                   16750: };
                   16751: </pre>
                   16752: <p>Depending on the type of content instantiated by the
                   16753: <code><a href="#embed">embed</a></code> element, the node may also
                   16754: support other interfaces.</p>
                   16755: </dd>
                   16756: </dl>
                   16757: <p>The <code><a href="#embed">embed</a></code> element represents
                   16758: an integration point for an external (typically non-HTML)
                   16759: application or interactive content.</p>
                   16760: <p>The <dfn id="src3" title="attr-embed-src"><code>src</code></dfn>
                   16761: attribute gives the address of the resource being embedded. The
                   16762: attribute must be present and contain a URI (or IRI).</p>
                   16763: <p>If the <code title="attr-embed-src"><a href=
                   16764: "#src3">src</a></code> attribute is missing, then the
                   16765: <code><a href="#embed">embed</a></code> element must be <del class=
                   16766: "diff-old">ignored.</del> <ins class="diff-chg">ignored (it
                   16767: represents nothing).</ins></p>
                   16768: <p id="sandboxPluginEmbed"><ins class="diff-chg">If the</ins>
                   16769: <a href="#sandboxed0"><ins class="diff-chg">sandboxed plugins
                   16770: browsing context flag</ins></a> <ins class="diff-chg">is set on
                   16771: the</ins> <a href="#browsing1"><ins class="diff-chg">browsing
                   16772: context</ins></a> <ins class="diff-chg">for which the</ins>
                   16773: <code><a href="#embed"><ins class="diff-chg">embed</ins></a></code>
                   16774: <ins class="diff-chg">element's document is the</ins> <a href=
                   16775: "#active"><ins class="diff-chg">active document</ins></a>
                   16776: ,<ins class="diff-chg">then the user agent must render the</ins>
                   16777: <code><a href="#embed"><ins class="diff-chg">embed</ins></a></code>
                   16778: <ins class="diff-chg">element in a manner that conveys that
                   16779: the</ins> <a href="#plugin"><ins class="diff-chg">plugin</ins></a>
                   16780: <ins class="diff-chg">was disabled. The user agent may offer the
                   16781: user the option to override the sandbox and instantiate the</ins>
                   16782: <a href="#plugin"><ins class="diff-chg">plugin</ins></a>
                   16783: <ins class="diff-chg">anyway; if the user invokes such an option,
                   16784: the user agent must act as if the</ins> <a href=
                   16785: "#sandboxed0"><ins class="diff-chg">sandboxed plugins browsing
                   16786: context flag</ins></a> <ins class="diff-chg">was not set for the
                   16787: purposes of this element.</ins></p>
                   16788: <p class="warning"><ins class="diff-chg">Plugins are disabled in
                   16789: sandboxed browsing contexts because they might not honor the
                   16790: restrictions imposed by the sandbox (e.g. they might allow
                   16791: scripting even when scripting in the sandbox is disabled). User
                   16792: agents should convey the danger of overriding the sandbox to the
                   16793: user if an option to do so is provided.</ins></p>
                   16794: <p><ins class="diff-chg">Otherwise, the</ins> <code title=
                   16795: "attr-embed-src"><a href="#src3"><ins class=
                   16796: "diff-chg">src</ins></a></code> <ins class="diff-chg">attribute is
                   16797: present, and the element is not in a sandboxed browsing
                   16798: context:</ins></p>
                   16799: <p>When the <code title="attr-embed-src"><a href=
                   16800: "#src3">src</a></code> attribute is set, user agents are expected
                   16801: to find an appropriate <del class="diff-old">handler</del> <a href=
                   16802: "#plugin"><ins class="diff-chg">plugin</ins></a> for the specified
                   16803: resource, based on the <a href="#type-of" title=
                   16804: "concept-embed-type">content's type</a> , and hand that <del class=
                   16805: "diff-old">handler</del> <a href="#plugin"><ins class=
                   16806: "diff-chg">plugin</ins></a> the content of the resource. If the
                   16807: <del class="diff-old">handler</del> <a href="#plugin"><ins class=
                   16808: "diff-chg">plugin</ins></a> supports a scriptable interface, the
                   16809: <code><a href="#htmlembedelement">HTMLEmbedElement</a></code>
                   16810: object representing the element should expose that interfaces.</p>
                   16811: <p>The download of the resource must <a href="#delays">delay the
                   16812: <code title="event-load">load</code> event</a> .</p>
                   16813: <p>The user agent should pass the names and values of all the
                   16814: attributes of the <code><a href="#embed">embed</a></code> element
                   16815: that have no namespace to the <del class="diff-old">handler</del>
                   16816: <a href="#plugin"><ins class="diff-chg">plugin</ins></a> used. Any
                   16817: (namespace-less) attribute may be specified on the <code><a href=
                   16818: "#embed">embed</a></code> element. <del class="diff-old">This
                   16819: specification does not define a mechanism for interacting with
                   16820: third-party handlers, as it is expected to be user-agent-specific.
                   16821: Some UAs might opt to support a plugin mechanism such as the
                   16822: Netscape Plugin API; others may use remote content convertors or
                   16823: have built-in support for certain types. [NPAPI]</del></p>
                   16824: <p>The <code><a href="#embed">embed</a></code> element has no
                   16825: <a href="#fallback">fallback content</a> . If the user agent can't
                   16826: display the specified resource, e.g. because the given type is not
                   16827: supported, then the user agent must use a default <del class=
                   16828: "diff-old">handler</del> <ins class="diff-chg">plugin</ins> for the
                   16829: content. (This default could be as simple as saying "Unsupported
                   16830: Format", of course.)</p>
                   16831: <p>The <dfn id="type4" title=
                   16832: "attr-embed-type"><code>type</code></dfn> attribute, if present,
                   16833: gives the MIME type of the linked resource. The value must be a
                   16834: valid MIME type, optionally with parameters. <a href=
                   16835: "#references">[RFC2046]</a></p>
                   16836: <p>The <dfn id="type-of" title="concept-embed-type">type of the
                   16837: content</dfn> being embedded is defined as follows:</p>
                   16838: <ol>
                   16839: <li>If the element has a <code title="attr-embed-type"><a href=
                   16840: "#type4">type</a></code> attribute, then the value of the
                   16841: <code title="attr-embed-type"><a href="#type4">type</a></code>
                   16842: attribute is the <span>content's type</span> .</li>
                   16843: <li>Otherwise, if the specified resource has <a href=
                   16844: "#content-type8" title="Content-Type">explicit Content-Type
                   16845: metadata</a> , then that is the <span>content's type</span> .</li>
                   16846: <li>Otherwise, the content has no type and there can be no
                   16847: appropriate <del class="diff-old">handler</del> <a href=
                   16848: "#plugin"><ins class="diff-chg">plugin</ins></a> for it.</li>
                   16849: </ol>
                   16850: <p class="big-issue">Should we instead say that the
                   16851: content-sniffing <del class="diff-old">that we're going to
                   16852: define</del> <ins class="diff-chg">used</ins> for top-level
                   16853: browsing contexts should apply here?</p>
                   16854: <p class="big-issue">Should we require the type attribute to match
                   16855: the server information?</p>
                   16856: <p class="big-issue">We should say that 404s, etc, don't affect
                   16857: whether the resource is used or not. Not sure how to say it here
                   16858: though.</p>
                   16859: <p><del class="diff-old">Browsers should take extreme care when
                   16860: interacting with external content intended for third-party
                   16861: renderers. When third-party software is run with the same
                   16862: privileges as the user agent itself, vulnerabilities in the
                   16863: third-party software become as dangerous as those in the user
                   16864: agent.</del> The <code><a href="#embed">embed</a></code> element
                   16865: supports <a href="#dimension0">dimension attributes</a> .</p>
                   16866: <p>The DOM attributes <dfn id="src4" title=
                   16867: "dom-embed-src"><code>src</code></dfn> and <dfn id="type5" title=
                   16868: "dom-embed-type"><code>type</code></dfn> each must <a href=
                   16869: "#reflect">reflect</a> the respective content attributes of the
                   16870: same name.</p>
                   16871: <h4 id="the-object"><span class="secno"><del class=
                   16872: "diff-old">3.14.5.</del> <ins class="diff-chg">3.12.5</ins></span>
                   16873: The <dfn id="object"><code>object</code></dfn> element</h4>
                   16874: <dl class="element">
                   16875: <dt>Categories</dt>
                   16876: <dd><a href="#embedded1">Embedded content</a> .</dd>
                   16877: <dt>Contexts in which this element may be used:</dt>
                   16878: <dd>Where <a href="#embedded1">embedded content</a> is
                   16879: expected.</dd>
                   16880: <dt>Content model:</dt>
                   16881: <dd>Zero or more <code><a href="#param">param</a></code> elements,
                   16882: then, <a href="#transparent0">transparent</a> .</dd>
                   16883: <dt>Element-specific attributes:</dt>
                   16884: <dd><code title="attr-object-data"><a href=
                   16885: "#data">data</a></code></dd>
                   16886: <dd><code title="attr-object-type"><a href=
                   16887: "#type6">type</a></code></dd>
                   16888: <dd><code title="attr-object-name"><a href="#name3"><ins class=
                   16889: "diff-new">name</ins></a></code></dd>
                   16890: <dd><code title="attr-hyperlink-usemap"><a href=
                   16891: "#usemap1">usemap</a></code></dd>
                   16892: <dd><code title="attr-dim-width"><a href=
                   16893: "#width4">width</a></code></dd>
                   16894: <dd><code title="attr-dim-height"><a href=
                   16895: "#height3">height</a></code></dd>
                   16896: <dt>DOM interface:</dt>
                   16897: <dd>
                   16898: <pre class="idl">
                   16899: interface <dfn id=
                   16900: "htmlobjectelement">HTMLObjectElement</dfn> : <a href=
                   16901: "#htmlelement">HTMLElement</a> {
                   16902:            attribute DOMString <a href="#data0" title=
                   16903: "dom-object-data">data</a>;
                   16904:            attribute DOMString <a href="#type7" title=
                   16905: "dom-object-type">type</a>;
                   16906: <ins class="diff-new">           attribute DOMString <a href=
                   16907: "#name4" title="dom-object-name">name</a>;
                   16908: </ins>
                   16909:            attribute DOMString <a href="#usemap0" title=
                   16910: "dom-object-useMap">useMap</a>;
                   16911: <del class="diff-old">           attribute long ;
                   16912: </del>
                   16913: <ins class="diff-chg">           attribute long <a href="#width5"
                   16914: title="dom-dim-width">width</a>;
                   16915: </ins>
                   16916:            attribute long <a href="#height4" title=
                   16917: "dom-dim-height">height</a>;
                   16918: };
                   16919: </pre>
                   16920: <p>Objects implementing the <code><a href=
                   16921: "#htmlobjectelement">HTMLObjectElement</a></code> interface must
                   16922: also implement the <code>EmbeddingElement</code> interface defined
                   16923: in the Window Object specification. <a href=
                   16924: "#references">[WINDOW]</a></p>
                   16925: <p>Depending on the type of content instantiated by the
                   16926: <code><a href="#object">object</a></code> element, the node may
                   16927: also support other interfaces.</p>
                   16928: </dd>
                   16929: </dl>
                   16930: <p>The <code><a href="#object">object</a></code> element can
                   16931: represent an external resource, which, depending on the type of the
                   16932: resource, will either be treated as an image, as a nested <a href=
                   16933: "#browsing1">browsing context</a> , or as an external resource to
                   16934: be processed by a <del class="diff-old">third-party software
                   16935: package.</del> <a href="#plugin"><ins class=
                   16936: "diff-chg">plugin</ins></a> .</p>
                   16937: <p>The <dfn id="data" title=
                   16938: "attr-object-data"><code>data</code></dfn> attribute, if present,
                   16939: specifies the address of the resource. If present, the attribute
                   16940: must be a URI (or IRI).</p>
                   16941: <p>The <dfn id="type6" title=
                   16942: "attr-object-type"><code>type</code></dfn> attribute, if present,
                   16943: specifies the type of the resource. If present, the attribute must
                   16944: be a valid MIME type, optionally with parameters. <a href=
                   16945: "#references">[RFC2046]</a></p>
                   16946: <p>One or both of the <code title="attr-object-data"><a href=
                   16947: "#data">data</a></code> and <code title="attr-object-type"><a href=
                   16948: "#type6">type</a></code> attributes must be present.</p>
                   16949: <p><del class="diff-old">Whenever</del> <ins class=
                   16950: "diff-chg">The</ins> <dfn id="name3" title=
                   16951: "attr-object-name"><code><ins class=
                   16952: "diff-chg">name</ins></code></dfn> <ins class="diff-chg">attribute,
                   16953: if present, must be a</ins> <a href="#valid8"><ins class=
                   16954: "diff-chg">valid browsing context name</ins></a> .</p>
                   16955: <p><ins class="diff-chg">When the element is created, and
                   16956: subsequently whenever the</ins> <code title=
                   16957: "attr-object-classid"><ins class="diff-chg">classid</ins></code>
                   16958: <ins class="diff-chg">attribute changes, or, if the</ins>
                   16959: <code title="attr-object-classid"><ins class=
                   16960: "diff-chg">classid</ins></code> <ins class="diff-chg">attribute is
                   16961: not present, whenever</ins> the <code title=
                   16962: "attr-object-data"><a href="#data">data</a></code> attribute
                   16963: changes, or, if <ins class="diff-new">neither</ins> <code title=
                   16964: "attr-object-classid"><ins class="diff-new">classid</ins></code>
                   16965: <ins class="diff-new">attribute nor</ins> the <code title=
                   16966: "attr-object-data"><a href="#data">data</a></code> attribute
                   16967: <del class="diff-old">is not</del> <ins class="diff-chg">are</ins>
                   16968: present, whenever the <code title="attr-object-type"><a href=
                   16969: "#type6">type</a></code> attribute changes, the user agent must run
                   16970: the following steps to determine what the <code><a href=
                   16971: "#object">object</a></code> element represents:</p>
                   16972: <ol>
                   16973: <li>
                   16974: <p>If the <code title="attr-object-classid"><ins class=
                   16975: "diff-new">classid</ins></code> <ins class="diff-new">attribute is
                   16976: present, and has a value that isn't the empty string, then: if the
                   16977: user agent can find a</ins> <a href="#plugin"><ins class=
                   16978: "diff-new">plugin</ins></a> <ins class="diff-new">suitable
                   16979: according to the value of the</ins> <code title=
                   16980: "attr-object-classid"><ins class="diff-new">classid</ins></code>
                   16981: <ins class="diff-new">attribute, and</ins> <a href=
                   16982: "#sandboxPluginObject"><ins class="diff-new">plugins aren't being
                   16983: sandboxed</ins></a> ,<ins class="diff-new">then that</ins> <a href=
                   16984: "#plugin"><ins class="diff-new">plugin</ins></a> <a href=
                   16985: "#object-plugin"><ins class="diff-new">should be used</ins></a>
                   16986: ,<ins class="diff-new">and the value of the</ins> <code title=
                   16987: "attr-object-data"><a href="#data"><ins class=
                   16988: "diff-new">data</ins></a></code> <ins class="diff-new">attribute,
                   16989: if any, should be passed to the</ins> <a href="#plugin"><ins class=
                   16990: "diff-new">plugin</ins></a> .<ins class="diff-new">If no
                   16991: suitable</ins> <a href="#plugin"><ins class=
                   16992: "diff-new">plugin</ins></a> <ins class="diff-new">can be found, or
                   16993: if the</ins> <a href="#plugin"><ins class=
                   16994: "diff-new">plugin</ins></a> <ins class="diff-new">reports an error,
                   16995: jump to the last step in the overall set of steps
                   16996: (fallback).</ins></p>
                   16997: </li>
                   16998: <li>
                   16999: <p><ins class="diff-new">If the</ins> <code title=
                   17000: "attr-object-data"><a href="#data">data</a></code> attribute is
                   17001: present, then:</p>
                   17002: <ol>
                   17003: <li>
                   17004: <p><ins class="diff-new">If the</ins> <code title=
                   17005: "attr-object-type"><a href="#type6"><ins class=
                   17006: "diff-new">type</ins></a></code> <ins class="diff-new">attribute is
                   17007: present and its value is not a type that the user agent supports,
                   17008: and is not a type that the user agent can find a</ins> <a href=
                   17009: "#plugin"><ins class="diff-new">plugin</ins></a> <ins class=
                   17010: "diff-new">for, then the user agent may jump to the last step in
                   17011: the overall set of steps (fallback) without downloading the content
                   17012: to examine its real type.</ins></p>
                   17013: </li>
                   17014: <li>
                   17015: <p>Begin a load for the resource.</p>
                   17016: <p>The download of the resource must <a href="#delays">delay the
                   17017: <code title="event-load">load</code> event</a> .</p>
                   17018: </li>
                   17019: <li>
                   17020: <p>If the resource is not yet available (e.g. because the resource
                   17021: was not available in the cache, so that loading the resource
                   17022: required making a request over the network), then jump to
                   17023: <ins class="diff-new">the last</ins> step <del class=
                   17024: "diff-old">3</del> in the overall set of steps (fallback). When the
                   17025: resource becomes available, or if the load fails, restart this
                   17026: algorithm from this step. Resources can load incrementally; user
                   17027: agents may opt to consider a resource "available" whenever enough
                   17028: data has been obtained to begin processing the resource.</p>
                   17029: </li>
                   17030: <li>
                   17031: <p>If the load failed (e.g. <ins class="diff-new">an HTTP 404
                   17032: error, a</ins> DNS error), <a href="#firing5">fire an <code title=
                   17033: "event-error">error</code> event</a> at the element, then jump to
                   17034: <ins class="diff-new">the last</ins> step <del class=
                   17035: "diff-old">3</del> in the overall set of steps (fallback).</p>
                   17036: </li>
                   17037: <li>
                   17038: <p>Determine the <var title="">resource type <del class=
                   17039: "diff-old">,</del></var> , as follows:</p>
                   17040: <del class="diff-old">This says to trust the type. Should we
                   17041: instead use</del>
                   17042: <ol>
                   17043: <li>
                   17044: <p><ins class="diff-chg">Let</ins> the <del class="diff-old">same
                   17045: mechanism as for browsing contexts?</del> <var title=""><ins class=
                   17046: "diff-chg">resource type</ins></var> <ins class="diff-chg">be
                   17047: unknown.</ins></p>
                   17048: </li>
                   17049: <li>
                   17050: <p>If the resource has <a href="#content-type8" title=
                   17051: "Content-Type">associated Content-Type metadata <del class=
                   17052: "diff-old">The</del></a> , <ins class="diff-chg">then let the</ins>
                   17053: <var title=""><ins class="diff-chg">resource</ins> type <del class=
                   17054: "diff-old">is</del></var> <ins class="diff-chg">be</ins> the type
                   17055: specified in <a href="#content-type8" title="Content-Type">the
                   17056: resource's Content-Type metadata</a> . <del class=
                   17057: "diff-old">Otherwise, if</del></p>
                   17058: </li>
                   17059: <li>
                   17060: <p><ins class="diff-chg">If</ins> the <var title=""><ins class=
                   17061: "diff-new">resource type</ins></var> <ins class="diff-new">is
                   17062: unknown or "</ins> <code title=""><ins class=
                   17063: "diff-new">application/octet-stream</ins></code> <ins class=
                   17064: "diff-new">" and there is a</ins> <code title=
                   17065: "attr-object-type"><a href="#type6">type</a></code> attribute
                   17066: <del class="diff-old">is</del> present <del class=
                   17067: "diff-old">The</del> <ins class="diff-chg">on the</ins>
                   17068: <code><a href="#object"><ins class=
                   17069: "diff-chg">object</ins></a></code> <ins class="diff-chg">element,
                   17070: then change the</ins> <var title=""><ins class=
                   17071: "diff-chg">resource</ins> type <del class="diff-old">is</del></var>
                   17072: <ins class="diff-chg">to instead be</ins> the type specified in
                   17073: <del class="diff-old">the</del> <ins class="diff-chg">that</ins>
                   17074: <code title="attr-object-type"><a href="#type6">type</a></code>
                   17075: attribute. <del class="diff-old">Otherwise, there is no explicit
                   17076: type information The</del></p>
                   17077: </li>
                   17078: <li>
                   17079: <p><ins class="diff-chg">If the</ins> <var title=""><ins class=
                   17080: "diff-chg">resource</ins> type</var> is <ins class="diff-new">still
                   17081: unknown, then change</ins> the <var title=""><ins class=
                   17082: "diff-chg">resource type</ins></var> <ins class="diff-chg">to
                   17083: instead be the</ins> <a href="#sniffed" title=
                   17084: "content-type sniffing">sniffed type of the resource <del class=
                   17085: "diff-old">.</del></a> .</p>
                   17086: </li>
                   17087: </ol>
                   17088: </li>
                   17089: <li>
                   17090: <p>Handle the content as given by the first of the following cases
                   17091: that matches:</p>
                   17092: <dl class="switch">
                   17093: <dt>If the <var title="">resource <del class="diff-old">requires a
                   17094: special handler (e.g.</del> <ins class="diff-chg">type</ins></var>
                   17095: <ins class="diff-chg">can be handled by</ins> a <del class=
                   17096: "diff-old">plugin)</del> <a href="#plugin"><ins class=
                   17097: "diff-chg">plugin</ins></a> <ins class="diff-chg">and</ins>
                   17098: <a href="#sandboxPluginObject"><ins class="diff-chg">plugins aren't
                   17099: being sandboxed</ins></a></dt>
                   17100: <dd>
                   17101: <p>The user agent <a href="#object-plugin">should <del class=
                   17102: "diff-old">find an appropriate handler for the specified resource,
                   17103: based on the resource type found in the previous step,</del>
                   17104: <ins class="diff-chg">use that plugin</ins></a> and pass the
                   17105: content of the resource to that <del class=
                   17106: "diff-old">handler.</del> <a href="#plugin"><ins class=
                   17107: "diff-chg">plugin</ins></a> . If the <del class="diff-old">handler
                   17108: supports a scriptable interface, the HTMLObjectElement</del>
                   17109: <a href="#plugin"><ins class="diff-chg">plugin</ins></a>
                   17110: <del class="diff-old">object representing the element should expose
                   17111: that interface. The handler is not a nested browsing context . If
                   17112: no appropriate handler can be found,</del> <ins class=
                   17113: "diff-chg">reports an error,</ins> then jump to <ins class=
                   17114: "diff-new">the last</ins> step <del class="diff-old">3</del> in the
                   17115: overall set of steps (fallback).</p>
                   17116: <del class="diff-old">The user agent should pass the names and
                   17117: values of all the parameters given by param elements that are
                   17118: children of the object element to the handler used. This
                   17119: specification does not define a mechanism for interacting with
                   17120: third-party handlers, as it is expected to be user-agent-specific.
                   17121: Some UAs might opt to support a plugin mechanism such as the
                   17122: Netscape Plugin API; others may use remote content convertors or
                   17123: have built-in support for certain types. [NPAPI] this doesn't
                   17124: completely duplicate the navigation section, since it handles
                   17125: &lt;param&gt;, etc, but surely some work should be done to work
                   17126: with it</del></dd>
                   17127: <dt>If the <del class="diff-old">type of the</del> <var title=
                   17128: "">resource <ins class="diff-new">type</ins></var> is an <span>XML
                   17129: MIME type</span></dt>
                   17130: <dt>If the <del class="diff-old">type of the</del> <var title=
                   17131: "">resource <ins class="diff-new">type</ins></var> is HTML</dt>
                   17132: <dt>If the <del class="diff-old">type of the</del> <var title=
                   17133: "">resource <ins class="diff-new">type</ins></var> does not start
                   17134: with " <code>image/</code> "</dt>
                   17135: <dd>
                   17136: <p>The <code><a href="#object">object</a></code> element must be
                   17137: associated with a nested <a href="#browsing1">browsing context</a>
                   17138: , if it does not already have one. The element's nested <a href=
                   17139: "#browsing1">browsing context</a> must then be <a href="#navigate"
                   17140: title="navigate">navigated</a> to the given resource, with <a href=
                   17141: "#replacement">replacement enabled</a> , <ins class="diff-new">and
                   17142: with the</ins> <code><a href="#object"><ins class=
                   17143: "diff-new">object</ins></a></code> <ins class="diff-new">element's
                   17144: document's</ins> <a href="#browsing1"><ins class=
                   17145: "diff-new">browsing context</ins></a> <ins class="diff-new">as
                   17146: the</ins> <a href="#source0"><ins class="diff-new">source browsing
                   17147: context</ins></a> . (The <code title="attr-object-data"><a href=
                   17148: "#data">data</a></code> attribute of the <code><a href=
                   17149: "#object">object</a></code> element doesn't get updated if the
                   17150: browsing context gets further navigated to other locations.)</p>
                   17151: <p><ins class="diff-new">If the</ins> <code title=
                   17152: "attr-object-name"><a href="#name3"><ins class=
                   17153: "diff-new">name</ins></a></code> <ins class="diff-new">attribute is
                   17154: present, the</ins> <a href="#browsing2"><ins class=
                   17155: "diff-new">browsing context name</ins></a> <ins class=
                   17156: "diff-new">must be set to the value of this attribute; otherwise,
                   17157: the</ins> <a href="#browsing2"><ins class="diff-new">browsing
                   17158: context name</ins></a> <ins class="diff-new">must be set to the
                   17159: empty string.</ins></p>
                   17160: <p class="big-issue">navigation might end up treating it as
                   17161: something else, because it can do sniffing. how should we handle
                   17162: that?</p>
                   17163: </dd>
                   17164: <dt>If the <var title="">resource <del class="diff-old">is a
                   17165: supported image format,</del> <ins class=
                   17166: "diff-chg">type</ins></var> <ins class="diff-chg">starts with
                   17167: "</ins> <code><ins class="diff-chg">image/</ins></code> <ins class=
                   17168: "diff-chg">",</ins> and support for images has not been
                   17169: disabled</dt>
                   17170: <dd>
                   17171: <p><ins class="diff-new">Apply the</ins> <a href="#content-type6"
                   17172: title="content-type sniffing: image"><ins class="diff-new">image
                   17173: sniffing</ins></a> <ins class="diff-new">rules to determine the
                   17174: type of the image.</ins></p>
                   17175: <p>The <code><a href="#object">object</a></code> element represents
                   17176: the specified image. The image is not a nested <a href=
                   17177: "#browsing1">browsing context</a> .</p>
                   17178: <del class="diff-old">shouldn't we use</del>
                   17179: <p><ins class="diff-chg">If</ins> the <del class=
                   17180: "diff-old">image-sniffing stuff here?</del> <ins class=
                   17181: "diff-chg">image cannot be rendered, e.g. because it is malformed
                   17182: or in an unsupported format, jump to the last step in the overall
                   17183: set of steps (fallback).</ins></p>
                   17184: </dd>
                   17185: <dt>Otherwise</dt>
                   17186: <dd>
                   17187: <p>The <del class="diff-old">object element represents the
                   17188: specified image, but the image cannot be shown.</del> <ins class=
                   17189: "diff-chg">given</ins> <var title=""><ins class="diff-chg">resource
                   17190: type</ins></var> <ins class="diff-chg">is not supported.</ins> Jump
                   17191: to <ins class="diff-new">the last</ins> step <del class=
                   17192: "diff-old">3 below</del> in the overall set of steps
                   17193: (fallback).</p>
                   17194: </dd>
                   17195: </dl>
                   17196: </li>
                   17197: <li>
                   17198: <p>The element's contents are not part of what the <code><a href=
                   17199: "#object">object</a></code> element represents.</p>
                   17200: </li>
                   17201: <li>
                   17202: <p>Once the resource is completely loaded, <a href="#firing4">fire
                   17203: a <code title="event-load">load</code> event</a> at the
                   17204: element.</p>
                   17205: </li>
                   17206: </ol>
                   17207: </li>
                   17208: <li>
                   17209: <p>If the <code title="attr-object-data"><a href=
                   17210: "#data">data</a></code> attribute is absent but the <code title=
                   17211: "attr-object-type"><a href="#type6">type</a></code> attribute is
                   17212: present, <a href="#sandboxPluginObject"><ins class=
                   17213: "diff-new">plugins aren't being sandboxed</ins></a> , and
                   17214: <del class="diff-old">if</del> the user agent can find a
                   17215: <del class="diff-old">handler</del> <a href="#plugin"><ins class=
                   17216: "diff-chg">plugin</ins></a> suitable according to the value of the
                   17217: <code title="attr-object-type"><a href="#type6">type</a></code>
                   17218: attribute, then that <del class="diff-old">handler should be used.
                   17219: If the handler supports a scriptable interface, the
                   17220: HTMLObjectElement</del> <a href="#plugin"><ins class=
                   17221: "diff-chg">plugin</ins></a> <del class="diff-old">object
                   17222: representing the element</del> <a href="#object-plugin">should
                   17223: <del class="diff-old">expose that interface. The handler is not a
                   17224: nested browsing context</del> <ins class="diff-chg">be
                   17225: used</ins></a> . If no suitable <del class="diff-old">handler</del>
                   17226: <a href="#plugin"><ins class="diff-chg">plugin</ins></a> can be
                   17227: found, <ins class="diff-new">or if the</ins> <a href=
                   17228: "#plugin"><ins class="diff-new">plugin</ins></a> <ins class=
                   17229: "diff-new">reports an error,</ins> jump to the next step
                   17230: (fallback).</p>
                   17231: </li>
                   17232: <li>
                   17233: <p>(Fallback.) The <code><a href="#object">object</a></code>
                   17234: element <del class="diff-old">doesn't represent anything
                   17235: except</del> <ins class="diff-chg">represents</ins> what the
                   17236: element's contents represent, ignoring any leading <code><a href=
                   17237: "#param">param</a></code> element children. This is the element's
                   17238: <a href="#fallback">fallback content</a> .</p>
                   17239: </li>
                   17240: </ol>
                   17241: <del class="diff-old">In</del>
                   17242: <p id="object-plugin"><ins class="diff-chg">When</ins> the
                   17243: <del class="diff-old">absence of other factors (such as style
                   17244: sheets), user agents must show</del> <ins class=
                   17245: "diff-chg">algorithm above instantiates a</ins> <a href=
                   17246: "#plugin"><ins class="diff-chg">plugin</ins></a> , the user
                   17247: <del class="diff-old">what</del> <ins class="diff-chg">agent should
                   17248: pass the names and values of all the</ins> <span title=
                   17249: "concept-param-parameter"><ins class=
                   17250: "diff-chg">parameters</ins></span> <ins class="diff-chg">given
                   17251: by</ins> <code><a href="#param"><ins class=
                   17252: "diff-chg">param</ins></a></code> <ins class="diff-chg">elements
                   17253: that are children of</ins> the <code><a href=
                   17254: "#object">object</a></code> element <del class=
                   17255: "diff-old">represents. Thus,</del> <ins class="diff-chg">to
                   17256: the</ins> <a href="#plugin"><ins class="diff-chg">plugin</ins></a>
                   17257: <ins class="diff-chg">used. If the</ins> <a href=
                   17258: "#plugin"><ins class="diff-chg">plugin</ins></a> <ins class=
                   17259: "diff-chg">supports a scriptable interface, the</ins>
                   17260: <code><a href="#htmlobjectelement"><ins class=
                   17261: "diff-chg">HTMLObjectElement</ins></a></code> <ins class=
                   17262: "diff-chg">object representing the element should expose that
                   17263: interface. The</ins> <a href="#plugin"><ins class=
                   17264: "diff-chg">plugin</ins></a> <ins class="diff-chg">is not a
                   17265: nested</ins> <a href="#browsing1"><ins class="diff-chg">browsing
                   17266: context</ins></a> .</p>
                   17267: <p id="sandboxPluginObject"><ins class="diff-chg">If the</ins>
                   17268: <a href="#sandboxed0"><ins class="diff-chg">sandboxed plugins
                   17269: browsing context flag</ins></a> <ins class="diff-chg">is set on
                   17270: the</ins> <a href="#browsing1"><ins class="diff-chg">browsing
                   17271: context</ins></a> <ins class="diff-chg">for which the</ins>
                   17272: <code><a href="#object"><ins class=
                   17273: "diff-chg">object</ins></a></code> <ins class="diff-chg">element's
                   17274: document is the</ins> <a href="#active"><ins class=
                   17275: "diff-chg">active document</ins></a> ,<ins class="diff-chg">then
                   17276: the steps above must always act as if they had failed to find
                   17277: a</ins> <a href="#plugin"><ins class="diff-chg">plugin</ins></a>
                   17278: ,<ins class="diff-chg">even if one would otherwise have been
                   17279: used.</ins></p>
                   17280: <p><ins class="diff-chg">Due to the algorithm above,</ins> the
                   17281: contents of <code><a href="#object">object</a></code> elements act
                   17282: as <a href="#fallback">fallback content</a> , <del class=
                   17283: "diff-old">to be</del> used only when referenced resources can't be
                   17284: shown (e.g. because it returned a 404 error). This allows multiple
                   17285: <code><a href="#object">object</a></code> elements to be nested
                   17286: inside each other, targeting multiple user agents with different
                   17287: capabilities, with the user agent picking the <del class=
                   17288: "diff-old">best</del> <ins class="diff-chg">first</ins> one it
                   17289: supports.</p>
                   17290: <p><ins class="diff-new">Whenever the</ins> <code title=
                   17291: "attr-object-name"><a href="#name3"><ins class=
                   17292: "diff-new">name</ins></a></code> <ins class="diff-new">attribute is
                   17293: set, if the</ins> <code><a href="#object"><ins class=
                   17294: "diff-new">object</ins></a></code> <ins class="diff-new">element
                   17295: has a nested</ins> <a href="#browsing1"><ins class=
                   17296: "diff-new">browsing context</ins></a> ,<ins class=
                   17297: "diff-new">its</ins> <a href="#browsing2" title=
                   17298: "browsing context name"><ins class="diff-new">name</ins></a>
                   17299: <ins class="diff-new">must be changed to the new value. If the
                   17300: attribute is removed, if the</ins> <code><a href=
                   17301: "#object"><ins class="diff-new">object</ins></a></code> <ins class=
                   17302: "diff-new">element has a</ins> <a href="#browsing1"><ins class=
                   17303: "diff-new">browsing context</ins></a> ,<ins class=
                   17304: "diff-new">the</ins> <a href="#browsing2"><ins class=
                   17305: "diff-new">browsing context name</ins></a> <ins class=
                   17306: "diff-new">must be set to the empty string.</ins></p>
                   17307: <p>The <code title="attr-hyperlink-usemap"><a href=
                   17308: "#usemap1">usemap</a></code> attribute, if present while the
                   17309: <code><a href="#object">object</a></code> element represents an
                   17310: image, can indicate that the object has an associated <a href=
                   17311: "#image">image map</a> . The attribute must be ignored if the
                   17312: <code><a href="#object">object</a></code> element doesn't represent
                   17313: an image.</p>
                   17314: <p>The <code><a href="#object">object</a></code> element supports
                   17315: <a href="#dimension0">dimension attributes</a> .</p>
                   17316: <p>The DOM attributes <dfn id="data0" title=
                   17317: "dom-object-data"><code>data</code></dfn> , <dfn id="type7" title=
                   17318: "dom-object-type"><code>type</code></dfn> , <dfn id="name4" title=
                   17319: "dom-object-name"><code><ins class=
                   17320: "diff-new">name</ins></code></dfn> , and <dfn id="usemap0" title=
                   17321: "dom-object-useMap"><code>useMap</code></dfn> each must <a href=
                   17322: "#reflect">reflect</a> the respective content attributes of the
                   17323: same name.</p>
                   17324: <div class="example">
                   17325: <p><ins class="diff-new">In the following example, a Java applet is
                   17326: embedded in a page using the</ins> <code><a href=
                   17327: "#object"><ins class="diff-new">object</ins></a></code> <ins class=
                   17328: "diff-new">element. (Generally speaking, it is better to avoid
                   17329: using applets like these and instead use native JavaScript and HTML
                   17330: to provide the functionality, since that way the application will
                   17331: work on all Web browsers without requiring a third-party plugin.
                   17332: Many devices, especially embedded devices, do not support
                   17333: third-party technologies like Java.)</ins></p>
                   17334: <pre>
                   17335: &lt;figure&gt;<ins class="diff-new">
                   17336:  &lt;object type="application/x-java-applet"&gt;
                   17337:   &lt;param name="code" value="MyJavaClass"&gt;
                   17338:   &lt;p&gt;You do not have Java available, or it is disabled.&lt;/p&gt;
                   17339:  &lt;/object&gt;
                   17340:  &lt;legend&gt;My Java Clock&lt;/legend&gt;
                   17341: &lt;/figure&gt;
                   17342: </ins>
                   17343: </pre></div>
                   17344: <div class="example">
                   17345: <p><ins class="diff-new">In this example, an HTML page is embedded
                   17346: in another using the</ins> <code><a href="#object"><ins class=
                   17347: "diff-new">object</ins></a></code> <ins class=
                   17348: "diff-new">element.</ins></p>
                   17349: <pre>
                   17350: &lt;figure&gt;<ins class="diff-new">
                   17351:  &lt;object data="clock.html"&gt;&lt;/object&gt;
                   17352:  &lt;legend&gt;My HTML Clock&lt;/legend&gt;
                   17353: &lt;/figure&gt;
                   17354: </ins>
                   17355: </pre></div>
                   17356: <h4 id="the-param"><span class="secno"><del class=
                   17357: "diff-old">3.14.6.</del> <ins class="diff-chg">3.12.6</ins></span>
                   17358: The <dfn id="param"><code>param</code></dfn> element</h4>
                   17359: <dl class="element">
                   17360: <dt>Categories</dt>
                   17361: <dd>None.</dd>
                   17362: <dt>Contexts in which this element may be used:</dt>
                   17363: <dd>As a child of an <code><a href="#object">object</a></code>
                   17364: element, before any <del class="diff-old">prose</del> <a href=
                   17365: "#flow-content0"><ins class="diff-chg">flow</ins> content</a>
                   17366: .</dd>
                   17367: <dt>Content model:</dt>
                   17368: <dd>Empty.</dd>
                   17369: <dt>Element-specific attributes:</dt>
                   17370: <dd><code title="attr-param-name"><a href=
                   17371: "#name5">name</a></code></dd>
                   17372: <dd><code title="attr-param-value"><a href=
                   17373: "#value5">value</a></code></dd>
                   17374: <dt>DOM interface:</dt>
                   17375: <dd>
                   17376: <pre class="idl">
                   17377: interface <dfn id=
                   17378: "htmlparamelement">HTMLParamElement</dfn> : <a href=
                   17379: "#htmlelement">HTMLElement</a> {
                   17380: <del class="diff-old">           attribute DOMString ;
                   17381: </del>
                   17382: <ins class="diff-chg">           attribute DOMString <a href=
                   17383: "#name6" title="dom-param-name">name</a>;
                   17384: </ins>
                   17385:            attribute DOMString <a href="#value6" title=
                   17386: "dom-param-value">value</a>;
                   17387: };
                   17388: </pre></dd>
                   17389: </dl>
                   17390: <p>The <code><a href="#param">param</a></code> element defines
                   17391: parameters for <del class="diff-old">handlers</del> <ins class=
                   17392: "diff-chg">plugins</ins> invoked by <code><a href=
                   17393: "#object">object</a></code> elements.</p>
                   17394: <p>The <dfn id="name5" title=
                   17395: "attr-param-name"><code>name</code></dfn> attribute gives the name
                   17396: of the parameter.</p>
                   17397: <p>The <dfn id="value5" title=
                   17398: "attr-param-value"><code>value</code></dfn> attribute gives the
                   17399: value of the parameter.</p>
                   17400: <p>Both attributes must be present. They may have any value.</p>
                   17401: <p>If both attributes are present, and if the parent element of the
                   17402: <code><a href="#param">param</a></code> is an <code><a href=
                   17403: "#object">object</a></code> element, then the element defines a
                   17404: <dfn id="parameter" title=
                   17405: "concept-param-parameters">parameter</dfn> with the given
                   17406: name/value pair.</p>
                   17407: <p>The DOM attributes <dfn id="name6" title=
                   17408: "dom-param-name"><code>name</code></dfn> and <dfn id="value6"
                   17409: title="dom-param-value"><code>value</code></dfn> must both <a href=
                   17410: "#reflect">reflect</a> the respective content attributes of the
                   17411: same name.</p>
                   17412: <h4 id="video"><span class="secno"><del class=
                   17413: "diff-old">3.14.7.</del> <ins class="diff-chg">3.12.7</ins></span>
                   17414: The <dfn id="video1"><code>video</code></dfn> element</h4>
                   17415: <dl class="element">
                   17416: <dt>Categories</dt>
                   17417: <dd><a href="#embedded1">Embedded content</a> .</dd>
                   17418: <dt>Contexts in which this element may be used:</dt>
                   17419: <dd>Where <a href="#embedded1">embedded content</a> is
                   17420: expected.</dd>
                   17421: <dt>Content model:</dt>
                   17422: <dd>If the element has a <code title="attr-media-src"><a href=
                   17423: "#src7">src</a></code> attribute: <a href=
                   17424: "#transparent0">transparent</a> .</dd>
                   17425: <dd>If the element does not have a <code title=
                   17426: "attr-media-src"><a href="#src7">src</a></code> attribute: one or
                   17427: more <code><a href="#source">source</a></code> elements, then,
                   17428: <a href="#transparent0">transparent</a> .</dd>
                   17429: <dt>Element-specific attributes:</dt>
                   17430: <dd><code title="attr-media-src"><a href=
                   17431: "#src7">src</a></code></dd>
                   17432: <dd><code title="attr-video-poster"><a href=
                   17433: "#poster">poster</a></code></dd>
                   17434: <dd><code title="attr-media-autoplay"><a href=
                   17435: "#autoplay">autoplay</a></code></dd>
                   17436: <dd><code title="attr-media-start"><a href=
                   17437: "#start2">start</a></code></dd>
                   17438: <dd><code title="attr-media-loopstart"><a href=
                   17439: "#loopstart">loopstart</a></code></dd>
                   17440: <dd><code title="attr-media-loopend"><a href=
                   17441: "#loopend">loopend</a></code></dd>
                   17442: <dd><code title="attr-media-end"><a href="#end">end</a></code></dd>
                   17443: <dd><code title="attr-media-playcount"><a href=
                   17444: "#playcount">playcount</a></code></dd>
                   17445: <dd><code title="attr-media-controls"><a href=
                   17446: "#controls">controls</a></code></dd>
                   17447: <dd><code title="attr-dim-width"><a href=
                   17448: "#width4">width</a></code></dd>
                   17449: <dd><code title="attr-dim-height"><a href=
                   17450: "#height3">height</a></code></dd>
                   17451: <dt>DOM interface:</dt>
                   17452: <dd>
                   17453: <pre class="idl">
                   17454: interface <dfn id=
                   17455: "htmlvideoelement">HTMLVideoElement</dfn> : <a href=
                   17456: "#htmlmediaelement">HTMLMediaElement</a> {
                   17457: <del class="diff-old">           attribute long ;
                   17458: </del>
                   17459: <ins class="diff-chg">           attribute long <a href="#width5"
                   17460: title="dom-dim-width">width</a>;
                   17461: </ins>
                   17462:            attribute long <a href="#height4" title=
                   17463: "dom-dim-height">height</a>;
                   17464:   readonly attribute unsigned long <a href="#videowidth" title=
                   17465: "dom-video-videoWidth">videoWidth</a>;
                   17466:   readonly attribute unsigned long <a href="#videoheight" title=
                   17467: "dom-video-videoHeight">videoHeight</a>;
                   17468:            attribute DOMString <a href="#poster0" title=
                   17469: "dom-video-poster">poster</a>;
                   17470: };
                   17471: </pre></dd>
                   17472: </dl>
                   17473: <p>A <code><a href="#video1">video</a></code> element represents a
                   17474: video or movie.</p>
                   17475: <p>Content may be provided inside the <code><a href=
                   17476: "#video1">video</a></code> element. User agents should not show
                   17477: this content to the user; it is intended for older Web browsers
                   17478: which do not support <code><a href="#video1">video</a></code> , so
                   17479: that legacy video plugins can be tried, or to show text to the
                   17480: users of these older browser informing them of how to access the
                   17481: video contents.</p>
                   17482: <p class="note">In particular, this content is not <i><a href=
                   17483: "#fallback">fallback content</a></i> intended to address
                   17484: accessibility concerns. To make video content accessible to the
                   17485: blind, deaf, and those with other physical or cognitive
                   17486: disabilities, authors are expected to provide alternative media
                   17487: streams and/or to embed accessibility aids (such as caption or
                   17488: subtitle tracks) into their media streams.</p>
                   17489: <p>The <code><a href="#video1">video</a></code> element is a
                   17490: <a href="#media7">media element</a> whose <a href="#media9">media
                   17491: data</a> is ostensibly video data, possibly with associated audio
                   17492: data.</p>
                   17493: <p>The <code title="attr-media-src"><a href="#src7">src</a></code>
                   17494: , <code title="attr-media-autoplay"><a href=
                   17495: "#autoplay">autoplay</a></code> , <code title=
                   17496: "attr-media-start"><a href="#start2">start</a></code> ,
                   17497: <code title="attr-media-loopstart"><a href=
                   17498: "#loopstart">loopstart</a></code> , <code title=
                   17499: "attr-media-loopend"><a href="#loopend">loopend</a></code> ,
                   17500: <code title="attr-media-end"><a href="#end">end</a></code> ,
                   17501: <code title="attr-media-playcount"><a href=
                   17502: "#playcount">playcount</a></code> , and <code title=
                   17503: "attr-media-controls"><a href="#controls">controls</a></code>
                   17504: attributes are <a href="#media8" title=
                   17505: "media element attributes">the attributes common to all media
                   17506: elements</a> .</p>
                   17507: <p>The <code><a href="#video1">video</a></code> element supports
                   17508: <a href="#dimension0">dimension attributes</a> .</p>
                   17509: <p>The <dfn id="poster" title=
                   17510: "attr-video-poster"><code>poster</code></dfn> attribute gives the
                   17511: address of an image file that the user agent can show while no
                   17512: video data is available. The attribute, if present, must contain a
                   17513: URI (or IRI).</p>
                   17514: <p>The <dfn id="poster0" title=
                   17515: "dom-video-poster"><code>poster</code></dfn> DOM attribute must
                   17516: <a href="#reflect">reflect</a> the <code title=
                   17517: "attr-video-poster"><a href="#poster">poster</a></code> content
                   17518: attribute.</p>
                   17519: <p>The <dfn id="videowidth" title=
                   17520: "dom-video-videoWidth"><code>videoWidth</code></dfn> DOM attribute
                   17521: must return the native width of the video in CSS pixels. The
                   17522: <dfn id="videoheight" title=
                   17523: "dom-video-videoHeight"><code>videoHeight</code></dfn> DOM
                   17524: attribute must return the native height of the video in CSS pixels.
                   17525: In the absence of resolution information defining the mapping of
                   17526: pixels in the video to physical dimensions, user agents may assume
                   17527: that one pixel in the video corresponds to one CSS pixel. If no
                   17528: video data is available, then the attributes must return 0.</p>
                   17529: <p>When no video data is available (the element's <code title=
                   17530: "dom-media-networkState"><a href=
                   17531: "#networkstate">networkState</a></code> attribute is either
                   17532: <code title="dom-media-EMPTY"><a href="#empty">EMPTY</a></code> ,
                   17533: <code title="dom-media-LOADING"><a href=
                   17534: "#loading0">LOADING</a></code> , or <code title=
                   17535: "dom-media-LOADED_METADATA"><a href=
                   17536: "#loadedmetadata">LOADED_METADATA</a></code> ), <code><a href=
                   17537: "#video1">video</a></code> elements represent either the image
                   17538: given by the <code title="attr-video-poster"><a href=
                   17539: "#poster">poster</a></code> attribute, or nothing.</p>
                   17540: <p>When a <code><a href="#video1">video</a></code> element is
                   17541: <a href="#actively">actively playing</a> , it represents the frame
                   17542: of video at the continuously increasing <a href="#current0" title=
                   17543: "current playback position">"current" position</a> . When the
                   17544: <a href="#current0">current playback position</a> changes such that
                   17545: the last frame rendered is no longer the frame corresponding to the
                   17546: <a href="#current0">current playback position</a> in the video, the
                   17547: new frame must be rendered. Similarly, any audio associated with
                   17548: the video must, if played, be played <del class=
                   17549: "diff-old">synchronised</del> <ins class=
                   17550: "diff-chg">synchronized</ins> with the <a href="#current0">current
                   17551: playback position</a> , at the specified <a href="#volume" title=
                   17552: "dom-media-volume">volume</a> with the specified <a href="#muted"
                   17553: title="dom-media-muted">mute state</a> .</p>
                   17554: <p>When a <code><a href="#video1">video</a></code> element is
                   17555: <a href="#paused" title="dom-media-paused">paused <del class=
                   17556: "diff-old">,</del></a> <ins class="diff-chg">and the</ins> <a href=
                   17557: "#current0" title="current playback position"><ins class=
                   17558: "diff-chg">current playback position</ins></a> <ins class=
                   17559: "diff-chg">is the first frame of video,</ins> the element
                   17560: represents <ins class="diff-new">either</ins> the frame of video
                   17561: corresponding to the <a href="#current0" title=
                   17562: "current playback position"><ins class="diff-chg">current playback
                   17563: position</ins></a> <ins class="diff-chg">or the image given by
                   17564: the</ins> <code title="attr-video-poster"><a href=
                   17565: "#poster"><ins class="diff-chg">poster</ins></a></code> <ins class=
                   17566: "diff-chg">attribute, at the discretion of the user
                   17567: agent.</ins></p>
                   17568: <p><ins class="diff-chg">When a</ins> <code><a href=
                   17569: "#video1"><ins class="diff-chg">video</ins></a></code> <ins class=
                   17570: "diff-chg">element is</ins> <a href="#paused" title=
                   17571: "dom-media-paused"><ins class="diff-chg">paused</ins></a>
                   17572: <ins class="diff-chg">at any other position, the element represents
                   17573: the frame of video corresponding to the</ins> <a href="#current0"
                   17574: title="current playback position">current playback position</a> ,
                   17575: or, if that is not <del class="diff-old">available</del> yet
                   17576: <ins class="diff-new">available</ins> (e.g. because the video is
                   17577: seeking or buffering), the last <del class=
                   17578: "diff-old">rendered</del> frame of <del class=
                   17579: "diff-old">video.</del> <ins class="diff-chg">the video to have
                   17580: been rendered.</ins></p>
                   17581: <p>When a <code><a href="#video1">video</a></code> element is
                   17582: neither <a href="#actively">actively playing</a> nor <a href=
                   17583: "#paused" title="dom-media-paused">paused</a> (e.g. when seeking or
                   17584: stalled), the element represents the last frame of the video to
                   17585: have been rendered.</p>
                   17586: <p class="note">Which frame in a video stream corresponds to a
                   17587: particular playback position is defined by the video stream's
                   17588: format.</p>
                   17589: <p>Video content should be rendered inside the element's playback
                   17590: area such that the video content is shown centered in the playback
                   17591: area at the largest possible size that fits completely within it,
                   17592: with the video content's <a href="#adjusted"><ins class=
                   17593: "diff-new">adjusted</ins> aspect ratio</a> being preserved. Thus,
                   17594: if the aspect ratio of the playback area does not match the
                   17595: <a href="#adjusted"><ins class="diff-new">adjusted</ins> aspect
                   17596: ratio</a> of the video, the video will be shown letterboxed. Areas
                   17597: of the element's playback area that do not contain the video
                   17598: represent nothing.</p>
                   17599: <p><ins class="diff-new">The</ins> <dfn id="adjusted"><ins class=
                   17600: "diff-new">adjusted aspect ratio</ins></dfn> <ins class=
                   17601: "diff-new">of a video is the ratio of its</ins> <a href=
                   17602: "#adjusted0"><ins class="diff-new">adjusted width</ins></a>
                   17603: <ins class="diff-new">to its intrinsic height. The</ins> <dfn id=
                   17604: "adjusted0"><ins class="diff-new">adjusted width</ins></dfn>
                   17605: <ins class="diff-new">of a video is its intrinsic width multiplied
                   17606: by its</ins> <a href="#pixel0"><ins class="diff-new">pixel
                   17607: ratio</ins></a> .</p>
                   17608: <p>In addition to the above, the user agent may provide messages to
                   17609: the user (such as "buffering", "no video loaded", "error", or more
                   17610: detailed information) by overlaying text or icons on the video or
                   17611: other areas of the element's playback area, or in another
                   17612: appropriate manner.</p>
                   17613: <p>User agents that cannot render the video may instead make the
                   17614: element represent a link to an external video playback utility or
                   17615: to the video data itself.</p>
                   17616: <p>User agents should provide controls to enable or disable the
                   17617: display of closed captions associated with the video stream, though
                   17618: such features should, again, not interfere with the page's normal
                   17619: rendering.</p>
                   17620: <p>User agents may allow users to view the video content in manners
                   17621: more suitable to the user (e.g. full-screen or in an independent
                   17622: resizable window). As for the other user interface features,
                   17623: controls to enable this should not interfere with the page's normal
                   17624: rendering unless the user agent is <a href="#expose" title=
                   17625: "expose a user interface to the user">exposing a user interface</a>
                   17626: . In such an independent context, however, user agents may make
                   17627: full user interfaces visible, with, e.g., play, pause, seeking, and
                   17628: volume controls, even if the <code title=
                   17629: "attr-media-controls"><a href="#controls">controls</a></code>
                   17630: attribute is absent.</p>
                   17631: <p>User agents may allow video playback to affect system features
                   17632: that could interfere with the user's experience; for example, user
                   17633: agents could disable screensavers while video playback is in
                   17634: progress.</p>
                   17635: <p class="warning">User agents should not provide a public API to
                   17636: cause videos to be shown full-screen. A script, combined with a
                   17637: carefully crafted video file, could trick the user into thinking a
                   17638: system-modal dialog had been shown, and prompt the user for a
                   17639: password. There is also the danger of "mere" annoyance, with pages
                   17640: launching full-screen videos when links are clicked or pages
                   17641: navigated. Instead, user-agent specific interface features may be
                   17642: provided to easily allow the user to obtain a full-screen playback
                   17643: mode.</p>
                   17644: <p class="big-issue"><ins class="diff-new">The spec does not
                   17645: currently define the interaction of the "controls" attribute with
                   17646: the "height" and "width" attributes. This will likely be defined in
                   17647: the rendering section based on implementation experience. So far,
                   17648: browsers seem to be making the controls overlay-only, thus somewhat
                   17649: sidestepping the issue.</ins></p>
                   17650: <h5 id="video0"><span class="secno"><del class=
                   17651: "diff-old">3.14.7.1.</del> <ins class=
                   17652: "diff-chg">3.12.7.1.</ins></span> Video and audio codecs for
                   17653: <code><a href="#video1">video</a></code> elements</h5>
                   17654: <p>User agents may support any video and audio codecs and container
                   17655: formats.</p>
                   17656: <p class="big-issue">It would be helpful for interoperability if
                   17657: all browsers could support the same codecs. However, there are no
                   17658: known codecs that satisfy all the current players: we need a codec
                   17659: that is known to not require per-unit or per-distributor licensing,
                   17660: that is compatible with the open source development model, that is
                   17661: of sufficient quality as to be usable, and that is not an
                   17662: additional submarine patent risk for large companies. This is an
                   17663: ongoing issue and this section will be updated once more
                   17664: information is available.</p>
                   17665: <p class="note">Certain user agents might support no codecs at all,
                   17666: e.g. text browsers running over SSH connections.</p>
                   17667: <h4 id="audio"><span class="secno"><del class=
                   17668: "diff-old">3.14.8.</del> <ins class="diff-chg">3.12.8</ins></span>
                   17669: The <dfn id="audio1"><code>audio</code></dfn> element</h4>
                   17670: <dl class="element">
                   17671: <dt>Categories</dt>
                   17672: <dd><a href="#embedded1">Embedded content</a> .</dd>
                   17673: <dt>Contexts in which this element may be used:</dt>
                   17674: <dd>Where <a href="#embedded1">embedded content</a> is
                   17675: expected.</dd>
                   17676: <dt>Content model:</dt>
                   17677: <dd>If the element has a <code title="attr-media-src"><a href=
                   17678: "#src7">src</a></code> attribute: <a href=
                   17679: "#transparent0">transparent</a> .</dd>
                   17680: <dd>If the element does not have a <code title=
                   17681: "attr-media-src"><a href="#src7">src</a></code> attribute: one or
                   17682: more <code><a href="#source">source</a></code> elements, then,
                   17683: <a href="#transparent0">transparent</a> .</dd>
                   17684: <dt>Element-specific attributes:</dt>
                   17685: <dd><code title="attr-media-src"><a href=
                   17686: "#src7">src</a></code></dd>
                   17687: <dd><code title="attr-media-autoplay"><a href=
                   17688: "#autoplay">autoplay</a></code></dd>
                   17689: <dd><code title="attr-media-start"><a href=
                   17690: "#start2">start</a></code></dd>
                   17691: <dd><code title="attr-media-loopstart"><a href=
                   17692: "#loopstart">loopstart</a></code></dd>
                   17693: <dd><code title="attr-media-loopend"><a href=
                   17694: "#loopend">loopend</a></code></dd>
                   17695: <dd><code title="attr-media-end"><a href="#end">end</a></code></dd>
                   17696: <dd><code title="attr-media-playcount"><a href=
                   17697: "#playcount">playcount</a></code></dd>
                   17698: <dd><code title="attr-media-controls"><a href=
                   17699: "#controls">controls</a></code></dd>
                   17700: <dt>DOM interface:</dt>
                   17701: <dd>
                   17702: <pre class="idl">
                   17703: interface <dfn id=
                   17704: "htmlaudioelement">HTMLAudioElement</dfn> : <a href=
                   17705: "#htmlmediaelement">HTMLMediaElement</a> {
                   17706:   // no members
                   17707: };
                   17708: </pre></dd>
                   17709: </dl>
                   17710: <p>An <code><a href="#audio1">audio</a></code> element represents a
                   17711: sound or audio stream.</p>
                   17712: <p>Content may be provided inside the <code><a href=
                   17713: "#audio1">audio</a></code> element. User agents should not show
                   17714: this content to the user; it is intended for older Web browsers
                   17715: which do not support <code><a href="#audio1">audio</a></code> , so
                   17716: that legacy audio plugins can be tried, or to show text to the
                   17717: users of these older browser informing them of how to access the
                   17718: audio contents.</p>
                   17719: <p class="note">In particular, this content is not <i><a href=
                   17720: "#fallback">fallback content</a></i> intended to address
                   17721: accessibility concerns. To make audio content accessible to the
                   17722: deaf or to those with other physical or cognitive disabilities,
                   17723: authors are expected to provide alternative media streams and/or to
                   17724: embed accessibility aids (such as transcriptions) into their media
                   17725: streams.</p>
                   17726: <p>The <code><a href="#audio1">audio</a></code> element is a
                   17727: <a href="#media7">media element</a> whose <a href="#media9">media
                   17728: data</a> is ostensibly audio data.</p>
                   17729: <p>The <code title="attr-media-src"><a href="#src7">src</a></code>
                   17730: , <code title="attr-media-autoplay"><a href=
                   17731: "#autoplay">autoplay</a></code> , <code title=
                   17732: "attr-media-start"><a href="#start2">start</a></code> ,
                   17733: <code title="attr-media-loopstart"><a href=
                   17734: "#loopstart">loopstart</a></code> , <code title=
                   17735: "attr-media-loopend"><a href="#loopend">loopend</a></code> ,
                   17736: <code title="attr-media-end"><a href="#end">end</a></code> ,
                   17737: <code title="attr-media-playcount"><a href=
                   17738: "#playcount">playcount</a></code> , and <code title=
                   17739: "attr-media-controls"><a href="#controls">controls</a></code>
                   17740: attributes are <a href="#media8" title=
                   17741: "media element attributes">the attributes common to all media
                   17742: elements</a> .</p>
                   17743: <p>When an <code><a href="#audio1">audio</a></code> element is
                   17744: <a href="#actively">actively playing</a> , it must have its audio
                   17745: data played <del class="diff-old">synchronised</del> <ins class=
                   17746: "diff-chg">synchronized</ins> with the <a href="#current0">current
                   17747: playback position</a> , at the specified <a href="#volume" title=
                   17748: "dom-media-volume">volume</a> with the specified <a href="#muted"
                   17749: title="dom-media-muted">mute state</a> .</p>
                   17750: <p>When an <code><a href="#audio1">audio</a></code> element is not
                   17751: <a href="#actively">actively playing</a> , audio must not play for
                   17752: the element.</p>
                   17753: <h5 id="audio0"><span class="secno"><del class=
                   17754: "diff-old">3.14.8.1.</del> <ins class=
                   17755: "diff-chg">3.12.8.1.</ins></span> Audio codecs for <code><a href=
                   17756: "#audio1">audio</a></code> elements</h5>
                   17757: <p>User agents may support any audio codecs and container
                   17758: formats.</p>
                   17759: <p>User agents must support the WAVE container format with audio
                   17760: encoded using the PCM format.</p>
                   17761: <h4 id="the-source"><span class="secno"><ins class=
                   17762: "diff-new">3.12.9</ins></span> <ins class="diff-new">The</ins>
                   17763: <dfn id="source"><code><ins class=
                   17764: "diff-new">source</ins></code></dfn> <ins class=
                   17765: "diff-new">element</ins></h4>
                   17766: <dl class="element">
                   17767: <dt><ins class="diff-new">Categories</ins></dt>
                   17768: <dd><ins class="diff-new">None.</ins></dd>
                   17769: <dt><ins class="diff-new">Contexts in which this element may be
                   17770: used:</ins></dt>
                   17771: <dd><ins class="diff-new">As a child of a</ins> <a href=
                   17772: "#media7"><ins class="diff-new">media element</ins></a>
                   17773: ,<ins class="diff-new">before any</ins> <a href=
                   17774: "#flow-content0"><ins class="diff-new">flow content</ins></a>
                   17775: .</dd>
                   17776: <dt><ins class="diff-new">Content model:</ins></dt>
                   17777: <dd><ins class="diff-new">Empty.</ins></dd>
                   17778: <dt><ins class="diff-new">Element-specific attributes:</ins></dt>
                   17779: <dd><code title="attr-source-src"><a href="#src5"><ins class=
                   17780: "diff-new">src</ins></a></code></dd>
                   17781: <dd><code title="attr-source-type"><a href="#type8"><ins class=
                   17782: "diff-new">type</ins></a></code></dd>
                   17783: <dd><code title="attr-source-media"><a href="#media5"><ins class=
                   17784: "diff-new">media</ins></a></code></dd>
                   17785: <dd><code title="attr-source-pixelratio"><a href=
                   17786: "#pixelratio"><ins class=
                   17787: "diff-new">pixelratio</ins></a></code></dd>
                   17788: <dt><ins class="diff-new">DOM interface:</ins></dt>
                   17789: <dd>
                   17790: <pre ins="" class="diff-new">
                   17791:      class=idl&gt;interface <dfn id=
                   17792: "htmlsourceelement">HTMLSourceElement</dfn> : <a href=
                   17793: "#htmlelement">HTMLElement</a> {
                   17794:            attribute DOMString <a href="#src6" title=
                   17795: "dom-source-src">src</a>;
                   17796:            attribute DOMString <a href="#type9" title=
                   17797: "dom-source-type">type</a>;
                   17798:            attribute DOMString <a href="#media6" title=
                   17799: "dom-source-media">media</a>;
                   17800:            attribute float <a href="#pixelratio0" title=
                   17801: "dom-source-pixelRatio">pixelRatio</a>;
                   17802: };
                   17803: </pre></dd>
                   17804: </dl>
                   17805: <p><ins class="diff-new">The</ins> <code><a href=
                   17806: "#source"><ins class="diff-new">source</ins></a></code> <ins class=
                   17807: "diff-new">element allows authors to specify multiple</ins>
                   17808: <a href="#media10" title="media resource"><ins class=
                   17809: "diff-new">media resources</ins></a> <ins class=
                   17810: "diff-new">for</ins> <a href="#media7" title=
                   17811: "media element"><ins class="diff-new">media elements</ins></a>
                   17812: .</p>
                   17813: <p><ins class="diff-new">The</ins> <dfn id="src5" title=
                   17814: "attr-source-src"><code><ins class=
                   17815: "diff-new">src</ins></code></dfn> <ins class="diff-new">attribute
                   17816: gives the address of the</ins> <a href="#media10"><ins class=
                   17817: "diff-new">media resource</ins></a> .<ins class="diff-new">The
                   17818: value must be a URI (or IRI). This attribute must be
                   17819: present.</ins></p>
                   17820: <p><ins class="diff-new">The</ins> <dfn id="type8" title=
                   17821: "attr-source-type"><code><ins class=
                   17822: "diff-new">type</ins></code></dfn> <ins class="diff-new">attribute
                   17823: gives the type of the</ins> <a href="#media10"><ins class=
                   17824: "diff-new">media resource</ins></a> ,<ins class="diff-new">to help
                   17825: the user agent determine if it can play this</ins> <a href=
                   17826: "#media10"><ins class="diff-new">media resource</ins></a>
                   17827: <ins class="diff-new">before downloading it. Its value must be a
                   17828: MIME type. The</ins> <code title=""><ins class=
                   17829: "diff-new">codecs</ins></code> <ins class="diff-new">parameter may
                   17830: be specified and might be necessary to specify exactly how the
                   17831: resource is encoded.</ins> <a href="#references"><ins class=
                   17832: "diff-new">[RFC2046]</ins></a> <a href="#references"><ins class=
                   17833: "diff-new">[RFC4281]</ins></a></p>
                   17834: <div class="example">
                   17835: <p><ins class="diff-new">The following list shows some examples of
                   17836: how to use the</ins> <code title=""><ins class=
                   17837: "diff-new">codecs=</ins></code> <ins class="diff-new">MIME
                   17838: parameter in the</ins> <code title="attr-source-type"><a href=
                   17839: "#type8"><ins class="diff-new">type</ins></a></code> <ins class=
                   17840: "diff-new">attribute.</ins></p>
                   17841: <dl>
                   17842: <dt><ins class="diff-new">H.264 Simple baseline profile video (main
                   17843: and extended video compatible) level 3 and Low-Complexity AAC audio
                   17844: in MP4 container</ins></dt>
                   17845: <dd>
                   17846: <pre>
                   17847: <ins class="diff-new">
                   17848: &lt;source
                   17849: src="video.mp4"
                   17850: type="video/mp4;
                   17851: codecs=&amp;quot;avc1.42E01E,
                   17852: mp4a.40.2&amp;quot;"&gt;
                   17853: </ins>
                   17854: </pre></dd>
                   17855: <dt><ins class="diff-new">H.264 Extended profile video
                   17856: (baseline-compatible) level 3 and Low-Complexity AAC audio in MP4
                   17857: container</ins></dt>
                   17858: <dd>
                   17859: <pre>
                   17860: <ins class="diff-new">
                   17861: &lt;source
                   17862: src="video.mp4"
                   17863: type="video/mp4;
                   17864: codecs=&amp;quot;avc1.58A01E,
                   17865: mp4a.40.2&amp;quot;"&gt;
                   17866: </ins>
                   17867: </pre></dd>
                   17868: <dt><ins class="diff-new">H.264 Main profile video level 3 and
                   17869: Low-Complexity AAC audio in MP4 container</ins></dt>
                   17870: <dd>
                   17871: <pre>
                   17872: <ins class="diff-new">
                   17873: &lt;source
                   17874: src="video.mp4"
                   17875: type="video/mp4;
                   17876: codecs=&amp;quot;avc1.4D401E,
                   17877: mp4a.40.2&amp;quot;"&gt;
                   17878: </ins>
                   17879: </pre></dd>
                   17880: <dt><ins class="diff-new">H.264 "High" profile video (incompatible
                   17881: with main, baseline, or extended profiles) level 3 and
                   17882: Low-Complexity AAC audio in MP4 container</ins></dt>
                   17883: <dd>
                   17884: <pre>
                   17885: <ins class="diff-new">
                   17886: &lt;source
                   17887: src="video.mp4"
                   17888: type="video/mp4;
                   17889: codecs=&amp;quot;avc1.64001E,
                   17890: mp4a.40.2&amp;quot;"&gt;
                   17891: </ins>
                   17892: </pre></dd>
                   17893: <dt><ins class="diff-new">MPEG-4 Visual Simple Profile Level 0
                   17894: video and Low-Complexity AAC audio in MP4 container</ins></dt>
                   17895: <dd>
                   17896: <pre>
                   17897: <ins class="diff-new">
                   17898: &lt;source
                   17899: src="video.mp4"
                   17900: type="video/mp4;
                   17901: codecs=&amp;quot;mp4v.20.8,
                   17902: mp4a.40.2&amp;quot;"&gt;
                   17903: </ins>
                   17904: </pre></dd>
                   17905: <dt><ins class="diff-new">MPEG-4 Advanced Simple Profile Level 0
                   17906: video and Low-Complexity AAC audio in MP4 container</ins></dt>
                   17907: <dd>
                   17908: <pre>
                   17909: <ins class="diff-new">
                   17910: &lt;source
                   17911: src="video.mp4"
                   17912: type="video/mp4;
                   17913: codecs=&amp;quot;mp4v.20.240,
                   17914: mp4a.40.2&amp;quot;"&gt;
                   17915: </ins>
                   17916: </pre></dd>
                   17917: <dt><ins class="diff-new">MPEG-4 Visual Simple Profile Level 0
                   17918: video and AMR audio in 3GPP container</ins></dt>
                   17919: <dd>
                   17920: <pre>
                   17921: <ins class="diff-new">
                   17922: &lt;source
                   17923: src="video.3gp"
                   17924: type="video/3gpp;
                   17925: codecs=&amp;quot;mp4v.20.8,
                   17926: samr&amp;quot;"&gt;
                   17927: </ins>
                   17928: </pre></dd>
                   17929: <dt><ins class="diff-new">Theora video and Vorbis audio in Ogg
                   17930: container</ins></dt>
                   17931: <dd>
                   17932: <pre>
                   17933: <ins class="diff-new">
                   17934: &lt;source
                   17935: src="video.ogv"
                   17936: type="video/ogg;
                   17937: codecs=&amp;quot;theora,
                   17938: vorbis&amp;quot;"&gt;
                   17939: </ins>
                   17940: </pre></dd>
                   17941: <dt><ins class="diff-new">Theora video and Speex audio in Ogg
                   17942: container</ins></dt>
                   17943: <dd>
                   17944: <pre>
                   17945: <ins class="diff-new">
                   17946: &lt;source
                   17947: src="video.ogv"
                   17948: type="video/ogg;
                   17949: codecs=&amp;quot;theora,
                   17950: speex&amp;quot;"&gt;
                   17951: </ins>
                   17952: </pre></dd>
                   17953: <dt><ins class="diff-new">Vorbis audio alone in Ogg
                   17954: container</ins></dt>
                   17955: <dd>
                   17956: <pre>
                   17957: <ins class="diff-new">
                   17958: &lt;source
                   17959: src="audio.ogg"
                   17960: type="audio/ogg;
                   17961: codecs=vorbis"&gt;
                   17962: </ins>
                   17963: </pre></dd>
                   17964: <dt><ins class="diff-new">Speex audio alone in Ogg
                   17965: container</ins></dt>
                   17966: <dd>
                   17967: <pre>
                   17968: <ins class="diff-new">
                   17969: &lt;source
                   17970: src="audio.spx"
                   17971: type="audio/ogg;
                   17972: codecs=speex"&gt;
                   17973: </ins>
                   17974: </pre></dd>
                   17975: <dt><ins class="diff-new">FLAC audio alone in Ogg
                   17976: container</ins></dt>
                   17977: <dd>
                   17978: <pre>
                   17979: <ins class="diff-new">
                   17980: &lt;source
                   17981: src="audio.oga"
                   17982: type="audio/ogg;
                   17983: codecs=flac"&gt;
                   17984: </ins>
                   17985: </pre></dd>
                   17986: <dt><ins class="diff-new">Dirac video and Vorbis audio in Ogg
                   17987: container</ins></dt>
                   17988: <dd>
                   17989: <pre>
                   17990: <ins class="diff-new">
                   17991: &lt;source
                   17992: src="video.ogv"
                   17993: type="video/ogg;
                   17994: codecs=&amp;quot;dirac,
                   17995: vorbis&amp;quot;"&gt;
                   17996: </ins>
                   17997: </pre></dd>
                   17998: <dt><ins class="diff-new">Theora video and Vorbis audio in Matroska
                   17999: container</ins></dt>
                   18000: <dd>
                   18001: <pre>
                   18002: <ins class="diff-new">
                   18003: &lt;source
                   18004: src="video.mkv"
                   18005: type="video/x-matroska;
                   18006: codecs=&amp;quot;theora,
                   18007: vorbis&amp;quot;"&gt;
                   18008: </ins>
                   18009: </pre></dd>
                   18010: </dl>
                   18011: </div>
                   18012: <p><ins class="diff-new">The</ins> <dfn id="media5" title=
                   18013: "attr-source-media"><code><ins class=
                   18014: "diff-new">media</ins></code></dfn> <ins class="diff-new">attribute
                   18015: gives the intended media type of the</ins> <a href=
                   18016: "#media10"><ins class="diff-new">media resource</ins></a>
                   18017: ,<ins class="diff-new">to help the user agent determine if
                   18018: this</ins> <a href="#media10"><ins class="diff-new">media
                   18019: resource</ins></a> <ins class="diff-new">is useful to the user
                   18020: before downloading it. Its value must be a valid</ins> <a href=
                   18021: "#mq"><ins class="diff-new">media query</ins></a> .<a href=
                   18022: "#references"><ins class="diff-new">[MQ]</ins></a></p>
                   18023: <p><ins class="diff-new">Either the</ins> <code title=
                   18024: "attr-source-type"><a href="#type8"><ins class=
                   18025: "diff-new">type</ins></a></code> <ins class="diff-new">attribute,
                   18026: the</ins> <code title="attr-source-media"><a href=
                   18027: "#media5"><ins class="diff-new">media</ins></a></code> <ins class=
                   18028: "diff-new">attribute or both, must be specified, unless this is the
                   18029: last</ins> <code><a href="#source"><ins class=
                   18030: "diff-new">source</ins></a></code> <ins class="diff-new">element
                   18031: child of the parent element.</ins></p>
                   18032: <p><ins class="diff-new">The</ins> <dfn id="pixelratio" title=
                   18033: "attr-source-pixelratio"><code><ins class=
                   18034: "diff-new">pixelratio</ins></code></dfn> <ins class=
                   18035: "diff-new">attribute allows the author to specify the pixel ratio
                   18036: of anamorphic</ins> <a href="#media10" title=
                   18037: "media resource"><ins class="diff-new">media resources</ins></a>
                   18038: <ins class="diff-new">that do not self-describe their pixel ratio.
                   18039: The attribute value, if specified, must be a</ins> <a href=
                   18040: "#valid1"><ins class="diff-new">valid floating point
                   18041: number</ins></a> <ins class="diff-new">giving the ratio of the
                   18042: correct rendered width of each pixel to the actual width of each
                   18043: pixel in the image (i.e., the multiple by which the video's
                   18044: intrinsic width is to be multiplied to obtain the rendered width
                   18045: that gives the correct aspect ratio). The default value, if the
                   18046: attribute is omitted or cannot be parsed, is 1.0.</ins></p>
                   18047: <p><ins class="diff-new">If a</ins> <code><a href=
                   18048: "#source"><ins class="diff-new">source</ins></a></code> <ins class=
                   18049: "diff-new">element is inserted into a</ins> <a href=
                   18050: "#media7"><ins class="diff-new">media element</ins></a> <ins class=
                   18051: "diff-new">that is already in a document and whose</ins>
                   18052: <code title="dom-media-networkState"><a href=
                   18053: "#networkstate"><ins class="diff-new">networkState</ins></a></code>
                   18054: <ins class="diff-new">is in the</ins> <code title=
                   18055: "dom-media-EMPTY"><a href="#empty"><ins class=
                   18056: "diff-new">EMPTY</ins></a></code> <ins class="diff-new">state, the
                   18057: user agent must implicitly invoke the</ins> <code title=
                   18058: "dom-media-load"><a href="#load"><ins class=
                   18059: "diff-new">load()</ins></a></code> <ins class="diff-new">method on
                   18060: the</ins> <a href="#media7"><ins class="diff-new">media
                   18061: element</ins></a> <ins class="diff-new">as soon as all other
                   18062: scripts have finished executing. Any exceptions raised must be
                   18063: ignored.</ins></p>
                   18064: <p><ins class="diff-new">The DOM attributes</ins> <dfn id="src6"
                   18065: title="dom-source-src"><code><ins class=
                   18066: "diff-new">src</ins></code></dfn> ,<dfn id="type9" title=
                   18067: "dom-source-type"><code><ins class=
                   18068: "diff-new">type</ins></code></dfn> ,<ins class="diff-new">and</ins>
                   18069: <dfn id="media6" title="dom-source-media"><code><ins class=
                   18070: "diff-new">media</ins></code></dfn> <ins class=
                   18071: "diff-new">must</ins> <a href="#reflect"><ins class=
                   18072: "diff-new">reflect</ins></a> <ins class="diff-new">the respective
                   18073: content attributes of the same name.</ins></p>
                   18074: <p><ins class="diff-new">The DOM attribute</ins> <dfn id=
                   18075: "pixelratio0" title="dom-source-pixelRatio"><code><ins class=
                   18076: "diff-new">pixelRatio</ins></code></dfn> <ins class=
                   18077: "diff-new">must</ins> <a href="#reflect"><ins class=
                   18078: "diff-new">reflect</ins></a> <ins class="diff-new">the</ins>
                   18079: <code title="attr-source-pixelratio"><a href=
                   18080: "#pixelratio"><ins class="diff-new">pixelratio</ins></a></code>
                   18081: <ins class="diff-new">content attribute.</ins></p>
                   18082: <h4 id="media"><span class="secno"><del class=
                   18083: "diff-old">3.14.9.</del> <ins class="diff-chg">3.12.10</ins></span>
                   18084: Media elements</h4>
                   18085: <p><dfn id="media7" title="media element">Media elements</dfn>
                   18086: implement the following interface:</p>
                   18087: <pre class="idl">
                   18088: interface <dfn id=
                   18089: "htmlmediaelement">HTMLMediaElement</dfn> : <a href=
                   18090: "#htmlelement">HTMLElement</a> {
                   18091:   // error state
                   18092:   readonly attribute <a href="#mediaerror">MediaError</a> <a href=
                   18093: "#error0" title="dom-media-error">error</a>;
                   18094:   // network state
                   18095: <del class="diff-old">           attribute DOMString ;
                   18096: </del>
                   18097: <ins class="diff-chg">           attribute DOMString <a href=
                   18098: "#src8" title="dom-media-src">src</a>;
                   18099: </ins>
                   18100:   readonly attribute DOMString <a href="#currentsrc" title=
                   18101: "dom-media-currentSrc">currentSrc</a>;
                   18102:   const unsigned short <a href="#empty" title=
                   18103: "dom-media-EMPTY">EMPTY</a> = 0;
                   18104:   const unsigned short <a href="#loading0" title=
                   18105: "dom-media-LOADING">LOADING</a> = 1;
                   18106:   const unsigned short <a href="#loadedmetadata" title=
                   18107: "dom-media-LOADED_METADATA">LOADED_METADATA</a> = 2;
                   18108:   const unsigned short <a href="#loadedfirstframe" title=
                   18109: "dom-media-LOADED_FIRST_FRAME">LOADED_FIRST_FRAME</a> = 3;
                   18110:   const unsigned short <a href="#loaded" title=
                   18111: "dom-media-LOADED">LOADED</a> = 4;
                   18112:   readonly attribute unsigned short <a href="#networkstate" title=
                   18113: "dom-media-networkState">networkState</a>;
                   18114:   readonly attribute float <a href="#bufferingrate" title=
                   18115: "dom-media-bufferingRate">bufferingRate</a>;
                   18116: <ins class="diff-new">  readonly attribute boolean <a href=
                   18117: "#bufferingthrottled" title=
                   18118: "dom-media-bufferingThrottled">bufferingThrottled</a>;
                   18119: </ins>
                   18120:   readonly attribute <a href="#timeranges">TimeRanges</a> <a href=
                   18121: "#buffered" title="dom-media-buffered">buffered</a>;
                   18122: <ins class="diff-new">  readonly attribute <a href=
                   18123: "#byteranges">ByteRanges</a> <a href="#bufferedbytes" title=
                   18124: "dom-media-bufferedBytes">bufferedBytes</a>;
                   18125:   readonly attribute unsigned long <a href="#totalbytes" title=
                   18126: "dom-media-totalBytes">totalBytes</a>;
                   18127: </ins>
                   18128:   void <a href="#load" title="dom-media-load">load</a>();
                   18129:   // ready state
                   18130:   const unsigned short <a href="#dataunavailable" title=
                   18131: "dom-media-DATA_UNAVAILABLE">DATA_UNAVAILABLE</a> = 0;
                   18132:   const unsigned short <a href="#canshowcurrentframe" title=
                   18133: "dom-media-CAN_SHOW_CURRENT_FRAME">CAN_SHOW_CURRENT_FRAME</a> = 1;
                   18134:   const unsigned short <a href="#canplay" title=
                   18135: "dom-media-CAN_PLAY">CAN_PLAY</a> = 2;
                   18136:   const unsigned short <a href="#canplaythrough" title=
                   18137: "dom-media-CAN_PLAY_THROUGH">CAN_PLAY_THROUGH</a> = 3;
                   18138: <del class="diff-old">  readonly attribute unsigned short ;
                   18139: </del>
                   18140: <ins class="diff-chg">  readonly attribute unsigned short <a href=
                   18141: "#readystate0" title="dom-media-readyState">readyState</a>;
                   18142: </ins>
                   18143:   readonly attribute boolean <a href="#seeking0" title=
                   18144: "dom-media-seeking">seeking</a>;
                   18145:   // playback state
                   18146:            attribute float <a href="#currenttime" title=
                   18147: "dom-media-currentTime">currentTime</a>;
                   18148:   readonly attribute float <a href="#duration" title=
                   18149: "dom-media-duration">duration</a>;
                   18150:   readonly attribute boolean <a href="#paused" title=
                   18151: "dom-media-paused">paused</a>;
                   18152:            attribute float <a href="#defaultplaybackrate" title=
                   18153: "dom-media-defaultPlaybackRate">defaultPlaybackRate</a>;
                   18154:            attribute float <a href="#playbackrate" title=
                   18155: "dom-media-playbackRate">playbackRate</a>;
                   18156:   readonly attribute <a href="#timeranges">TimeRanges</a> <a href=
                   18157: "#played" title="dom-media-played">played</a>;
                   18158:   readonly attribute <a href="#timeranges">TimeRanges</a> <a href=
                   18159: "#seekable" title="dom-media-seekable">seekable</a>;
                   18160:   readonly attribute boolean <a href="#ended0" title=
                   18161: "dom-media-ended">ended</a>;
                   18162:            attribute boolean <a href="#autoplay0" title=
                   18163: "dom-media-autoplay">autoplay</a>;
                   18164:   void <a href="#play" title="dom-media-play">play</a>();
                   18165:   void <a href="#pause0" title="dom-media-pause">pause</a>();
                   18166:   // looping
                   18167:            attribute float <a href="#start3" title=
                   18168: "dom-media-start">start</a>;
                   18169:            attribute float <a href="#end0" title=
                   18170: "dom-media-end">end</a>;
                   18171:            attribute float <a href="#loopstart0" title=
                   18172: "dom-media-loopStart">loopStart</a>;
                   18173:            attribute float <a href="#loopend0" title=
                   18174: "dom-media-loopEnd">loopEnd</a>;
                   18175:            attribute unsigned long <a href="#playcount0" title=
                   18176: "dom-media-playCount">playCount</a>;
                   18177:            attribute unsigned long <a href="#currentloop" title=
                   18178: "dom-media-currentLoop">currentLoop</a>;
                   18179:   // cue ranges
                   18180:   void <a href="#addcuerange" title=
                   18181: "dom-media-addCueRange">addCueRange</a>(in DOMString className, in float start, in float end, in boolean pauseOnExit, in <a href="#voidcallback">VoidCallback</a> enterCallback, in <a href="#voidcallback">VoidCallback</a> exitCallback);
                   18182:   void <span title=
                   18183: "dom-media-removeCueRange">removeCueRanges</span>(in DOMString className);
                   18184:   // controls
                   18185:            attribute boolean <a href="#controls0" title=
                   18186: "dom-media-controls">controls</a>;
                   18187:            attribute float <a href="#volume" title=
                   18188: "dom-media-volume">volume</a>;
                   18189:            attribute boolean <a href="#muted" title=
                   18190: "dom-media-muted">muted</a>;
                   18191: };
                   18192: </pre>
                   18193: <p>The <dfn id="media8">media element attributes</dfn> ,
                   18194: <code title="attr-media-src"><a href="#src7">src</a></code> ,
                   18195: <code title="attr-media-autoplay"><a href=
                   18196: "#autoplay">autoplay</a></code> , <code title=
                   18197: "attr-media-start"><a href="#start2">start</a></code> ,
                   18198: <code title="attr-media-loopstart"><a href=
                   18199: "#loopstart">loopstart</a></code> , <code title=
                   18200: "attr-media-loopend"><a href="#loopend">loopend</a></code> ,
                   18201: <code title="attr-media-end"><a href="#end">end</a></code> ,
                   18202: <code title="attr-media-playcount"><a href=
                   18203: "#playcount">playcount</a></code> , and <code title=
                   18204: "attr-media-controls"><a href="#controls">controls</a></code> ,
                   18205: apply to all <a href="#media7" title="media element">media
                   18206: elements</a> . They are defined in this section.</p>
                   18207: <p><a href="#media7" title="media element">Media elements</a> are
                   18208: used to present audio data, or video and audio data, to the user.
                   18209: This is referred to as <dfn id="media9">media data</dfn> in this
                   18210: section, since this section applies equally to <a href="#media7"
                   18211: title="media element">media elements</a> for audio or for video.
                   18212: The term <dfn id="media10">media resource</dfn> is used to refer to
                   18213: the complete set of media data, e.g. the complete video file, or
                   18214: complete audio file.</p>
                   18215: <h5 id="error"><span class="secno"><del class=
                   18216: "diff-old">3.14.9.1.</del> <ins class=
                   18217: "diff-chg">3.12.10.1.</ins></span> Error codes</h5>
                   18218: <p>All <a href="#media7" title="media element">media elements</a>
                   18219: have an associated error status, which records the last error the
                   18220: element encountered since the <code title="dom-media-load"><a href=
                   18221: "#load">load()</a></code> method was last invoked. The <dfn id=
                   18222: "error0" title="dom-media-error"><code>error</code></dfn>
                   18223: attribute, on getting, must return the <code><a href=
                   18224: "#mediaerror">MediaError</a></code> object created for this last
                   18225: error, or null if there has not been an error.</p>
                   18226: <pre class="idl">
                   18227: interface <dfn id="mediaerror">MediaError</dfn> {
                   18228:   const unsigned short <a href="#mediaerraborted" title=
                   18229: "dom-MediaError-MEDIA_ERR_ABORTED">MEDIA_ERR_ABORTED</a> = 1;
                   18230:   const unsigned short <a href="#mediaerrnetwork" title=
                   18231: "dom-MediaError-MEDIA_ERR_NETWORK">MEDIA_ERR_NETWORK</a> = 2;
                   18232:   const unsigned short <a href="#mediaerrdecode" title=
                   18233: "dom-MediaError-MEDIA_ERR_DECODE">MEDIA_ERR_DECODE</a> = 3;
                   18234:   readonly attribute unsigned short <a href="#code0" title=
                   18235: "dom-MediaError-code">code</a>;
                   18236: };
                   18237: </pre>
                   18238: <p>The <dfn id="code0" title=
                   18239: "dom-MediaError-code"><code>code</code></dfn> attribute of a
                   18240: <code><a href="#mediaerror">MediaError</a></code> object must
                   18241: return the code for the error, which must be one of the
                   18242: following:</p>
                   18243: <dl>
                   18244: <dt><dfn id="mediaerraborted" title=
                   18245: "dom-MediaError-MEDIA_ERR_ABORTED"><code>MEDIA_ERR_ABORTED</code></dfn>
                   18246: (numeric value 1)</dt>
                   18247: <dd>The download of the <a href="#media10">media resource</a> was
                   18248: aborted by the user agent at the user's request.</dd>
                   18249: <dt><dfn id="mediaerrnetwork" title=
                   18250: "dom-MediaError-MEDIA_ERR_NETWORK"><code>MEDIA_ERR_NETWORK</code></dfn>
                   18251: (numeric value 2)</dt>
                   18252: <dd>A network error of some description caused the user agent to
                   18253: stop downloading the <a href="#media10">media resource</a> .</dd>
                   18254: <dt><dfn id="mediaerrdecode" title=
                   18255: "dom-MediaError-MEDIA_ERR_DECODE"><code>MEDIA_ERR_DECODE</code></dfn>
                   18256: (numeric value 3)</dt>
                   18257: <dd>An error of some description occurred while decoding the
                   18258: <a href="#media10">media resource</a> .</dd>
                   18259: </dl>
                   18260: <h5 id="location"><span class="secno"><del class=
                   18261: "diff-old">3.14.9.2.</del> <ins class=
                   18262: "diff-chg">3.12.10.2.</ins></span> Location of the media
                   18263: resource</h5>
                   18264: <p>The <dfn id="src7" title="attr-media-src"><code>src</code></dfn>
                   18265: content attribute on <a href="#media7" title="media element">media
                   18266: elements</a> gives the address of the media resource (video, audio)
                   18267: to show. The attribute, if present, must contain a URI (or
                   18268: IRI).</p>
                   18269: <p>If the <code title="attr-media-src"><a href=
                   18270: "#src7">src</a></code> attribute of a <a href="#media7">media
                   18271: element</a> that is already in a document and whose <code title=
                   18272: "dom-media-networkState"><a href=
                   18273: "#networkstate">networkState</a></code> is in the <code title=
                   18274: "dom-media-EMPTY"><a href="#empty">EMPTY</a></code> state is added,
                   18275: changed, or removed, the user agent must implicitly invoke the
                   18276: <code title="dom-media-load"><a href="#load">load()</a></code>
                   18277: method on the <a href="#media7">media element</a> as soon as all
                   18278: other scripts have finished executing. Any exceptions raised must
                   18279: be ignored.</p>
                   18280: <p class="note">If a <code title="attr-media-src"><a href=
                   18281: "#src7">src</a></code> attribute is specified, the resource it
                   18282: specifies is the <a href="#media10">media resource</a> that will be
                   18283: used. Otherwise, the resource specified by the first suitable
                   18284: <code><a href="#source">source</a></code> element child of the
                   18285: <a href="#media7">media element</a> is the one used.</p>
                   18286: <p>The <dfn id="src8" title="dom-media-src"><code>src</code></dfn>
                   18287: DOM attribute on <a href="#media7" title="media element">media
                   18288: elements</a> must <a href="#reflect">reflect</a> the content
                   18289: attribute of the same name.</p>
                   18290: <p>To <dfn id="pick-a">pick a media resource</dfn> for a <a href=
                   18291: "#media7">media element</a> , a user agent must use the following
                   18292: steps:</p>
                   18293: <ol>
                   18294: <li>
                   18295: <p><ins class="diff-new">Let the</ins> <var title=""><ins class=
                   18296: "diff-new">chosen resource's pixel ratio</ins></var> <ins class=
                   18297: "diff-new">be 1.0.</ins></p>
                   18298: </li>
                   18299: <li>
                   18300: <p>If the <a href="#media7">media element</a> has a <code title=
                   18301: "attr-media-src"><a href="#src7">src</a></code> , then the address
                   18302: given in that attribute is the address of the <a href=
                   18303: "#media10">media resource</a> ; jump to the last step.</p>
                   18304: </li>
                   18305: <li>
                   18306: <p>Otherwise, let <var title="">candidate</var> be the first
                   18307: <code><a href="#source">source</a></code> element child in the
                   18308: <a href="#media7">media element</a> , or null if there is no such
                   18309: child.</p>
                   18310: </li>
                   18311: <li>
                   18312: <p><i><ins class="diff-new">Loop</ins></i> :<ins class=
                   18313: "diff-new">this is the start of the loop that looks at the</ins>
                   18314: <code><a href="#source"><ins class=
                   18315: "diff-new">source</ins></a></code> <ins class=
                   18316: "diff-new">elements.</ins></p>
                   18317: </li>
                   18318: <li>
                   18319: <p><ins class="diff-new">If</ins> <var title=""><ins class=
                   18320: "diff-new">candidate</ins></var> <ins class="diff-new">is not null
                   18321: and it has a</ins> <code title="attr-source-pixelratio"><a href=
                   18322: "#pixelratio"><ins class="diff-new">pixelratio</ins></a></code>
                   18323: <ins class="diff-new">attribute, then let the</ins> <var title=
                   18324: ""><ins class="diff-new">chosen resource's pixel ratio</ins></var>
                   18325: <ins class="diff-new">be result of applying the</ins> <a href=
                   18326: "#rules1"><ins class="diff-new">rules for parsing floating point
                   18327: number values</ins></a> <ins class="diff-new">to the value of that
                   18328: attribute, or 1.0 if those rules return an error.</ins></p>
                   18329: </li>
                   18330: <li>
                   18331: <p>If either:</p>
                   18332: <ul>
                   18333: <li><var title="">candidate</var> is null, or</li>
                   18334: <li>the <var title="">candidate</var> element has no <code title=
                   18335: "attr-source-src"><a href="#src5">src</a></code> attribute, or</li>
                   18336: <li>the <var title="">candidate</var> element has a <code title=
                   18337: "attr-source-type"><a href="#type8">type</a></code> attribute and
                   18338: that attribute's value, when parsed as a MIME type, does not
                   18339: represent a type that the user agent can render (including any
                   18340: codecs described by the <code title="">codec</code> parameter), or
                   18341: <a href="#references">[RFC2046]</a> <a href=
                   18342: "#references">[RFC4281]</a></li>
                   18343: <li>the <var title="">candidate</var> element has a <code title=
                   18344: "attr-source-media"><a href="#media5">media</a></code> attribute
                   18345: and that attribute's value, when processed according to the rules
                   18346: for <a href="#mq">media <del class="diff-old">queries,</del>
                   18347: <ins class="diff-chg">queries</ins></a> , does not match the
                   18348: current environment, <a href="#references">[MQ]</a></li>
                   18349: </ul>
                   18350: <p>...then the <var title="">candidate</var> is not suitable; go to
                   18351: the next step.</p>
                   18352: <p>Otherwise, the address given in that <var title=
                   18353: "">candidate</var> element's <code title="attr-source-src"><a href=
                   18354: "#src5">src</a></code> attribute is the address of the <a href=
                   18355: "#media10">media resource</a> ; jump to the last step.</p>
                   18356: </li>
                   18357: <li>
                   18358: <p>Let <var title="">candidate</var> be the next <code><a href=
                   18359: "#source">source</a></code> element child in the <a href=
                   18360: "#media7">media element</a> , or null if there are no more such
                   18361: children.</p>
                   18362: </li>
                   18363: <li>
                   18364: <p>If <var title="">candidate</var> is not null, return to
                   18365: <ins class="diff-new">the</ins> step <del class="diff-old">3.</del>
                   18366: <ins class="diff-chg">labeled</ins> <i><ins class=
                   18367: "diff-chg">loop</ins></i> .</p>
                   18368: </li>
                   18369: <li>
                   18370: <p>There is no <a href="#media10">media resource</a> . Abort these
                   18371: steps.</p>
                   18372: </li>
                   18373: <li>
                   18374: <p>Let the address of the <dfn id="chosen">chosen media
                   18375: resource</dfn> be the one that was found before jumping to this
                   18376: <del class="diff-old">step. A source element with no src attribute
                   18377: is assumed to</del> <ins class="diff-chg">step, and let its</ins>
                   18378: <dfn id="pixel0"><ins class="diff-chg">pixel ratio</ins></dfn> be
                   18379: the <del class="diff-old">last source element — any source elements
                   18380: after it are ignored (and are invalid).</del> <ins class=
                   18381: "diff-chg">value of the</ins> <var title=""><ins class=
                   18382: "diff-chg">chosen resource's pixel ratio</ins></var> .</p>
                   18383: </li>
                   18384: </ol>
                   18385: <p>The <dfn id="currentsrc" title=
                   18386: "dom-media-currentSrc"><code>currentSrc</code></dfn> DOM attribute
                   18387: must return the empty string if the <a href="#media7">media
                   18388: element</a> 's <code title="dom-media-networkState"><a href=
                   18389: "#networkstate">networkState</a></code> has the value <a href=
                   18390: "#empty" title="dom-media-EMPTY">EMPTY</a> , and the absolute URL
                   18391: of the <a href="#chosen">chosen media resource</a> otherwise.</p>
                   18392: <h5 id="network0"><span class="secno"><del class=
                   18393: "diff-old">3.14.9.3.</del> <ins class=
                   18394: "diff-chg">3.12.10.3.</ins></span> Network states</h5>
                   18395: <p>As <a href="#media7" title="media element">media elements</a>
                   18396: interact with the network, they go through several states. The
                   18397: <dfn id="networkstate" title=
                   18398: "dom-media-networkState"><code>networkState</code></dfn> attribute,
                   18399: on getting, must return the current network state of the element,
                   18400: which must be one of the following values:</p>
                   18401: <dl>
                   18402: <dt><dfn id="empty" title=
                   18403: "dom-media-EMPTY"><code>EMPTY</code></dfn> (numeric value 0)</dt>
                   18404: <dd>The element has not yet been <del class=
                   18405: "diff-old">initialised.</del> <ins class=
                   18406: "diff-chg">initialized.</ins> All attributes are in their initial
                   18407: states.</dd>
                   18408: <dt><dfn id="loading0" title=
                   18409: "dom-media-LOADING"><code>LOADING</code></dfn> (numeric value
                   18410: 1)</dt>
                   18411: <dd>The element has <a href="#pick-a" title=
                   18412: "pick a media resource">picked a media resource</a> (the <a href=
                   18413: "#chosen">chosen media resource</a> is available from the
                   18414: <code title="dom-media-currentSrc"><a href=
                   18415: "#currentsrc">currentSrc</a></code> attribute), but none of the
                   18416: metadata has yet been obtained and therefore all the other
                   18417: attributes are still in their initial states.</dd>
                   18418: <dt><dfn id="loadedmetadata" title=
                   18419: "dom-media-LOADED_METADATA"><code>LOADED_METADATA</code></dfn>
                   18420: (numeric value 2)</dt>
                   18421: <dd>Enough of the resource has been obtained that the metadata
                   18422: attributes are initialized (e.g. the length is known). The API will
                   18423: no longer raise exceptions when used.</dd>
                   18424: <dt><dfn id="loadedfirstframe" title=
                   18425: "dom-media-LOADED_FIRST_FRAME"><code>LOADED_FIRST_FRAME</code></dfn>
                   18426: (numeric value 3)</dt>
                   18427: <dd>Actual <a href="#media9">media data</a> has been obtained. In
                   18428: the case of video, this specifically means that a frame of video is
                   18429: available and can be shown.</dd>
                   18430: <dt><dfn id="loaded" title=
                   18431: "dom-media-LOADED"><code>LOADED</code></dfn> (numeric value 4)</dt>
                   18432: <dd>The entire <a href="#media10">media resource</a> has been
                   18433: obtained and is available to the user agent locally. Network
                   18434: connectivity could be lost without affecting the media
                   18435: playback.</dd>
                   18436: </dl>
                   18437: <p>The algorithm for the <code title="dom-media-load"><a href=
                   18438: "#load">load()</a></code> method defined below describes exactly
                   18439: when the <code title="dom-media-networkState"><a href=
                   18440: "#networkstate">networkState</a></code> attribute changes
                   18441: value.</p>
                   18442: <h5 id="loading"><span class="secno"><del class=
                   18443: "diff-old">3.14.9.4.</del> <ins class=
                   18444: "diff-chg">3.12.10.4.</ins></span> Loading the media resource</h5>
                   18445: <p>All <a href="#media7" title="media element">media elements</a>
                   18446: have a <dfn id="begun">begun flag</dfn> , which must begin in the
                   18447: false state, a <dfn id="loaded-first-frame">loaded-first-frame
                   18448: flag</dfn> , which must begin in the false state, and an <dfn id=
                   18449: "autoplaying">autoplaying flag</dfn> , which must begin in the true
                   18450: state.</p>
                   18451: <p>When the <dfn id="load" title=
                   18452: "dom-media-load"><code>load()</code></dfn> method on a <a href=
                   18453: "#media7">media element</a> is invoked, the user agent must run the
                   18454: following steps. Note that this algorithm might get aborted, e.g.
                   18455: if the <code title="dom-media-load"><a href=
                   18456: "#load">load()</a></code> method itself is invoked again.</p>
                   18457: <ol>
                   18458: <li>
                   18459: <p>Any already-running instance of this algorithm for this element
                   18460: must be aborted. If those method calls have not yet returned, they
                   18461: must finish the step they are on, and then immediately return.</p>
                   18462: </li>
                   18463: <li>
                   18464: <p>If the element's <a href="#begun">begun flag</a> is true, then
                   18465: the <a href="#begun">begun flag</a> must be set to false, the
                   18466: <code title="dom-media-error"><a href="#error0">error</a></code>
                   18467: attribute must be set to a new <code><a href=
                   18468: "#mediaerror">MediaError</a></code> object whose <code title=
                   18469: "dom-MediaError-code"><a href="#code0">code</a></code> attribute is
                   18470: set to <code title="dom-MediaError-MEDIA_ERR_ABORTED"><a href=
                   18471: "#mediaerraborted">MEDIA_ERR_ABORTED</a></code> , and the user
                   18472: agent must synchronously <a href="#firing6">fire a progress
                   18473: event</a> called <code title="event-abort"><a href=
                   18474: "#abort">abort</a></code> at the <a href="#media7">media
                   18475: element</a> .</p>
                   18476: </li>
                   18477: <li>
                   18478: <p>The <code title="dom-media-error"><a href=
                   18479: "#error0">error</a></code> attribute must be set to null, the
                   18480: <a href="#loaded-first-frame">loaded-first-frame flag</a> must be
                   18481: set to false, and the <a href="#autoplaying">autoplaying flag</a>
                   18482: must be set to true.</p>
                   18483: </li>
                   18484: <li>
                   18485: <p>The <code title="dom-media-playbackRate"><a href=
                   18486: "#playbackrate">playbackRate</a></code> attribute must be set to
                   18487: the value of the <code title=
                   18488: "dom-media-defaultPlaybackRate"><a href=
                   18489: "#defaultplaybackrate">defaultPlaybackRate</a></code>
                   18490: attribute.</p>
                   18491: </li>
                   18492: <li>
                   18493: <p>If the <a href="#media7">media element</a> 's <code title=
                   18494: "dom-media-networkState"><a href=
                   18495: "#networkstate">networkState</a></code> is not set to <a href=
                   18496: "#empty" title="dom-media-EMPTY">EMPTY</a> , then the following
                   18497: substeps must be followed:</p>
                   18498: <ol>
                   18499: <li>The <code title="dom-media-networkState"><a href=
                   18500: "#networkstate">networkState</a></code> attribute must be set to
                   18501: <a href="#empty" title="dom-media-EMPTY">EMPTY</a> .</li>
                   18502: <li>If <code title="dom-media-readyState"><a href=
                   18503: "#readystate0">readyState</a></code> is not set to <code title=
                   18504: "dom-media-DATA_UNAVAILABLE"><a href=
                   18505: "#dataunavailable">DATA_UNAVAILABLE</a></code> , it must be set to
                   18506: that state .</li>
                   18507: <li>If the <code title="dom-media-paused"><a href=
                   18508: "#paused">paused</a></code> attribute is false, it must be set to
                   18509: true .</li>
                   18510: <li>If <code title="dom-media-seeking"><a href=
                   18511: "#seeking0">seeking</a></code> is true, it must be set to
                   18512: false.</li>
                   18513: <li>The <a href="#current0">current playback position</a> must be
                   18514: set to 0.</li>
                   18515: <li>The <code title="dom-media-currentLoop"><a href=
                   18516: "#currentloop">currentLoop</a></code> DOM attribute must be set to
                   18517: 0.</li>
                   18518: <li>The user agent must synchronously <a href="#firing2">fire a
                   18519: simple event</a> called <code title="event-emptied"><a href=
                   18520: "#emptied">emptied</a></code> at the <a href="#media7">media
                   18521: element</a> .</li>
                   18522: </ol>
                   18523: </li>
                   18524: <li>
                   18525: <p>The user agent must <a href="#pick-a">pick a media resource</a>
                   18526: for the <a href="#media7">media element</a> . If that fails, the
                   18527: method must raise an <code>INVALID_STATE_ERR</code> exception, and
                   18528: abort these steps.</p>
                   18529: </li>
                   18530: <li>
                   18531: <p>The <code title="dom-media-networkState"><a href=
                   18532: "#networkstate">networkState</a></code> attribute must be set to
                   18533: <a href="#loading0" title="dom-media-LOADING">LOADING</a> .</p>
                   18534: </li>
                   18535: <li>
                   18536: <p class="note">The <code title="dom-media-currentSrc"><a href=
                   18537: "#currentsrc">currentSrc</a></code> attribute starts returning the
                   18538: new value.</p>
                   18539: </li>
                   18540: <li>
                   18541: <p>The user agent must then set the <a href="#begun">begun flag</a>
                   18542: to true and <a href="#firing6">fire a progress event</a> called
                   18543: <del class="diff-old">begin</del> <code title=
                   18544: "event-loadstart"><a href="#loadstart"><ins class=
                   18545: "diff-chg">loadstart</ins></a></code> at the <a href=
                   18546: "#media7">media element</a> .</p>
                   18547: </li>
                   18548: <li>
                   18549: <p>The method must return, but these steps must continue.</p>
                   18550: </li>
                   18551: <li>
                   18552: <p class="note">Playback of any previously playing <a href=
                   18553: "#media10">media resource</a> for this element stops.</p>
                   18554: </li>
                   18555: <li>
                   18556: <p>If a download is in progress for the <a href="#media7">media
                   18557: element</a> , the user agent should stop the download.</p>
                   18558: </li>
                   18559: <li>
                   18560: <p>The user agent must then begin to download the <a href=
                   18561: "#chosen">chosen media resource</a> . The rate of the download may
                   18562: be throttled, however, in response to user preferences (including
                   18563: throttling it to zero until the user indicates that the download
                   18564: can start), or to balance the download with other connections
                   18565: sharing the same bandwidth.</p>
                   18566: </li>
                   18567: <li>
                   18568: <p>While the download is progressing, the user agent must <a href=
                   18569: "#firing6">fire a progress event</a> called <code title=
                   18570: "event-progress"><a href="#progress0">progress</a></code> at the
                   18571: element every 350ms (±200ms) or for every byte received, whichever
                   18572: is <em>least</em> frequent.</p>
                   18573: <p>If at any point the user agent has received no data for more
                   18574: than about three seconds, the user agent must <a href=
                   18575: "#firing6">fire a progress event</a> called <code title=
                   18576: "event-stalled"><a href="#stalled">stalled</a></code> at the
                   18577: element.</p>
                   18578: <p>User agents may allow users to selectively block or slow
                   18579: <a href="#media9">media data</a> downloads. When a <a href=
                   18580: "#media7">media element</a> 's download has been blocked, the user
                   18581: agent must act as if it was stalled (as opposed to acting as if the
                   18582: connection was closed).</p>
                   18583: <p>The user agent may use whatever means necessary to download the
                   18584: resource (within the constraints put forward by this and other
                   18585: specifications); for example, reconnecting to the server in the
                   18586: face of network errors, using HTTP partial range requests, or
                   18587: switching to a streaming protocol. The user agent must <del class=
                   18588: "diff-old">only</del> consider a resource erroneous <ins class=
                   18589: "diff-new">only</ins> if it has given up trying to download it.</p>
                   18590: <dl class="switch">
                   18591: <dt>If the <a href="#media9">media data</a> cannot be downloaded at
                   18592: all, due to network errors, causing the user agent to give up
                   18593: trying to download the resource</dt>
                   18594: <dd>
                   18595: <p>DNS errors and HTTP 4xx and 5xx errors (and equivalents in other
                   18596: protocols) must cause the user agent to execute the following
                   18597: steps. User agents may also follow these steps in response to other
                   18598: network errors of similar severity.</p>
                   18599: <ol>
                   18600: <li>The user agent should cancel the download.</li>
                   18601: <li>The <code title="dom-media-error"><a href=
                   18602: "#error0">error</a></code> attribute must be set to a new
                   18603: <code><a href="#mediaerror">MediaError</a></code> object whose
                   18604: <code title="dom-MediaError-code"><a href="#code0">code</a></code>
                   18605: attribute is set to <code title=
                   18606: "dom-MediaError-MEDIA_ERR_NETWORK"><a href=
                   18607: "#mediaerrnetwork">MEDIA_ERR_NETWORK</a></code> .</li>
                   18608: <li>The <a href="#begun">begun flag</a> must be set to false and
                   18609: the user agent must <a href="#firing6">fire a progress event</a>
                   18610: called <code title="event-error"><a href="#error1">error</a></code>
                   18611: at the <a href="#media7">media element</a> .</li>
                   18612: <li>The element's <code title="dom-media-networkState"><a href=
                   18613: "#networkstate">networkState</a></code> attribute must be switched
                   18614: to the <a href="#empty" title="dom-media-EMPTY">EMPTY</a> value and
                   18615: the user agent must <a href="#firing2">fire a simple event</a>
                   18616: called <code title="event-emptied"><a href=
                   18617: "#emptied">emptied</a></code> at the element.</li>
                   18618: <li>These steps must be aborted.</li>
                   18619: </ol>
                   18620: </dd>
                   18621: <dt id="fatal-decode-error">If the <a href="#media9">media data</a>
                   18622: can be downloaded but is in an unsupported format, or can otherwise
                   18623: not be rendered at all</dt>
                   18624: <dd>
                   18625: <p>The server returning a file of the wrong kind (e.g. one that
                   18626: that turns out to not be pure audio when the <a href=
                   18627: "#media7">media element</a> is an <code><a href=
                   18628: "#audio1">audio</a></code> element), or the file using unsupported
                   18629: codecs for all the data, must cause the user agent to execute the
                   18630: following steps. User agents may also execute these steps in
                   18631: response to other codec-related fatal errors, such as the file
                   18632: requiring more resources to process than the user agent can provide
                   18633: in real time.</p>
                   18634: <ol>
                   18635: <li>The user agent should cancel the download.</li>
                   18636: <li>The <code title="dom-media-error"><a href=
                   18637: "#error0">error</a></code> attribute must be set to a new
                   18638: <code><a href="#mediaerror">MediaError</a></code> object whose
                   18639: <code title="dom-MediaError-code"><a href="#code0">code</a></code>
                   18640: attribute is set to <code title=
                   18641: "dom-MediaError-MEDIA_ERR_DECODE"><a href=
                   18642: "#mediaerrdecode">MEDIA_ERR_DECODE</a></code> .</li>
                   18643: <li>The <a href="#begun">begun flag</a> must be set to false and
                   18644: the user agent must <a href="#firing6">fire a progress event</a>
                   18645: called <code title="event-error"><a href="#error1">error</a></code>
                   18646: at the <a href="#media7">media element</a> .</li>
                   18647: <li>The element's <code title="dom-media-networkState"><a href=
                   18648: "#networkstate">networkState</a></code> attribute must be switched
                   18649: to the <a href="#empty" title="dom-media-EMPTY">EMPTY</a> value and
                   18650: the user agent must <a href="#firing2">fire a simple event</a>
                   18651: called <code title="event-emptied"><a href=
                   18652: "#emptied">emptied</a></code> at the element.</li>
                   18653: <li>These steps must be aborted.</li>
                   18654: </ol>
                   18655: </dd>
                   18656: <dt>If the <a href="#media9">media data</a> download is aborted by
                   18657: the user</dt>
                   18658: <dd>
                   18659: <p>The download is aborted by the user, e.g. because the user
                   18660: navigated the browsing context to another page, the user agent must
                   18661: execute the following steps. These steps are not followed if the
                   18662: <code title="dom-media-load"><a href="#load">load()</a></code>
                   18663: method itself is reinvoked, as the steps above handle that
                   18664: particular kind of abort.</p>
                   18665: <ol>
                   18666: <li>The user agent should cancel the download.</li>
                   18667: <li>The <code title="dom-media-error"><a href=
                   18668: "#error0">error</a></code> attribute must be set to a new
                   18669: <code><a href="#mediaerror">MediaError</a></code> object whose
                   18670: <code title="dom-MediaError-code"><a href="#code0">code</a></code>
                   18671: attribute is set to <code title=
                   18672: "dom-MediaError-MEDIA_ERR_ABORT">MEDIA_ERR_ABORT</code> .</li>
                   18673: <li>The <a href="#begun">begun flag</a> must be set to false and
                   18674: the user agent must <a href="#firing6">fire a progress event</a>
                   18675: called <code title="event-abort"><a href="#abort">abort</a></code>
                   18676: at the <a href="#media7">media element</a> .</li>
                   18677: <li>If the <a href="#media7">media element</a> 's <code title=
                   18678: "dom-media-networkState"><a href=
                   18679: "#networkstate">networkState</a></code> attribute has the value
                   18680: <code title="dom-media-LOADING"><a href=
                   18681: "#loading0">LOADING</a></code> , the element's <code title=
                   18682: "dom-media-networkState"><a href=
                   18683: "#networkstate">networkState</a></code> attribute must be switched
                   18684: to the <a href="#empty" title="dom-media-EMPTY">EMPTY</a> value and
                   18685: the user agent must <a href="#firing2">fire a simple event</a>
                   18686: called <code title="event-emptied"><a href=
                   18687: "#emptied">emptied</a></code> at the element. (If the <code title=
                   18688: "dom-media-networkState"><a href=
                   18689: "#networkstate">networkState</a></code> attribute has a value
                   18690: greater than <code title="dom-media-LOADING"><a href=
                   18691: "#loading0">LOADING</a></code> , then this doesn't happen; the
                   18692: available data, if any, will be playable.)</li>
                   18693: <li>These steps must be aborted.</li>
                   18694: </ol>
                   18695: </dd>
                   18696: <dt id="non-fatal-media-error">If the <a href="#media9">media
                   18697: data</a> can be downloaded but has non-fatal errors or uses, in
                   18698: part, codecs that are unsupported, preventing the user agent from
                   18699: rendering the content completely correctly but not preventing
                   18700: playback altogether</dt>
                   18701: <dd>
                   18702: <p>The server returning data that is partially usable but cannot be
                   18703: optimally rendered must cause the user agent to execute the
                   18704: following steps.</p>
                   18705: <ol>
                   18706: <li class="big-issue">Should we fire a 'warning' event? Set the
                   18707: 'error' flag to 'MEDIA_ERR_SUBOPTIMAL' or something?</li>
                   18708: </ol>
                   18709: </dd>
                   18710: <dt>Once enough of the <a href="#media9">media data</a> has been
                   18711: downloaded to determine the duration of the <a href=
                   18712: "#media10">media resource</a> , its dimensions, and other
                   18713: metadata</dt>
                   18714: <dd>
                   18715: <p>The user agent must follow these substeps:</p>
                   18716: <ol>
                   18717: <li>
                   18718: <p>The <a href="#current0">current playback position</a> must be
                   18719: set to the <var><a href="#effective">effective start</a></var>
                   18720: .</p>
                   18721: </li>
                   18722: <li>
                   18723: <p>The <code title="dom-media-networkState"><a href=
                   18724: "#networkstate">networkState</a></code> attribute must be set to
                   18725: <code title="dom-media-LOADED_METADATA"><a href=
                   18726: "#loadedmetadata">LOADED_METADATA</a></code> .</p>
                   18727: </li>
                   18728: <li>
                   18729: <p class="note">A number of attributes, including <code title=
                   18730: "dom-media-duration"><a href="#duration">duration</a></code> ,
                   18731: <code title="dom-media-buffered"><a href=
                   18732: "#buffered">buffered</a></code> , and <code title=
                   18733: "dom-media-played"><a href="#played">played</a></code> , become
                   18734: available.</p>
                   18735: </li>
                   18736: <li>
                   18737: <p class="note">The user agent will <a href="#firing2">fire a
                   18738: simple event</a> called <code title="event-durationchange"><a href=
                   18739: "#durationchange">durationchange</a></code> at the element at this
                   18740: point.</p>
                   18741: </li>
                   18742: <li>
                   18743: <p>The user agent must <a href="#firing2">fire a simple event</a>
                   18744: called <code title="event-loadedmetadata"><a href=
                   18745: "#loadedmetadata0">loadedmetadata</a></code> at the element.</p>
                   18746: </li>
                   18747: </ol>
                   18748: </dd>
                   18749: <dt id="handling-first-frame-available">Once enough of the <a href=
                   18750: "#media9">media data</a> has been downloaded to enable the user
                   18751: agent to display the frame at the <a href="#effective">effective
                   18752: start</a> of the <a href="#media10">media resource</a></dt>
                   18753: <dd>
                   18754: <p>The user agent must follow these substeps:</p>
                   18755: <ol>
                   18756: <li>
                   18757: <p>The <code title="dom-media-networkState"><a href=
                   18758: "#networkstate">networkState</a></code> attribute must be set to
                   18759: <code title="dom-media-LOADED_FIRST_FRAME"><a href=
                   18760: "#loadedfirstframe">LOADED_FIRST_FRAME</a></code> .</p>
                   18761: </li>
                   18762: <li>
                   18763: <p>The <code title="dom-media-readyState"><a href=
                   18764: "#readystate0">readyState</a></code> attribute must change to
                   18765: <code title="dom-media-CAN_SHOW_CURRENT_FRAME"><a href=
                   18766: "#canshowcurrentframe">CAN_SHOW_CURRENT_FRAME</a></code> .</p>
                   18767: </li>
                   18768: <li>
                   18769: <p>The <a href="#loaded-first-frame">loaded-first-frame flag</a>
                   18770: must be set to true.</p>
                   18771: </li>
                   18772: <li>
                   18773: <p>The user agent must <a href="#firing2">fire a simple event</a>
                   18774: called <code title="event-loadedfirstframe"><a href=
                   18775: "#loadedfirstframe0">loadedfirstframe</a></code> at the
                   18776: element.</p>
                   18777: </li>
                   18778: <li>
                   18779: <p>The user agent must <a href="#firing2">fire a simple event</a>
                   18780: called <code title="event-canshowcurrentframe"><a href=
                   18781: "#canshowcurrentframe0">canshowcurrentframe</a></code> at the
                   18782: element.</p>
                   18783: </li>
                   18784: </ol>
                   18785: </dd>
                   18786: </dl>
                   18787: <p>When the user agent has completed the download of the entire
                   18788: <a href="#media10">media resource</a> , it must move on to the next
                   18789: step.</p>
                   18790: </li>
                   18791: <li>
                   18792: <p>If the download completes without errors, the <a href=
                   18793: "#begun">begun flag</a> must be set to false, the <code title=
                   18794: "dom-media-networkState"><a href=
                   18795: "#networkstate">networkState</a></code> attribute must be set to
                   18796: <code title="dom-media-LOADED"><a href="#loaded">LOADED</a></code>
                   18797: , and the user agent must <a href="#firing6">fire a progress
                   18798: event</a> called <code title="event-load"><a href=
                   18799: "#load0">load</a></code> at the element.</p>
                   18800: </li>
                   18801: </ol>
                   18802: <p>If a <a href="#media7">media element</a> whose <code title=
                   18803: "dom-media-networkState"><a href=
                   18804: "#networkstate">networkState</a></code> has the value <code title=
                   18805: "dom-media-EMPTY"><a href="#empty">EMPTY</a></code> is inserted
                   18806: into a document, user agents must implicitly invoke the
                   18807: <code title="dom-media-load"><a href="#load">load()</a></code>
                   18808: method on the <a href="#media7">media element</a> as soon as all
                   18809: other scripts have finished executing. Any exceptions raised must
                   18810: be ignored.</p>
                   18811: <p>The <dfn id="bufferingrate" title=
                   18812: "dom-media-bufferingRate"><code>bufferingRate</code></dfn>
                   18813: attribute must return the average number of bits received per
                   18814: second for the current download over the past few seconds. If there
                   18815: is no download in progress, the attribute must return 0.</p>
                   18816: <p>The <dfn id="bufferingthrottled" title=
                   18817: "dom-media-bufferingThrottled"><code><ins class=
                   18818: "diff-new">bufferingThrottled</ins></code></dfn> <ins class=
                   18819: "diff-new">attribute must return true if the user agent is
                   18820: intentionally throttling the bandwidth used by the download
                   18821: (including when throttling to zero to pause the download
                   18822: altogether), and false otherwise.</ins></p>
                   18823: <p><ins class="diff-new">The</ins> <dfn id="buffered" title=
                   18824: "dom-media-buffered"><code>buffered</code></dfn> attribute must
                   18825: return a static <del class="diff-old">normalised</del> <a href=
                   18826: "#normalized"><ins class="diff-chg">normalized</ins>
                   18827: <code>TimeRanges</code> object</a> that represents the ranges of
                   18828: the <a href="#media10">media resource</a> , if any, that the user
                   18829: agent has downloaded, at the time the attribute is evaluated.</p>
                   18830: <p class="note">Typically this will be a single range anchored at
                   18831: the zero point, but if, e.g. the user agent uses HTTP range
                   18832: requests in response to seeking, then there could be multiple
                   18833: ranges.</p>
                   18834: <p><ins class="diff-new">The</ins> <dfn id="bufferedbytes" title=
                   18835: "dom-media-bufferedBytes"><code><ins class=
                   18836: "diff-new">bufferedBytes</ins></code></dfn> <ins class=
                   18837: "diff-new">attribute must return a static</ins> <a href=
                   18838: "#normalized0"><ins class="diff-new">normalized</ins>
                   18839: <code><ins class="diff-new">ByteRanges</ins></code> <ins class=
                   18840: "diff-new">object</ins></a> <ins class="diff-new">that represents
                   18841: the ranges of the</ins> <a href="#media10"><ins class=
                   18842: "diff-new">media resource</ins></a> ,<ins class="diff-new">if any,
                   18843: that the user agent has downloaded, at the time the attribute is
                   18844: evaluated.</ins></p>
                   18845: <p><ins class="diff-new">The</ins> <dfn id="totalbytes" title=
                   18846: "dom-media-totalBytes"><code><ins class=
                   18847: "diff-new">totalBytes</ins></code></dfn> <ins class=
                   18848: "diff-new">attribute must return the length of the</ins> <a href=
                   18849: "#media10"><ins class="diff-new">media resource</ins></a>
                   18850: ,<ins class="diff-new">in bytes, if it is known and finite. If it
                   18851: is not known, is infinite (e.g. streaming radio), or if no</ins>
                   18852: <a href="#media9"><ins class="diff-new">media data</ins></a>
                   18853: <ins class="diff-new">is available, the attribute must return
                   18854: 0.</ins></p>
                   18855: <h5 id="offsets"><span class="secno"><del class=
                   18856: "diff-old">3.14.9.5.</del> <ins class=
                   18857: "diff-chg">3.12.10.5.</ins></span> Offsets into the media
                   18858: resource</h5>
                   18859: <p>The <dfn id="duration" title=
                   18860: "dom-media-duration"><code>duration</code></dfn> attribute must
                   18861: return the length of the <a href="#media10">media resource</a> , in
                   18862: seconds. If no <a href="#media9">media data</a> is available, then
                   18863: the attributes must return 0. If <a href="#media9">media data</a>
                   18864: is available but the length is not known, the attribute must return
                   18865: the Not-a-Number (NaN) value. If the <a href="#media10">media
                   18866: resource</a> is known to be unbounded (e.g. a streaming radio),
                   18867: then the attribute must return the positive Infinity value.</p>
                   18868: <p>When the length of the <a href="#media10">media resource</a>
                   18869: changes (e.g. from being unknown to known, or from indeterminate to
                   18870: known, or from a previously established length to a new length) the
                   18871: user agent must, once any running scripts have finished, <a href=
                   18872: "#firing2">fire a simple event</a> called <code title=
                   18873: "event-durationchange"><a href=
                   18874: "#durationchange">durationchange</a></code> at the <a href=
                   18875: "#media7">media element</a> .</p>
                   18876: <p><a href="#media7" title="media element">Media elements</a> have
                   18877: a <dfn id="current0">current playback position</dfn> , which must
                   18878: initially be zero. The current position is a time.</p>
                   18879: <p>The <dfn id="currenttime" title=
                   18880: "dom-media-currentTime"><code>currentTime</code></dfn> attribute
                   18881: must, on getting, return the <a href="#current0">current playback
                   18882: position</a> , expressed in seconds. On setting, the user agent
                   18883: must <a href="#seek" title="dom-media-seek">seek</a> to the new
                   18884: value (which might raise an exception).</p>
                   18885: <p>The <dfn id="start2" title=
                   18886: "attr-media-start"><code>start</code></dfn> content attribute gives
                   18887: the offset into the <a href="#media10">media resource</a> at which
                   18888: playback is to begin. The default value is the default start
                   18889: position of the <a href="#media10">media resource</a> , or 0 if not
                   18890: enough <a href="#media9">media data</a> has been obtained yet to
                   18891: determine the default start position or if the resource doesn't
                   18892: specify a default start position.</p>
                   18893: <p>The <dfn id="effective"><var>effective start</var></dfn> is the
                   18894: smaller of the <code title="dom-media-start"><a href=
                   18895: "#start3">start</a></code> DOM attribute and the end of the
                   18896: <a href="#media10">media resource</a> .</p>
                   18897: <p>The <dfn id="loopstart" title=
                   18898: "attr-media-loopstart"><code>loopstart</code></dfn> content
                   18899: attribute gives the offset into the <a href="#media10">media
                   18900: resource</a> at which playback is to begin when looping a clip. The
                   18901: default value of the <code title="attr-media-loopStart"><a href=
                   18902: "#loopstart">loopstart</a></code> content attribute is the value of
                   18903: the <code title="dom-media-start"><a href=
                   18904: "#start3">start</a></code> DOM attribute.</p>
                   18905: <p>The <dfn id="effective0"><var>effective loop start</var></dfn>
                   18906: is the smaller of the <code title="dom-media-loopStart"><a href=
                   18907: "#loopstart0">loopStart</a></code> DOM attribute and the end of the
                   18908: <a href="#media10">media resource</a> .</p>
                   18909: <p>The <dfn id="loopend" title=
                   18910: "attr-media-loopend"><code>loopend</code></dfn> content attribute
                   18911: gives an offset into the <a href="#media10">media resource</a> at
                   18912: which playback is to jump back to the <code title=
                   18913: "attr-media-loopstart"><a href="#loopstart">loopstart</a></code> ,
                   18914: when looping the clip. The default value of the <code title=
                   18915: "attr-media-loopEnd"><a href="#loopend">loopend</a></code> content
                   18916: attribute is the value of the <code title="dom-media-end"><a href=
                   18917: "#end0">end</a></code> DOM attribute.</p>
                   18918: <p>The <dfn id="effective1"><var>effective loop end</var></dfn> is
                   18919: the greater of the <code title="dom-media-start"><a href=
                   18920: "#start3">start</a></code> , <code title=
                   18921: "dom-media-loopStart"><a href="#loopstart0">loopStart</a></code> ,
                   18922: and <code title="dom-media-loopEnd"><a href=
                   18923: "#loopend0">loopEnd</a></code> DOM attributes, except if that is
                   18924: greater than the end of the <a href="#media10">media resource</a> ,
                   18925: in which case that's its value.</p>
                   18926: <p>The <dfn id="end" title="attr-media-end"><code>end</code></dfn>
                   18927: content attribute gives an offset into the <a href="#media10">media
                   18928: resource</a> at which playback is to end. The default value is
                   18929: infinity.</p>
                   18930: <p>The <dfn id="effective2"><var>effective end</var></dfn> is the
                   18931: greater of the <code title="dom-media-start"><a href=
                   18932: "#start3">start</a></code> , <code title=
                   18933: "dom-media-loopStart"><a href="#loopstart0">loopStart</a></code> ,
                   18934: and <code title="dom-media-loopEnd"><a href=
                   18935: "#loopend0">end</a></code> DOM attributes, except if that is
                   18936: greater than the end of the <a href="#media10">media resource</a> ,
                   18937: in which case that's its value.</p>
                   18938: <p>The <code title="attr-media-start"><a href=
                   18939: "#start2">start</a></code> , <code title=
                   18940: "attr-media-loopstart"><a href="#loopstart">loopstart</a></code> ,
                   18941: <code title="attr-media-loopend"><a href=
                   18942: "#loopend">loopend</a></code> , and <code title=
                   18943: "attr-media-end"><a href="#end">end</a></code> attributes must, if
                   18944: specified, contain <span title="value time offset">value time
                   18945: offsets</span> . To get the time values they represent, user agents
                   18946: must use the <a href="#rules4">rules for parsing time offsets</a>
                   18947: .</p>
                   18948: <p>The <dfn id="start3" title=
                   18949: "dom-media-start"><code>start</code></dfn> , <dfn id="loopstart0"
                   18950: title="dom-media-loopStart"><code>loopStart</code></dfn> , <dfn id=
                   18951: "loopend0" title="dom-media-loopEnd"><code>loopEnd</code></dfn> ,
                   18952: and <dfn id="end0" title="dom-media-end"><code>end</code></dfn> DOM
                   18953: attributes must <a href="#reflect">reflect</a> the <code title=
                   18954: "attr-media-start"><a href="#start2">start</a></code> ,
                   18955: <code title="attr-media-loopstart"><a href=
                   18956: "#loopstart">loopstart</a></code> , <code title=
                   18957: "attr-media-loopend"><a href="#loopend">loopend</a></code> , and
                   18958: <code title="attr-media-end"><a href="#end">end</a></code> content
                   18959: attributes on the <a href="#media7">media element</a>
                   18960: respectively.</p>
                   18961: <p>The <dfn id="playcount" title=
                   18962: "attr-media-playcount"><code>playcount</code></dfn> content
                   18963: attribute gives the number of times to play the clip. The default
                   18964: value is 1.</p>
                   18965: <p>The <dfn id="playcount0" title=
                   18966: "dom-media-playCount"><code>playCount</code></dfn> DOM attribute
                   18967: must <a href="#reflect">reflect</a> the <code title=
                   18968: "attr-media-playcount"><a href="#playcount">playcount</a></code>
                   18969: content attribute on the <a href="#media7">media element</a> . The
                   18970: value must be <a href="#limited1">limited to only positive non-zero
                   18971: numbers</a> .</p>
                   18972: <p>The <dfn id="currentloop" title=
                   18973: "dom-media-currentLoop"><code>currentLoop</code></dfn> attribute
                   18974: must initially have the value 0. It gives the index of the current
                   18975: loop. It is changed during playback as described below.</p>
                   18976: <p>When any of the <code title="dom-media-start"><a href=
                   18977: "#start3">start</a></code> , <code title=
                   18978: "dom-media-loopStart"><a href="#loopstart0">loopStart</a></code> ,
                   18979: <code title="dom-media-loopEnd"><a href=
                   18980: "#loopend0">loopEnd</a></code> , <code title=
                   18981: "dom-media-end"><a href="#end0">end</a></code> , and <code title=
                   18982: "dom-media-playCount"><a href="#playcount0">playCount</a></code>
                   18983: DOM attributes change value (either through content attribute
                   18984: mutations reflecting into the DOM attribute, or direct mutations of
                   18985: the DOM attribute), the user agent must apply the following
                   18986: steps:</p>
                   18987: <ol>
                   18988: <li>
                   18989: <p>If the <code title="dom-media-playCount"><a href=
                   18990: "#playcount0">playCount</a></code> DOM attribute's value is less
                   18991: than or equal to the <code title="dom-media-currentLoop"><a href=
                   18992: "#currentloop">currentLoop</a></code> DOM attribute's value, then
                   18993: the <code title="dom-media-currentLoop"><a href=
                   18994: "#currentloop">currentLoop</a></code> DOM attribute's value must be
                   18995: set to <span><code title="dom-media-playCount"><a href=
                   18996: "#playcount0">playCount</a></code> -1</span> (which will make the
                   18997: current loop the last loop).</p>
                   18998: </li>
                   18999: <li>
                   19000: <p>If the <a href="#media7">media element</a> 's <code title=
                   19001: "dom-media-networkState"><a href=
                   19002: "#networkstate">networkState</a></code> is in the <code title=
                   19003: "dom-media-EMPTY"><a href="#empty">EMPTY</a></code> state or the
                   19004: <code title="dom-media-LOADING"><a href=
                   19005: "#loading0">LOADING</a></code> state, then the user agent must at
                   19006: this point abort these steps.</p>
                   19007: </li>
                   19008: <li>
                   19009: <p>If the <code title="dom-media-currentLoop"><a href=
                   19010: "#currentloop">currentLoop</a></code> is zero, and the <a href=
                   19011: "#current0">current playback position</a> is before the
                   19012: <var><a href="#effective">effective start</a></var> , the user
                   19013: agent must <a href="#seek" title="dom-media-seek">seek</a> to the
                   19014: <var><a href="#effective">effective start</a></var> .</p>
                   19015: </li>
                   19016: <li>
                   19017: <p>If the <code title="dom-media-currentLoop"><a href=
                   19018: "#currentloop">currentLoop</a></code> is greater than zero, and the
                   19019: <a href="#current0">current playback position</a> is before the
                   19020: <var><a href="#effective0">effective loop start</a></var> , the
                   19021: user agent must <a href="#seek" title="dom-media-seek">seek</a> to
                   19022: the <var><a href="#effective0">effective loop start</a></var> .</p>
                   19023: </li>
                   19024: <li>
                   19025: <p>If the <code title="dom-media-currentLoop"><a href=
                   19026: "#currentloop">currentLoop</a></code> is less than
                   19027: <span><code title="dom-media-playCount"><a href=
                   19028: "#playcount0">playCount</a></code> -1</span> , and the <a href=
                   19029: "#current0">current playback position</a> is after the
                   19030: <var><a href="#effective1">effective loop end</a></var> , the user
                   19031: agent must <a href="#seek" title="dom-media-seek">seek</a> to the
                   19032: <var><a href="#effective0">effective loop start</a></var> , and
                   19033: increase <code title="dom-media-currentLoop"><a href=
                   19034: "#currentloop">currentLoop</a></code> by 1.</p>
                   19035: </li>
                   19036: <li>
                   19037: <p>If the <code title="dom-media-currentLoop"><a href=
                   19038: "#currentloop">currentLoop</a></code> is equal to
                   19039: <span><code title="dom-media-playCount"><a href=
                   19040: "#playcount0">playCount</a></code> -1</span> , and the <a href=
                   19041: "#current0">current playback position</a> is after the
                   19042: <var><a href="#effective2">effective end</a></var> , the user agent
                   19043: must <a href="#seek" title="dom-media-seek">seek</a> to the
                   19044: <var><a href="#effective2">effective end</a></var> and then the
                   19045: looping will end.</p>
                   19046: </li>
                   19047: </ol>
                   19048: <h5 id="the-ready"><span class="secno"><del class=
                   19049: "diff-old">3.14.9.6.</del> <ins class=
                   19050: "diff-chg">3.12.10.6.</ins></span> The ready states</h5>
                   19051: <p><a href="#media7" title="media element">Media elements</a> have
                   19052: a <em>ready state</em> , which describes to what degree they are
                   19053: ready to be rendered at the <a href="#current0">current playback
                   19054: position</a> . The possible values are as follows; the ready state
                   19055: of a media element at any particular time is the greatest value
                   19056: describing the state of the element:</p>
                   19057: <dl>
                   19058: <dt><dfn id="dataunavailable" title=
                   19059: "dom-media-DATA_UNAVAILABLE"><code>DATA_UNAVAILABLE</code></dfn>
                   19060: (numeric value 0)</dt>
                   19061: <dd>No data for the <a href="#current0">current playback
                   19062: position</a> is available. <a href="#media7" title=
                   19063: "media element">Media elements</a> whose <code title=
                   19064: "dom-media-networkState"><a href=
                   19065: "#networkstate">networkState</a></code> attribute is less than
                   19066: <code title="dom-media-LOADED_FIRST_FRAME"><a href=
                   19067: "#loadedfirstframe">LOADED_FIRST_FRAME</a></code> are always in the
                   19068: <code title="dom-media-DATA_UNAVAILABLE"><a href=
                   19069: "#dataunavailable">DATA_UNAVAILABLE</a></code> state.</dd>
                   19070: <dt><dfn id="canshowcurrentframe" title=
                   19071: "dom-media-CAN_SHOW_CURRENT_FRAME"><code>CAN_SHOW_CURRENT_FRAME</code></dfn>
                   19072: (numeric value 1)</dt>
                   19073: <dd>Data for the immediate <a href="#current0">current playback
                   19074: position</a> is available, but not enough data is available that
                   19075: the user agent could successfully advance the <a href=
                   19076: "#current0">current playback position</a> at all without
                   19077: immediately reverting to the <code title=
                   19078: "dom-media-DATA_UNAVAILABLE"><a href=
                   19079: "#dataunavailable">DATA_UNAVAILABLE</a></code> state. In video,
                   19080: this corresponds to the user agent having data from the current
                   19081: frame, but not the next frame. In audio, this corresponds to the
                   19082: user agent only having audio up to the <a href="#current0">current
                   19083: playback position</a> , but no further.</dd>
                   19084: <dt><dfn id="canplay" title=
                   19085: "dom-media-CAN_PLAY"><code>CAN_PLAY</code></dfn> (numeric value
                   19086: 2)</dt>
                   19087: <dd>Data for the immediate <a href="#current0">current playback
                   19088: position</a> is available, as well as enough data for the user
                   19089: agent to advance the <a href="#current0">current playback
                   19090: position</a> at least a little without immediately reverting to the
                   19091: <code title="dom-media-DATA_UNAVAILABLE"><a href=
                   19092: "#dataunavailable">DATA_UNAVAILABLE</a></code> state. In video,
                   19093: this corresponds to the user agent having data for the current
                   19094: frame and the next frame. In audio, this corresponds <del class=
                   19095: "diff-old">ot</del> <ins class="diff-chg">to</ins> the user agent
                   19096: having data beyond the <a href="#current0">current playback
                   19097: position</a> .</dd>
                   19098: <dt><dfn id="canplaythrough" title=
                   19099: "dom-media-CAN_PLAY_THROUGH"><code>CAN_PLAY_THROUGH</code></dfn>
                   19100: (numeric value 3)</dt>
                   19101: <dd>Data for the immediate <a href="#current0">current playback
                   19102: position</a> is available, as well as enough data for the user
                   19103: agent to advance the <a href="#current0">current playback
                   19104: position</a> at least a little without immediately reverting to the
                   19105: <code title="dom-media-DATA_UNAVAILABLE"><a href=
                   19106: "#dataunavailable">DATA_UNAVAILABLE</a></code> state, and, in
                   19107: addition, the user agent estimates that data is being downloaded at
                   19108: a rate where the <a href="#current0">current playback position</a>
                   19109: , if it were to advance at the rate given by the <code title=
                   19110: "dom-media-defaultPlaybackRate"><a href=
                   19111: "#defaultplaybackrate">defaultPlaybackRate</a></code> attribute,
                   19112: would not overtake the available data before playback reaches the
                   19113: <a href="#effective2">effective end</a> of the <a href=
                   19114: "#media10">media resource</a> on the last <a href="#playcount0"
                   19115: title="dom-media-playCount">loop</a> .</dd>
                   19116: </dl>
                   19117: <p>When the ready state of a <a href="#media7">media element</a>
                   19118: whose <code title="dom-media-networkState"><a href=
                   19119: "#networkstate">networkState</a></code> is not <code title=
                   19120: "dom-media-EMPTY"><a href="#empty">EMPTY</a></code> changes, the
                   19121: user agent must follow the steps given below:</p>
                   19122: <dl class="switch">
                   19123: <dt>If the new ready state is <code title=
                   19124: "dom-media-DATA_UNAVAILABLE"><a href=
                   19125: "#dataunavailable">DATA_UNAVAILABLE</a></code></dt>
                   19126: <dd>
                   19127: <p>The user agent must <a href="#firing2">fire a simple event</a>
                   19128: called <code title="event-dataunavailable"><a href=
                   19129: "#dataunavailable0">dataunavailable</a></code> at the element.</p>
                   19130: </dd>
                   19131: <dt>If the new ready state is <code title=
                   19132: "dom-media-CAN_SHOW_CURRENT_FRAME"><a href=
                   19133: "#canshowcurrentframe">CAN_SHOW_CURRENT_FRAME</a></code></dt>
                   19134: <dd>
                   19135: <p>If the element's <a href=
                   19136: "#loaded-first-frame">loaded-first-frame flag</a> is true, the user
                   19137: agent must <a href="#firing2">fire a simple event</a> called
                   19138: <code title="event-canshowcurrentframe"><a href=
                   19139: "#canshowcurrentframe0">canshowcurrentframe</a></code> event.</p>
                   19140: <p class="note">The first time the <code title=
                   19141: "dom-media-networkState"><a href=
                   19142: "#networkstate">networkState</a></code> attribute switches to this
                   19143: value, the <a href="#loaded-first-frame">loaded-first-frame
                   19144: flag</a> is false, and the event is fired <a href=
                   19145: "#handling-first-frame-available">by the algorithm described
                   19146: above</a> for the <code title="dom-media-load"><a href=
                   19147: "#load">load()</a></code> method, in conjunction with other
                   19148: steps.</p>
                   19149: </dd>
                   19150: <dt>If the new ready state is <code title=
                   19151: "dom-media-CAN_PLAY"><a href="#canplay">CAN_PLAY</a></code></dt>
                   19152: <dd>
                   19153: <p>The user agent must <a href="#firing2">fire a simple event</a>
                   19154: called <code title="event-canplay"><a href=
                   19155: "#canplay0">canplay</a></code> .</p>
                   19156: </dd>
                   19157: <dt>If the new ready state is <code title=
                   19158: "dom-media-CAN_PLAY_THROUGH"><a href=
                   19159: "#canplaythrough">CAN_PLAY_THROUGH</a></code></dt>
                   19160: <dd>
                   19161: <p>The user agent must <a href="#firing2">fire a simple event</a>
                   19162: called <code title="event-canplaythrough"><a href=
                   19163: "#canplaythrough0">canplaythrough</a></code> event. If the <a href=
                   19164: "#autoplaying">autoplaying flag</a> is true, and the <code title=
                   19165: "dom-media-paused"><a href="#paused">paused</a></code> attribute is
                   19166: true, and the <a href="#media7">media element</a> has an
                   19167: <code title="attr-media-autoplay"><a href=
                   19168: "#autoplay">autoplay</a></code> attribute specified, then the user
                   19169: agent must also set the <code title="dom-media-paused"><a href=
                   19170: "#paused">paused</a></code> attribute to false and <a href=
                   19171: "#firing2">fire a simple event</a> called <code title=
                   19172: "event-play"><a href="#play0">play</a></code> .</p>
                   19173: </dd>
                   19174: </dl>
                   19175: <p class="note">It is possible for the ready state of a media
                   19176: element to jump between these states discontinuously. For example,
                   19177: the state of a media element whose <span>leaded-first-frame
                   19178: flag</span> is false can jump straight from <code title=
                   19179: "dom-media-DATA_UNAVAILABLE"><a href=
                   19180: "#dataunavailable">DATA_UNAVAILABLE</a></code> to <code title=
                   19181: "dom-media-CAN_PLAY_THROUGH"><a href=
                   19182: "#canplaythrough">CAN_PLAY_THROUGH</a></code> without passing
                   19183: through the <code title="dom-media-CAN_SHOW_CURRENT_FRAME"><a href=
                   19184: "#canshowcurrentframe">CAN_SHOW_CURRENT_FRAME</a></code> and
                   19185: <code title="dom-media-CAN_PLAY"><a href=
                   19186: "#canplay">CAN_PLAY</a></code> states, and thus without firing the
                   19187: <code title="event-canshowcurrentframe"><a href=
                   19188: "#canshowcurrentframe0">canshowcurrentframe</a></code> and
                   19189: <code title="event-canplay"><a href="#canplay0">canplay</a></code>
                   19190: events. The only state that is <del class=
                   19191: "diff-old">guarenteed</del> <ins class="diff-chg">guaranteed</ins>
                   19192: to be reached is the <code title=
                   19193: "dom-media-CAN_SHOW_CURRENT_FRAME"><a href=
                   19194: "#canshowcurrentframe">CAN_SHOW_CURRENT_FRAME</a></code> state,
                   19195: which is reached as part of the <code title=
                   19196: "dom-media-load"><a href="#load">load()</a></code> method's
                   19197: processing.</p>
                   19198: <p>The <dfn id="readystate0" title=
                   19199: "dom-media-readyState"><code>readyState</code></dfn> DOM attribute
                   19200: must, on getting, return the value described above that describes
                   19201: the current ready state of the <a href="#media7">media element</a>
                   19202: .</p>
                   19203: <p>The <dfn id="autoplay" title=
                   19204: "attr-media-autoplay"><code>autoplay</code></dfn> attribute is a
                   19205: <a href="#boolean0">boolean attribute</a> . When present, the
                   19206: algorithm described herein will cause the user agent to
                   19207: automatically begin playback of the <a href="#media10">media
                   19208: resource</a> as soon as it can do so without stopping.</p>
                   19209: <p>The <dfn id="autoplay0" title=
                   19210: "dom-media-autoplay"><code>autoplay</code></dfn> DOM attribute must
                   19211: <a href="#reflect">reflect</a> the content attribute of the same
                   19212: name.</p>
                   19213: <h5 id="playing"><span class="secno"><del class=
                   19214: "diff-old">3.14.9.7.</del> <ins class=
                   19215: "diff-chg">3.12.10.7.</ins></span> Playing the media resource</h5>
                   19216: <p>The <dfn id="paused" title=
                   19217: "dom-media-paused"><code>paused</code></dfn> attribute represents
                   19218: whether the <a href="#media7">media element</a> is paused or not.
                   19219: The attribute must initially be true.</p>
                   19220: <p>A <a href="#media7">media element</a> is said to be <dfn id=
                   19221: "actively">actively playing</dfn> when its <code title=
                   19222: "dom-media-paused"><a href="#paused">paused</a></code> attribute is
                   19223: false, the <code title="dom-media-readyState"><a href=
                   19224: "#readystate0">readyState</a></code> attribute is either
                   19225: <code title="dom-media-CAN_PLAY"><a href=
                   19226: "#canplay">CAN_PLAY</a></code> or <code title=
                   19227: "dom-media-CAN_PLAY_THROUGH"><a href=
                   19228: "#canplaythrough">CAN_PLAY_THROUGH</a></code> , the element has not
                   19229: <a href="#ended">ended playback</a> , playback has not <a href=
                   19230: "#stopped">stopped due to errors</a> , and the element has not
                   19231: <a href="#paused0">paused for user interaction</a> .</p>
                   19232: <p>A <a href="#media7">media element</a> is said to have <dfn id=
                   19233: "ended">ended playback</dfn> when the element's <code title=
                   19234: "dom-media-networkState"><a href=
                   19235: "#networkstate">networkState</a></code> attribute is <code title=
                   19236: "dom-media-LOADED_METADATA"><a href=
                   19237: "#loadedmetadata">LOADED_METADATA</a></code> or greater, the
                   19238: <a href="#current0">current playback position</a> is equal to the
                   19239: <var><a href="#effective2">effective end</a></var> of the <a href=
                   19240: "#media10">media resource</a> , and the <code title=
                   19241: "dom-media-currentLoop"><a href=
                   19242: "#currentloop">currentLoop</a></code> attribute is equal to
                   19243: <span><code title="dom-media-playCount"><a href=
                   19244: "#playcount0">playCount</a></code> -1</span> .</p>
                   19245: <p>A <a href="#media7">media element</a> is said to have <dfn id=
                   19246: "stopped">stopped due to errors</dfn> when the element's
                   19247: <code title="dom-media-networkState"><a href=
                   19248: "#networkstate">networkState</a></code> attribute is <code title=
                   19249: "dom-media-LOADED_METADATA"><a href=
                   19250: "#loadedmetadata">LOADED_METADATA</a></code> or greater, and the
                   19251: user agent <a href="#non-fatal-media-error">encounters a non-fatal
                   19252: error</a> during the processing of the <a href="#media9">media
                   19253: data</a> , and due to that error, is not able to play the content
                   19254: at the <a href="#current0">current playback position</a> .</p>
                   19255: <p>A <a href="#media7">media element</a> is said to have <dfn id=
                   19256: "paused0">paused for user interaction</dfn> when its <code title=
                   19257: "dom-media-paused"><a href="#paused">paused</a></code> attribute is
                   19258: false, the <code title="dom-media-readyState"><a href=
                   19259: "#readystate0">readyState</a></code> attribute is either
                   19260: <code title="dom-media-CAN_PLAY"><a href=
                   19261: "#canplay">CAN_PLAY</a></code> or <code title=
                   19262: "dom-media-CAN_PLAY_THROUGH"><a href=
                   19263: "#canplaythrough">CAN_PLAY_THROUGH</a></code> and the user agent
                   19264: has reached a point in the <a href="#media10">media resource</a>
                   19265: where the user has to make a selection for the resource to
                   19266: continue.</p>
                   19267: <p>It is possible for a <a href="#media7">media element</a> to have
                   19268: both <a href="#ended">ended playback</a> and <a href=
                   19269: "#paused0">paused for user interaction</a> at the same time.</p>
                   19270: <p id="media-playback">When a <a href="#media7">media element</a>
                   19271: is <a href="#actively">actively playing</a> and its <span title=
                   19272: "dom-ownerDocument">owner <code>Document</code></span> is an
                   19273: <a href="#active">active document</a> , its <a href=
                   19274: "#current0">current playback position</a> must increase
                   19275: monotonically at <code title="dom-media-playbackRate"><a href=
                   19276: "#playbackrate">playbackRate</a></code> units of media time per
                   19277: unit time of wall clock time. If this value is not 1, the user
                   19278: agent may apply pitch adjustments to any audio component of the
                   19279: <a href="#media10">media resource</a> .</p>
                   19280: <p><a href="#media10" title="media resource">Media resources</a>
                   19281: might be internally scripted or interactive. Thus, a <a href=
                   19282: "#media7">media element</a> could play in a non-linear fashion. If
                   19283: this happens, the user agent must act as if the algorithm for
                   19284: <a href="#seek" title="dom-media-seek">seeking</a> was used
                   19285: whenever the <a href="#current0">current playback position</a>
                   19286: changes in a discontinuous fashion (so that the relevant events
                   19287: fire).</p>
                   19288: <p id="fire-waiting-when-waiting">When a <a href="#media7">media
                   19289: element</a> that is <a href="#actively">actively playing</a> stops
                   19290: playing because its <code title="dom-media-readyState"><a href=
                   19291: "#readystate0">readyState</a></code> attribute changes to a value
                   19292: lower than <code title="dom-media-CAN_PLAY"><a href=
                   19293: "#canplay">CAN_PLAY</a></code> , without the element having
                   19294: <a href="#ended">ended playback</a> , or playback having <a href=
                   19295: "#stopped">stopped due to errors</a> , or playback having <a href=
                   19296: "#paused0">paused for user interaction</a> , <ins class=
                   19297: "diff-new">or the</ins> <a href="#seek" title=
                   19298: "dom-media-seek"><ins class="diff-new">seeking algorithm</ins></a>
                   19299: <ins class="diff-new">being invoked,</ins> the user agent must
                   19300: <a href="#firing2">fire a simple event</a> called <code title=
                   19301: "event-timeupdate"><a href="#timeupdate">timeupdate</a></code> at
                   19302: the element, and then must <a href="#firing2">fire a simple
                   19303: event</a> called <code title="event-waiting"><a href=
                   19304: "#waiting">waiting</a></code> at the element.</p>
                   19305: <p>When a <a href="#media7">media element</a> that is <a href=
                   19306: "#actively">actively playing</a> stops playing because it has
                   19307: <a href="#paused0">paused for user interaction</a> , the user agent
                   19308: must <a href="#firing2">fire a simple event</a> called <code title=
                   19309: "event-timeupdate"><a href="#timeupdate">timeupdate</a></code> at
                   19310: the element.</p>
                   19311: <p>When <code title="dom-media-currentLoop"><a href=
                   19312: "#currentloop">currentLoop</a></code> is less than
                   19313: <span><code title="dom-media-playCount"><a href=
                   19314: "#playcount0">playCount</a></code> -1</span> and the <a href=
                   19315: "#current0">current playback position</a> reaches the <var><a href=
                   19316: "#effective1">effective loop end</a></var> , then the user agent
                   19317: must <a href="#seek" title="dom-media-seek">seek</a> to the
                   19318: <var><a href="#effective0">effective loop start</a></var> ,
                   19319: increase <code title="dom-media-currentLoop"><a href=
                   19320: "#currentloop">currentLoop</a></code> by 1, and <a href=
                   19321: "#firing2">fire a simple event</a> called <code title=
                   19322: "event-timeupdate"><a href="#timeupdate">timeupdate</a></code>
                   19323: .</p>
                   19324: <p>When <code title="dom-media-currentLoop"><a href=
                   19325: "#currentloop">currentLoop</a></code> is equal to the
                   19326: <span><code title="dom-media-playCount"><a href=
                   19327: "#playcount0">playCount</a></code> -1</span> and the <a href=
                   19328: "#current0">current playback position</a> reaches the <var><a href=
                   19329: "#effective2">effective end</a></var> , then the user agent must
                   19330: follow these steps:</p>
                   19331: <ol>
                   19332: <li>
                   19333: <p>The user agent must stop playback.</p>
                   19334: </li>
                   19335: <li>
                   19336: <p class="note">The <code title="dom-media-ended"><a href=
                   19337: "#ended0">ended</a></code> attribute becomes true.</p>
                   19338: </li>
                   19339: <li>
                   19340: <p>The user agent must <a href="#firing2">fire a simple event</a>
                   19341: called <code title="event-timeupdate"><a href=
                   19342: "#timeupdate">timeupdate</a></code> at the element.</p>
                   19343: </li>
                   19344: <li>
                   19345: <p>The user agent must <a href="#firing2">fire a simple event</a>
                   19346: called <code title="event-ended"><a href="#ended1">ended</a></code>
                   19347: at the element.</p>
                   19348: </li>
                   19349: </ol>
                   19350: <p>The <dfn id="defaultplaybackrate" title=
                   19351: "dom-media-defaultPlaybackRate"><code>defaultPlaybackRate</code></dfn>
                   19352: attribute gives the desired speed at which the <a href=
                   19353: "#media10">media resource</a> is to play, as a multiple of its
                   19354: intrinsic speed. The attribute is mutable, but on setting, if the
                   19355: new value is 0.0, a <code>NOT_SUPPORTED_ERR</code> exception must
                   19356: be raised instead of the value being changed. It must initially
                   19357: have the value 1.0.</p>
                   19358: <p>The <dfn id="playbackrate" title=
                   19359: "dom-media-playbackRate"><code>playbackRate</code></dfn> attribute
                   19360: gives the speed at which the <a href="#media10">media resource</a>
                   19361: plays, as a multiple of its intrinsic speed. If it is not equal to
                   19362: the <code title="dom-media-defaultPlaybackRate"><a href=
                   19363: "#defaultplaybackrate">defaultPlaybackRate</a></code> , then the
                   19364: implication is that the user is using a feature such as fast
                   19365: forward or slow motion playback. The attribute is mutable, but on
                   19366: setting, if the new value is 0.0, a <code>NOT_SUPPORTED_ERR</code>
                   19367: exception must be raised instead of the value being changed.
                   19368: Otherwise, the playback must change speed (if the element is
                   19369: <a href="#actively">actively playing</a> ). It must initially have
                   19370: the value 1.0.</p>
                   19371: <p>When the <code title="dom-media-defaultPlaybackRate"><a href=
                   19372: "#defaultplaybackrate">defaultPlaybackRate</a></code> or
                   19373: <code title="dom-media-playbackRate"><a href=
                   19374: "#playbackrate">playbackRate</a></code> attributes change value
                   19375: (either by being set by script or by being changed directly by the
                   19376: user agent, e.g. in response to user control) the user agent must,
                   19377: once any running scripts have finished, <a href="#firing2">fire a
                   19378: simple event</a> called <code title="event-ratechange"><a href=
                   19379: "#ratechange">ratechange</a></code> at the <a href="#media7">media
                   19380: element</a> .</p>
                   19381: <p>When the <dfn id="play" title=
                   19382: "dom-media-play"><code>play()</code></dfn> method on a <a href=
                   19383: "#media7">media element</a> is invoked, the user agent must run the
                   19384: following steps.</p>
                   19385: <ol>
                   19386: <li>
                   19387: <p>If the <a href="#media7">media element</a> 's <code title=
                   19388: "dom-media-networkState"><a href=
                   19389: "#networkstate">networkState</a></code> attribute has the value
                   19390: <a href="#empty" title="dom-media-EMPTY">EMPTY</a> , then the user
                   19391: agent must invoke the <code title="dom-media-load"><a href=
                   19392: "#load">load()</a></code> method and wait for it to return. If that
                   19393: raises an exception, that exception must be reraised by the
                   19394: <code title="dom-media-play"><a href="#play">play()</a></code>
                   19395: method.</p>
                   19396: </li>
                   19397: <li>
                   19398: <p>If the <a href="#ended" title="ended playback">playback has
                   19399: ended</a> , then the user agent must set <code title=
                   19400: "dom-media-currentLoop"><a href=
                   19401: "#currentloop">currentLoop</a></code> to zero and <a href="#seek"
                   19402: title="dom-media-seek">seek</a> to the <var><a href=
                   19403: "#effective">effective start</a></var> .</p>
                   19404: <p class="note"><ins class="diff-new">If this involved a seek, the
                   19405: user agent will</ins> <a href="#firing2"><ins class="diff-new">fire
                   19406: a simple event</ins></a> <ins class="diff-new">called</ins>
                   19407: <code title="event-timeupdate"><a href="#timeupdate"><ins class=
                   19408: "diff-new">timeupdate</ins></a></code> <ins class="diff-new">at
                   19409: the</ins> <a href="#media7"><ins class="diff-new">media
                   19410: element</ins></a> .</p>
                   19411: </li>
                   19412: <li>
                   19413: <p>The <code title="dom-media-playbackRate"><a href=
                   19414: "#playbackrate">playbackRate</a></code> attribute must be set to
                   19415: the value of the <code title=
                   19416: "dom-media-defaultPlaybackRate"><a href=
                   19417: "#defaultplaybackrate">defaultPlaybackRate</a></code>
                   19418: attribute.</p>
                   19419: <p class="note"><ins class="diff-new">If this caused the</ins>
                   19420: <code title="dom-media-playbackRate"><a href=
                   19421: "#playbackrate"><ins class="diff-new">playbackRate</ins></a></code>
                   19422: <ins class="diff-new">attribute to change value, the user agent
                   19423: will</ins> <a href="#firing2"><ins class="diff-new">fire a simple
                   19424: event</ins></a> <ins class="diff-new">called</ins> <code title=
                   19425: "event-ratechange"><a href="#ratechange"><ins class=
                   19426: "diff-new">ratechange</ins></a></code> <ins class="diff-new">at
                   19427: the</ins> <a href="#media7"><ins class="diff-new">media
                   19428: element</ins></a> .</p>
                   19429: </li>
                   19430: <li>
                   19431: <p>If the <a href="#media7">media element</a> 's <code title=
                   19432: "dom-media-paused"><a href="#paused">paused</a></code> attribute is
                   19433: true, it must be set to false.</p>
                   19434: </li>
                   19435: <li>
                   19436: <p>The <a href="#media7">media element</a> 's <a href=
                   19437: "#autoplaying">autoplaying flag</a> must be set to false.</p>
                   19438: </li>
                   19439: <li>
                   19440: <p>The method must then return. <del class="diff-old">If the second
                   19441: step above involved a seek, the user agent will fire a simple event
                   19442: called timeupdate at the media element . If the third step above
                   19443: caused the playbackRate attribute to change value, the user agent
                   19444: will fire a simple event called ratechange at the media element
                   19445: .</del></p>
                   19446: </li>
                   19447: <li>
                   19448: <p>If the fourth step above changed the value of <code title=
                   19449: "dom-media-paused"><a href="#paused">paused</a></code> , the user
                   19450: agent <del class="diff-old">must</del> <ins class="diff-chg">must,
                   19451: after any running scripts have finished executing, and after any
                   19452: other events triggered by this algorithm (specifically</ins>
                   19453: <code title="event-timeupdate"><a href="#timeupdate"><ins class=
                   19454: "diff-chg">timeupdate</ins></a></code> <ins class=
                   19455: "diff-chg">and</ins> <code title="event-ratechange"><a href=
                   19456: "#ratechange"><ins class="diff-chg">ratechange</ins></a></code>
                   19457: <ins class="diff-chg">) have fired,</ins> <a href="#firing2">fire a
                   19458: simple event</a> called <code title="event-pause"><a href=
                   19459: "#pause1">play</a></code> at the <del class="diff-old">media
                   19460: element .</del> <ins class="diff-chg">element.</ins></p>
                   19461: </li>
                   19462: </ol>
                   19463: <p>When the <dfn id="pause0" title=
                   19464: "dom-media-pause"><code>pause()</code></dfn> method is invoked, the
                   19465: user agent must run the following steps:</p>
                   19466: <ol>
                   19467: <li>
                   19468: <p>If the <a href="#media7">media element</a> 's <code title=
                   19469: "dom-media-networkState"><a href=
                   19470: "#networkstate">networkState</a></code> attribute has the value
                   19471: <a href="#empty" title="dom-media-EMPTY">EMPTY</a> , then the user
                   19472: agent must invoke the <code title="dom-media-load"><a href=
                   19473: "#load">load()</a></code> method and wait for it to return. If that
                   19474: raises an exception, that exception must be reraised by the
                   19475: <code title="dom-media-play"><a href="#play">pause()</a></code>
                   19476: method.</p>
                   19477: </li>
                   19478: <li>
                   19479: <p>If the <a href="#media7">media element</a> 's <code title=
                   19480: "dom-media-paused"><a href="#paused">paused</a></code> attribute is
                   19481: false, it must be set to true.</p>
                   19482: </li>
                   19483: <li>
                   19484: <p>The <a href="#media7">media element</a> 's <a href=
                   19485: "#autoplaying">autoplaying flag</a> must be set to false.</p>
                   19486: </li>
                   19487: <li>
                   19488: <p>The method must then return.</p>
                   19489: </li>
                   19490: <li>
                   19491: <p>If the second step above changed the value of <code title=
                   19492: "dom-media-paused"><a href="#paused">paused</a></code> ,
                   19493: <ins class="diff-new">then, after any running scripts have finished
                   19494: executing,</ins> the user agent must first <a href="#firing2">fire
                   19495: a simple event</a> called <code title="event-timeupdate"><a href=
                   19496: "#timeupdate">timeupdate</a></code> at the element, and then
                   19497: <a href="#firing2">fire a simple event</a> called <code title=
                   19498: "event-pause"><a href="#pause1">pause</a></code> at the
                   19499: element.</p>
                   19500: </li>
                   19501: </ol>
                   19502: <p>When a <a href="#media7">media element</a> is <span>removed from
                   19503: a <code>Document</code></span> , <ins class="diff-new">if the</ins>
                   19504: <a href="#media7"><ins class="diff-new">media element</ins></a>
                   19505: <ins class="diff-new">'s</ins> <code title=
                   19506: "dom-media-networkState"><a href="#networkstate"><ins class=
                   19507: "diff-new">networkState</ins></a></code> <ins class=
                   19508: "diff-new">attribute has a value other than</ins> <a href="#empty"
                   19509: title="dom-media-EMPTY"><ins class="diff-new">EMPTY</ins></a>
                   19510: <ins class="diff-new">then</ins> the user agent must act as if the
                   19511: <code title="dom-media-pause"><a href="#pause0">pause()</a></code>
                   19512: method had been invoked.</p>
                   19513: <p><a href="#media7" title="media element">Media elements</a> that
                   19514: are <a href="#actively">actively playing</a> while not <span>in a
                   19515: <code>Document</code></span> must not play any video, but should
                   19516: play any audio component. Media elements must not stop playing just
                   19517: because all references to them have been removed; only once a media
                   19518: element to which no references exist has reached a point where no
                   19519: further audio remains to be played for that element (e.g. because
                   19520: the element is paused or because the end of the clip has been
                   19521: reached) may the element be <span>garbage collected</span> .</p>
                   19522: <p class="note">If the <a href="#media7">media element</a> 's
                   19523: <code title="dom-ownerDocument">ownerDocument</code> stops being an
                   19524: active document, then the playback will <a href=
                   19525: "#media-playback">stop</a> until the document is active again.</p>
                   19526: <p>The <dfn id="ended0" title=
                   19527: "dom-media-ended"><code>ended</code></dfn> attribute must return
                   19528: true if the <a href="#media7">media element</a> has <a href=
                   19529: "#ended">ended playback</a> , and false otherwise.</p>
                   19530: <p>The <dfn id="played" title=
                   19531: "dom-media-played"><code>played</code></dfn> attribute must return
                   19532: a static <del class="diff-old">normalised</del> <a href=
                   19533: "#normalized"><ins class="diff-chg">normalized</ins>
                   19534: <code>TimeRanges</code> object</a> that represents the ranges of
                   19535: the <a href="#media10">media resource</a> , if any, that the user
                   19536: agent has so far rendered, at the time the attribute is
                   19537: evaluated.</p>
                   19538: <h5 id="seeking"><span class="secno"><del class=
                   19539: "diff-old">3.14.9.8.</del> <ins class=
                   19540: "diff-chg">3.12.10.8.</ins></span> Seeking</h5>
                   19541: <p>The <dfn id="seeking0" title=
                   19542: "dom-media-seeking"><code>seeking</code></dfn> attribute must
                   19543: initially have the value false.</p>
                   19544: <p>When the user agent is required to <dfn id="seek" title=
                   19545: "dom-media-seek">seek</dfn> to a particular <var title="">new
                   19546: playback position</var> in the <a href="#media10">media
                   19547: resource</a> , it means that the user agent must run the following
                   19548: steps:</p>
                   19549: <ol>
                   19550: <li>
                   19551: <p>If the <a href="#media7">media element</a> 's <code title=
                   19552: "dom-media-networkState"><a href=
                   19553: "#networkstate">networkState</a></code> is less than <code title=
                   19554: "dom-media-LOADED_METADATA"><a href=
                   19555: "#loadedmetadata">LOADED_METADATA</a></code> , then the user agent
                   19556: must raise an <code>INVALID_STATE_ERR</code> exception (if the seek
                   19557: was in response to a DOM method call or setting of a DOM
                   19558: attribute), and abort these steps.</p>
                   19559: </li>
                   19560: <li>
                   19561: <p>If <code title="dom-media-currentLoop"><a href=
                   19562: "#currentloop">currentLoop</a></code> is 0, let <var title=
                   19563: "">min</var> be the <var><a href="#effective">effective
                   19564: start</a></var> . Otherwise, let it be the <var><a href=
                   19565: "#effective0">effective loop start</a></var> .</p>
                   19566: </li>
                   19567: <li>
                   19568: <p>If <code title="dom-media-currentLoop"><a href=
                   19569: "#currentloop">currentLoop</a></code> is equal to <del class=
                   19570: "diff-old">the value of</del> <span><code title=
                   19571: "dom-media-playCount"><a href="#playcount0">playCount</a>
                   19572: <del class="diff-old">,</del></code> <ins class=
                   19573: "diff-chg">-1</ins></span> , let <var title="">max</var> be the
                   19574: <var><a href="#effective2">effective end</a></var> . Otherwise, let
                   19575: it be the <var><a href="#effective1">effective loop end</a></var>
                   19576: .</p>
                   19577: </li>
                   19578: <li>
                   19579: <p>If the <var title="">new playback position</var> is more than
                   19580: <var title="">max</var> , let it be <var title="">max</var> .</p>
                   19581: </li>
                   19582: <li>
                   19583: <p>If the <var title="">new playback position</var> is less than
                   19584: <var title="">min</var> , let it be <var title="">min</var> .</p>
                   19585: </li>
                   19586: <li>
                   19587: <p>If the (possibly now changed) <var title="">new playback
                   19588: position</var> is not in one of the ranges given in the
                   19589: <code title="dom-media-seekable"><a href=
                   19590: "#seekable">seekable</a></code> attribute, then the user agent must
                   19591: raise an <code>INDEX_SIZE_ERR</code> exception (if the seek was in
                   19592: response to a DOM method call or setting of a DOM attribute), and
                   19593: abort these steps.</p>
                   19594: </li>
                   19595: <li>
                   19596: <p>The <a href="#current0">current playback position</a> must be
                   19597: set to the given <var title="">new playback position</var> .</p>
                   19598: </li>
                   19599: <li>
                   19600: <p>The <code title="dom-media-seeking"><a href=
                   19601: "#seeking0">seeking</a></code> DOM attribute must be set to
                   19602: true.</p>
                   19603: </li>
                   19604: <li>
                   19605: <p><ins class="diff-new">If the seek was in response to a DOM
                   19606: method call or setting of a DOM attribute, then continue the
                   19607: script.</ins> The <ins class="diff-new">remainder of these steps
                   19608: must be run asynchronously.</ins></p>
                   19609: </li>
                   19610: <li>
                   19611: <p><ins class="diff-new">Once any running scripts have finished
                   19612: executing, the</ins> user agent must <a href="#firing2">fire a
                   19613: simple event</a> called <code title="event-timeupdate"><a href=
                   19614: "#timeupdate">timeupdate</a></code> at the element.</p>
                   19615: </li>
                   19616: <li>
                   19617: <p><del class="diff-old">As soon as</del> <ins class="diff-chg">If
                   19618: the</ins> <a href="#media7"><ins class="diff-chg">media
                   19619: element</ins></a> <ins class="diff-chg">was</ins> <a href=
                   19620: "#actively"><ins class="diff-chg">actively playing</ins></a>
                   19621: <ins class="diff-chg">immediately before it started seeking, but
                   19622: seeking caused its</ins> <code title=
                   19623: "dom-media-readyState"><a href="#readystate0"><ins class=
                   19624: "diff-chg">readyState</ins></a></code> <ins class=
                   19625: "diff-chg">attribute to change to a value lower than</ins>
                   19626: <code title="dom-media-CAN_PLAY"><a href="#canplay"><ins class=
                   19627: "diff-chg">CAN_PLAY</ins></a></code> ,<ins class="diff-chg">the
                   19628: user agent must</ins> <a href="#firing2"><ins class="diff-chg">fire
                   19629: a simple event</ins></a> <ins class="diff-chg">called</ins>
                   19630: <code title="event-waiting"><a href="#waiting"><ins class=
                   19631: "diff-chg">waiting</ins></a></code> <ins class="diff-chg">at the
                   19632: element.</ins></p>
                   19633: </li>
                   19634: <li>
                   19635: <p><ins class="diff-chg">If, when it reaches this step,</ins> the
                   19636: user agent has <ins class="diff-new">still not</ins> established
                   19637: whether or not the <a href="#media9">media data</a> for the
                   19638: <var title="">new playback position</var> is available, and, if it
                   19639: is, decoded enough data to play back that position, the <ins class=
                   19640: "diff-new">user agent must</ins> <a href="#firing2"><ins class=
                   19641: "diff-new">fire a simple event</ins></a> <ins class=
                   19642: "diff-new">called</ins> <code title="event-seeking"><a href=
                   19643: "#seeking1"><ins class="diff-new">seeking</ins></a></code>
                   19644: <ins class="diff-new">at the element.</ins></p>
                   19645: </li>
                   19646: <li>
                   19647: <p><ins class="diff-new">The user agent must wait until it has
                   19648: established whether or not the</ins> <a href="#media9"><ins class=
                   19649: "diff-new">media data</ins></a> <ins class="diff-new">for the</ins>
                   19650: <var title=""><ins class="diff-new">new playback
                   19651: position</ins></var> <ins class="diff-new">is available, and, if it
                   19652: is, until it has decoded enough data to play back that
                   19653: position.</ins></p>
                   19654: </li>
                   19655: <li>
                   19656: <p><ins class="diff-new">The</ins> <code title=
                   19657: "dom-media-seeking"><a href="#seeking0">seeking</a></code> DOM
                   19658: attribute must be set to false.</p>
                   19659: </li>
                   19660: <li>
                   19661: <p><ins class="diff-new">Once any running scripts have finished
                   19662: executing, the user agent must</ins> <a href="#firing2"><ins class=
                   19663: "diff-new">fire a simple event</ins></a> <ins class=
                   19664: "diff-new">called</ins> <code title="event-seeked"><a href=
                   19665: "#seeked"><ins class="diff-new">seeked</ins></a></code> <ins class=
                   19666: "diff-new">at the element.</ins></p>
                   19667: </li>
                   19668: </ol>
                   19669: <p>The <dfn id="seekable" title=
                   19670: "dom-media-seekable"><code>seekable</code></dfn> attribute must
                   19671: return a static <del class="diff-old">normalised</del> <a href=
                   19672: "#normalized"><ins class="diff-chg">normalized</ins>
                   19673: <code>TimeRanges</code> object</a> that represents the ranges of
                   19674: the <a href="#media10">media resource</a> , if any, that the user
                   19675: agent is able to seek to, at the time the attribute is evaluated,
                   19676: notwithstanding the looping attributes (i.e. the <var><a href=
                   19677: "#effective">effective start</a></var> and <var><a href=
                   19678: "#effective2">effective end</a></var> , etc, don't affect the
                   19679: <code title="dom-media-seekable"><a href="#seekable"><del class=
                   19680: "diff-old">seeking</del> <ins class=
                   19681: "diff-chg">seekable</ins></a></code> attribute).</p>
                   19682: <p class="note">If the user agent can seek to anywhere in the
                   19683: <a href="#media10">media resource</a> , e.g. because it a simple
                   19684: movie file and the user agent and the server support HTTP Range
                   19685: requests, then the attribute would return an object with one range,
                   19686: whose start is the time of the first frame (typically zero), and
                   19687: whose end is the same as the time of the first frame plus the
                   19688: <code title="dom-media-duration"><a href=
                   19689: "#duration">duration</a></code> attribute's value (which would
                   19690: equal the time of the last frame).</p>
                   19691: <h5 id="cue-ranges"><span class="secno"><del class=
                   19692: "diff-old">3.14.9.9.</del> <ins class=
                   19693: "diff-chg">3.12.10.9.</ins></span> Cue ranges</h5>
                   19694: <p><a href="#media7" title="media element">Media elements</a> have
                   19695: a set of <dfn id="cue-ranges0" title="cue range">cue ranges</dfn> .
                   19696: Each cue range is made up of the following information:</p>
                   19697: <dl>
                   19698: <dt>A class name</dt>
                   19699: <dd>A group of related ranges can be given the same class name so
                   19700: that they can all be removed at the same time.</dd>
                   19701: <dt>A start time</dt>
                   19702: <dt>An end time</dt>
                   19703: <dd>The actual time range, using the same timeline as the <a href=
                   19704: "#media10">media resource</a> itself.</dd>
                   19705: <dt>A "pause" boolean</dt>
                   19706: <dd>A flag indicating whether to pause playback on exit.</dd>
                   19707: <dt>An "enter" callback</dt>
                   19708: <dd>A callback that is called when the <a href="#current0">current
                   19709: playback position</a> enters the range.</dd>
                   19710: <dt>An "exit" callback</dt>
                   19711: <dd>A callback that is called when the <a href="#current0">current
                   19712: playback position</a> exits the range.</dd>
                   19713: <dt>An "active" boolean</dt>
                   19714: <dd>A flag indicating whether the range is active or not.</dd>
                   19715: </dl>
                   19716: <p>The <dfn id="addcuerange" title=
                   19717: "dom-media-addCueRange"><code>addCueRange( <var title=
                   19718: "">className</var> , <var title="">start</var> , <var title=
                   19719: "">end</var> , <var title="">pauseOnExit</var> , <var title=
                   19720: "">enterCallback</var> , <var title="">exitCallback</var>
                   19721: )</code></dfn> method must, when called, add a <a href=
                   19722: "#cue-ranges0">cue range</a> to the <a href="#media7">media
                   19723: element</a> , that cue range having the class name <var title=
                   19724: "">className</var> , the start time <var title="">start</var> (in
                   19725: seconds), the end time <var title="">end</var> (in seconds), the
                   19726: "pause" boolean with the same value as <var title=
                   19727: "">pauseOnExit</var> , the "enter" callback <var title=
                   19728: "">enterCallback</var> , the "exit" callback <var title=
                   19729: "">exitCallback</var> , and an "active" boolean that is true if the
                   19730: <a href="#current0">current playback position</a> is equal to or
                   19731: greater than the start time and less than the end time, and false
                   19732: otherwise.</p>
                   19733: <p>The <dfn id="removecueranges" title=
                   19734: "dom-media-removeCueRanges"><code>removeCueRanges( <var title=
                   19735: "">className</var> )</code></dfn> method must, when called, remove
                   19736: all the <a href="#cue-ranges0" title="cue range">cue ranges</a> of
                   19737: the <a href="#media7">media element</a> which have the class name
                   19738: <var title="">className</var> .</p>
                   19739: <p>When the <a href="#current0">current playback position</a> of a
                   19740: <a href="#media7">media element</a> changes (e.g. due to playback
                   19741: or seeking), the user agent must run the following steps. If the
                   19742: <a href="#current0">current playback position</a> changes while the
                   19743: steps are running, then the user agent must wait for the steps to
                   19744: complete, and then must immediately rerun the steps. (These steps
                   19745: are thus run as often as possible or needed — if one iteration
                   19746: takes a long time, this can cause certain ranges to be skipped over
                   19747: as the user agent rushes ahead to "catch up".)</p>
                   19748: <ol>
                   19749: <li>
                   19750: <p>Let <var title="">current ranges</var> be an ordered list of
                   19751: <a href="#cue-ranges0" title="cue range">cue ranges</a> ,
                   19752: <del class="diff-old">initialised</del> <ins class=
                   19753: "diff-chg">initialized</ins> to contain all the <a href=
                   19754: "#cue-ranges0" title="cue range">cue ranges</a> of the <a href=
                   19755: "#media7">media element</a> whose start times are less than or
                   19756: equal to the <a href="#current0">current playback position</a> and
                   19757: whose end times are greater than the <a href="#current0">current
                   19758: playback position</a> , in the order they were added to the
                   19759: element.</p>
                   19760: </li>
                   19761: <li>
                   19762: <p>Let <var title="">other ranges</var> be an ordered list of
                   19763: <a href="#cue-ranges0" title="cue range">cue ranges</a> ,
                   19764: <del class="diff-old">initialised</del> <ins class=
                   19765: "diff-chg">initialized</ins> to contain all the <a href=
                   19766: "#cue-ranges0" title="cue range">cue ranges</a> of the <a href=
                   19767: "#media7">media element</a> that are not present in <var title=
                   19768: "">current ranges</var> , in the order they were added to the
                   19769: element.</p>
                   19770: </li>
                   19771: <li>
                   19772: <p>If none of the <a href="#cue-ranges0" title="cue range">cue
                   19773: ranges</a> in <var title="">current ranges</var> have their
                   19774: "active" boolean set to "false" (inactive) and none of the <a href=
                   19775: "#cue-ranges0" title="cue range">cue ranges</a> in <var title=
                   19776: "">other ranges</var> have their "active" boolean set to "true"
                   19777: (active), then abort these steps.</p>
                   19778: </li>
                   19779: <li>
                   19780: <p>If the time was reached through the usual monotonic increase of
                   19781: the current playback position during normal playback, the user
                   19782: agent must then <a href="#firing2">fire a simple event</a> called
                   19783: <code title="event-timeupdate"><a href=
                   19784: "#timeupdate">timeupdate</a></code> at the element. (In the other
                   19785: cases, such as explicit seeks, relevant events get fired as part of
                   19786: the overall process of changing the current playback position.)</p>
                   19787: </li>
                   19788: <li>
                   19789: <p>If the time was reached through the usual monotonic increase of
                   19790: the current playback position during normal playback, and there are
                   19791: <a href="#cue-ranges0" title="cue range">cue ranges</a> in
                   19792: <var title="">other ranges</var> that have both their "active"
                   19793: boolean and their "pause" boolean set to "true", then immediately
                   19794: act as if the element's <code title="dom-media-pause"><a href=
                   19795: "#pause0">pause()</a></code> method had been invoked. (In the other
                   19796: cases, such as explicit seeks, playback is not paused by exiting a
                   19797: cue range, even if that cue range has its "pause" boolean set to
                   19798: "true".)</p>
                   19799: </li>
                   19800: <li>
                   19801: <p>Invoke all the non-null "exit" callbacks for all of the <a href=
                   19802: "#cue-ranges0" title="cue range">cue ranges</a> in <var title=
                   19803: "">other ranges</var> that have their "active" boolean set to
                   19804: "true" (active), in list order.</p>
                   19805: </li>
                   19806: <li>
                   19807: <p>Invoke all the non-null "enter" callbacks for all of the
                   19808: <a href="#cue-ranges0" title="cue range">cue ranges</a> in
                   19809: <var title="">current ranges</var> that have their "active" boolean
                   19810: set to "false" (inactive), in list order.</p>
                   19811: </li>
                   19812: <li>
                   19813: <p>Set the "active" boolean of all the <a href="#cue-ranges0"
                   19814: title="cue range">cue ranges</a> in the <var title="">current
                   19815: ranges</var> list to "true" (active), and the "active" boolean of
                   19816: all the <a href="#cue-ranges0" title="cue range">cue ranges</a> in
                   19817: the <var title="">other ranges</var> list to "false"
                   19818: (inactive).</p>
                   19819: </li>
                   19820: </ol>
                   19821: <p>Invoking a callback (an object implementing the <code><a href=
                   19822: "#voidcallback">VoidCallback</a></code> interface) means calling
                   19823: its <code title="dom-VoidCallback-handleEvent"><a href=
                   19824: "#handleevent">handleEvent()</a></code> method.</p>
                   19825: <pre class="idl">
                   19826: interface <dfn id="voidcallback">VoidCallback</dfn> {
                   19827:   void <a href="#handleevent" title=
                   19828: "dom-voidCallback-handleEvent">handleEvent</a>();
                   19829: };
                   19830: </pre>
                   19831: <p>The <dfn id="handleevent" title=
                   19832: "dom-voidCallback-handleEvent"><code>handleEvent</code></dfn>
                   19833: method of objects implementing the <code><a href=
                   19834: "#voidcallback">VoidCallback</a></code> interface is the
                   19835: <del class="diff-old">entrypoint</del> <ins class="diff-chg">entry
                   19836: point</ins> for the callback represented by the object. <del class=
                   19837: "diff-old">In the ECMAScript DOM binding, the ECMAScript native
                   19838: Function type must implement the VoidCallback interface such that
                   19839: invoking the handleEvent() method of that interface on the object
                   19840: from another language binding invokes the function itself. In the
                   19841: ECMAScript binding itself, however, the handleEvent() method of the
                   19842: interface is not directly accessible on Function objects. Such
                   19843: functions, when invoked, must be called at the scope of the
                   19844: browsing context .</del></p>
                   19845: <h5 id="user-interface"><span class="secno"><del class=
                   19846: "diff-old">3.14.9.10.</del> <ins class=
                   19847: "diff-chg">3.12.10.10.</ins></span> User interface</h5>
                   19848: <p>The <dfn id="controls" title=
                   19849: "attr-media-controls"><code>controls</code></dfn> attribute is a
                   19850: <a href="#boolean0">boolean attribute</a> . If the attribute is
                   19851: present, or if <del class="diff-old">scripting</del> <ins class=
                   19852: "diff-chg">the</ins> <a href="#media7"><ins class="diff-chg">media
                   19853: element</ins></a> is <del class="diff-old">disabled</del> <a href=
                   19854: "#without"><ins class="diff-chg">without script</ins></a> , then
                   19855: the user agent should <dfn id="expose">expose a user interface to
                   19856: the user</dfn> . This user interface should include features to
                   19857: begin playback, pause playback, seek to an arbitrary position in
                   19858: the content (if the content supports arbitrary seeking), change the
                   19859: volume, and show the media content in manners more suitable to the
                   19860: user (e.g. full-screen video or in an independent resizable
                   19861: window). Other controls may also be made available.</p>
                   19862: <p>If the attribute is absent, then the user agent should avoid
                   19863: making a user interface available that could conflict with an
                   19864: author-provided user interface. User agents may make the following
                   19865: features available, however, even when the attribute is absent:</p>
                   19866: <p>User agents may provide controls to affect playback of the media
                   19867: resource (e.g. play, pause, seeking, and volume controls), but such
                   19868: features should not interfere with the page's normal rendering. For
                   19869: example, such features could be exposed in the <a href=
                   19870: "#media7">media element</a> 's context menu.</p>
                   19871: <p>Where possible (specifically, for starting, stopping, pausing,
                   19872: and unpausing playback, for muting or changing the volume of the
                   19873: audio, and for seeking), user interface features exposed by the
                   19874: user agent must be implemented in terms of the DOM API described
                   19875: above, so that, e.g., all the same events fire.</p>
                   19876: <p>The <dfn id="controls0" title=
                   19877: "dom-media-controls"><code>controls</code></dfn> DOM attribute must
                   19878: <a href="#reflect">reflect</a> the content attribute of the same
                   19879: name.</p>
                   19880: <p>The <dfn id="volume" title=
                   19881: "dom-media-volume"><code>volume</code></dfn> attribute must return
                   19882: the playback volume of any audio portions of the <a href=
                   19883: "#media7">media element</a> , in the range 0.0 (silent) to 1.0
                   19884: (loudest). Initially, the volume must be 0.5, but user agents may
                   19885: remember the last set value across sessions, on a per-site basis or
                   19886: otherwise, so the volume may start at other values. On setting, if
                   19887: the new value is in the range 0.0 to 1.0 inclusive, the attribute
                   19888: must be set to the new value and the playback volume must be
                   19889: correspondingly adjusted as soon as possible after setting the
                   19890: attribute, with 0.0 being silent, and 1.0 being the loudest
                   19891: setting, values in between increasing in loudness. The range need
                   19892: not be linear. The loudest setting may be lower than the system's
                   19893: loudest possible setting; for example the user could have set a
                   19894: maximum volume. If the new value is outside the range 0.0 to 1.0
                   19895: inclusive, then, on setting, an <code>INDEX_SIZE_ERR</code>
                   19896: exception must be raised instead.</p>
                   19897: <p>The <dfn id="muted" title=
                   19898: "dom-media-muted"><code>muted</code></dfn> attribute must return
                   19899: true if the audio channels are muted and false otherwise. On
                   19900: setting, the attribute must be set to the new value; if the new
                   19901: value is true, audio playback for this <a href="#media10">media
                   19902: resource</a> must then be muted, and if false, audio playback must
                   19903: then be enabled.</p>
                   19904: <p>Whenever either the <code title="dom-media-muted"><a href=
                   19905: "#muted">muted</a></code> or <code title=
                   19906: "dom-media-volume"><a href="#volume">volume</a></code> attributes
                   19907: are changed, after any running scripts have finished executing, the
                   19908: user agent must <a href="#firing2">fire a simple event</a> called
                   19909: <code title="event-volumechange"><a href=
                   19910: "#volumechange">volumechange</a></code> at the <a href=
                   19911: "#media7">media element</a> .</p>
                   19912: <h5 id="time-ranges"><span class="secno"><del class=
                   19913: "diff-old">3.14.9.11.</del> <ins class=
                   19914: "diff-chg">3.12.10.11.</ins></span> Time <del class=
                   19915: "diff-old">range</del> <ins class="diff-chg">ranges</ins></h5>
                   19916: <p>Objects implementing the <code><a href=
                   19917: "#timeranges">TimeRanges</a></code> interface represent a list of
                   19918: ranges (periods) of time.</p>
                   19919: <pre class="idl">
                   19920: interface <dfn id="timeranges">TimeRanges</dfn> {
                   19921:   readonly attribute unsigned long <a href="#length3" title=
                   19922: "dom-TimeRanges-length">length</a>;
                   19923:   float <a href="#start4" title=
                   19924: "dom-TimeRanges-start">start</a>(in unsigned long index);
                   19925:   float <a href="#endindex" title=
                   19926: "dom-TimeRanges-end">end</a>(in unsigned long index);
                   19927: };
                   19928: </pre>
                   19929: <p>The <dfn id="length3" title=
                   19930: "dom-TimeRanges-length"><code>length</code></dfn> DOM attribute
                   19931: must return the number of ranges represented by the object.</p>
                   19932: <p>The <dfn id="start4" title="dom-TimeRanges-start"><code>start(
                   19933: <var title="">index</var> )</code></dfn> method must return the
                   19934: position of the start of the <var title="">index</var> th range
                   19935: represented by the object, in seconds measured from the start of
                   19936: the timeline that the object covers.</p>
                   19937: <p>The <dfn id="endindex" title="dom-TimeRanges-end"><code>end(
                   19938: <var title="">index</var> )</code></dfn> method must return the
                   19939: position of the end of the <var title="">index</var> th range
                   19940: represented by the object, in seconds measured from the start of
                   19941: the timeline that the object covers.</p>
                   19942: <p>These methods must raise <code>INDEX_SIZE_ERR</code> exceptions
                   19943: if called with an <var title="">index</var> argument greater than
                   19944: or equal to the number of ranges represented by the object.</p>
                   19945: <p>When a <code><a href="#timeranges">TimeRanges</a></code> object
                   19946: is said to be a <del class="diff-old">normalised</del> <dfn id=
                   19947: "normalized"><ins class="diff-chg">normalized</ins>
                   19948: <code>TimeRanges</code> object</dfn> , the ranges it represents
                   19949: must obey the following criteria:</p>
                   19950: <ul>
                   19951: <li>The start of a range must be greater than the end of all
                   19952: earlier ranges.</li>
                   19953: <li>The start of a range must be less than the end of that same
                   19954: range.</li>
                   19955: </ul>
                   19956: <p>In other words, the ranges in such an object are ordered, don't
                   19957: overlap, <ins class="diff-new">aren't empty,</ins> and don't touch
                   19958: (adjacent ranges are folded into one bigger range).</p>
                   19959: <p>The timelines used by the objects returned by the <code title=
                   19960: "dom-media-buffered"><a href="#buffered">buffered</a></code> ,
                   19961: <code title="dom-media-seekable"><a href=
                   19962: "#seekable">seekable</a></code> and <code title=
                   19963: "dom-media-played"><a href="#played">played</a></code> DOM
                   19964: attributes of <a href="#media7" title="media element">media
                   19965: elements</a> must be the same as that element's <a href=
                   19966: "#media10">media resource</a> 's timeline.</p>
                   19967: <h5 id="byte-ranges"><span class="secno"><ins class=
                   19968: "diff-new">3.12.10.12.</ins></span> <ins class="diff-new">Byte
                   19969: ranges</ins></h5>
                   19970: <p><ins class="diff-new">Objects implementing the</ins>
                   19971: <code><a href="#byteranges"><ins class=
                   19972: "diff-new">ByteRanges</ins></a></code> <ins class=
                   19973: "diff-new">interface represent a list of ranges of bytes.</ins></p>
                   19974: <pre class="idl">
                   19975: interface <dfn id="byteranges">ByteRanges</dfn> {<ins class=
                   19976: "diff-new">
                   19977:   readonly attribute unsigned long <a href="#length4" title=
                   19978: "dom-ByteRanges-length">length</a>;
                   19979:   unsigned long <a href="#start5" title=
                   19980: "dom-ByteRanges-start">start</a>(in unsigned long index);
                   19981:   unsigned long <a href="#endindex0" title=
                   19982: "dom-ByteRanges-end">end</a>(in unsigned long index);
                   19983: };
                   19984: </ins>
                   19985: </pre>
                   19986: <p><ins class="diff-new">The</ins> <dfn id="length4" title=
                   19987: "dom-ByteRanges-length"><code><ins class=
                   19988: "diff-new">length</ins></code></dfn> <ins class="diff-new">DOM
                   19989: attribute must return the number of ranges represented by the
                   19990: object.</ins></p>
                   19991: <p><ins class="diff-new">The</ins> <dfn id="start5" title=
                   19992: "dom-ByteRanges-start"><code><ins class="diff-new">start(</ins>
                   19993: <var title=""><ins class="diff-new">index</ins></var> <ins class=
                   19994: "diff-new">)</ins></code></dfn> <ins class="diff-new">method must
                   19995: return the position of the first byte of the</ins> <var title=
                   19996: ""><ins class="diff-new">index</ins></var> <ins class="diff-new">th
                   19997: range represented by the object.</ins></p>
                   19998: <p><ins class="diff-new">The</ins> <dfn id="endindex0" title=
                   19999: "dom-ByteRanges-end"><code><ins class="diff-new">end(</ins>
                   20000: <var title=""><ins class="diff-new">index</ins></var> <ins class=
                   20001: "diff-new">)</ins></code></dfn> <ins class="diff-new">method must
                   20002: return the position of the byte immediately after the last byte of
                   20003: the</ins> <var title=""><ins class="diff-new">index</ins></var>
                   20004: <ins class="diff-new">th range represented by the object. (The byte
                   20005: position returned by this method is not in the range itself. If the
                   20006: first byte of the range is the byte at position 0, and the entire
                   20007: stream of bytes is in the range, then the value of the position of
                   20008: the byte returned by this method for that range will be the same as
                   20009: the number of bytes in the stream.)</ins></p>
                   20010: <p><ins class="diff-new">These methods must raise</ins>
                   20011: <code><ins class="diff-new">INDEX_SIZE_ERR</ins></code> <ins class=
                   20012: "diff-new">exceptions if called with an</ins> <var title=
                   20013: ""><ins class="diff-new">index</ins></var> <ins class=
                   20014: "diff-new">argument greater than or equal to the number of ranges
                   20015: represented by the object.</ins></p>
                   20016: <p><ins class="diff-new">When a</ins> <code><a href=
                   20017: "#byteranges"><ins class="diff-new">ByteRanges</ins></a></code>
                   20018: <ins class="diff-new">object is said to be a</ins> <dfn id=
                   20019: "normalized0"><ins class="diff-new">normalized</ins>
                   20020: <code><ins class="diff-new">ByteRanges</ins></code> <ins class=
                   20021: "diff-new">object</ins></dfn> ,<ins class="diff-new">the ranges it
                   20022: represents must obey the following criteria:</ins></p>
                   20023: <ul>
                   20024: <li><ins class="diff-new">The start of a range must be greater than
                   20025: the end of all earlier ranges.</ins></li>
                   20026: <li><ins class="diff-new">The start of a range must be less than
                   20027: the end of that same range.</ins></li>
                   20028: </ul>
                   20029: <p><ins class="diff-new">In other words, the ranges in such an
                   20030: object are ordered, don't overlap, aren't empty, and don't touch
                   20031: (adjacent ranges are folded into one bigger range).</ins></p>
                   20032: <h5 id="mediaevents"><span class="secno"><del class=
                   20033: "diff-old">3.14.9.12.</del> <ins class=
                   20034: "diff-chg">3.12.10.13.</ins></span> Event summary</h5>
                   20035: <p>The following events fire on <a href="#media7" title=
                   20036: "media element">media elements</a> as part of the processing model
                   20037: described above:</p>
                   20038: <table>
                   20039: <thead>
                   20040: <tr>
                   20041: <th>Event name</th>
                   20042: <th>Interface</th>
                   20043: <th>Dispatched when...</th>
                   20044: <th>Preconditions</th>
                   20045: </tr>
                   20046: </thead>
                   20047: <tbody>
                   20048: <tr>
                   20049: <td><dfn id="loadstart" title="event-loadstart"><code><del class=
                   20050: "diff-old">begin</del> <ins class=
                   20051: "diff-chg">loadstart</ins></code></dfn></td>
                   20052: <td><code>ProgressEvent</code> <a href=
                   20053: "#references">[PROGRESS]</a></td>
                   20054: <td>The user agent begins fetching the <a href="#media9">media
                   20055: data</a> , synchronously during the <code title=
                   20056: "dom-media-load"><a href="#load">load()</a></code> method
                   20057: call.</td>
                   20058: <td><code title="dom-media-networkState"><a href=
                   20059: "#networkstate">networkState</a></code> equals <code title=
                   20060: "dom-media-LOADING"><a href="#loading0">LOADING</a></code></td>
                   20061: </tr>
                   20062: <tr>
                   20063: <td><dfn id="progress0" title=
                   20064: "event-progress"><code>progress</code></dfn></td>
                   20065: <td><code>ProgressEvent</code> <a href=
                   20066: "#references">[PROGRESS]</a></td>
                   20067: <td>The user agent is fetching <a href="#media9">media data</a>
                   20068: .</td>
                   20069: <td><code title="dom-media-networkState"><a href=
                   20070: "#networkstate">networkState</a></code> is more than <code title=
                   20071: "dom-media-EMPTY"><a href="#empty">EMPTY</a></code> and less than
                   20072: <code title="dom-media-LOADED"><a href=
                   20073: "#loaded">LOADED</a></code></td>
                   20074: </tr>
                   20075: <tr>
                   20076: <td><dfn id="loadedmetadata0" title=
                   20077: "event-loadedmetadata"><code>loadedmetadata</code></dfn></td>
                   20078: <td><code>Event</code></td>
                   20079: <td>The user agent is fetching <a href="#media9">media data</a> ,
                   20080: and the <a href="#media10">media resource</a> 's metadata has just
                   20081: been received.</td>
                   20082: <td><code title="dom-media-networkState"><a href=
                   20083: "#networkstate">networkState</a></code> equals <code title=
                   20084: "dom-media-LOADED_METADATA"><a href=
                   20085: "#loadedmetadata">LOADED_METADATA</a></code></td>
                   20086: </tr>
                   20087: <tr>
                   20088: <td><dfn id="loadedfirstframe0" title=
                   20089: "event-loadedfirstframe"><code>loadedfirstframe</code></dfn></td>
                   20090: <td><code>Event</code></td>
                   20091: <td>The user agent is fetching <a href="#media9">media data</a> ,
                   20092: and the <a href="#media10">media resource</a> 's first frame has
                   20093: just been received.</td>
                   20094: <td><code title="dom-media-networkState"><a href=
                   20095: "#networkstate">networkState</a></code> equals <code title=
                   20096: "dom-media-LOADED_FIRST_FRAME"><a href=
                   20097: "#loadedfirstframe">LOADED_FIRST_FRAME</a></code></td>
                   20098: </tr>
                   20099: <tr>
                   20100: <td><dfn id="load0" title="event-load"><code>load</code></dfn></td>
                   20101: <td><code>ProgressEvent</code> <a href=
                   20102: "#references">[PROGRESS]</a></td>
                   20103: <td>The user agent finishes downloading the entire <a href=
                   20104: "#media10">media resource</a> .</td>
                   20105: <td><code title="dom-media-networkState"><a href=
                   20106: "#networkstate">networkState</a></code> equals <code title=
                   20107: "dom-media-LOADED"><a href="#loaded">LOADED</a></code></td>
                   20108: </tr>
                   20109: <tr>
                   20110: <td><dfn id="abort" title=
                   20111: "event-abort"><code>abort</code></dfn></td>
                   20112: <td><code>ProgressEvent</code> <a href=
                   20113: "#references">[PROGRESS]</a></td>
                   20114: <td>The user agent stops fetching the <a href="#media9">media
                   20115: data</a> before it is completely downloaded. This can be fired
                   20116: synchronously during the <code title="dom-media-load"><a href=
                   20117: "#load">load()</a></code> method call.</td>
                   20118: <td><code title="dom-media-error"><a href=
                   20119: "#error0">error</a></code> is an object with the code <code title=
                   20120: "dom-MediaError-MEDIA_ERR_ABORTED"><a href=
                   20121: "#mediaerraborted">MEDIA_ERR_ABORTED</a></code> . <code title=
                   20122: "dom-media-networkState"><a href=
                   20123: "#networkstate">networkState</a></code> equals either <code title=
                   20124: "dom-media-EMPTY"><a href="#empty">EMPTY</a></code> or <code title=
                   20125: "dom-media-LOADED"><a href="#loaded">LOADED</a></code> , depending
                   20126: on when the download was aborted.</td>
                   20127: </tr>
                   20128: <tr>
                   20129: <td><dfn id="error1" title=
                   20130: "event-error"><code>error</code></dfn></td>
                   20131: <td><code>ProgressEvent</code> <a href=
                   20132: "#references">[PROGRESS]</a></td>
                   20133: <td>An error occurs while fetching the <a href="#media9">media
                   20134: data</a> .</td>
                   20135: <td><code title="dom-media-error"><a href=
                   20136: "#error0">error</a></code> is an object with the code <code title=
                   20137: "dom-MediaError-MEDIA_ERR_NETWORK_ERROR">MEDIA_ERR_NETWORK_ERROR</code>
                   20138: or higher. <code title="dom-media-networkState"><a href=
                   20139: "#networkstate">networkState</a></code> equals either <code title=
                   20140: "dom-media-EMPTY"><a href="#empty">EMPTY</a></code> or <code title=
                   20141: "dom-media-LOADED"><a href="#loaded">LOADED</a></code> , depending
                   20142: on when the download was aborted.</td>
                   20143: </tr>
                   20144: <tr>
                   20145: <td><dfn id="emptied" title=
                   20146: "event-emptied"><code>emptied</code></dfn></td>
                   20147: <td><code>Event</code></td>
                   20148: <td>A <a href="#media7">media element</a> whose <code title=
                   20149: "dom-media-networkState"><a href=
                   20150: "#networkstate">networkState</a></code> was previously not in the
                   20151: <code title="dom-media-EMPTY"><a href="#empty">EMPTY</a></code>
                   20152: state has just switched to that state (either because of a fatal
                   20153: error during load that's about to be reported, or because the
                   20154: <code title="dom-media-load"><a href="#load">load()</a></code>
                   20155: method was reinvoked, in which case it is fired synchronously
                   20156: during the <code title="dom-media-load"><a href=
                   20157: "#load">load()</a></code> method call).</td>
                   20158: <td><code title="dom-media-networkState"><a href=
                   20159: "#networkstate">networkState</a></code> is <code title=
                   20160: "dom-media-EMPTY"><a href="#empty">EMPTY</a></code> ; all the DOM
                   20161: attributes are in their initial states.</td>
                   20162: </tr>
                   20163: <tr>
                   20164: <td><dfn id="stalled" title=
                   20165: "event-stalled"><code>stalled</code></dfn></td>
                   20166: <td><code>ProgressEvent</code></td>
                   20167: <td>The user agent is trying to fetch <a href="#media9">media
                   20168: data</a> , but data is unexpectedly not forthcoming.</td>
                   20169: <td></td>
                   20170: </tr>
                   20171: <tr>
                   20172: <td><dfn id="play0" title="event-play"><code>play</code></dfn></td>
                   20173: <td><code>Event</code></td>
                   20174: <td>Playback has begun. Fired after the <code title=
                   20175: "dom-media-play"><a href="#play">play</a></code> method has
                   20176: returned.</td>
                   20177: <td><code title="dom-media-paused"><a href=
                   20178: "#paused">paused</a></code> is newly false.</td>
                   20179: </tr>
                   20180: <tr>
                   20181: <td><dfn id="pause1" title=
                   20182: "event-pause"><code>pause</code></dfn></td>
                   20183: <td><code>Event</code></td>
                   20184: <td>Playback has been paused. Fired after the <code title=
                   20185: "dom-media-pause"><a href="#pause0">pause</a></code> method has
                   20186: returned.</td>
                   20187: <td><code title="dom-media-paused"><a href=
                   20188: "#paused">paused</a></code> is newly true.</td>
                   20189: </tr>
                   20190: <tr>
                   20191: <td><dfn id="waiting" title=
                   20192: "event-waiting"><code>waiting</code></dfn></td>
                   20193: <td><code>Event</code></td>
                   20194: <td>Playback has stopped because the next frame is not available,
                   20195: but the user agent expects that frame to become available in due
                   20196: course.</td>
                   20197: <td><code title="dom-media-readyState"><a href=
                   20198: "#readystate0">readyState</a></code> is either <code title=
                   20199: "dom-media-DATA_UNAVAILABLE"><a href=
                   20200: "#dataunavailable">DATA_UNAVAILABLE</a></code> or <code title=
                   20201: "dom-media-CAN_SHOW_CURRENT_FRAME"><a href=
                   20202: "#canshowcurrentframe">CAN_SHOW_CURRENT_FRAME</a></code> , and
                   20203: <code title="dom-media-paused"><a href="#paused">paused</a></code>
                   20204: is false. Either <code title="dom-media-seeking"><a href=
                   20205: "#seeking0">seeking</a></code> is true, or the <a href=
                   20206: "#current0">current playback position</a> is not contained in any
                   20207: of the ranges in <code title="dom-media-buffered"><a href=
                   20208: "#buffered">buffered</a></code> . It is possible for playback to
                   20209: stop for two other reasons without <code title=
                   20210: "dom-media-paused"><a href="#paused">paused</a></code> being false,
                   20211: but those two reasons do not fire this event: maybe <a href=
                   20212: "#ended" title="ended playback">playback ended</a> , or playback
                   20213: <a href="#stopped">stopped due to errors</a> .</td>
                   20214: </tr>
                   20215: <tr>
                   20216: <td><dfn id="seeking1" title="event-seeking"><code><ins class=
                   20217: "diff-new">seeking</ins></code></dfn></td>
                   20218: <td><code><ins class="diff-new">Event</ins></code></td>
                   20219: <td><ins class="diff-new">The</ins> <code title=
                   20220: "dom-media-seeking"><a href="#seeking0"><ins class=
                   20221: "diff-new">seeking</ins></a></code> <ins class="diff-new">DOM
                   20222: attribute changed to true and the seek operation is taking long
                   20223: enough that the user agent has time to fire the event.</ins></td>
                   20224: <td></td>
                   20225: </tr>
                   20226: <tr>
                   20227: <td><dfn id="seeked" title="event-seeked"><code><ins class=
                   20228: "diff-new">seeked</ins></code></dfn></td>
                   20229: <td><code><ins class="diff-new">Event</ins></code></td>
                   20230: <td><ins class="diff-new">The</ins> <code title=
                   20231: "dom-media-seeking"><a href="#seeking0"><ins class=
                   20232: "diff-new">seeking</ins></a></code> <ins class="diff-new">DOM
                   20233: attribute changed to false.</ins></td>
                   20234: <td></td>
                   20235: </tr>
                   20236: <tr>
                   20237: <td><dfn id="timeupdate" title=
                   20238: "event-timeupdate"><code>timeupdate</code></dfn></td>
                   20239: <td><code>Event</code></td>
                   20240: <td>The <a href="#current0">current playback position</a> changed
                   20241: in an interesting way, for example discontinuously.</td>
                   20242: <td></td>
                   20243: </tr>
                   20244: <tr>
                   20245: <td><dfn id="ended1" title=
                   20246: "event-ended"><code>ended</code></dfn></td>
                   20247: <td><code>Event</code></td>
                   20248: <td>Playback has stopped because the end of the <a href=
                   20249: "#media10">media resource</a> was reached.</td>
                   20250: <td><code title="dom-media-currentTime"><a href=
                   20251: "#currenttime">currentTime</a></code> equals the <var><a href=
                   20252: "#effective2">effective end</a></var> ; <code title=
                   20253: "dom-media-ended"><a href="#ended0">ended</a></code> is true.</td>
                   20254: </tr>
                   20255: <tr>
                   20256: <td><dfn id="dataunavailable0" title=
                   20257: "event-dataunavailable"><code>dataunavailable</code></dfn></td>
                   20258: <td><code>Event</code></td>
                   20259: <td>The user agent cannot render the data at the <a href=
                   20260: "#current0">current playback position</a> because data for the
                   20261: current frame is not immediately available.</td>
                   20262: <td>The <code title="dom-media-readyState"><a href=
                   20263: "#readystate0">readyState</a></code> attribute is newly equal to
                   20264: <code title="DATA_UNAVAILABLE">DATA_UNAVAILABLE</code> .</td>
                   20265: </tr>
                   20266: <tr>
                   20267: <td><dfn id="canshowcurrentframe0" title=
                   20268: "event-canshowcurrentframe"><code>canshowcurrentframe</code></dfn></td>
                   20269: <td><code>Event</code></td>
                   20270: <td>The user agent cannot render the data after the <a href=
                   20271: "#current0">current playback position</a> because data for the next
                   20272: frame is not immediately available.</td>
                   20273: <td>The <code title="dom-media-readyState"><a href=
                   20274: "#readystate0">readyState</a></code> attribute is newly equal to
                   20275: <code title="dom-media-CAN_SHOW_CURRENT_FRAME"><a href=
                   20276: "#canshowcurrentframe">CAN_SHOW_CURRENT_FRAME</a></code> .</td>
                   20277: </tr>
                   20278: <tr>
                   20279: <td><dfn id="canplay0" title=
                   20280: "event-canplay"><code>canplay</code></dfn></td>
                   20281: <td><code>Event</code></td>
                   20282: <td>The user agent can resume playback of the <a href=
                   20283: "#media9">media data</a> , but estimates that if playback were to
                   20284: be started now, the <a href="#media10">media resource</a> could not
                   20285: be rendered at the current playback rate up to its end without
                   20286: having to stop for further buffering of content.</td>
                   20287: <td>The <code title="dom-media-readyState"><a href=
                   20288: "#readystate0">readyState</a></code> attribute is newly equal to
                   20289: <code title="dom-media-CAN_PLAY"><a href=
                   20290: "#canplay">CAN_PLAY</a></code> .</td>
                   20291: </tr>
                   20292: <tr>
                   20293: <td><dfn id="canplaythrough0" title=
                   20294: "event-canplaythrough"><code>canplaythrough</code></dfn></td>
                   20295: <td><code>Event</code></td>
                   20296: <td>The user agent estimates that if playback were to be started
                   20297: now, the <a href="#media10">media resource</a> could be rendered at
                   20298: the current playback rate all the way to its end without having to
                   20299: stop for further buffering.</td>
                   20300: <td>The <code title="dom-media-readyState"><a href=
                   20301: "#readystate0">readyState</a></code> attribute is newly equal to
                   20302: <code title="dom-media-CAN_PLAY_THROUGH"><a href=
                   20303: "#canplaythrough">CAN_PLAY_THROUGH</a></code> .</td>
                   20304: </tr>
                   20305: <tr>
                   20306: <td><dfn id="ratechange" title=
                   20307: "event-ratechange"><code>ratechange</code></dfn></td>
                   20308: <td><code>Event</code></td>
                   20309: <td>Either the <code title="dom-media-defaultPlaybackRate"><a href=
                   20310: "#defaultplaybackrate">defaultPlaybackRate</a></code> or the
                   20311: <code title="dom-media-playbackRate"><a href=
                   20312: "#playbackrate">playbackRate</a></code> attribute has just been
                   20313: updated.</td>
                   20314: <td></td>
                   20315: </tr>
                   20316: <tr>
                   20317: <td><dfn id="durationchange" title=
                   20318: "event-durationchange"><code>durationchange</code></dfn></td>
                   20319: <td><code>Event</code></td>
                   20320: <td>The <code title="dom-media-duration"><a href=
                   20321: "#duration">duration</a></code> attribute has just been
                   20322: updated.</td>
                   20323: <td></td>
                   20324: </tr>
                   20325: <tr>
                   20326: <td><dfn id="volumechange" title=
                   20327: "event-volumechange"><code>volumechange</code></dfn></td>
                   20328: <td><code>Event</code></td>
                   20329: <td>Either the <code title="dom-media-volume"><a href=
                   20330: "#volume">volume</a></code> attribute or the <code title=
                   20331: "dom-media-muted"><a href="#muted">muted</a></code> attribute has
                   20332: changed. Fired after the relevant attribute's setter has
                   20333: returned.</td>
                   20334: <td></td>
                   20335: </tr>
                   20336: </tbody>
                   20337: </table>
                   20338: <h5 id="security0"><span class="secno"><del class=
                   20339: "diff-old">3.14.9.13.</del> <ins class=
                   20340: "diff-chg">3.12.10.14.</ins></span> Security and privacy
                   20341: considerations</h5>
                   20342: <p class="big-issue">Talk about making sure interactive media files
                   20343: (e.g. SVG) don't have access to the container DOM (XSS potential);
                   20344: talk about not exposing any sensitive data like metadata from
                   20345: tracks in the media files (intranet snooping risk) <del class=
                   20346: "diff-old">3.14.10. The source element Categories None. Contexts in
                   20347: which this element may be used: As a child of a media element ,
                   20348: before any prose content . Content model: Empty. Element-specific
                   20349: attributes: src type media DOM interface: &lt;pre
                   20350: class=idl&gt;interface { attribute DOMString ; attribute DOMString
                   20351: ; attribute DOMString ; }; The source element allows authors to
                   20352: specify multiple media resources for media elements . The src
                   20353: attribute gives the address of the media resource . The value must
                   20354: be a URI (or IRI). This attribute must be present. The type
                   20355: attribute gives the type of the media resource , to help the user
                   20356: agent determine if it can play this media resource before
                   20357: downloading it. Its value must be a MIME type. The codecs parameter
                   20358: may be specified and might be necessary to specify exactly how the
                   20359: resource is encoded. [RFC2046] [RFC4281] The following list shows
                   20360: some examples of how to use the codecs= MIME parameter in the type
                   20361: attribute. H.264 Simple baseline profile video (main and extended
                   20362: video compatible) level 3 and Low-Complexity AAC audio in MP4
                   20363: container &lt;source src="video.mp4" type="video/mp4;
                   20364: codecs=&amp;quot;avc1.42E01E, mp4a.40.2&amp;quot;"&gt; H.264
                   20365: Extended profile video (baseline-compatible) level 3 and
                   20366: Low-Complexity AAC audio in MP4 container &lt;source
                   20367: src="video.mp4" type="video/mp4; codecs=&amp;quot;avc1.58A01E,
                   20368: mp4a.40.2&amp;quot;"&gt; H.264 Main profile video level 3 and
                   20369: Low-Complexity AAC audio in MP4 container &lt;source
                   20370: src="video.mp4" type="video/mp4; codecs=&amp;quot;avc1.4D401E,
                   20371: mp4a.40.2&amp;quot;"&gt; H.264 "High" profile video (incompatible
                   20372: with main, baseline, or extended profiles) level 3 and
                   20373: Low-Complexity AAC audio in MP4 container &lt;source
                   20374: src="video.mp4" type="video/mp4; codecs=&amp;quot;avc1.64001E,
                   20375: mp4a.40.2&amp;quot;"&gt; MPEG-4 Visual Simple Profile Level 0 video
                   20376: and Low-Complexity AAC audio in MP4 container &lt;source
                   20377: src="video.mp4" type="video/mp4; codecs=&amp;quot;mp4v.20.8,
                   20378: mp4a.40.2&amp;quot;"&gt; MPEG-4 Advanced Simple Profile Level 0
                   20379: video and Low-Complexity AAC audio in MP4 container &lt;source
                   20380: src="video.mp4" type="video/mp4; codecs=&amp;quot;mp4v.20.240,
                   20381: mp4a.40.2&amp;quot;"&gt; MPEG-4 Visual Simple Profile Level 0 video
                   20382: and AMR audio in 3GPP container &lt;source src="video.3gp"
                   20383: type="video/3gpp; codecs=&amp;quot;mp4v.20.8, samr&amp;quot;"&gt;
                   20384: Theora video and Vorbis audio in Ogg container &lt;source
                   20385: src="video.ogv" type="video/ogg; codecs=&amp;quot;theora,
                   20386: vorbis&amp;quot;"&gt; Theora video and Speex audio in Ogg container
                   20387: &lt;source src="video.ogv" type="video/ogg;
                   20388: codecs=&amp;quot;theora, speex&amp;quot;"&gt; Vorbis audio alone in
                   20389: Ogg container &lt;source src="audio.oga" type="audio/ogg;
                   20390: codecs=vorbis"&gt; Speex audio alone in Ogg container &lt;source
                   20391: src="audio.oga" type="audio/ogg; codecs=speex"&gt; Flac audio alone
                   20392: in Ogg container &lt;source src="audio.oga" type="audio/ogg;
                   20393: codecs=flac"&gt; Dirac video and Vorbis audio in Ogg container
                   20394: &lt;source src="video.ogv" type="video/ogg; codecs=&amp;quot;dirac,
                   20395: vorbis&amp;quot;"&gt; Theora video and Vorbis audio in Matroska
                   20396: container &lt;source src="video.mkv" type="video/x-matroska;
                   20397: codecs=&amp;quot;theora, vorbis&amp;quot;"&gt; The media attribute
                   20398: gives the intended media type of the media resource , to help the
                   20399: user agent determine if this media resource is useful to the user
                   20400: before downloading it. Its value must be a valid media query. [MQ]
                   20401: Either the type attribute, the media attribute or both, must be
                   20402: specified, unless this is the last source element child of the
                   20403: parent element. If a source element is inserted into a media
                   20404: element that is already in a document and whose networkState is in
                   20405: the EMPTY state, the user agent must implicitly invoke the load()
                   20406: method on the media element as soon as all other scripts have
                   20407: finished executing. Any exceptions raised must be ignored. The DOM
                   20408: attributes src , type , and media must reflect the respective
                   20409: content attributes of the same name.</del></p>
                   20410: <h4 id="the-canvas"><span class="secno"><del class=
                   20411: "diff-old">3.14.11.</del> <ins class=
                   20412: "diff-chg">3.12.11</ins></span> The <dfn id=
                   20413: "canvas"><code>canvas</code></dfn> element</h4>
                   20414: <dl class="element">
                   20415: <dt>Categories</dt>
                   20416: <dd><a href="#embedded1">Embedded content</a> .</dd>
                   20417: <dt>Contexts in which this element may be used:</dt>
                   20418: <dd>Where <a href="#embedded1">embedded content</a> is
                   20419: expected.</dd>
                   20420: <dt>Content model:</dt>
                   20421: <dd><a href="#transparent0">Transparent</a> .</dd>
                   20422: <dt>Element-specific attributes:</dt>
                   20423: <dd><code title="attr-canvas-width"><a href=
                   20424: "#width0">width</a></code></dd>
                   20425: <dd><code title="attr-canvas-height"><a href=
                   20426: "#height0">height</a></code></dd>
                   20427: <dt>DOM interface:</dt>
                   20428: <dd>
                   20429: <pre class="idl">
                   20430: interface <dfn id=
                   20431: "htmlcanvaselement">HTMLCanvasElement</dfn> : <a href=
                   20432: "#htmlelement">HTMLElement</a> {
                   20433: <del class="diff-old">         attribute unsigned long ;
                   20434:          attribute unsigned long ;
                   20435: </del>
                   20436: <ins class="diff-chg">           attribute unsigned long <a href=
                   20437: "#width1" title="dom-canvas-width">width</a>;
                   20438:            attribute unsigned long <a href="#height1" title=
                   20439: "dom-canvas-height">height</a>;
                   20440: </ins>
                   20441:   DOMString <a href="#todataurl" title=
                   20442: "dom-canvas-toDataURL">toDataURL</a>();
                   20443:   DOMString <a href="#todataurl0" title=
                   20444: "dom-canvas-toDataURL-type">toDataURL</a>(in DOMString type);
                   20445:   DOMObject <a href="#getcontext" title=
                   20446: "dom-canvas-getContext">getContext</a>(in DOMString contextId);
                   20447: };
                   20448: </pre></dd>
                   20449: </dl>
                   20450: <p>The <code><a href="#canvas">canvas</a></code> element represents
                   20451: a resolution-dependent bitmap canvas, which can be used for
                   20452: rendering graphs, game graphics, or other visual images on the
                   20453: fly.</p>
                   20454: <p>Authors should not use the <code><a href=
                   20455: "#canvas">canvas</a></code> element in a document when a more
                   20456: suitable element is available. For example, it is inappropriate to
                   20457: use a <code><a href="#canvas">canvas</a></code> element to render a
                   20458: page heading: if the desired presentation of the heading is
                   20459: graphically intense, it should be marked up using appropriate
                   20460: elements (typically <code><a href="#h1">h1</a></code> ) and then
                   20461: styled using CSS and supporting technologies such as XBL.</p>
                   20462: <p>When authors use the <code><a href="#canvas">canvas</a></code>
                   20463: element, they should also provide content that, when presented to
                   20464: the user, conveys essentially the same function or purpose as the
                   20465: bitmap canvas. This content may be placed as content of the
                   20466: <code><a href="#canvas">canvas</a></code> element. The contents of
                   20467: the <code><a href="#canvas">canvas</a></code> element, if any, are
                   20468: the element's <a href="#fallback">fallback content</a> .</p>
                   20469: <p>In interactive visual <del class="diff-old">media with scripting
                   20470: enabled ,</del> <ins class="diff-chg">media, if</ins> the
                   20471: <code><a href="#canvas">canvas</a></code> element is <a href=
                   20472: "#with-script"><ins class="diff-new">with script</ins></a>
                   20473: ,<ins class="diff-new">the</ins> <code><a href=
                   20474: "#canvas"><ins class="diff-new">canvas</ins></a></code> <ins class=
                   20475: "diff-new">element represents</ins> an embedded element with a
                   20476: dynamically created image.</p>
                   20477: <p>In non-interactive, static, visual media, if the <code><a href=
                   20478: "#canvas">canvas</a></code> element has been previously painted on
                   20479: (e.g. if the page was viewed in an interactive visual medium and is
                   20480: now being printed, or if some script that ran during the page
                   20481: layout process painted on the element), then the <code><a href=
                   20482: "#canvas">canvas</a></code> element <del class="diff-old">must be
                   20483: treated as</del> <ins class="diff-chg">represents</ins> <a href=
                   20484: "#embedded1">embedded content</a> with the current image and size.
                   20485: Otherwise, the <del class="diff-old">element's</del> <ins class=
                   20486: "diff-chg">element represents its</ins> <a href=
                   20487: "#fallback">fallback content</a> <del class="diff-old">must be
                   20488: used</del> instead.</p>
                   20489: <p>In non-visual media, and in visual media <del class=
                   20490: "diff-old">with scripting disabled ,</del> <ins class=
                   20491: "diff-chg">if</ins> the <code><a href="#canvas">canvas</a></code>
                   20492: <del class="diff-old">element's</del> <ins class="diff-chg">element
                   20493: is</ins> <a href="#without"><ins class="diff-chg">without
                   20494: script</ins></a> ,<ins class="diff-chg">the</ins> <code><a href=
                   20495: "#canvas"><ins class="diff-chg">canvas</ins></a></code> <ins class=
                   20496: "diff-chg">element represents its</ins> <a href=
                   20497: "#fallback">fallback content</a> <del class="diff-old">must be
                   20498: used</del> instead.</p>
                   20499: <p>The <code><a href="#canvas">canvas</a></code> element has two
                   20500: attributes to control the size of the coordinate space: <dfn id=
                   20501: "width0" title="attr-canvas-width"><code>width</code></dfn> and
                   20502: <dfn id="height0" title=
                   20503: "attr-canvas-height"><code>height</code></dfn> . These attributes,
                   20504: when specified, must have values that are <a href="#valid" title=
                   20505: "valid non-negative integer">valid non-negative integers</a> . The
                   20506: <a href="#rules">rules for parsing non-negative integers</a> must
                   20507: be used to obtain their numeric values. If an attribute is missing,
                   20508: or if parsing its value returns an error, then the default value
                   20509: must be used instead. The <code title="attr-canvas-width"><a href=
                   20510: "#width0">width</a></code> attribute defaults to 300, and the
                   20511: <code title="attr-canvas-height"><a href=
                   20512: "#height0">height</a></code> attribute defaults to 150.</p>
                   20513: <p>The intrinsic dimensions of the <code><a href=
                   20514: "#canvas">canvas</a></code> element equal the size of the
                   20515: coordinate space, with the numbers interpreted in CSS pixels.
                   20516: However, the element can be sized arbitrarily by a style sheet.
                   20517: During rendering, the image is scaled to fit this layout size.</p>
                   20518: <p>The size of the coordinate space does not necessarily represent
                   20519: the size of the actual bitmap that the user agent will use
                   20520: internally or during rendering. On high-definition displays, for
                   20521: instance, the user agent may internally use a bitmap with two
                   20522: device pixels per unit in the coordinate space, so that the
                   20523: rendering remains at high quality throughout.</p>
                   20524: <p><del class="diff-old">The canvas must initially be fully
                   20525: transparent black.</del> Whenever the <code title=
                   20526: "attr-canvas-width"><a href="#width0">width</a></code> and
                   20527: <code title="attr-canvas-height"><a href=
                   20528: "#height0">height</a></code> attributes are set (whether to a new
                   20529: value or to the previous value), the bitmap and any associated
                   20530: contexts must be cleared back to their initial state and
                   20531: <del class="diff-old">reinitialised</del> <ins class=
                   20532: "diff-chg">reinitialized</ins> with the newly specified coordinate
                   20533: space dimensions.</p>
                   20534: <p>The <dfn id="width1" title=
                   20535: "dom-canvas-width"><code>width</code></dfn> and <dfn id="height1"
                   20536: title="dom-canvas-height"><code>height</code></dfn> DOM attributes
                   20537: must <a href="#reflect">reflect</a> the content attributes of the
                   20538: same name.</p>
                   20539: <div class="example">
                   20540: <p>Only one square appears to be drawn in the following
                   20541: example:</p>
                   20542: <pre>
                   20543:   // canvas is a reference to a &lt;canvas&gt; element
                   20544:   var context = canvas.getContext('2d');
                   20545:   context.fillRect(0,0,50,50);
                   20546:   canvas.setAttribute('width', '300'); // clears the canvas
                   20547:   context.fillRect(0,100,50,50);
                   20548:   canvas.width = canvas.width; // clears the canvas
                   20549: context.fillRect(100,0,50,50);
                   20550: //
                   20551: only
                   20552: this
                   20553: square
                   20554: remains
                   20555: </pre></div>
                   20556: <p><ins class="diff-new">When the canvas is initialized it must be
                   20557: set to fully transparent black.</ins></p>
                   20558: <p>To draw on the canvas, authors must first obtain a reference to
                   20559: a <dfn id="context0">context</dfn> using the <dfn id="getcontext"
                   20560: title="dom-canvas-getContext"><code>getContext( <var title=
                   20561: "">contextId</var> )</code></dfn> method of the <code><a href=
                   20562: "#canvas">canvas</a></code> element.</p>
                   20563: <p>This specification only defines one context, with the name "
                   20564: <code title="canvas-context-2d"><a href="#d">2d</a></code> ". If
                   20565: <code title="dom-canvas-getContext"><a href=
                   20566: "#getcontext">getContext()</a></code> is called with that exact
                   20567: string for its <var title="">contextId</var> argument, then the UA
                   20568: must return a reference to an object implementing <code><a href=
                   20569: "#canvasrenderingcontext2d">CanvasRenderingContext2D</a></code> .
                   20570: Other specifications may define their own contexts, which would
                   20571: return different objects.</p>
                   20572: <p>Vendors may also define experimental contexts using the syntax
                   20573: <code><var title="">vendorname</var> - <var title=
                   20574: "">context</var></code> , for example, <code>moz-3d</code> .</p>
                   20575: <p>When the UA is passed an empty string or a string specifying a
                   20576: context that it does not support, then it must return null. String
                   20577: comparisons must be literal and case-sensitive.</p>
                   20578: <p><ins class="diff-new">Arguments other than the</ins> <var title=
                   20579: ""><ins class="diff-new">contextId</ins></var> <ins class=
                   20580: "diff-new">must be ignored, and must not cause the user agent to
                   20581: raise an exception (as would normally occur if a method was called
                   20582: with the wrong number of arguments).</ins></p>
                   20583: <p class="note">A future version of this specification will
                   20584: probably define a <code>3d</code> context (probably based on the
                   20585: OpenGL ES API).</p>
                   20586: <p>The <dfn id="todataurl" title=
                   20587: "dom-canvas-toDataURL"><code>toDataURL()</code></dfn> method must,
                   20588: when called with no arguments, return a <code title="">data:</code>
                   20589: URI containing a representation of the image as a PNG file.
                   20590: <a href="#references">[PNG]</a> .</p>
                   20591: <p><ins class="diff-new">If the canvas has no pixels (i.e. either
                   20592: its horizontal dimension or its vertical dimension is zero) then
                   20593: the method must return the string "</ins> <code title=
                   20594: ""><ins class="diff-new">data:,</ins></code> <ins class=
                   20595: "diff-new">". (This is the shortest</ins> <code title=
                   20596: ""><ins class="diff-new">data:</ins></code> <ins class=
                   20597: "diff-new">URI; it represents the empty string in a</ins>
                   20598: <code title=""><ins class="diff-new">text/plain</ins></code>
                   20599: <ins class="diff-new">resource.)</ins></p>
                   20600: <p>The <dfn id="todataurl0" title=
                   20601: "dom-canvas-toDataURL-type"><code>toDataURL( <var title=
                   20602: "">type</var> )</code></dfn> method (when called with one <em>or
                   20603: more</em> arguments) must return a <code title="">data:</code> URI
                   20604: containing a representation of the image in the format given by
                   20605: <var title="">type</var> . The possible values are MIME types with
                   20606: no parameters, for example <code>image/png</code> ,
                   20607: <code>image/jpeg</code> , or even maybe <code>image/svg+xml</code>
                   20608: if the implementation actually keeps enough information to reliably
                   20609: render an SVG image from the canvas.</p>
                   20610: <p>Only support for <code>image/png</code> is required. User agents
                   20611: may support other types. If the user agent does not support the
                   20612: requested type, it must return the image using the PNG format.</p>
                   20613: <p>User agents must convert the provided type to lower case before
                   20614: establishing if they support that type and before creating the
                   20615: <code title="">data:</code> URI.</p>
                   20616: <p class="note">When trying to use types other than
                   20617: <code>image/png</code> , authors can check if the image was really
                   20618: returned in the requested format by checking to see if the returned
                   20619: string starts with one the exact strings " <code title=
                   20620: "">data:image/png,</code> " or " <code title=
                   20621: "">data:image/png;</code> ". If it does, the image is PNG, and thus
                   20622: the requested type was not supported. <ins class="diff-new">(The
                   20623: one exception to this is if the canvas has either no height or no
                   20624: width, in which case the result might simply be "</ins>
                   20625: <code title=""><ins class="diff-new">data:,</ins></code>
                   20626: <ins class="diff-new">".)</ins></p>
                   20627: <p>Arguments other than the <var title="">type</var> must be
                   20628: ignored, and must not cause the user agent to raise an exception
                   20629: (as would normally occur if a method was called with the wrong
                   20630: number of arguments). A future version of this specification will
                   20631: probably allow extra parameters to be passed to <code title=
                   20632: "dom-canvas-toDataURL"><a href="#todataurl">toDataURL()</a></code>
                   20633: to allow authors to more carefully control compression settings,
                   20634: image metadata, etc. <del class="diff-old">Security: To prevent
                   20635: information leakage , the toDataURL() and getImageData() methods
                   20636: should raise a security exception if the canvas has ever had an
                   20637: image painted on it whose origin is different from that of the
                   20638: script calling the method.</del></p>
                   20639: <h5 id="the-2d"><span class="secno"><del class=
                   20640: "diff-old">3.14.11.1.</del> <ins class=
                   20641: "diff-chg">3.12.11.1.</ins></span> The 2D context</h5>
                   20642: <p>When the <code title="dom-canvas-getContext"><a href=
                   20643: "#getcontext">getContext()</a></code> method of a <code><a href=
                   20644: "#canvas">canvas</a></code> element is invoked with <dfn id="d"
                   20645: title="canvas-context-2d"><code>2d</code></dfn> as the argument, a
                   20646: <code><a href=
                   20647: "#canvasrenderingcontext2d">CanvasRenderingContext2D</a></code>
                   20648: object is returned.</p>
                   20649: <p>There is only one <code><a href=
                   20650: "#canvasrenderingcontext2d">CanvasRenderingContext2D</a></code>
                   20651: object per canvas, so calling the <code title=
                   20652: "dom-canvas-getContext"><a href=
                   20653: "#getcontext">getContext()</a></code> method with the <code title=
                   20654: "canvas-context-2d"><a href="#d">2d</a></code> argument a second
                   20655: time must return the same object.</p>
                   20656: <p>The 2D context represents a flat <del class=
                   20657: "diff-old">cartesian</del> <ins class="diff-chg">Cartesian</ins>
                   20658: surface whose origin (0,0) is at the top left corner, with the
                   20659: coordinate space having <var title="">x</var> values increasing
                   20660: when going right, and <var title="">y</var> values increasing when
                   20661: going down.</p>
                   20662: <pre class="idl">
                   20663: interface <dfn id=
                   20664: "canvasrenderingcontext2d">CanvasRenderingContext2D</dfn> {
                   20665:   // back-reference to the canvas
                   20666:   readonly attribute <a href=
                   20667: "#htmlcanvaselement">HTMLCanvasElement</a> <a href="#canvas0"
                   20668: title="dom-context-2d-canvas">canvas</a>;
                   20669:   // state
                   20670:   void <a href="#save" title=
                   20671: "dom-context-2d-save">save</a>(); // push state on state stack
                   20672:   void <a href="#restore" title=
                   20673: "dom-context-2d-restore">restore</a>(); // pop state stack and restore state
                   20674:   // transformations (default transform is the identity matrix)
                   20675:   void <a href="#scale" title=
                   20676: "dom-context-2d-scale">scale</a>(in float x, in float y);
                   20677:   void <a href="#rotate" title=
                   20678: "dom-context-2d-rotate">rotate</a>(in float angle);
                   20679:   void <a href="#translate" title=
                   20680: "dom-context-2d-translate">translate</a>(in float x, in float y);
                   20681:   void <a href="#transform" title=
                   20682: "dom-context-2d-transform">transform</a>(in float m11, in float m12, in float m21, in float m22, in float dx, in float dy);
                   20683:   void <a href="#settransform" title=
                   20684: "dom-context-2d-setTransform">setTransform</a>(in float m11, in float m12, in float m21, in float m22, in float dx, in float dy);
                   20685:   // compositing
                   20686:            attribute float <a href="#globalalpha" title=
                   20687: "dom-context-2d-globalAlpha">globalAlpha</a>; // (default 1.0)
                   20688:            attribute DOMString <a href="#globalcompositeoperation"
                   20689: title=
                   20690: "dom-context-2d-globalCompositeOperation">globalCompositeOperation</a>; // (default source-over)
                   20691:   // colors and styles
                   20692:            attribute DOMObject <a href="#strokestyle" title=
                   20693: "dom-context-2d-strokeStyle">strokeStyle</a>; // (default black)
                   20694:            attribute DOMObject <a href="#fillstyle" title=
                   20695: "dom-context-2d-fillStyle">fillStyle</a>; // (default black)
                   20696:   <a href="#canvasgradient0">CanvasGradient</a> <a href=
                   20697: "#createlineargradient" title=
                   20698: "dom-context-2d-createLinearGradient">createLinearGradient</a>(in float x0, in float y0, in float x1, in float y1);
                   20699:   <a href="#canvasgradient0">CanvasGradient</a> <a href=
                   20700: "#createradialgradient" title=
                   20701: "dom-context-2d-createRadialGradient">createRadialGradient</a>(in float x0, in float y0, in float r0, in float x1, in float y1, in float r1);
                   20702: <del class="diff-old">   image, DOMString repetition);
                   20703:    image, DOMString repetition);
                   20704: </del>
                   20705:   <a href="#canvaspattern0">CanvasPattern</a> <a href=
                   20706: "#createpattern" title=
                   20707: "dom-context-2d-createPattern">createPattern</a>(in <a href=
                   20708: "#htmlimageelement">HTMLImageElement</a> image, in DOMString repetition);
                   20709:   <a href="#canvaspattern0">CanvasPattern</a> <a href=
                   20710: "#createpattern" title=
                   20711: "dom-context-2d-createPattern">createPattern</a>(in <a href=
                   20712: "#htmlcanvaselement">HTMLCanvasElement</a> image, in DOMString repetition);
                   20713:   // line caps/joins
                   20714:            attribute float <a href="#linewidth" title=
                   20715: "dom-context-2d-lineWidth">lineWidth</a>; // (default 1)
                   20716:            attribute DOMString <a href="#linecap" title=
                   20717: "dom-context-2d-lineCap">lineCap</a>; // "butt", "round", "square" (default "butt")
                   20718:            attribute DOMString <a href="#linejoin" title=
                   20719: "dom-context-2d-lineJoin">lineJoin</a>; // "round", "bevel", "miter" (default "miter")
                   20720:            attribute float <a href="#miterlimit" title=
                   20721: "dom-context-2d-miterLimit">miterLimit</a>; // (default 10)
                   20722:   // shadows
                   20723:            attribute float <a href="#shadowoffsetx" title=
                   20724: "dom-context-2d-shadowOffsetX">shadowOffsetX</a>; // (default 0)
                   20725:            attribute float <a href="#shadowoffsety" title=
                   20726: "dom-context-2d-shadowOffsetY">shadowOffsetY</a>; // (default 0)
                   20727:            attribute float <a href="#shadowblur" title=
                   20728: "dom-context-2d-shadowBlur">shadowBlur</a>; // (default 0)
                   20729:            attribute DOMString <a href="#shadowcolor" title=
                   20730: "dom-context-2d-shadowColor">shadowColor</a>; // (default transparent black)
                   20731:   // rects
                   20732:   void <a href="#clearrect" title=
                   20733: "dom-context-2d-clearRect">clearRect</a>(in float x, in float y, in float w, in float h);
                   20734:   void <a href="#fillrect" title=
                   20735: "dom-context-2d-fillRect">fillRect</a>(in float x, in float y, in float w, in float h);
                   20736:   void <a href="#strokerect" title=
                   20737: "dom-context-2d-strokeRect">strokeRect</a>(in float x, in float y, in float w, in float h);
                   20738:   // path API
                   20739:   void <a href="#beginpath" title=
                   20740: "dom-context-2d-beginPath">beginPath</a>();
                   20741:   void <a href="#closepath" title=
                   20742: "dom-context-2d-closePath">closePath</a>();
                   20743:   void <a href="#moveto" title=
                   20744: "dom-context-2d-moveTo">moveTo</a>(in float x, in float y);
                   20745:   void <a href="#lineto" title=
                   20746: "dom-context-2d-lineTo">lineTo</a>(in float x, in float y);
                   20747:   void <a href="#quadraticcurveto" title=
                   20748: "dom-context-2d-quadraticCurveTo">quadraticCurveTo</a>(in float cpx, in float cpy, in float x, in float y);
                   20749:   void <a href="#beziercurveto" title=
                   20750: "dom-context-2d-bezierCurveTo">bezierCurveTo</a>(in float cp1x, in float cp1y, in float cp2x, in float cp2y, in float x, in float y);
                   20751:   void <a href="#arcto" title=
                   20752: "dom-context-2d-arcTo">arcTo</a>(in float x1, in float y1, in float x2, in float y2, in float radius);
                   20753:   void <a href="#rectx" title=
                   20754: "dom-context-2d-rect">rect</a>(in float x, in float y, in float w, in float h);
                   20755:   void <a href="#arcx-" title=
                   20756: "dom-context-2d-arc">arc</a>(in float x, in float y, in float radius, in float startAngle, in float endAngle, in boolean anticlockwise);
                   20757:   void <a href="#fill" title="dom-context-2d-fill">fill</a>();
                   20758:   void <a href="#stroke" title=
                   20759: "dom-context-2d-stroke">stroke</a>();
                   20760:   void <a href="#clip" title="dom-context-2d-clip">clip</a>();
                   20761:   boolean <a href="#ispointinpath" title=
                   20762: "dom-context-2d-isPointInPath">isPointInPath</a>(in float x, in float y);
                   20763: <ins class="diff-new">  // text
                   20764:            attribute DOMString <a href="#font" title=
                   20765: "dom-context-2d-font">font</a>; // (default 10px sans-serif)
                   20766:            attribute DOMString <a href="#textalign" title=
                   20767: "dom-context-2d-textAlign">textAlign</a>; // "start", "end", "left", "right", "center" (default: "start")
                   20768:            attribute DOMString <a href="#textbaseline" title=
                   20769: "dom-context-2d-textBaseline">textBaseline</a>; // "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic")
                   20770:   void <a href="#filltext" title=
                   20771: "dom-context-2d-fillText">fillText</a>(in DOMString text, in float x, in float y);
                   20772:   void <a href="#filltext" title=
                   20773: "dom-context-2d-fillText">fillText</a>(in DOMString text, in float x, in float y, in float maxWidth);
                   20774:   void <a href="#stroketext" title=
                   20775: "dom-context-2d-strokeText">strokeText</a>(in DOMString text, in float x, in float y);
                   20776:   void <a href="#stroketext" title=
                   20777: "dom-context-2d-strokeText">strokeText</a>(in DOMString text, in float x, in float y, in float maxWidth);
                   20778: </ins>  <a href="#textmetrics">TextMetrics</a> <a href=
                   20779: "#measuretext" title=
                   20780: "dom-context-2d-measureText">measureText</a>(in DOMString text);
                   20781:   // drawing images
                   20782:   void <a href="#drawimage" title=
                   20783: "dom-context-2d-drawImage">drawImage</a>(in <a href=
                   20784: "#htmlimageelement">HTMLImageElement</a> image, in float dx, in float dy);
                   20785:   void <a href="#drawimage" title=
                   20786: "dom-context-2d-drawImage">drawImage</a>(in <a href=
                   20787: "#htmlimageelement">HTMLImageElement</a> image, in float dx, in float dy, in float dw, in float dh);
                   20788:   void <a href="#drawimage" title=
                   20789: "dom-context-2d-drawImage">drawImage</a>(in <a href=
                   20790: "#htmlimageelement">HTMLImageElement</a> image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh);
                   20791:   void <a href="#drawimage" title=
                   20792: "dom-context-2d-drawImage">drawImage</a>(in <a href=
                   20793: "#htmlcanvaselement">HTMLCanvasElement</a> image, in float dx, in float dy);
                   20794:   void <a href="#drawimage" title=
                   20795: "dom-context-2d-drawImage">drawImage</a>(in <a href=
                   20796: "#htmlcanvaselement">HTMLCanvasElement</a> image, in float dx, in float dy, in float dw, in float dh);
                   20797:   void <a href="#drawimage" title=
                   20798: "dom-context-2d-drawImage">drawImage</a>(in <a href=
                   20799: "#htmlcanvaselement">HTMLCanvasElement</a> image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh);
                   20800:   // pixel manipulation
                   20801:   <a href="#imagedata">ImageData</a> <a href="#createimagedata"
                   20802: title=
                   20803: "dom-context-2d-createImageData">createImageData</a>(in float sw, in float sh);
                   20804:   <a href="#imagedata">ImageData</a> <a href="#getimagedata" title=
                   20805: "dom-context-2d-getImageData">getImageData</a>(in float sx, in float sy, in float sw, in float sh);
                   20806:   void <a href="#putimagedata" title=
                   20807: "dom-context-2d-putImageData">putImageData</a>(in <a href=
                   20808: "#imagedata">ImageData</a> imagedata, in float dx, in float dy);
                   20809: <del class=
                   20810: "diff-old">  // drawing text is not supported in this version of the API
                   20811:   // (there is no way to predict what metrics the fonts will have,
                   20812:   // which makes fonts very hard to use for painting)
                   20813: </del>
                   20814: <ins class="diff-chg">  void <a href="#putimagedata" title=
                   20815: "dom-context-2d-putImageData">putImageData</a>(in <a href=
                   20816: "#imagedata">ImageData</a> imagedata, in float dx, in float dy, in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight);
                   20817: </ins>
                   20818: };
                   20819: interface <dfn id="canvasgradient">CanvasGradient</dfn> {
                   20820:   // opaque object
                   20821:   void <a href="#addcolorstop" title=
                   20822: "dom-canvasgradient-addColorStop">addColorStop</a>(in float offset, in DOMString color);
                   20823: };
                   20824: interface <dfn id="canvaspattern">CanvasPattern</dfn> {
                   20825:   // opaque object
                   20826: };
                   20827: <ins class="diff-new">interface <dfn id=
                   20828: "textmetrics">TextMetrics</dfn> {
                   20829:   readonly attribute float <a href="#width2" title=
                   20830: "dom-textmetrics-width">width</a>;
                   20831: };
                   20832: </ins>
                   20833: interface <dfn id="imagedata">ImageData</dfn> {
                   20834: <del class="diff-old">  readonly attribute long int ;
                   20835: </del>
                   20836: <ins class="diff-chg">  readonly attribute long int <a href=
                   20837: "#width3" title="dom-imagedata-width">width</a>;
                   20838: </ins>
                   20839:   readonly attribute long int <a href="#height2" title=
                   20840: "dom-imagedata-height">height</a>;
                   20841:   readonly attribute int[] <a href="#data1" title=
                   20842: "dom-imagedata-data">data</a>;
                   20843: };
                   20844: </pre>
                   20845: <p>The <dfn id="canvas0" title=
                   20846: "dom-context-2d-canvas"><code>canvas</code></dfn> attribute must
                   20847: return the <code><a href="#canvas">canvas</a></code> element that
                   20848: the context paints on.</p>
                   20849: <p><ins class="diff-new">Unless otherwise stated, for the 2D
                   20850: context interface, any method call with a numeric argument whose
                   20851: value is infinite or a NaN value must be ignored.</ins></p>
                   20852: <h6 id="the-canvas0"><span class="secno"><del class=
                   20853: "diff-old">3.14.11.1.1.</del> <ins class=
                   20854: "diff-chg">3.12.11.1.1.</ins></span> The canvas state</h6>
                   20855: <p>Each context maintains a stack of drawing states. <dfn id=
                   20856: "drawing0" title="drawing state">Drawing states</dfn> consist
                   20857: of:</p>
                   20858: <ul class="brief">
                   20859: <li>The current <a href="#transformations0" title=
                   20860: "dom-context-2d-transformation">transformation matrix</a> .</li>
                   20861: <li>The current <a href="#clipping">clipping <del class=
                   20862: "diff-old">path</del> <ins class="diff-chg">region</ins></a> .</li>
                   20863: <li>The current values of the following attributes: <code title=
                   20864: "dom-context-2d-strokeStyle"><a href=
                   20865: "#strokestyle">strokeStyle</a></code> , <code title=
                   20866: "dom-context-2d-fillStyle"><a href=
                   20867: "#fillstyle">fillStyle</a></code> , <code title=
                   20868: "dom-context-2d-globalAlpha"><a href=
                   20869: "#globalalpha">globalAlpha</a></code> , <code title=
                   20870: "dom-context-2d-lineWidth"><a href=
                   20871: "#linewidth">lineWidth</a></code> , <code title=
                   20872: "dom-context-2d-lineCap"><a href="#linecap">lineCap</a></code> ,
                   20873: <code title="dom-context-2d-lineJoin"><a href=
                   20874: "#linejoin">lineJoin</a></code> , <code title=
                   20875: "dom-context-2d-miterLimit"><a href=
                   20876: "#miterlimit">miterLimit</a></code> , <code title=
                   20877: "dom-context-2d-shadowOffsetX"><a href=
                   20878: "#shadowoffsetx">shadowOffsetX</a></code> , <code title=
                   20879: "dom-context-2d-shadowOffsetY"><a href=
                   20880: "#shadowoffsety">shadowOffsetY</a></code> , <code title=
                   20881: "dom-context-2d-shadowBlur"><a href=
                   20882: "#shadowblur">shadowBlur</a></code> , <code title=
                   20883: "dom-context-2d-shadowColor"><a href=
                   20884: "#shadowcolor">shadowColor</a></code> , <code title=
                   20885: "dom-context-2d-globalCompositeOperation"><a href=
                   20886: "#globalcompositeoperation">globalCompositeOperation</a></code> ,
                   20887: <code title="dom-context-2d-font"><a href="#font"><ins class=
                   20888: "diff-new">font</ins></a></code> ,<code title=
                   20889: "dom-context-2d-textAlign"><a href="#textalign"><ins class=
                   20890: "diff-new">textAlign</ins></a></code> ,<code title=
                   20891: "dom-context-2d-textBaseline"><a href="#textbaseline"><ins class=
                   20892: "diff-new">textBaseline</ins></a></code> .</li>
                   20893: </ul>
                   20894: <p class="note">The current path and the current bitmap are not
                   20895: part of the drawing state. The current path is persistent, and can
                   20896: only be reset using the <code title=
                   20897: "dom-context-2d-beginPath"><a href=
                   20898: "#beginpath">beginPath()</a></code> method. The current bitmap is
                   20899: <span title="concept-canvas-image">a property of the canvas</span>
                   20900: , not the context.</p>
                   20901: <p>The <dfn id="save" title=
                   20902: "dom-context-2d-save"><code>save()</code></dfn> method must push a
                   20903: copy of the current drawing state onto the drawing state stack.</p>
                   20904: <p>The <dfn id="restore" title=
                   20905: "dom-context-2d-restore"><code>restore()</code></dfn> method must
                   20906: pop the top entry in the drawing state stack, and reset the drawing
                   20907: state it describes. If there is no saved state, the method must do
                   20908: nothing.</p>
                   20909: <h6 id="transformations"><span class="secno"><del class=
                   20910: "diff-old">3.14.11.1.2.</del> <ins class=
                   20911: "diff-chg">3.12.11.1.2.</ins></span> <dfn id="transformations0"
                   20912: title="dom-context-2d-transformation">Transformations</dfn></h6>
                   20913: <p>The transformation matrix is applied to coordinates when
                   20914: creating shapes and paths.</p>
                   20915: <p>When the context is created, the transformation matrix must
                   20916: initially be the identity transform. It may then be adjusted using
                   20917: the transformation methods.</p>
                   20918: <p>The <del class="diff-old">transformation matrix can become
                   20919: infinite, at which point nothing is drawn anymore. The</del>
                   20920: transformations must be performed in reverse order. For instance,
                   20921: if a scale transformation that doubles the width is applied,
                   20922: followed by a rotation transformation that rotates drawing
                   20923: operations by a quarter turn, and a rectangle twice as wide as it
                   20924: is tall is then drawn on the canvas, the actual result will be a
                   20925: square.</p>
                   20926: <p>The <dfn id="scale" title="dom-context-2d-scale"><code>scale(
                   20927: <var title="">x</var> , <var title="">y</var> )</code></dfn> method
                   20928: must add the scaling transformation described by the arguments to
                   20929: the transformation matrix. The <var title="">x</var> argument
                   20930: represents the scale factor in the horizontal direction and the
                   20931: <var title="">y</var> argument represents the scale factor in the
                   20932: vertical direction. The factors are multiples. <del class=
                   20933: "diff-old">If either argument is Infinity the transformation matrix
                   20934: must be marked as infinite instead of the method throwing an
                   20935: exception.</del></p>
                   20936: <p>The <dfn id="rotate" title="dom-context-2d-rotate"><code>rotate(
                   20937: <var title="">angle</var> )</code></dfn> method must add the
                   20938: rotation transformation described by the argument to the
                   20939: transformation matrix. The <var title="">angle</var> argument
                   20940: represents a clockwise rotation angle expressed in radians.
                   20941: <ins class="diff-new">If the</ins> <var title=""><ins class=
                   20942: "diff-new">angle</ins></var> <ins class="diff-new">argument is
                   20943: infinite, the method call must be ignored.</ins></p>
                   20944: <p>The <dfn id="translate" title=
                   20945: "dom-context-2d-translate"><code>translate( <var title="">x</var> ,
                   20946: <var title="">y</var> )</code></dfn> method must add the
                   20947: translation transformation described by the arguments to the
                   20948: transformation matrix. The <var title="">x</var> argument
                   20949: represents the translation distance in the horizontal direction and
                   20950: the <var title="">y</var> argument represents the translation
                   20951: distance in the vertical direction. The arguments are in coordinate
                   20952: space units. <del class="diff-old">If either argument is Infinity
                   20953: the transformation matrix must be marked as infinite instead of the
                   20954: method throwing an exception.</del></p>
                   20955: <p>The <dfn id="transform" title=
                   20956: "dom-context-2d-transform"><code>transform( <var title="">m11</var>
                   20957: , <var title="">m12</var> , <var title="">m21</var> , <var title=
                   20958: "">m22</var> , <var title="">dx</var> , <var title="">dy</var>
                   20959: )</code></dfn> method must multiply the current transformation
                   20960: matrix with the matrix described by:</p>
                   20961: <table class="matrix">
                   20962: <tbody>
                   20963: <tr>
                   20964: <td><var title="">m11</var></td>
                   20965: <td><var title="">m21</var></td>
                   20966: <td><var title="">dx</var></td>
                   20967: </tr>
                   20968: <tr>
                   20969: <td><var title="">m12</var></td>
                   20970: <td><var title="">m22</var></td>
                   20971: <td><var title="">dy</var></td>
                   20972: </tr>
                   20973: <tr>
                   20974: <td>0</td>
                   20975: <td>0</td>
                   20976: <td>1</td>
                   20977: </tr>
                   20978: </tbody>
                   20979: </table>
                   20980: <p><del class="diff-old">If any of the arguments are Infinity the
                   20981: transformation matrix must be marked as infinite instead of the
                   20982: method throwing an exception.</del> The <dfn id="settransform"
                   20983: title="dom-context-2d-setTransform"><code>setTransform( <var title=
                   20984: "">m11</var> , <var title="">m12</var> , <var title="">m21</var> ,
                   20985: <var title="">m22</var> , <var title="">dx</var> , <var title=
                   20986: "">dy</var> )</code></dfn> method must reset the current transform
                   20987: to the identity matrix, and then invoke the <code><a href=
                   20988: "#transform" title="dom-context-2d-transform">transform</a> (
                   20989: <var title="">m11</var> , <var title="">m12</var> , <var title=
                   20990: "">m21</var> , <var title="">m22</var> , <var title="">dx</var> ,
                   20991: <var title="">dy</var> )</code> method with the same arguments.
                   20992: <del class="diff-old">If any of the arguments are Infinity the
                   20993: transformation matrix must be marked as infinite instead of the
                   20994: method throwing an exception.</del></p>
                   20995: <h6 id="compositing"><span class="secno"><del class=
                   20996: "diff-old">3.14.11.1.3.</del> <ins class=
                   20997: "diff-chg">3.12.11.1.3.</ins></span> Compositing</h6>
                   20998: <p>All drawing operations are affected by the global compositing
                   20999: attributes, <code title="dom-context-2d-globalAlpha"><a href=
                   21000: "#globalalpha">globalAlpha</a></code> and <code title=
                   21001: "dom-context-2d-globalCompositeOperation"><a href=
                   21002: "#globalcompositeoperation">globalCompositeOperation</a></code>
                   21003: .</p>
                   21004: <p>The <dfn id="globalalpha" title=
                   21005: "dom-context-2d-globalAlpha"><code>globalAlpha</code></dfn>
                   21006: attribute gives an alpha value that is applied to shapes and images
                   21007: before they are composited onto the canvas. The value must be in
                   21008: the range from 0.0 (fully transparent) to 1.0 (no additional
                   21009: transparency). If an attempt is made to set the attribute to a
                   21010: value outside this range, the attribute must retain its previous
                   21011: value. When the context is created, the <code title=
                   21012: "dom-context-2d-globalAlpha"><a href=
                   21013: "#globalalpha">globalAlpha</a></code> attribute must initially have
                   21014: the value 1.0.</p>
                   21015: <p>The <dfn id="globalcompositeoperation" title=
                   21016: "dom-context-2d-globalCompositeOperation"><code>globalCompositeOperation</code></dfn>
                   21017: attribute sets how shapes and images are drawn onto the existing
                   21018: bitmap, once they have had <code title=
                   21019: "dom-context-2d-globalAlpha"><a href=
                   21020: "#globalalpha">globalAlpha</a></code> and the current
                   21021: transformation matrix applied. It must be set to a value from the
                   21022: following list. In the descriptions below, the source image,
                   21023: <var title="">A</var> , is the shape or image being rendered, and
                   21024: the destination image, <var title="">B</var> , is the current state
                   21025: of the bitmap.</p>
                   21026: <dl>
                   21027: <dt><dfn id="source-atop" title=
                   21028: "gcop-source-atop"><code>source-atop</code></dfn></dt>
                   21029: <dd><var title="">A</var> atop <var title="">B</var> . Display the
                   21030: source image wherever both images are opaque. Display the
                   21031: destination image wherever the destination image is opaque but the
                   21032: source image is transparent. Display transparency elsewhere.</dd>
                   21033: <dt><dfn id="source-in" title=
                   21034: "gcop-source-in"><code>source-in</code></dfn></dt>
                   21035: <dd><var title="">A</var> in <var title="">B</var> . Display the
                   21036: source image wherever both the source image and destination image
                   21037: are opaque. Display transparency elsewhere.</dd>
                   21038: <dt><dfn id="source-out" title=
                   21039: "gcop-source-out"><code>source-out</code></dfn></dt>
                   21040: <dd><var title="">A</var> out <var title="">B</var> . Display the
                   21041: source image wherever the source image is opaque and the
                   21042: destination image is transparent. Display transparency
                   21043: elsewhere.</dd>
                   21044: <dt><dfn id="source-over" title=
                   21045: "gcop-source-over"><code>source-over</code></dfn> (default)</dt>
                   21046: <dd><var title="">A</var> over <var title="">B</var> . Display the
                   21047: source image wherever the source image is opaque. Display the
                   21048: destination image elsewhere.</dd>
                   21049: <dt><dfn id="destination-atop" title=
                   21050: "gcop-destination-atop"><code>destination-atop</code></dfn></dt>
                   21051: <dd><var title="">B</var> atop <var title="">A</var> . Same as
                   21052: <code title="gcop-source-atop"><a href=
                   21053: "#source-atop">source-atop</a></code> but using the destination
                   21054: image instead of the source image and vice versa.</dd>
                   21055: <dt><dfn id="destination-in" title=
                   21056: "gcop-destination-in"><code>destination-in</code></dfn></dt>
                   21057: <dd><var title="">B</var> in <var title="">A</var> . Same as
                   21058: <code title="gcop-source-in"><a href=
                   21059: "#source-in">source-in</a></code> but using the destination image
                   21060: instead of the source image and vice versa.</dd>
                   21061: <dt><dfn id="destination-out" title=
                   21062: "gcop-destination-out"><code>destination-out</code></dfn></dt>
                   21063: <dd><var title="">B</var> out <var title="">A</var> . Same as
                   21064: <code title="gcop-source-out"><a href=
                   21065: "#source-out">source-out</a></code> but using the destination image
                   21066: instead of the source image and vice versa.</dd>
                   21067: <dt><dfn id="destination-over" title=
                   21068: "gcop-destination-over"><code>destination-over</code></dfn></dt>
                   21069: <dd><var title="">B</var> over <var title="">A</var> . Same as
                   21070: <code title="gcop-source-over"><a href=
                   21071: "#source-over">source-over</a></code> but using the destination
                   21072: image instead of the source image and vice versa.</dd>
                   21073: <dt><dfn id="lighter" title=
                   21074: "gcop-lighter"><code>lighter</code></dfn></dt>
                   21075: <dd><var title="">A</var> plus <var title="">B</var> . Display the
                   21076: sum of the source image and destination image, with color values
                   21077: approaching 1 as a limit.</dd>
                   21078: <dt><dfn id="copy" title="gcop-copy"><code>copy</code></dfn></dt>
                   21079: <dd><var title="">A</var> ( <var title="">B</var> is ignored).
                   21080: Display the source image instead of the destination image.</dd>
                   21081: <dt><dfn id="xor" title="gcop-xor"><code>xor</code></dfn></dt>
                   21082: <dd><var title="">A</var> xor <var title="">B</var> . Exclusive OR
                   21083: of the source image and destination image.</dd>
                   21084: <dt><code><var title="">vendorName</var> - <var title=
                   21085: "">operationName</var></code></dt>
                   21086: <dd>Vendor-specific extensions to the list of composition operators
                   21087: should use this syntax.</dd>
                   21088: </dl>
                   21089: <p>These values are all case-sensitive — they must be used exactly
                   21090: as shown. User agents must <del class="diff-old">only
                   21091: recognise</del> <ins class="diff-chg">not recognize</ins> values
                   21092: that <ins class="diff-new">do not</ins> exactly match the values
                   21093: given above.</p>
                   21094: <p>The operators in the above list must be treated as described by
                   21095: the Porter-Duff operator given at the start of their description
                   21096: (e.g. <var title="">A</var> over <var title="">B</var> ). <a href=
                   21097: "#references">[PORTERDUFF]</a></p>
                   21098: <p>On setting, if the user agent does not <del class=
                   21099: "diff-old">recognise</del> <ins class="diff-chg">recognize</ins>
                   21100: the specified value, it must be ignored, leaving the value of
                   21101: <code title="dom-context-2d-globalCompositeOperation"><a href=
                   21102: "#globalcompositeoperation">globalCompositeOperation</a></code>
                   21103: unaffected.</p>
                   21104: <p>When the context is created, the <code title=
                   21105: "dom-context-2d-globalCompositeOperation"><a href=
                   21106: "#globalcompositeoperation">globalCompositeOperation</a></code>
                   21107: attribute must initially have the value <code>source-over</code>
                   21108: .</p>
                   21109: <h6 id="colors"><span class="secno"><del class=
                   21110: "diff-old">3.14.11.1.4.</del> <ins class=
                   21111: "diff-chg">3.12.11.1.4.</ins></span> Colors and styles</h6>
                   21112: <p>The <dfn id="strokestyle" title=
                   21113: "dom-context-2d-strokeStyle"><code>strokeStyle</code></dfn>
                   21114: attribute represents the color or style to use for the lines around
                   21115: shapes, and the <dfn id="fillstyle" title=
                   21116: "dom-context-2d-fillStyle"><code>fillStyle</code></dfn> attribute
                   21117: represents the color or style to use inside the shapes.</p>
                   21118: <p>Both attributes can be either strings, <code><a href=
                   21119: "#canvasgradient0">CanvasGradient</a></code> s, or <code><a href=
                   21120: "#canvaspattern0">CanvasPattern</a></code> s. On setting, strings
                   21121: must be parsed as CSS &lt;color&gt; values and the color assigned,
                   21122: and <code><a href="#canvasgradient0">CanvasGradient</a></code> and
                   21123: <code><a href="#canvaspattern0">CanvasPattern</a></code> objects
                   21124: must be assigned themselves. <a href="#references">[CSS3COLOR]</a>
                   21125: If the value is a string but is not a valid color, or is neither a
                   21126: string, a <code><a href=
                   21127: "#canvasgradient0">CanvasGradient</a></code> , nor a <code><a href=
                   21128: "#canvaspattern0">CanvasPattern</a></code> , then it must be
                   21129: ignored, and the attribute must retain its previous value.</p>
                   21130: <p>On getting, if the value is a color, then the <del class=
                   21131: "diff-old">serialisation</del> <a href="#serialization" title=
                   21132: "serialization of a color"><ins class=
                   21133: "diff-chg">serialization</ins> of the color</a> must be returned.
                   21134: Otherwise, if it is not a color but a <code><a href=
                   21135: "#canvasgradient0">CanvasGradient</a></code> or <code><a href=
                   21136: "#canvaspattern0">CanvasPattern</a></code> , then the respective
                   21137: object must be returned. (Such objects are opaque and therefore
                   21138: only useful for assigning to other attributes or for comparison to
                   21139: other gradients or patterns.)</p>
                   21140: <p>The <del class="diff-old">serialisation</del> <dfn id=
                   21141: "serialization"><ins class="diff-chg">serialization</ins> of a
                   21142: color</dfn> for a color value is a string, computed as follows: if
                   21143: it has alpha equal to 1.0, then the string is a lowercase six-digit
                   21144: hex value, prefixed with a "#" character (U+0023 NUMBER SIGN), with
                   21145: the first two digits representing the red component, the next two
                   21146: digits representing the green component, and the last two digits
                   21147: representing the blue component, the digits being in the range 0-9
                   21148: a-f (U+0030 to U+0039 and U+0061 to U+0066). Otherwise, the color
                   21149: value has alpha less than 1.0, and the string is the color value in
                   21150: the CSS <code title="">rgba()</code> functional-notation format:
                   21151: the literal string <code title="">rgba</code> (U+0072 U+0067 U+0062
                   21152: U+0061) followed by a U+0028 LEFT PARENTHESIS, a base-ten integer
                   21153: in the range 0-255 representing the red component (using digits
                   21154: 0-9, U+0030 to U+0039, in the shortest form possible), a literal
                   21155: U+002C COMMA and U+0020 SPACE, an integer for the green component,
                   21156: a comma and a space, an integer for the blue component, another
                   21157: comma and space, a U+0030 DIGIT ZERO, a U+002E FULL STOP
                   21158: (representing the decimal point), one or more digits in the range
                   21159: 0-9 (U+0030 to U+0039) representing the fractional part of the
                   21160: alpha value, and finally a U+0029 RIGHT PARENTHESIS.</p>
                   21161: <p>When the context is created, the <code title=
                   21162: "dom-context-2d-strokeStyle"><a href=
                   21163: "#strokestyle">strokeStyle</a></code> and <code title=
                   21164: "dom-context-2d-fillStyle"><a href=
                   21165: "#fillstyle">fillStyle</a></code> attributes must initially have
                   21166: the string value <code title="">#000000</code> .</p>
                   21167: <p>There are two types of gradients, linear gradients and radial
                   21168: gradients, both represented by objects implementing the opaque
                   21169: <dfn id="canvasgradient0"><code>CanvasGradient</code></dfn>
                   21170: interface.</p>
                   21171: <p>Once a gradient has been created (see below), stops are placed
                   21172: along it to define how the colors are distributed along the
                   21173: gradient. The color of the gradient at each stop is the color
                   21174: specified for that stop. Between each such stop, the colors and the
                   21175: alpha component must be linearly interpolated over the RGBA space
                   21176: without premultiplying the alpha value to find the color to use at
                   21177: that offset. Before the first stop, the color must be the color of
                   21178: the first stop. After the last stop, the color must be the color of
                   21179: the last stop. When there are no stops, the gradient is transparent
                   21180: black.</p>
                   21181: <p>The <dfn id="addcolorstop" title=
                   21182: "dom-canvasgradient-addColorStop"><code>addColorStop( <var title=
                   21183: "">offset</var> , <var title="">color</var> )</code></dfn> method
                   21184: on the <code><a href="#canvasgradient0">CanvasGradient</a></code>
                   21185: interface adds a new stop to a gradient. If the <var title=
                   21186: "">offset</var> is less than <del class="diff-old">0 or</del>
                   21187: <ins class="diff-chg">0,</ins> greater than <del class=
                   21188: "diff-old">1</del> <ins class="diff-chg">1, infinite, or NaN,</ins>
                   21189: then an <code>INDEX_SIZE_ERR</code> exception must be raised. If
                   21190: the <var title="">color</var> cannot be parsed as a CSS color, then
                   21191: a <code>SYNTAX_ERR</code> exception must be raised. Otherwise, the
                   21192: gradient must have a new stop placed, at offset <var title=
                   21193: "">offset</var> relative to the whole gradient, and with the color
                   21194: obtained by parsing <var title="">color</var> as a CSS
                   21195: &lt;color&gt; value. If multiple stops are added at the same offset
                   21196: on a gradient, they must be placed in the order added, with the
                   21197: first one closest to the start of the gradient, and each subsequent
                   21198: one infinitesimally further along towards the end point (in effect
                   21199: causing all but the first and last stop added at each point to be
                   21200: ignored).</p>
                   21201: <p>The <dfn id="createlineargradient" title=
                   21202: "dom-context-2d-createLinearGradient"><code>createLinearGradient(
                   21203: <var title="">x0</var> , <var title="">y0</var> , <var title=
                   21204: "">x1</var> , <var title="">y1</var> )</code></dfn> method takes
                   21205: four <del class="diff-old">arguments, representing</del>
                   21206: <ins class="diff-chg">arguments that, after being subjected to
                   21207: the</ins> <a href="#transformations0" title=
                   21208: "dom-context-2d-transformation"><ins class="diff-chg">current
                   21209: transformation matrix</ins></a> ,<ins class=
                   21210: "diff-chg">represent</ins> the start point ( <var title="">x0</var>
                   21211: , <var title="">y0</var> ) and end point ( <var title="">x1</var> ,
                   21212: <var title="">y1</var> ) of the <del class="diff-old">gradient, in
                   21213: coordinate space units, and</del> <ins class="diff-chg">gradient.
                   21214: If any of the arguments to</ins> <code title=
                   21215: "dom-context-2d-createLinearGradient"><a href=
                   21216: "#createlineargradient"><ins class=
                   21217: "diff-chg">createLinearGradient()</ins></a></code> <ins class=
                   21218: "diff-chg">are infinite or NaN, the method must raise an</ins>
                   21219: <code><ins class="diff-chg">INDEX_SIZE_ERR</ins></code> <ins class=
                   21220: "diff-chg">exception. Otherwise, the method</ins> must return a
                   21221: linear <code><a href="#canvasgradient0">CanvasGradient</a></code>
                   21222: <del class="diff-old">initialised</del> <ins class=
                   21223: "diff-chg">initialized</ins> with <del class="diff-old">that</del>
                   21224: <ins class="diff-chg">the specified</ins> line.</p>
                   21225: <p>Linear gradients must be rendered such that at and before the
                   21226: starting point on the canvas the color at offset 0 is used, that at
                   21227: and after the ending point the color at offset 1 is used, and that
                   21228: all points on a line perpendicular to the line that crosses the
                   21229: start and end points have the color at the point where those two
                   21230: lines cross (with the colors coming from the interpolation
                   21231: described above).</p>
                   21232: <p>If <span><var title="">x <sub>0</sub></var> &nbsp;=&nbsp;
                   21233: <var title="">x <sub>1</sub></var></span> and <span><var title="">y
                   21234: <sub>0</sub></var> &nbsp;=&nbsp; <var title="">y
                   21235: <sub>1</sub></var></span> , then the linear gradient must paint
                   21236: nothing.</p>
                   21237: <p>The <dfn id="createradialgradient" title=
                   21238: "dom-context-2d-createRadialGradient"><code>createRadialGradient(
                   21239: <var title="">x0</var> , <var title="">y0</var> , <var title=
                   21240: "">r0</var> , <var title="">x1</var> , <var title="">y1</var> ,
                   21241: <var title="">r1</var> )</code></dfn> method takes six arguments,
                   21242: the first three representing the start circle with origin (
                   21243: <var title="">x0</var> , <var title="">y0</var> ) and radius
                   21244: <var title="">r0</var> , and the last three representing the end
                   21245: circle with origin ( <var title="">x1</var> , <var title=
                   21246: "">y1</var> ) and radius <var title="">r1</var> . The values are in
                   21247: coordinate space units. <del class="diff-old">The method must
                   21248: return a radial CanvasGradient initialised with those two
                   21249: circles.</del> If either of <var title="">r0</var> or <var title=
                   21250: "">r1</var> are negative, <ins class="diff-new">or if any of the
                   21251: arguments are infinite or NaN,</ins> an <code>INDEX_SIZE_ERR</code>
                   21252: exception must be raised. <ins class="diff-new">Otherwise, the
                   21253: method must return a radial</ins> <code><a href=
                   21254: "#canvasgradient0"><ins class=
                   21255: "diff-new">CanvasGradient</ins></a></code> <ins class=
                   21256: "diff-new">initialized with the two specified circles, after
                   21257: transforming them according to the</ins> <a href=
                   21258: "#transformations0" title=
                   21259: "dom-context-2d-transformation"><ins class="diff-new">current
                   21260: transformation matrix</ins></a> .</p>
                   21261: <p>Radial gradients must be rendered by following these steps:</p>
                   21262: <ol>
                   21263: <li>
                   21264: <p><ins class="diff-new">If</ins> <span><var title=""><ins class=
                   21265: "diff-new">x</ins> <sub><ins class="diff-new">0</ins></sub></var>
                   21266: <ins class="diff-new">&nbsp;=&nbsp;</ins> <var title=""><ins class=
                   21267: "diff-new">x</ins> <sub><ins class=
                   21268: "diff-new">1</ins></sub></var></span> <ins class=
                   21269: "diff-new">and</ins> <span><var title=""><ins class=
                   21270: "diff-new">y</ins> <sub><ins class="diff-new">0</ins></sub></var>
                   21271: <ins class="diff-new">&nbsp;=&nbsp;</ins> <var title=""><ins class=
                   21272: "diff-new">y</ins> <sub><ins class=
                   21273: "diff-new">1</ins></sub></var></span> <ins class=
                   21274: "diff-new">and</ins> <span><var title=""><ins class=
                   21275: "diff-new">r</ins> <sub><ins class="diff-new">0</ins></sub></var>
                   21276: <ins class="diff-new">&nbsp;=&nbsp;</ins> <var title=""><ins class=
                   21277: "diff-new">r</ins> <sub><ins class=
                   21278: "diff-new">1</ins></sub></var></span> ,<ins class="diff-new">then
                   21279: the radial gradient must paint nothing. Abort these
                   21280: steps.</ins></p>
                   21281: </li>
                   21282: <li>
                   21283: <p>Let <span>x( <var title="">ω</var> )&nbsp;=&nbsp;( <var title=
                   21284: "">x <sub>1</sub></var> - <var title="">x <sub>0</sub></var> )
                   21285: <var title="">ω</var> &nbsp;+&nbsp; <var title="">x
                   21286: <sub>0</sub></var></span></p>
                   21287: <p>Let <span>y( <var title="">ω</var> )&nbsp;=&nbsp;( <var title=
                   21288: "">y <sub>1</sub></var> - <var title="">y <sub>0</sub></var> )
                   21289: <var title="">ω</var> &nbsp;+&nbsp; <var title="">y
                   21290: <sub>0</sub></var></span></p>
                   21291: <p>Let <span>r( <var title="">ω</var> )&nbsp;=&nbsp;( <var title=
                   21292: "">r <sub>1</sub></var> - <var title="">r <sub>0</sub></var> )
                   21293: <var title="">ω</var> &nbsp;+&nbsp; <var title="">r
                   21294: <sub>0</sub></var></span></p>
                   21295: <p>Let the color at <var title="">ω</var> be the color of the
                   21296: gradient at offset 0.0 for all values of <var title="">ω</var> less
                   21297: than 0.0, the color at offset 1.0 for all values of <var title=
                   21298: "">ω</var> greater than 1.0, and the color at the given offset for
                   21299: values of <var title="">ω</var> in the range <span>0.0&nbsp;≤&nbsp;
                   21300: <var title="">ω</var> &nbsp;≤&nbsp;1.0</span></p>
                   21301: </li>
                   21302: <li>
                   21303: <p>For all values of <var title="">ω</var> where <span>r(
                   21304: <var title="">ω</var> )&nbsp;&gt;&nbsp;0</span> , starting with the
                   21305: value of <var title="">ω</var> nearest to positive infinity and
                   21306: ending with the value of <var title="">ω</var> nearest to negative
                   21307: infinity, draw the circumference of the circle with radius <span>r(
                   21308: <var title="">ω</var> )</span> at position ( <span>x( <var title=
                   21309: "">ω</var> )</span> , <span>y( <var title="">ω</var> )</span> ),
                   21310: with the color at <var title="">ω</var> , but only painting on the
                   21311: parts of the canvas that have not yet been painted on by earlier
                   21312: circles in this step for this rendering of the gradient.</p>
                   21313: </li>
                   21314: </ol>
                   21315: <del class="diff-old">If x 0 &nbsp;=&nbsp; x 1 and y 0
                   21316: &nbsp;=&nbsp; y 1 and r 0 &nbsp;=&nbsp; r 1 , then the radial
                   21317: gradient must paint nothing.</del>
                   21318: <p class="note">This effectively creates a cone, touched by the two
                   21319: circles defined in the creation of the gradient, with the part of
                   21320: the cone before the start circle (0.0) using the color of the first
                   21321: offset, the part of the cone after the end circle (1.0) using the
                   21322: color of the last offset, and areas outside the cone untouched by
                   21323: the gradient (transparent black).</p>
                   21324: <p>Gradients must <del class="diff-old">only</del> be painted
                   21325: <ins class="diff-new">only</ins> where the relevant stroking or
                   21326: filling effects requires that they be drawn. <del class=
                   21327: "diff-old">Support for actually painting gradients is optional.
                   21328: Instead of painting the gradients, user agents may instead just
                   21329: paint the first stop's color. However, createLinearGradient() and
                   21330: createRadialGradient() must always return objects when passed valid
                   21331: arguments.</del></p>
                   21332: <p>Patterns are represented by objects implementing the opaque
                   21333: <dfn id="canvaspattern0"><code>CanvasPattern</code></dfn>
                   21334: interface.</p>
                   21335: <p>To create objects of this type, the <dfn id="createpattern"
                   21336: title="dom-context-2d-createPattern"><code><del class=
                   21337: "diff-old">createPattern(image, repetition)</del> <ins class=
                   21338: "diff-chg">createPattern(</ins> <var title=""><ins class=
                   21339: "diff-chg">image</ins></var> ,<var title=""><ins class=
                   21340: "diff-chg">repetition</ins></var> <ins class=
                   21341: "diff-chg">)</ins></code></dfn> method is used. The first argument
                   21342: gives the image to use as the pattern (either an <code><a href=
                   21343: "#htmlimageelement">HTMLImageElement</a></code> or an
                   21344: <code><a href="#htmlcanvaselement">HTMLCanvasElement</a></code> ).
                   21345: Modifying this image after calling the <code title=
                   21346: "dom-context-2d-createPattern"><a href=
                   21347: "#createpattern">createPattern()</a></code> method must not affect
                   21348: the pattern. The second argument must be a string with one of the
                   21349: following values: <code title="">repeat</code> , <code title=
                   21350: "">repeat-x</code> , <code title="">repeat-y</code> , <code title=
                   21351: "">no-repeat</code> . If the empty string or null is specified,
                   21352: <code title="">repeat</code> must be assumed. If an <del class=
                   21353: "diff-old">unrecognised</del> <ins class=
                   21354: "diff-chg">unrecognized</ins> value is given, then the user agent
                   21355: must raise a <code>SYNTAX_ERR</code> exception. User agents must
                   21356: <del class="diff-old">recognise</del> <ins class=
                   21357: "diff-chg">recognize</ins> the four values described above exactly
                   21358: (e.g. they must not do case folding). The method must return a
                   21359: <code><a href="#canvaspattern0">CanvasPattern</a></code> object
                   21360: suitably <del class="diff-old">initialised.</del> <ins class=
                   21361: "diff-chg">initialized.</ins></p>
                   21362: <p>The <var title="">image</var> argument must be an instance of an
                   21363: <code><a href="#htmlimageelement">HTMLImageElement</a></code> or
                   21364: <code><a href="#htmlcanvaselement">HTMLCanvasElement</a></code> .
                   21365: If the <var title="">image</var> is of the wrong <del class=
                   21366: "diff-old">type,</del> <ins class="diff-chg">type or null,</ins>
                   21367: the implementation must raise a <code>TYPE_MISMATCH_ERR</code>
                   21368: exception.</p>
                   21369: <p>If the <var title="">image</var> argument is an <code><a href=
                   21370: "#htmlimageelement">HTMLImageElement</a></code> object whose
                   21371: <code title="dom-img-complete"><a href=
                   21372: "#complete">complete</a></code> attribute is false, then the
                   21373: implementation must raise an <code>INVALID_STATE_ERR</code>
                   21374: exception.</p>
                   21375: <p><ins class="diff-new">If the</ins> <var title=""><ins class=
                   21376: "diff-new">image</ins></var> <ins class="diff-new">argument is
                   21377: an</ins> <code><a href="#htmlcanvaselement"><ins class=
                   21378: "diff-new">HTMLCanvasElement</ins></a></code> <ins class=
                   21379: "diff-new">object with either a horizontal dimension or a vertical
                   21380: dimension equal to zero, then the implementation must raise
                   21381: an</ins> <code><ins class="diff-new">INVALID_STATE_ERR</ins></code>
                   21382: <ins class="diff-new">exception.</ins></p>
                   21383: <p>Patterns must be painted so that the top left of the first image
                   21384: is anchored at the origin of the coordinate space, and images are
                   21385: then repeated horizontally to the left and right (if the
                   21386: <code>repeat-x</code> string was specified) or vertically up and
                   21387: down (if the <code>repeat-y</code> string was specified) or in all
                   21388: four directions all over the canvas (if the <code>repeat</code>
                   21389: string was specified). The images are not <del class=
                   21390: "diff-old">be</del> scaled by this process; one CSS pixel of the
                   21391: image must be painted on one coordinate space unit. Of course,
                   21392: patterns must <del class="diff-old">only</del> actually <ins class=
                   21393: "diff-new">be</ins> painted <ins class="diff-new">only</ins> where
                   21394: the stroking or filling effect requires that they be drawn, and are
                   21395: affected by the current transformation matrix.</p>
                   21396: <p><ins class="diff-new">When the</ins> <code title=
                   21397: "dom-context-2d-createPattern"><a href="#createpattern"><ins class=
                   21398: "diff-new">createPattern()</ins></a></code> <ins class=
                   21399: "diff-new">method is passed, as its</ins> <var title=""><ins class=
                   21400: "diff-new">image</ins></var> <ins class="diff-new">argument, an
                   21401: animated image, the poster frame of the animation, or the first
                   21402: frame of the animation if there is no poster frame, must be
                   21403: used.</ins></p>
                   21404: <p>Support for patterns is optional. If the user agent doesn't
                   21405: support patterns, then <code title=
                   21406: "dom-context-2d-createPattern"><a href=
                   21407: "#createpattern">createPattern()</a></code> must return null.</p>
                   21408: <h6 id="line-styles"><span class="secno"><del class=
                   21409: "diff-old">3.14.11.1.5.</del> <ins class=
                   21410: "diff-chg">3.12.11.1.5.</ins></span> Line styles</h6>
                   21411: <p>The <dfn id="linewidth" title=
                   21412: "dom-context-2d-lineWidth"><code>lineWidth</code></dfn> attribute
                   21413: gives the <del class="diff-old">default</del> width of lines, in
                   21414: coordinate space units. On setting, <del class=
                   21415: "diff-old">zero</del> <ins class="diff-chg">zero, negative,
                   21416: infinite,</ins> and <del class="diff-old">negative</del>
                   21417: <ins class="diff-chg">NaN</ins> values must be ignored, leaving the
                   21418: value unchanged.</p>
                   21419: <p>When the context is created, the <code title=
                   21420: "dom-context-2d-lineWidth"><a href=
                   21421: "#linewidth">lineWidth</a></code> attribute must initially have the
                   21422: value <code>1.0</code> .</p>
                   21423: <p>The <dfn id="linecap" title=
                   21424: "dom-context-2d-lineCap"><code>lineCap</code></dfn> attribute
                   21425: defines the type of endings that UAs <del class=
                   21426: "diff-old">shall</del> <ins class="diff-chg">will</ins> place on
                   21427: the end of lines. The three valid values are <code>butt</code> ,
                   21428: <code>round</code> , and <code>square</code> . The
                   21429: <code>butt</code> value means that the end of each line is a flat
                   21430: edge perpendicular to the direction of the line. The
                   21431: <code>round</code> value means that a semi-circle with the diameter
                   21432: equal to the width of the line <del class="diff-old">is</del>
                   21433: <ins class="diff-chg">must</ins> then <ins class=
                   21434: "diff-new">be</ins> added on to the end of the line. The
                   21435: <code>square</code> value means that <del class="diff-old">at the
                   21436: end of each line is</del> a rectangle with the length of the line
                   21437: width and the width of half the line width, placed flat against the
                   21438: edge perpendicular to the direction of the <ins class=
                   21439: "diff-new">line, must be added at the end of each</ins> line. On
                   21440: setting, any other value than the literal strings <code>butt</code>
                   21441: , <code>round</code> , and <code>square</code> must be ignored,
                   21442: leaving the value unchanged.</p>
                   21443: <p>When the context is created, the <code title=
                   21444: "dom-context-2d-lineCap"><a href="#linecap">lineCap</a></code>
                   21445: attribute must initially have the value <code>butt</code> .</p>
                   21446: <p>The <dfn id="linejoin" title=
                   21447: "dom-context-2d-lineJoin"><code>lineJoin</code></dfn> attribute
                   21448: defines the type of corners that <del class="diff-old">that</del>
                   21449: UAs will place where two lines meet. The three valid values are
                   21450: <code><del class="diff-old">round</del> <ins class=
                   21451: "diff-chg">bevel</ins></code> , <code><del class=
                   21452: "diff-old">bevel</del> <ins class="diff-chg">round</ins></code> ,
                   21453: and <code>miter</code> .</p>
                   21454: <p>On setting, any other value than the literal strings
                   21455: <code><del class="diff-old">round</del> <ins class=
                   21456: "diff-chg">bevel</ins></code> , <code><del class=
                   21457: "diff-old">bevel</del> <ins class="diff-chg">round</ins></code> ,
                   21458: and <code>miter</code> must be ignored, leaving the value
                   21459: unchanged.</p>
                   21460: <p>When the context is created, the <code title=
                   21461: "dom-context-2d-lineJoin"><a href="#linejoin">lineJoin</a></code>
                   21462: attribute must initially have the value <code>miter</code> .</p>
                   21463: <p><del class="diff-old">The round value means that</del>
                   21464: <ins class="diff-chg">A join exists at any point in</ins> a
                   21465: <del class="diff-old">filled arc</del> <ins class=
                   21466: "diff-chg">subpath shared by two consecutive lines. When a subpath
                   21467: is closed, then a join also exists at its first point (equivalent
                   21468: to its last point)</ins> connecting the <del class=
                   21469: "diff-old">corners on</del> <ins class="diff-chg">first and last
                   21470: lines in</ins> the <del class="diff-old">outside of</del>
                   21471: <ins class="diff-chg">subpath.</ins></p>
                   21472: <p><ins class="diff-chg">In addition to</ins> the <del class=
                   21473: "diff-old">join, with</del> <ins class="diff-chg">point where</ins>
                   21474: the <del class="diff-old">diameter equal</del> <ins class=
                   21475: "diff-chg">join occurs, two additional points are relevant</ins> to
                   21476: <ins class="diff-new">each join, one for each line: the two corners
                   21477: found half</ins> the line <del class="diff-old">width, and</del>
                   21478: <ins class="diff-chg">width away from</ins> the <del class=
                   21479: "diff-old">origin at</del> <ins class="diff-chg">join point, one
                   21480: perpendicular to each line, each on</ins> the <del class=
                   21481: "diff-old">point where</del> <ins class="diff-chg">side furthest
                   21482: from</ins> the <del class="diff-old">inside edges</del> <ins class=
                   21483: "diff-chg">other line.</ins></p>
                   21484: <p><ins class="diff-chg">A filled triangle connecting these two
                   21485: opposite corners with a straight line, with the third point</ins>
                   21486: of the <del class="diff-old">lines touch,</del> <ins class=
                   21487: "diff-chg">triangle being the join point,</ins> must be rendered at
                   21488: <ins class="diff-new">all</ins> joins. The <code title=
                   21489: "dom-context-2d-lineJoin"><a href="#linejoin"><ins class=
                   21490: "diff-new">lineJoin</ins></a></code> <ins class=
                   21491: "diff-new">attribute controls whether anything else is rendered.
                   21492: The three aforementioned values have the following
                   21493: meanings:</ins></p>
                   21494: <p><ins class="diff-new">The</ins> <code>bevel</code> value means
                   21495: that <ins class="diff-new">this is all that is rendered at
                   21496: joins.</ins></p>
                   21497: <p><ins class="diff-new">The</ins> <code><ins class=
                   21498: "diff-new">round</ins></code> <ins class="diff-new">value means
                   21499: that</ins> a filled <del class="diff-old">triangle</del>
                   21500: <ins class="diff-chg">arc</ins> connecting <del class=
                   21501: "diff-old">those</del> <ins class="diff-chg">the</ins> two
                   21502: <ins class="diff-new">aforementioned</ins> corners <del class=
                   21503: "diff-old">with a straight line, the third point</del> of the
                   21504: <del class="diff-old">triangle being</del> <ins class=
                   21505: "diff-chg">join, abutting (and not overlapping)</ins> the
                   21506: <del class="diff-old">point where</del> <ins class=
                   21507: "diff-chg">aforementioned triangle, with</ins> the <del class=
                   21508: "diff-old">lines touch on</del> <ins class="diff-chg">diameter
                   21509: equal to</ins> the <del class="diff-old">inside</del> <ins class=
                   21510: "diff-chg">line width and the origin at the point</ins> of the
                   21511: join, must be rendered at joins.</p>
                   21512: <p>The <code>miter</code> value means that a <ins class=
                   21513: "diff-new">second</ins> filled <del class="diff-old">four- or
                   21514: five-sided polygon</del> <ins class="diff-chg">triangle</ins> must
                   21515: <ins class="diff-new">(if it can given the miter length)</ins> be
                   21516: <del class="diff-old">placed</del> <ins class=
                   21517: "diff-chg">rendered</ins> at the join, with <del class=
                   21518: "diff-old">two of the lines</del> <ins class="diff-chg">one
                   21519: line</ins> being the <del class="diff-old">perpendicular edges
                   21520: of</del> <ins class="diff-chg">line between</ins> the <del class=
                   21521: "diff-old">joining lines,</del> <ins class="diff-chg">two
                   21522: aforementioned corners, abutting the first triangle,</ins> and the
                   21523: other two being continuations of the outside edges of the two
                   21524: joining lines, as long as required to intersect without going over
                   21525: the miter <del class="diff-old">limit.</del> <ins class=
                   21526: "diff-chg">length.</ins></p>
                   21527: <p>The miter length is the distance from the point where the lines
                   21528: touch on the inside of the join to the intersection of the line
                   21529: edges on the outside of the join. The miter limit ratio is the
                   21530: maximum allowed ratio of the <del class="diff-old">miter</del>
                   21531: length <ins class="diff-new">of the two continuation lines</ins> to
                   21532: the line width. If the miter <del class="diff-old">limit</del>
                   21533: <ins class="diff-chg">length</ins> would be exceeded, <del class=
                   21534: "diff-old">then a fifth line</del> <ins class="diff-chg">this
                   21535: second triangle</ins> must <ins class="diff-new">not</ins> be
                   21536: <del class="diff-old">added to the polygon, connecting the two
                   21537: outside lines, such that the distance from the inside point of the
                   21538: join to the point in the middle of this fifth line is the maximum
                   21539: allowed value for the miter length.</del> <ins class=
                   21540: "diff-chg">rendered.</ins></p>
                   21541: <p>The miter limit ratio can be explicitly set using the <dfn id=
                   21542: "miterlimit" title=
                   21543: "dom-context-2d-miterLimit"><code>miterLimit</code></dfn>
                   21544: attribute. On setting, <del class="diff-old">zero</del> <ins class=
                   21545: "diff-chg">zero, negative, infinite,</ins> and <del class=
                   21546: "diff-old">negative</del> <ins class="diff-chg">NaN</ins> values
                   21547: must be ignored, leaving the value unchanged.</p>
                   21548: <p>When the context is created, the <code title=
                   21549: "dom-context-2d-miterLimit"><a href=
                   21550: "#miterlimit">miterLimit</a></code> attribute must initially have
                   21551: the value <code>10.0</code> .</p>
                   21552: <h6 id="shadows"><span class="secno"><del class=
                   21553: "diff-old">3.14.11.1.6.</del> <ins class=
                   21554: "diff-chg">3.12.11.1.6.</ins></span> <dfn id=
                   21555: "shadows0">Shadows</dfn></h6>
                   21556: <p>All drawing operations are affected by the four global shadow
                   21557: attributes.</p>
                   21558: <p>The <dfn id="shadowcolor" title=
                   21559: "dom-context-2d-shadowColor"><code>shadowColor</code></dfn>
                   21560: attribute sets the color of the shadow.</p>
                   21561: <p>When the context is created, the <code title=
                   21562: "dom-context-2d-shadowColor"><a href=
                   21563: "#shadowcolor">shadowColor</a></code> attribute initially must be
                   21564: fully-transparent black.</p>
                   21565: <p>On getting, the <del class="diff-old">serialisation</del>
                   21566: <a href="#serialization" title=
                   21567: "serialization of a color"><ins class=
                   21568: "diff-chg">serialization</ins> of the color</a> must be
                   21569: returned.</p>
                   21570: <p>On setting, the new value must be parsed as a CSS &lt;color&gt;
                   21571: value and the color assigned. If the value is not a valid color,
                   21572: then it must be ignored, and the attribute must retain its previous
                   21573: value. <a href="#references">[CSS3COLOR]</a></p>
                   21574: <p>The <dfn id="shadowoffsetx" title=
                   21575: "dom-context-2d-shadowOffsetX"><code>shadowOffsetX</code></dfn> and
                   21576: <dfn id="shadowoffsety" title=
                   21577: "dom-context-2d-shadowOffsetY"><code>shadowOffsetY</code></dfn>
                   21578: attributes specify the distance that the shadow will be offset in
                   21579: the positive horizontal and positive vertical distance
                   21580: respectively. Their values are in coordinate space units. They are
                   21581: not affected by the current transformation matrix.</p>
                   21582: <p>When the context is created, the shadow offset attributes
                   21583: initially have the value <code>0</code> .</p>
                   21584: <p>On getting, they must return their current value. On setting,
                   21585: the attribute being set must be set to the new <del class=
                   21586: "diff-old">value.</del> <ins class="diff-chg">value, except if the
                   21587: value is infinite or NaN, in which case the new value must be
                   21588: ignored.</ins></p>
                   21589: <p>The <dfn id="shadowblur" title=
                   21590: "dom-context-2d-shadowBlur"><code>shadowBlur</code></dfn> attribute
                   21591: specifies the size of the blurring effect. (The units do not map to
                   21592: coordinate space units, and are not affected by the current
                   21593: transformation matrix.)</p>
                   21594: <p>When the context is created, the <code title=
                   21595: "dom-context-2d-shadowBlur"><a href=
                   21596: "#shadowblur">shadowBlur</a></code> attribute must initially have
                   21597: the value <code>0</code> .</p>
                   21598: <p>On getting, the attribute must return its current value. On
                   21599: <del class="diff-old">setting, if the value is greater than or
                   21600: equal to zero, then</del> <ins class="diff-chg">setting</ins> the
                   21601: attribute must be set to the new <del class="diff-old">value;
                   21602: otherwise,</del> <ins class="diff-chg">value, except if</ins> the
                   21603: <del class="diff-old">new</del> value is <ins class=
                   21604: "diff-new">negative, infinite or NaN, in which case the new value
                   21605: must be</ins> ignored.</p>
                   21606: <p>Support for shadows is optional. When they are supported, then,
                   21607: when shadows are drawn, they must be rendered as follows:</p>
                   21608: <ol>
                   21609: <li>
                   21610: <p>Let <var title="">A</var> be the source image for which a shadow
                   21611: is being created.</p>
                   21612: </li>
                   21613: <li>
                   21614: <p>Let <var title="">B</var> be an infinite transparent black
                   21615: bitmap, with a coordinate space and an origin identical to
                   21616: <var title="">A</var> .</p>
                   21617: </li>
                   21618: <li>
                   21619: <p>Copy the alpha channel of <var title="">A</var> to <var title=
                   21620: "">B</var> , offset by <code title=
                   21621: "dom-context-2d-shadowOffsetX"><a href=
                   21622: "#shadowoffsetx">shadowOffsetX</a></code> in the positive
                   21623: <var title="">x</var> direction, and <code title=
                   21624: "dom-context-2d-shadowOffsetY"><a href=
                   21625: "#shadowoffsety">shadowOffsetY</a></code> in the positive
                   21626: <var title="">y</var> direction.</p>
                   21627: </li>
                   21628: <li>
                   21629: <p>If <code title="dom-context-2d-shadowBlur"><a href=
                   21630: "#shadowblur">shadowBlur</a></code> is greater than 0:</p>
                   21631: <ol>
                   21632: <li>
                   21633: <p>If <code title="dom-context-2d-shadowBlur"><a href=
                   21634: "#shadowblur">shadowBlur</a></code> is less than 8, let <var title=
                   21635: "">σ</var> be half the value of <code title=
                   21636: "dom-context-2d-shadowBlur"><a href=
                   21637: "#shadowblur">shadowBlur</a></code> ; otherwise, let <var title=
                   21638: "">σ</var> be the square root of multiplying the value of
                   21639: <code title="dom-context-2d-shadowBlur"><a href=
                   21640: "#shadowblur">shadowBlur</a></code> by 2.</p>
                   21641: </li>
                   21642: <li>
                   21643: <p>Perform a 2D Gaussian Blur on <var title="">B</var> , using
                   21644: <var title="">σ</var> as the standard deviation.</p>
                   21645: </li>
                   21646: </ol>
                   21647: <p>User agents may limit values of <var title="">σ</var> to an
                   21648: implementation-specific maximum value to avoid exceeding hardware
                   21649: limitations during the Gaussian blur operation.</p>
                   21650: </li>
                   21651: <li>
                   21652: <p>Set the red, green, and blue components of every pixel in
                   21653: <var title="">B</var> to the red, green, and blue components
                   21654: (respectively) of the color of <code title=
                   21655: "dom-context-2d-shadowColor"><a href=
                   21656: "#shadowcolor">shadowColor</a></code> .</p>
                   21657: </li>
                   21658: <li>
                   21659: <p>Multiply the alpha component of every pixel in <var title=
                   21660: "">B</var> by the alpha component of the color of <code title=
                   21661: "dom-context-2d-shadowColor"><a href=
                   21662: "#shadowcolor">shadowColor</a></code> .</p>
                   21663: </li>
                   21664: <li>
                   21665: <p>The shadow is in the bitmap <var title="">B</var> , and is
                   21666: rendered as part of the drawing model described below.</p>
                   21667: </li>
                   21668: </ol>
                   21669: <h6 id="simple"><span class="secno"><del class=
                   21670: "diff-old">3.14.11.1.7.</del> <ins class=
                   21671: "diff-chg">3.12.11.1.7.</ins></span> Simple shapes
                   21672: (rectangles)</h6>
                   21673: <p>There are three methods that immediately draw rectangles to the
                   21674: bitmap. They each take four arguments; the first two give the
                   21675: <var title="">x</var> and <var title="">y</var> coordinates of the
                   21676: top left of the rectangle, and the second two give the width
                   21677: <var title="">w</var> and height <var title="">h</var> of the
                   21678: rectangle, respectively.</p>
                   21679: <p>The <a href="#transformations0" title=
                   21680: "dom-context-2d-transformation">current transformation matrix</a>
                   21681: must be applied to the following four coordinates, which form the
                   21682: path that must then be closed to get the specified rectangle:
                   21683: <span>( <var title="">x</var> , <var title="">y</var> )</span> ,
                   21684: <span>( <span><var title="">x</var> + <var title="">w</var></span>
                   21685: , <var title="">y</var> )</span> , <span>( <span><var title=
                   21686: "">x</var> + <var title="">w</var></span> , <span><var title=
                   21687: "">y</var> + <var title="">h</var></span> )</span> , <span>(
                   21688: <var title="">x</var> , <span><var title="">y</var> + <var title=
                   21689: "">h</var></span> )</span> .</p>
                   21690: <p>Shapes are painted without affecting the current path, and are
                   21691: subject to <ins class="diff-chg">the</ins> <a href="#clipping"
                   21692: title="clipping region">clipping <del class="diff-old">paths</del>
                   21693: <ins class="diff-chg">region</ins></a> , and, with the exception of
                   21694: <code title="dom-context-2d-clearRect"><a href=
                   21695: "#clearrect">clearRect()</a></code> , also <a href="#shadows0"
                   21696: title="shadows">shadow effects</a> , <a href="#globalalpha" title=
                   21697: "dom-context-2d-globalAlpha">global alpha</a> , and <a href=
                   21698: "#globalcompositeoperation" title=
                   21699: "dom-context-2d-globalCompositeOperation">global composition
                   21700: operators</a> .</p>
                   21701: <p><del class="diff-old">Negative values for width and height must
                   21702: cause the implementation to raise an INDEX_SIZE_ERR
                   21703: exception.</del> The <dfn id="clearrect" title=
                   21704: "dom-context-2d-clearRect"><code><del class=
                   21705: "diff-old">clearRect()</del> <ins class="diff-chg">clearRect(</ins>
                   21706: <var title=""><ins class="diff-chg">x</ins></var> ,<var title=
                   21707: ""><ins class="diff-chg">y</ins></var> ,<var title=""><ins class=
                   21708: "diff-chg">w</ins></var> ,<var title=""><ins class=
                   21709: "diff-chg">h</ins></var> <ins class="diff-chg">)</ins></code></dfn>
                   21710: method must clear the pixels in the specified rectangle that also
                   21711: intersect the current clipping <del class="diff-old">path</del>
                   21712: <ins class="diff-chg">region</ins> to a fully transparent black,
                   21713: erasing any previous image. If either height or width are zero,
                   21714: this method has no effect.</p>
                   21715: <p>The <dfn id="fillrect" title=
                   21716: "dom-context-2d-fillRect"><code><del class=
                   21717: "diff-old">fillRect()</del> <ins class="diff-chg">fillRect(</ins>
                   21718: <var title=""><ins class="diff-chg">x</ins></var> ,<var title=
                   21719: ""><ins class="diff-chg">y</ins></var> ,<var title=""><ins class=
                   21720: "diff-chg">w</ins></var> ,<var title=""><ins class=
                   21721: "diff-chg">h</ins></var> <ins class="diff-chg">)</ins></code></dfn>
                   21722: method must paint the specified rectangular area using the
                   21723: <code title="dom-context-2d-fillStyle"><a href=
                   21724: "#fillstyle">fillStyle</a></code> . If either height or width are
                   21725: zero, this method has no effect.</p>
                   21726: <p>The <dfn id="strokerect" title=
                   21727: "dom-context-2d-strokeRect"><code><del class=
                   21728: "diff-old">strokeRect()</del> <ins class=
                   21729: "diff-chg">strokeRect(</ins> <var title=""><ins class=
                   21730: "diff-chg">x</ins></var> ,<var title=""><ins class=
                   21731: "diff-chg">y</ins></var> ,<var title=""><ins class=
                   21732: "diff-chg">w</ins></var> ,<var title=""><ins class=
                   21733: "diff-chg">h</ins></var> <ins class="diff-chg">)</ins></code></dfn>
                   21734: method must stroke the specified rectangle's path using the
                   21735: <code title="dom-context-2d-strokeStyle"><a href=
                   21736: "#strokestyle">strokeStyle</a></code> , <code title=
                   21737: "dom-context-2d-lineWidth"><a href=
                   21738: "#linewidth">lineWidth</a></code> , <code title=
                   21739: "dom-context-2d-lineJoin"><a href="#linejoin">lineJoin</a></code> ,
                   21740: and (if appropriate) <code title=
                   21741: "dom-context-2d-miterLimit"><a href=
                   21742: "#miterlimit">miterLimit</a></code> attributes. If both height and
                   21743: width are zero, this method has no effect, since there is no path
                   21744: to stroke (it's a point). If only one of the two is zero, then the
                   21745: method will draw a line instead (the path for the outline is just a
                   21746: straight line along the non-zero dimension).</p>
                   21747: <h6 id="complex"><span class="secno"><del class=
                   21748: "diff-old">3.14.11.1.8.</del> <ins class=
                   21749: "diff-chg">3.12.11.1.8.</ins></span> Complex shapes (paths)</h6>
                   21750: <p>The context always has a current path. There is only one current
                   21751: path, it is not part of the <span title="dom-context-2d-">drawing
                   21752: state</span> .</p>
                   21753: <p>A <dfn id="path">path</dfn> has a list of zero or more subpaths.
                   21754: Each subpath consists of a list of one or more points, connected by
                   21755: straight or curved lines, and a flag indicating whether the subpath
                   21756: is closed or not. A closed subpath is one where the last point of
                   21757: the subpath is connected to the first point of the subpath by a
                   21758: straight line. Subpaths with fewer than two points are ignored when
                   21759: painting the path.</p>
                   21760: <p>Initially, the context's path must have zero subpaths.</p>
                   21761: <p>The <del class="diff-old">coordinates given in the
                   21762: arguments</del> <ins class="diff-chg">points and lines added</ins>
                   21763: to <ins class="diff-new">the path by</ins> these methods must be
                   21764: transformed according to the <a href="#transformations0" title=
                   21765: "dom-context-2d-transformation">current transformation matrix</a>
                   21766: <del class="diff-old">before applying the calculations described
                   21767: below and before adding any points to the path.</del> <ins class=
                   21768: "diff-chg">as they are added.</ins></p>
                   21769: <p>The <dfn id="beginpath" title=
                   21770: "dom-context-2d-beginPath"><code>beginPath()</code></dfn> method
                   21771: must empty the list of subpaths so that the context once again has
                   21772: zero subpaths.</p>
                   21773: <p>The <dfn id="moveto" title="dom-context-2d-moveTo"><code>moveTo(
                   21774: <var title="">x</var> , <var title="">y</var> )</code></dfn> method
                   21775: must create a new subpath with the specified point as its first
                   21776: (and only) point.</p>
                   21777: <p>The <dfn id="closepath" title=
                   21778: "dom-context-2d-closePath"><code>closePath()</code></dfn> method
                   21779: must do nothing if the context has no subpaths. Otherwise, it must
                   21780: mark the last subpath as closed, create a new subpath whose first
                   21781: point is the same as the previous subpath's first point, and
                   21782: finally add this new subpath to the path. (If the last subpath had
                   21783: more than one point in its list of points, then this is equivalent
                   21784: to adding a straight line connecting the last point back to the
                   21785: first point, thus "closing" the shape, and then repeating the last
                   21786: <code title="dom-context-2d-moveTo"><a href=
                   21787: "#moveto">moveTo()</a></code> call.)</p>
                   21788: <p>New points and the lines connecting them are added to subpaths
                   21789: using the methods described below. In all cases, the methods only
                   21790: modify the last subpath in the context's paths.</p>
                   21791: <p>The <dfn id="lineto" title="dom-context-2d-lineTo"><code>lineTo(
                   21792: <var title="">x</var> , <var title="">y</var> )</code></dfn> method
                   21793: must do nothing if the context has no subpaths. Otherwise, it must
                   21794: connect the last point in the subpath to the given point (
                   21795: <var title="">x</var> , <var title="">y</var> ) using a straight
                   21796: line, and must then add the given point ( <var title="">x</var> ,
                   21797: <var title="">y</var> ) to the subpath.</p>
                   21798: <p>The <dfn id="quadraticcurveto" title=
                   21799: "dom-context-2d-quadraticCurveTo"><code>quadraticCurveTo(
                   21800: <var title="">cpx</var> , <var title="">cpy</var> , <var title=
                   21801: "">x</var> , <var title="">y</var> )</code></dfn> method must do
                   21802: nothing if the context has no subpaths. Otherwise it must connect
                   21803: the last point in the subpath to the given point ( <var title=
                   21804: "">x</var> , <var title="">y</var> ) using a quadratic Bézier curve
                   21805: with control point ( <var title="">cpx</var> , <var title=
                   21806: "">cpy</var> ), and must then add the given point ( <var title=
                   21807: "">x</var> , <var title="">y</var> ) to the subpath. <a href=
                   21808: "#references">[BEZIER]</a></p>
                   21809: <p>The <dfn id="beziercurveto" title=
                   21810: "dom-context-2d-bezierCurveTo"><code>bezierCurveTo( <var title=
                   21811: "">cp1x</var> , <var title="">cp1y</var> , <var title="">cp2x</var>
                   21812: , <var title="">cp2y</var> , <var title="">x</var> , <var title=
                   21813: "">y</var> )</code></dfn> method must do nothing if the context has
                   21814: no subpaths. Otherwise, it must connect the last point in the
                   21815: subpath to the given point ( <var title="">x</var> , <var title=
                   21816: "">y</var> ) using a cubic Bézier curve with control points (
                   21817: <var title="">cp1x</var> , <var title="">cp1y</var> ) and (
                   21818: <var title="">cp2x</var> , <var title="">cp2y</var> ). Then, it
                   21819: must add the point ( <var title="">x</var> , <var title="">y</var>
                   21820: ) to the subpath. <a href="#references">[BEZIER]</a></p>
                   21821: <p>The <dfn id="arcto" title="dom-context-2d-arcTo"><code>arcTo(
                   21822: <var title="">x1</var> , <var title="">y1</var> , <var title=
                   21823: "">x2</var> , <var title="">y2</var> , <var title="">radius</var>
                   21824: )</code></dfn> method must do nothing if the context has no
                   21825: subpaths. If the context <em>does</em> have a subpath, then the
                   21826: <del class="diff-old">behaviour</del> <ins class=
                   21827: "diff-chg">behavior</ins> depends on the arguments and the last
                   21828: point in the subpath.</p>
                   21829: <p><ins class="diff-new">Negative values for</ins> <var title=
                   21830: ""><ins class="diff-new">radius</ins></var> <ins class=
                   21831: "diff-new">must cause the implementation to raise an</ins>
                   21832: <code><ins class="diff-new">INDEX_SIZE_ERR</ins></code> <ins class=
                   21833: "diff-new">exception.</ins></p>
                   21834: <p>Let the point ( <var title="">x0</var> , <var title="">y0</var>
                   21835: ) be the last point in the subpath. <del class=
                   21836: "diff-old">Let</del></p>
                   21837: <p><ins class="diff-chg">If the point (</ins> <var title=
                   21838: ""><del class="diff-old">The Arc</del> <ins class=
                   21839: "diff-chg">x0</ins></var> ,<var title=""><ins class=
                   21840: "diff-chg">y0</ins></var> <del class="diff-old">be</del>
                   21841: <ins class="diff-chg">) is equal to</ins> the <del class=
                   21842: "diff-old">shortest arc given by circumference of</del> <ins class=
                   21843: "diff-chg">point (</ins> <var title=""><ins class=
                   21844: "diff-chg">x1</ins></var> ,<var title=""><ins class=
                   21845: "diff-chg">y1</ins></var> <ins class="diff-chg">), or if</ins> the
                   21846: <del class="diff-old">circle</del> <ins class="diff-chg">point
                   21847: (</ins> <var title=""><ins class="diff-chg">x1</ins></var>
                   21848: ,<var title=""><ins class="diff-chg">y1</ins></var> <ins class=
                   21849: "diff-chg">) is equal to the point (</ins> <var title=
                   21850: ""><ins class="diff-chg">x2</ins></var> ,<var title=""><ins class=
                   21851: "diff-chg">y2</ins></var> <ins class="diff-chg">), then the method
                   21852: must add the point (</ins> <var title=""><ins class=
                   21853: "diff-chg">x1</ins></var> ,<var title=""><ins class=
                   21854: "diff-chg">y1</ins></var> <ins class="diff-chg">) to the subpath,
                   21855: and connect</ins> that <del class="diff-old">has one</del> point
                   21856: <del class="diff-old">tangent</del> to the <del class=
                   21857: "diff-old">line defined</del> <ins class="diff-chg">previous point
                   21858: (</ins> <var title=""><ins class="diff-chg">x0</ins></var>
                   21859: ,<var title=""><ins class="diff-chg">y0</ins></var> <ins class=
                   21860: "diff-chg">)</ins> by <ins class="diff-new">a straight
                   21861: line.</ins></p>
                   21862: <p><ins class="diff-new">Otherwise, if</ins> the points (
                   21863: <var title="">x0</var> , <var title="">y0</var> <del class=
                   21864: "diff-old">)</del> <ins class="diff-chg">), (</ins> <var title=
                   21865: ""><ins class="diff-chg">x1</ins></var> ,<var title=""><ins class=
                   21866: "diff-chg">y1</ins></var> <ins class="diff-chg">),</ins> and (
                   21867: <var title=""><ins class="diff-new">x2</ins></var> ,<var title=
                   21868: ""><ins class="diff-new">y2</ins></var> <ins class="diff-new">) all
                   21869: lie on a single straight line, then: if the direction from (</ins>
                   21870: <var title=""><ins class="diff-new">x0</ins></var> ,<var title=
                   21871: ""><ins class="diff-new">y0</ins></var> <ins class="diff-new">) to
1.2     ! mike     21872: (</ins> <var title="">x1</var> , <var title="">y1</var> <ins class=
1.1       mike     21873: "diff-new">) is the same as the direction from (</ins> <var title=
1.2     ! mike     21874: ""><ins class="diff-new">x1</ins></var> ,<var title=""><ins class=
        !          21875: "diff-new">y1</ins></var> <ins class="diff-new">) to (</ins>
        !          21876: <var title=""><ins class="diff-new">x2</ins></var> ,<var title=
        !          21877: ""><ins class="diff-new">y2</ins></var> ), <del class=
1.1       mike     21878: "diff-old">another</del> <ins class="diff-chg">then method must add
                   21879: the</ins> point <del class="diff-old">tangent</del> <ins class=
                   21880: "diff-chg">(</ins> <var title=""><ins class=
                   21881: "diff-chg">x1</ins></var> ,<var title=""><ins class=
                   21882: "diff-chg">y1</ins></var> <ins class="diff-chg">)</ins> to the
                   21883: <del class="diff-old">line defined</del> <ins class=
                   21884: "diff-chg">subpath, and connect that point to the previous point
                   21885: (</ins> <var title=""><ins class="diff-chg">x0</ins></var>
                   21886: ,<var title=""><ins class="diff-chg">y0</ins></var> <ins class=
                   21887: "diff-chg">)</ins> by <ins class="diff-new">a straight line;
                   21888: otherwise,</ins> the <del class="diff-old">points</del> <ins class=
                   21889: "diff-chg">direction from (</ins> <var title=""><ins class=
                   21890: "diff-chg">x0</ins></var> ,<var title=""><ins class=
                   21891: "diff-chg">y0</ins></var> <ins class="diff-chg">) to</ins> (
                   21892: <var title="">x1</var> , <var title="">y1</var> ) <del class=
                   21893: "diff-old">and</del> <ins class="diff-chg">is the opposite of the
                   21894: direction from (</ins> <var title=""><ins class=
                   21895: "diff-chg">x1</ins></var> ,<var title=""><ins class=
                   21896: "diff-chg">y1</ins></var> <ins class="diff-chg">) to</ins> (
                   21897: <var title="">x2</var> , <var title="">y2</var> ), and <del class=
                   21898: "diff-old">that has radius</del> <ins class="diff-chg">the method
                   21899: must add a point (</ins> <var title=""><del class="diff-old">radius
                   21900: . The points at which this circle touches these two lines are
                   21901: called</del> <ins class="diff-chg">x</ins> <sub><ins class=
                   21902: "diff-chg">∞</ins></sub></var> ,<var title=""><ins class=
                   21903: "diff-chg">y</ins> <sub><ins class="diff-chg">∞</ins></sub></var>
                   21904: <ins class="diff-chg">) to</ins> the <del class=
                   21905: "diff-old">start</del> <ins class="diff-chg">subpath,</ins> and
                   21906: <del class="diff-old">end tangent points respectively. If</del>
1.2     ! mike     21907: <ins class="diff-chg">connect that point to</ins> the <ins class=
        !          21908: "diff-new">previous</ins> point ( <var title=""><ins class=
        !          21909: "diff-new">x0</ins></var> ,<var title=""><ins class=
        !          21910: "diff-new">y0</ins></var> <ins class="diff-new">) by a straight
        !          21911: line, where (</ins> <var title=""><ins class="diff-new">x</ins>
        !          21912: <sub><ins class="diff-new">∞</ins></sub></var> ,<var title=
        !          21913: ""><ins class="diff-new">y</ins> <sub><ins class=
        !          21914: "diff-new">∞</ins></sub></var> <ins class="diff-new">) is the point
        !          21915: that is infinitely far away from (</ins> <var title=""><ins class=
        !          21916: "diff-new">x1</ins></var> ,<var title=""><ins class=
1.1       mike     21917: "diff-new">y1</ins></var> <ins class="diff-new">), that lies on the
                   21918: same line as (</ins> <var title=""><ins class=
                   21919: "diff-new">x0</ins></var> ,<var title=""><ins class=
                   21920: "diff-new">y0</ins></var> <ins class="diff-new">), (</ins>
                   21921: <var title=""><ins class="diff-new">x1</ins></var> ,<var title=
                   21922: ""><ins class="diff-new">y1</ins></var> <ins class="diff-new">),
1.2     ! mike     21923: and (</ins> <var title="">x2</var> , <var title="">y2</var>
1.1       mike     21924: <del class="diff-old">)</del> <ins class="diff-chg">), and
                   21925: that</ins> is on the <ins class="diff-new">same side of (</ins>
                   21926: <var title=""><ins class="diff-new">x1</ins></var> ,<var title=
                   21927: ""><ins class="diff-new">y1</ins></var> <ins class="diff-new">) on
                   21928: that</ins> line <del class="diff-old">defined</del> <ins class=
                   21929: "diff-chg">as (</ins> <var title=""><ins class=
                   21930: "diff-chg">x2</ins></var> ,<var title=""><ins class=
                   21931: "diff-chg">y2</ins></var> <ins class="diff-chg">).</ins></p>
                   21932: <p><ins class="diff-chg">Otherwise, let</ins> <var title=
                   21933: ""><ins class="diff-chg">The Arc</ins></var> <ins class=
                   21934: "diff-chg">be the shortest arc given</ins> by <ins class=
                   21935: "diff-new">circumference of</ins> the <del class=
                   21936: "diff-old">points</del> <ins class="diff-chg">circle that has
                   21937: radius</ins> <var title=""><ins class="diff-chg">radius</ins></var>
                   21938: ,<ins class="diff-chg">and that has one point tangent to the
                   21939: half-infinite line that crosses the point</ins> ( <var title=
                   21940: "">x0</var> , <var title="">y0</var> ) and <ins class=
                   21941: "diff-new">ends at the point (</ins> <var title=""><ins class=
                   21942: "diff-new">x1</ins></var> ,<var title=""><ins class=
                   21943: "diff-new">y1</ins></var> <ins class="diff-new">), and that has a
                   21944: different point tangent to the half-infinite line that ends at the
                   21945: point</ins> ( <var title="">x1</var> , <var title="">y1</var> )
                   21946: <del class="diff-old">then</del> <ins class="diff-chg">and
                   21947: crosses</ins> the <del class="diff-old">method must do nothing, as
                   21948: no arc would satisfy</del> <ins class="diff-chg">point (</ins>
                   21949: <var title=""><ins class="diff-chg">x2</ins></var> ,<var title=
                   21950: ""><ins class="diff-chg">y2</ins></var> <ins class="diff-chg">).
                   21951: The points at which this circle touches these two lines are
                   21952: called</ins> the <del class="diff-old">above constraints.</del>
                   21953: <ins class="diff-chg">start and end tangent points
                   21954: respectively.</ins></p>
                   21955: <p><del class="diff-old">Otherwise, the</del> <ins class=
                   21956: "diff-chg">The</ins> method must connect the point ( <var title=
                   21957: "">x0</var> , <var title="">y0</var> ) to the start tangent point
                   21958: by a straight line, <ins class="diff-new">adding the start tangent
                   21959: point to the subpath, and</ins> then <ins class=
                   21960: "diff-new">must</ins> connect the start tangent point to the end
                   21961: tangent point by <var title="">The Arc</var> , <del class=
                   21962: "diff-old">and finally add</del> <ins class="diff-chg">adding</ins>
                   21963: the <del class="diff-old">start and</del> end tangent <del class=
                   21964: "diff-old">points</del> <ins class="diff-chg">point</ins> to the
                   21965: subpath.</p>
                   21966: <p><del class="diff-old">Negative or zero values for radius must
                   21967: cause the implementation to raise an INDEX_SIZE_ERR
                   21968: exception.</del> The <dfn id="arcx-" title=
                   21969: "dom-context-2d-arc"><code>arc( <var title="">x</var> , <var title=
                   21970: "">y</var> , <var title="">radius</var> , <var title=
                   21971: "">startAngle</var> , <var title="">endAngle</var> , <var title=
                   21972: "">anticlockwise</var> )</code></dfn> method draws an arc. If the
                   21973: context has any subpaths, then the method must add a straight line
                   21974: from the last point in the subpath to the start point of the arc.
                   21975: In any case, it must draw the arc between the start point of the
                   21976: arc and the end point of the arc, and add the start and end points
                   21977: of the arc to the subpath. The arc and its start and end points are
                   21978: defined as follows:</p>
                   21979: <p>Consider a circle that has its origin at ( <var title="">x</var>
                   21980: , <var title="">y</var> ) and that has radius <var title=
                   21981: "">radius</var> . The points at <var title="">startAngle</var> and
                   21982: <var title="">endAngle</var> along the circle's circumference,
                   21983: measured in radians clockwise from the positive x-axis, are the
                   21984: start and end points respectively. The arc is the path along the
                   21985: circumference of this circle from the start point to the end point,
                   21986: going anti-clockwise if the <var title="">anticlockwise</var>
                   21987: argument is true, and clockwise otherwise. <del class=
                   21988: "diff-old">Negative</del> <ins class="diff-chg">Since the points
                   21989: are on the circle, as opposed to being simply angles from zero, the
                   21990: arc can never cover an angle greater than 2π radians. If the two
                   21991: angles are equal,</ins> or <ins class="diff-new">if the radius is
                   21992: zero, then the arc is defined as being of</ins> zero <ins class=
                   21993: "diff-new">length in both directions.</ins></p>
                   21994: <p><ins class="diff-new">Negative</ins> values for <var title=
                   21995: "">radius</var> must cause the implementation to raise an
                   21996: <code>INDEX_SIZE_ERR</code> exception.</p>
                   21997: <p>The <dfn id="rectx" title="dom-context-2d-rect"><code>rect(
                   21998: <var title="">x</var> , <var title="">y</var> , <var title=
                   21999: "">w</var> , <var title="">h</var> )</code></dfn> method must
                   22000: create a new subpath containing just the four points ( <var title=
                   22001: "">x</var> , <var title="">y</var> ), ( <var title="">x</var> +
                   22002: <var title="">w</var> , <var title="">y</var> ), ( <var title=
                   22003: "">x</var> + <var title="">w</var> , <var title="">y</var> +
                   22004: <var title="">h</var> ), ( <var title="">x</var> , <var title=
                   22005: "">y</var> + <var title="">h</var> ), with those four points
                   22006: connected by straight lines, and must then mark the subpath as
                   22007: closed. It must then create a new subpath with the point (
                   22008: <var title="">x</var> , <var title="">y</var> ) as the only point
                   22009: in the subpath.</p>
                   22010: <p><del class="diff-old">Negative values for w and h must cause the
                   22011: implementation to raise an INDEX_SIZE_ERR exception.</del> The
                   22012: <dfn id="fill" title=
                   22013: "dom-context-2d-fill"><code>fill()</code></dfn> method must fill
                   22014: <del class="diff-old">each subpath</del> <ins class="diff-chg">all
                   22015: the subpaths</ins> of the current <del class="diff-old">path in
                   22016: turn,</del> <ins class="diff-chg">path,</ins> using <code title=
                   22017: "dom-context-2d-fillStyle"><a href=
                   22018: "#fillstyle">fillStyle</a></code> , and using the non-zero winding
                   22019: number rule. Open subpaths must be implicitly closed when being
                   22020: filled (without affecting the actual subpaths).</p>
                   22021: <p class="note"><ins class="diff-new">Thus, if two overlapping but
                   22022: otherwise independent subpaths have opposite windings, they cancel
                   22023: out and result in no fill. If they have the same winding, that area
                   22024: just gets painted once.</ins></p>
                   22025: <p>The <dfn id="stroke" title=
                   22026: "dom-context-2d-stroke"><code>stroke()</code></dfn> method must
                   22027: <del class="diff-old">stroke each subpath</del> <ins class=
                   22028: "diff-chg">calculate the strokes of all the subpaths</ins> of the
                   22029: current <del class="diff-old">path in turn,</del> <ins class=
                   22030: "diff-chg">path,</ins> using the <code title=
                   22031: "dom-context-2d-lineWidth"><del class="diff-old">strokeStyle</del>
                   22032: <a href="#linewidth"><ins class=
                   22033: "diff-chg">lineWidth</ins></a></code> , <code title=
                   22034: "dom-context-2d-lineCap"><del class="diff-old">lineWidth</del>
                   22035: <a href="#linecap"><ins class="diff-chg">lineCap</ins></a></code> ,
                   22036: <code title="dom-context-2d-lineJoin"><a href=
                   22037: "#linejoin">lineJoin</a></code> , and (if appropriate) <code title=
                   22038: "dom-context-2d-miterLimit"><a href=
                   22039: "#miterlimit">miterLimit</a></code> <del class=
                   22040: "diff-old">attributes.</del> <ins class="diff-chg">attributes, and
                   22041: then fill the combined stroke area using the</ins> <code title=
                   22042: "dom-context-2d-strokeStyle"><a href="#strokestyle"><ins class=
                   22043: "diff-chg">strokeStyle</ins></a></code> ,<ins class=
                   22044: "diff-chg">attribute.</ins></p>
                   22045: <p class="note"><ins class="diff-chg">Since the subpaths are all
                   22046: stroked as one, overlapping parts of the paths in one stroke
                   22047: operation are treated as if their union was what was
                   22048: painted.</ins></p>
                   22049: <p>Paths, when filled or stroked, must be painted without affecting
                   22050: the current path, and must be subject to <del class=
                   22051: "diff-old">transformations ,</del> <a href="#shadows0" title=
                   22052: "shadows">shadow effects</a> , <a href="#globalalpha" title=
                   22053: "dom-context-2d-globalAlpha">global alpha</a> , <ins class=
                   22054: "diff-chg">the</ins> <a href="#clipping" title=
                   22055: "clipping region">clipping <del class="diff-old">paths</del>
                   22056: <ins class="diff-chg">region</ins></a> , and <a href=
                   22057: "#globalcompositeoperation" title=
                   22058: "dom-context-2d-globalCompositeOperation">global composition
                   22059: operators</a> . <del class="diff-old">The transformation is applied
                   22060: to</del> <ins class="diff-chg">(Transformations affect</ins> the
                   22061: path when <del class="diff-old">it</del> <ins class="diff-chg">the
                   22062: path</ins> is <del class="diff-old">drawn,</del> <ins class=
                   22063: "diff-chg">created,</ins> not when <ins class="diff-new">it is
                   22064: painted, though</ins> the <del class="diff-old">path</del>
                   22065: <ins class="diff-chg">stroke</ins> <em><a href=
                   22066: "#style1"><ins class="diff-chg">style</ins></a></em> is <del class=
                   22067: "diff-old">constructed. Thus, a single path can be constructed and
                   22068: then drawn according to different transformations without
                   22069: recreating</del> <ins class="diff-chg">still affected by</ins> the
                   22070: <ins class="diff-new">transformation during painting.)</ins></p>
                   22071: <p><ins class="diff-new">Zero-length line segments must be pruned
                   22072: before stroking a</ins> path. <ins class="diff-new">Empty subpaths
                   22073: must be ignored.</ins></p>
                   22074: <p>The <dfn id="clip" title=
                   22075: "dom-context-2d-clip"><code>clip()</code></dfn> method must create
                   22076: a new <dfn id="clipping">clipping <del class="diff-old">path</del>
                   22077: <ins class="diff-chg">region</ins></dfn> by calculating the
                   22078: intersection of the current clipping <del class=
                   22079: "diff-old">path</del> <ins class="diff-chg">region</ins> and the
                   22080: area described by the current path, using the non-zero winding
                   22081: number rule. Open subpaths must be implicitly closed when computing
                   22082: the clipping <del class="diff-old">path,</del> <ins class=
                   22083: "diff-chg">region,</ins> without affecting the actual subpaths.
                   22084: <ins class="diff-new">The new clipping region replaces the current
                   22085: clipping region.</ins></p>
                   22086: <p>When the context is <del class="diff-old">created,</del>
                   22087: <ins class="diff-chg">initialized,</ins> the <del class=
                   22088: "diff-old">initial</del> clipping <del class="diff-old">path
                   22089: is</del> <ins class="diff-chg">region must be set to</ins> the
                   22090: rectangle with the top left corner at (0,0) and the width and
                   22091: height of the coordinate space.</p>
                   22092: <p>The <dfn id="ispointinpath" title=
                   22093: "dom-context-2d-isPointInPath"><code>isPointInPath( <var title=
                   22094: "">x</var> , <var title="">y</var> )</code></dfn> method must
                   22095: return true if the point given by the <var title="">x</var> and
                   22096: <var title="">y</var> coordinates passed to the method, when
                   22097: treated as coordinates in the <del class="diff-old">canvas'</del>
                   22098: <ins class="diff-chg">canvas</ins> coordinate space unaffected by
                   22099: the current transformation, is <del class="diff-old">within</del>
                   22100: <ins class="diff-chg">inside</ins> the <del class=
                   22101: "diff-old">area</del> <ins class="diff-chg">current path; and must
                   22102: return false otherwise. Points on the path itself are considered to
                   22103: be inside the path. If either</ins> of the <ins class=
                   22104: "diff-new">arguments is infinite or NaN, then the method must
                   22105: return false.</ins></p>
                   22106: <h6 id="text"><span class="secno"><ins class=
                   22107: "diff-new">3.12.11.1.9.</ins></span> <ins class=
                   22108: "diff-new">Text</ins></h6>
                   22109: <p><ins class="diff-new">The</ins> <dfn id="font" title=
                   22110: "dom-context-2d-font"><code><ins class=
                   22111: "diff-new">font</ins></code></dfn> <ins class="diff-new">DOM
                   22112: attribute, on setting, must be parsed the same way as the 'font'
                   22113: property of CSS (but without supporting property-independent
                   22114: stylesheet syntax like 'inherit'), and the resulting font must be
                   22115: assigned to the context, with the 'line-height' component forced to
                   22116: 'normal'.</ins> <a href="#references"><ins class=
                   22117: "diff-new">[CSS]</ins></a></p>
                   22118: <p><ins class="diff-new">Font names must be interpreted in the
                   22119: context of the</ins> <code><a href="#canvas">canvas <del class=
                   22120: "diff-old">that</del></a></code> <ins class="diff-chg">element's
                   22121: stylesheets; any fonts embedded using</ins> <code title=
                   22122: ""><ins class="diff-chg">@font-face</ins></code> <ins class=
                   22123: "diff-chg">must therefore be available.</ins> <a href=
                   22124: "#references"><ins class="diff-chg">[CSSWEBFONTS]</ins></a></p>
                   22125: <p><ins class="diff-chg">Only vector fonts should be used by the
                   22126: user agent; if a user agent were to use bitmap fonts then
                   22127: transformations</ins> would <ins class="diff-new">likely make the
                   22128: font look very ugly.</ins></p>
                   22129: <p><ins class="diff-new">On getting, the</ins> <code title=
                   22130: "dom-context-2d-font"><a href="#font"><ins class=
                   22131: "diff-new">font</ins></a></code> <ins class="diff-new">attribute
                   22132: must return the serialized form of the current font of the
                   22133: context.</ins> <a href="#references"><ins class=
                   22134: "diff-new">[CSSOM]</ins></a></p>
                   22135: <p><ins class="diff-new">When the context is created, the font of
                   22136: the context must</ins> be <del class="diff-old">filled</del>
                   22137: <ins class="diff-chg">set to 10px sans-serif. When the 'font-size'
                   22138: component is set to lengths using percentages, 'em' or 'ex' units,
                   22139: or the 'larger' or 'smaller' keywords, these must be interpreted
                   22140: relative to the computed value of the 'font-size' property of the
                   22141: corresponding</ins> <code><a href="#canvas"><ins class=
                   22142: "diff-chg">canvas</ins></a></code> <ins class="diff-chg">element.
                   22143: When the 'font-weight' component is set to the relative values
                   22144: 'bolder' and 'lighter', these must be interpreted relative to the
                   22145: computed value of the 'font-weight' property of the
                   22146: corresponding</ins> <code><a href="#canvas"><ins class=
                   22147: "diff-chg">canvas</ins></a></code> <ins class=
                   22148: "diff-chg">element.</ins></p>
                   22149: <p><ins class="diff-chg">The</ins> <dfn id="textalign" title=
                   22150: "dom-context-2d-textAlign"><code><ins class=
                   22151: "diff-chg">textAlign</ins></code></dfn> <ins class="diff-chg">DOM
                   22152: attribute, on getting, must return the current value. On
                   22153: setting,</ins> if the <ins class="diff-new">value is one of</ins>
                   22154: <code title=""><ins class="diff-new">start</ins></code>
                   22155: ,<code title=""><ins class="diff-new">end</ins></code>
                   22156: ,<code title=""><ins class="diff-new">left</ins></code>
                   22157: ,<code title=""><ins class="diff-new">right</ins></code>
                   22158: ,<ins class="diff-new">or</ins> <code title=""><ins class=
                   22159: "diff-new">center</ins></code> ,<ins class="diff-new">then the
                   22160: value must be changed to the new value. Otherwise, the new value
                   22161: must be ignored. When the context is created, the</ins>
                   22162: <code title="dom-context-2d-textAlign"><a href=
                   22163: "#textalign"><ins class="diff-new">textAlign</ins></a></code>
                   22164: <ins class="diff-new">attribute must initially have the value</ins>
                   22165: <code title=""><ins class="diff-new">start</ins></code> .</p>
                   22166: <p><ins class="diff-new">The</ins> <dfn id="textbaseline" title=
                   22167: "dom-context-2d-textBaseline"><code><ins class=
                   22168: "diff-new">textBaseline</ins></code></dfn> <ins class=
                   22169: "diff-new">DOM attribute, on getting, must return the</ins> current
                   22170: <del class="diff-old">path</del> <ins class="diff-chg">value. On
                   22171: setting, if the value is one of</ins> <code title=
                   22172: "dom-context-2d-textBaseline-top"><a href="#top"><ins class=
                   22173: "diff-chg">top</ins></a></code> ,<code title=
                   22174: "dom-context-2d-textBaseline-hanging"><a href=
                   22175: "#hanging"><ins class="diff-chg">hanging</ins></a></code>
                   22176: ,<code title="dom-context-2d-textBaseline-middle"><a href=
                   22177: "#middle"><ins class="diff-chg">middle</ins></a></code>
                   22178: ,<code title="dom-context-2d-textBaseline-alphabetic"><a href=
                   22179: "#alphabetic"><ins class="diff-chg">alphabetic</ins></a></code>
                   22180: ,<code title="dom-context-2d-textBaseline-ideographic"><a href=
                   22181: "#ideographic"><ins class="diff-chg">ideographic</ins></a></code>
                   22182: ,<ins class="diff-chg">or</ins> <code title=
                   22183: "dom-context-2d-textBaseline-bottom"><a href="#bottom"><ins class=
                   22184: "diff-chg">bottom</ins></a></code> ,<ins class="diff-chg">then the
                   22185: value must be changed to the new value. Otherwise, the new value
                   22186: must be ignored. When the context is created, the</ins>
                   22187: <code title="dom-context-2d-textBaseline"><a href=
                   22188: "#textbaseline"><ins class="diff-chg">textBaseline</ins></a></code>
                   22189: <ins class="diff-chg">attribute must initially have the value</ins>
                   22190: <code title=""><ins class="diff-chg">alphabetic</ins></code> .</p>
                   22191: <p><ins class="diff-chg">The</ins> <code title=
                   22192: "dom-context-2d-textBaseline"><a href="#textbaseline"><ins class=
                   22193: "diff-chg">textBaseline</ins></a></code> <ins class=
                   22194: "diff-chg">attribute's allowed keywords correspond to alignment
                   22195: points in the font:</ins></p>
                   22196: <p><img alt=
                   22197: "The top of the em square is roughly at the top of the glyphs in a font, the hanging baseline is where some glyphs like आ are anchored, the middle is half-way between the top of the em square and the bottom of the em square, the alphabetic baseline is where characters like Á, ÿ, f, and Ω are anchored, the ideographic baseline is where glyphs like 私 and 達 are anchored, and the bottom of the em square is roughly at the bottom of the glyphs in a font. The top and bottom of the bounding box can be far from these baselines, due to glyphs extending far outside the em square."
                   22198: src="images/baselines.png"></p>
                   22199: <p><ins class="diff-chg">The keywords map to these alignment points
                   22200: as follows:</ins></p>
                   22201: <dl>
                   22202: <dt><dfn id="top" title=
                   22203: "dom-context-2d-textBaseline-top"><code><ins class=
                   22204: "diff-chg">top</ins></code></dfn></dt>
                   22205: <dd><ins class="diff-chg">The top of the em square</ins></dd>
                   22206: <dt><dfn id="hanging" title=
                   22207: "dom-context-2d-textBaseline-hanging"><code><ins class=
                   22208: "diff-chg">hanging</ins></code></dfn></dt>
                   22209: <dd><ins class="diff-chg">The hanging baseline</ins></dd>
                   22210: <dt><dfn id="middle" title=
                   22211: "dom-context-2d-textBaseline-middle"><code><ins class=
                   22212: "diff-chg">middle</ins></code></dfn></dt>
                   22213: <dd><ins class="diff-chg">The middle of the em square</ins></dd>
                   22214: <dt><dfn id="alphabetic" title=
                   22215: "dom-context-2d-textBaseline-alphabetic"><code><ins class=
                   22216: "diff-chg">alphabetic</ins></code></dfn></dt>
                   22217: <dd><ins class="diff-chg">The alphabetic baseline</ins></dd>
                   22218: <dt><dfn id="ideographic" title=
                   22219: "dom-context-2d-textBaseline-ideographic"><code><ins class=
                   22220: "diff-chg">ideographic</ins></code></dfn></dt>
                   22221: <dd><ins class="diff-chg">The ideographic baseline</ins></dd>
                   22222: <dt><dfn id="bottom" title=
                   22223: "dom-context-2d-textBaseline-bottom"><code><ins class=
                   22224: "diff-chg">bottom</ins></code></dfn></dt>
                   22225: <dd><ins class="diff-chg">The bottom of the em square</ins></dd>
                   22226: </dl>
                   22227: <p><ins class="diff-chg">The</ins> <dfn id="filltext" title=
                   22228: "dom-context-2d-fillText"><code><ins class=
                   22229: "diff-chg">fillText()</ins></code></dfn> <ins class=
                   22230: "diff-chg">and</ins> <dfn id="stroketext" title=
                   22231: "dom-context-2d-strokeText"><code><ins class=
                   22232: "diff-chg">strokeText()</ins></code></dfn> <ins class=
                   22233: "diff-chg">methods take three or four arguments,</ins> <var title=
                   22234: ""><ins class="diff-chg">text</ins></var> ,<var title=
                   22235: ""><ins class="diff-chg">x</ins></var> ,<var title=""><ins class=
                   22236: "diff-chg">y</ins></var> ,<ins class="diff-chg">and
                   22237: optionally</ins> <var title=""><ins class=
                   22238: "diff-chg">maxWidth</ins></var> ,<ins class="diff-chg">and render
                   22239: the given</ins> <var title=""><ins class=
                   22240: "diff-chg">text</ins></var> <ins class="diff-chg">at the given
                   22241: (</ins> <var title=""><ins class="diff-chg">x</ins></var>
                   22242: ,<var title=""><ins class="diff-chg">y</ins></var> <ins class=
                   22243: "diff-chg">) coordinates ensuring that the text isn't wider
                   22244: than</ins> <var title=""><ins class="diff-chg">maxWidth</ins></var>
                   22245: <ins class="diff-chg">if specified, using the current</ins>
                   22246: <code title="dom-context-2d-font"><a href="#font"><ins class=
                   22247: "diff-chg">font</ins></a></code> ,<code title=
                   22248: "dom-context-2d-textAlign"><a href="#textalign"><ins class=
                   22249: "diff-chg">textAlign</ins></a></code> ,<ins class=
                   22250: "diff-chg">and</ins> <code title=
                   22251: "dom-context-2d-textBaseline"><a href="#textbaseline"><ins class=
                   22252: "diff-chg">textBaseline</ins></a></code> <ins class=
                   22253: "diff-chg">values. Specifically, when the methods are called, the
                   22254: user agent must run the following steps:</ins></p>
                   22255: <ol>
                   22256: <li>
                   22257: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   22258: "diff-chg">font</ins></var> <ins class="diff-chg">be the current
                   22259: font of the browsing context, as given by the</ins> <code title=
                   22260: "dom-context-2d-font"><a href="#font"><ins class=
                   22261: "diff-chg">font</ins></a></code> <ins class=
                   22262: "diff-chg">attribute.</ins></p>
                   22263: </li>
                   22264: <li>
                   22265: <p><ins class="diff-chg">Replace all the</ins> <a href="#space"
                   22266: title="space character"><ins class="diff-chg">space
                   22267: characters</ins></a> <ins class="diff-chg">in</ins> <var title=
                   22268: ""><ins class="diff-chg">text</ins></var> <ins class=
                   22269: "diff-chg">with U+0020 SPACE characters.</ins></p>
                   22270: </li>
                   22271: <li>
                   22272: <p><ins class="diff-chg">Form a hypothetical infinitely wide CSS
                   22273: line box containing a single inline box containing the text</ins>
                   22274: <var title=""><ins class="diff-chg">text</ins></var> ,<ins class=
                   22275: "diff-chg">with all the properties at their initial values except
                   22276: the 'font' property of the inline element set to</ins> <var title=
                   22277: ""><ins class="diff-chg">font</ins></var> <ins class="diff-chg">and
                   22278: the 'direction' property of the inline element set to the
                   22279: 'direction' property of the</ins> <code><a href=
                   22280: "#canvas"><ins class="diff-chg">canvas</ins></a></code> <ins class=
                   22281: "diff-chg">element.</ins> <a href="#references"><ins class=
                   22282: "diff-chg">[CSS]</ins></a></p>
                   22283: </li>
                   22284: <li>
                   22285: <p><ins class="diff-chg">If the</ins> <var title=""><ins class=
                   22286: "diff-chg">maxWidth</ins></var> <ins class=
                   22287: "diff-chg">argument</ins> was <ins class="diff-new">specified and
                   22288: the hypothetical width of the inline box in the hypothetical line
                   22289: box is greater than</ins> <var title=""><ins class=
                   22290: "diff-new">maxWidth</ins></var> <ins class="diff-new">CSS pixels,
                   22291: then change</ins> <var title=""><ins class=
1.2     ! mike     22292: "diff-new">font</ins></var> to <ins class="diff-new">have a more
1.1       mike     22293: condensed font (if one is available or if a reasonably readable one
1.2     ! mike     22294: can</ins> be <del class="diff-old">filled;</del> <ins class=
        !          22295: "diff-chg">synthesized by applying a horizontal scale factor to the
        !          22296: font) or a smaller font, and return to the previous step.</ins></p>
1.1       mike     22297: </li>
                   22298: <li>
1.2     ! mike     22299: <p><ins class="diff-chg">Let the</ins> <var title=""><ins class=
        !          22300: "diff-chg">anchor point</ins></var> <ins class="diff-chg">be a
        !          22301: point on the inline box, determined by the</ins> <code title=
1.1       mike     22302: "dom-context-2d-textAlign"><a href="#textalign"><ins class=
                   22303: "diff-chg">textAlign</ins></a></code> <ins class=
                   22304: "diff-chg">and</ins> <code title=
                   22305: "dom-context-2d-textBaseline"><a href="#textbaseline"><ins class=
                   22306: "diff-chg">textBaseline</ins></a></code> <ins class=
                   22307: "diff-chg">values, as follows:</ins></p>
                   22308: <p><ins class="diff-chg">Horizontal position:</ins></p>
                   22309: <dl>
                   22310: <dt><ins class="diff-chg">If</ins> <code title=
                   22311: "dom-context-2d-textAlign"><a href="#textalign"><ins class=
                   22312: "diff-chg">textAlign</ins></a></code> <ins class=
                   22313: "diff-chg">is</ins> <code title=""><ins class=
                   22314: "diff-chg">left</ins></code></dt>
                   22315: <dt><ins class="diff-chg">If</ins> <code title=
                   22316: "dom-context-2d-textAlign"><a href="#textalign"><ins class=
                   22317: "diff-chg">textAlign</ins></a></code> <ins class=
                   22318: "diff-chg">is</ins> <code title=""><ins class=
                   22319: "diff-chg">start</ins></code> <ins class="diff-chg">and the
                   22320: 'direction' property on the</ins> <code><a href=
                   22321: "#canvas"><ins class="diff-chg">canvas</ins></a></code> <ins class=
                   22322: "diff-chg">element has a computed value of 'ltr'</ins></dt>
                   22323: <dt><ins class="diff-chg">If</ins> <code title=
                   22324: "dom-context-2d-textAlign"><a href="#textalign"><ins class=
                   22325: "diff-chg">textAlign</ins></a></code> <ins class=
                   22326: "diff-chg">is</ins> <code title=""><ins class=
1.2     ! mike     22327: "diff-chg">end</ins></code> <ins class="diff-chg">and the
1.1       mike     22328: 'direction' property on the</ins> <code><a href=
1.2     ! mike     22329: "#canvas"><ins class="diff-chg">canvas</ins></a></code> <ins class=
        !          22330: "diff-chg">element has a computed value of 'rtl'</ins></dt>
        !          22331: <dd><ins class="diff-chg">Let the</ins> <var title=""><ins class=
        !          22332: "diff-chg">anchor point</ins></var> <ins class="diff-chg">'s
1.1       mike     22333: horizontal position be the left edge of the inline box.</ins></dd>
1.2     ! mike     22334: <dt><ins class="diff-chg">If</ins> <code title=
1.1       mike     22335: "dom-context-2d-textAlign"><a href="#textalign"><ins class=
1.2     ! mike     22336: "diff-chg">textAlign</ins></a></code> <ins class=
        !          22337: "diff-chg">is</ins> <code title=""><ins class=
        !          22338: "diff-chg">right</ins></code></dt>
        !          22339: <dt><ins class="diff-chg">If</ins> <code title=
1.1       mike     22340: "dom-context-2d-textAlign"><a href="#textalign"><ins class=
1.2     ! mike     22341: "diff-chg">textAlign</ins></a></code> <ins class=
        !          22342: "diff-chg">is</ins> <code title=""><ins class=
        !          22343: "diff-chg">end</ins></code> <ins class="diff-chg">and the
1.1       mike     22344: 'direction' property on the</ins> <code><a href=
1.2     ! mike     22345: "#canvas"><ins class="diff-chg">canvas</ins></a></code> <ins class=
        !          22346: "diff-chg">element has a computed value of 'ltr'</ins></dt>
        !          22347: <dt><ins class="diff-chg">If</ins> <code title=
1.1       mike     22348: "dom-context-2d-textAlign"><a href="#textalign"><ins class=
1.2     ! mike     22349: "diff-chg">textAlign</ins></a></code> <ins class=
        !          22350: "diff-chg">is</ins> <code title=""><ins class=
        !          22351: "diff-chg">start</ins></code> <ins class="diff-chg">and the
1.1       mike     22352: 'direction' property on the</ins> <code><a href=
1.2     ! mike     22353: "#canvas"><ins class="diff-chg">canvas</ins></a></code> <ins class=
        !          22354: "diff-chg">element has a computed value of 'rtl'</ins></dt>
        !          22355: <dd><ins class="diff-chg">Let the</ins> <var title=""><ins class=
        !          22356: "diff-chg">anchor point</ins></var> <ins class="diff-chg">'s
1.1       mike     22357: horizontal position be the right edge of the inline box.</ins></dd>
1.2     ! mike     22358: <dt><ins class="diff-chg">If</ins> <code title=
1.1       mike     22359: "dom-context-2d-textAlign"><a href="#textalign"><ins class=
1.2     ! mike     22360: "diff-chg">textAlign</ins></a></code> <ins class=
        !          22361: "diff-chg">is</ins> <code title=""><ins class=
        !          22362: "diff-chg">center</ins></code></dt>
        !          22363: <dd><ins class="diff-chg">Let the</ins> <var title=""><ins class=
        !          22364: "diff-chg">anchor point</ins></var> <ins class="diff-chg">'s
1.1       mike     22365: horizontal position be half way between the left and right edges of
                   22366: the inline box.</ins></dd>
                   22367: </dl>
1.2     ! mike     22368: <p><ins class="diff-chg">Vertical position:</ins></p>
1.1       mike     22369: <dl>
1.2     ! mike     22370: <dt><ins class="diff-chg">If</ins> <code title=
1.1       mike     22371: "dom-context-2d-textBaseline"><a href="#textbaseline"><ins class=
1.2     ! mike     22372: "diff-chg">textBaseline</ins></a></code> <ins class=
        !          22373: "diff-chg">is</ins> <code title=
1.1       mike     22374: "dom-context-2d-textBaseline-top"><a href="#top"><ins class=
1.2     ! mike     22375: "diff-chg">top</ins></a></code></dt>
        !          22376: <dd><ins class="diff-chg">Let the</ins> <var title=""><ins class=
        !          22377: "diff-chg">anchor point</ins></var> <ins class="diff-chg">'s
1.1       mike     22378: vertical position be the top of the em box of the first available
                   22379: font of the inline box.</ins></dd>
1.2     ! mike     22380: <dt><ins class="diff-chg">If</ins> <code title=
1.1       mike     22381: "dom-context-2d-textBaseline"><a href="#textbaseline"><ins class=
1.2     ! mike     22382: "diff-chg">textBaseline</ins></a></code> <ins class=
        !          22383: "diff-chg">is</ins> <code title=
1.1       mike     22384: "dom-context-2d-textBaseline-hanging"><a href=
1.2     ! mike     22385: "#hanging"><ins class="diff-chg">hanging</ins></a></code></dt>
        !          22386: <dd><ins class="diff-chg">Let the</ins> <var title=""><ins class=
        !          22387: "diff-chg">anchor point</ins></var> <ins class="diff-chg">'s
1.1       mike     22388: vertical position be the hanging baseline of the first available
                   22389: font of the inline box.</ins></dd>
1.2     ! mike     22390: <dt><ins class="diff-chg">If</ins> <code title=
1.1       mike     22391: "dom-context-2d-textBaseline"><a href="#textbaseline"><ins class=
1.2     ! mike     22392: "diff-chg">textBaseline</ins></a></code> <ins class=
        !          22393: "diff-chg">is</ins> <code title=
1.1       mike     22394: "dom-context-2d-textBaseline-middle"><a href="#middle"><ins class=
1.2     ! mike     22395: "diff-chg">middle</ins></a></code></dt>
        !          22396: <dd><ins class="diff-chg">Let the</ins> <var title=""><ins class=
        !          22397: "diff-chg">anchor point</ins></var> <ins class="diff-chg">'s
1.1       mike     22398: vertical position be half way between the bottom and the top of the
                   22399: em box of the first available font of the inline box.</ins></dd>
1.2     ! mike     22400: <dt><ins class="diff-chg">If</ins> <code title=
1.1       mike     22401: "dom-context-2d-textBaseline"><a href="#textbaseline"><ins class=
1.2     ! mike     22402: "diff-chg">textBaseline</ins></a></code> <ins class=
        !          22403: "diff-chg">is</ins> <code title=
1.1       mike     22404: "dom-context-2d-textBaseline-alphabetic"><a href=
                   22405: "#alphabetic"><ins class=
1.2     ! mike     22406: "diff-chg">alphabetic</ins></a></code></dt>
        !          22407: <dd><ins class="diff-chg">Let the</ins> <var title=""><ins class=
        !          22408: "diff-chg">anchor point</ins></var> <ins class="diff-chg">'s
1.1       mike     22409: vertical position be the alphabetic baseline of the first available
                   22410: font of the inline box.</ins></dd>
1.2     ! mike     22411: <dt><ins class="diff-chg">If</ins> <code title=
1.1       mike     22412: "dom-context-2d-textBaseline"><a href="#textbaseline"><ins class=
1.2     ! mike     22413: "diff-chg">textBaseline</ins></a></code> <ins class=
        !          22414: "diff-chg">is</ins> <code title=
1.1       mike     22415: "dom-context-2d-textBaseline-ideographic"><a href=
                   22416: "#ideographic"><ins class=
1.2     ! mike     22417: "diff-chg">ideographic</ins></a></code></dt>
        !          22418: <dd><ins class="diff-chg">Let the</ins> <var title=""><ins class=
        !          22419: "diff-chg">anchor point</ins></var> <ins class="diff-chg">'s
1.1       mike     22420: vertical position be the ideographic baseline of the first
                   22421: available font of the inline box.</ins></dd>
1.2     ! mike     22422: <dt><ins class="diff-chg">If</ins> <code title=
1.1       mike     22423: "dom-context-2d-textBaseline"><a href="#textbaseline"><ins class=
1.2     ! mike     22424: "diff-chg">textBaseline</ins></a></code> <ins class=
        !          22425: "diff-chg">is</ins> <code title=
1.1       mike     22426: "dom-context-2d-textBaseline-bottom"><a href="#bottom"><ins class=
1.2     ! mike     22427: "diff-chg">bottom</ins></a></code></dt>
        !          22428: <dd><ins class="diff-chg">Let the</ins> <var title=""><ins class=
        !          22429: "diff-chg">anchor point</ins></var> <ins class="diff-chg">'s
1.1       mike     22430: vertical position be the bottom of the em box of the first
                   22431: available font of the inline box.</ins></dd>
                   22432: </dl>
                   22433: </li>
                   22434: <li>
1.2     ! mike     22435: <p><ins class="diff-chg">Paint the hypothetical inline box as the
1.1       mike     22436: shape given by the text's glyphs, as transformed by the</ins>
                   22437: <a href="#transformations0" title=
1.2     ! mike     22438: "dom-context-2d-transformation"><ins class="diff-chg">current
        !          22439: transformation matrix</ins></a> ,<ins class="diff-chg">and anchored
1.1       mike     22440: and sized so that before applying the</ins> <a href=
                   22441: "#transformations0" title=
1.2     ! mike     22442: "dom-context-2d-transformation"><ins class="diff-chg">current
        !          22443: transformation matrix</ins></a> ,<ins class="diff-chg">the</ins>
        !          22444: <var title=""><ins class="diff-chg">anchor point</ins></var>
        !          22445: <ins class="diff-chg">is at (</ins> <var title=""><ins class=
        !          22446: "diff-chg">x</ins></var> ,<var title=""><ins class=
        !          22447: "diff-chg">y</ins></var> <ins class="diff-chg">) and each CSS pixel
1.1       mike     22448: is mapped to one coordinate space unit.</ins></p>
1.2     ! mike     22449: <p><ins class="diff-chg">For</ins> <code title=
1.1       mike     22450: "dom-context-2d-fillText"><a href="#filltext"><ins class=
1.2     ! mike     22451: "diff-chg">fillText()</ins></a></code> <code title=
1.1       mike     22452: "dom-context-2d-fillStyle"><a href="#fillstyle"><ins class=
1.2     ! mike     22453: "diff-chg">fillStyle</ins></a></code> <ins class="diff-chg">must be
1.1       mike     22454: applied to the glyphs and</ins> <code title=
                   22455: "dom-context-2d-strokeStyle"><a href="#strokestyle"><ins class=
1.2     ! mike     22456: "diff-chg">strokeStyle</ins></a></code> <ins class="diff-chg">must
1.1       mike     22457: be ignored. For</ins> <code title=
                   22458: "dom-context-2d-strokeText"><a href="#stroketext"><ins class=
1.2     ! mike     22459: "diff-chg">strokeText()</ins></a></code> <ins class="diff-chg">the
        !          22460: reverse holds</ins> and <code title=
1.1       mike     22461: "dom-context-2d-strokeStyle"><a href="#strokestyle"><ins class=
1.2     ! mike     22462: "diff-new">strokeStyle</ins></a></code> must <ins class=
        !          22463: "diff-new">be applied to the glyph outlines and</ins> <code title=
1.1       mike     22464: "dom-context-2d-fillStyle"><a href="#fillstyle"><ins class=
                   22465: "diff-new">fillStyle</ins></a></code> <ins class="diff-new">must be
                   22466: ignored.</ins></p>
                   22467: <p><ins class="diff-new">Text is painted without affecting the
                   22468: current path, and is subject to</ins> <a href="#shadows0" title=
                   22469: "shadows"><ins class="diff-new">shadow effects</ins></a> ,<a href=
                   22470: "#globalalpha" title="dom-context-2d-globalAlpha"><ins class=
                   22471: "diff-new">global alpha</ins></a> ,<ins class="diff-new">the</ins>
                   22472: <a href="#clipping" title="clipping region"><ins class=
                   22473: "diff-new">clipping region</ins></a> ,<ins class=
                   22474: "diff-new">and</ins> <a href="#globalcompositeoperation" title=
                   22475: "dom-context-2d-globalCompositeOperation"><ins class=
                   22476: "diff-new">global composition operators</ins></a> .</p>
                   22477: </li>
                   22478: </ol>
                   22479: <p><ins class="diff-new">The</ins> <dfn id="measuretext" title=
                   22480: "dom-context-2d-measureText"><code><ins class=
                   22481: "diff-new">measureText()</ins></code></dfn> <ins class=
                   22482: "diff-new">method takes one argument,</ins> <var title=
                   22483: ""><ins class="diff-new">text</ins></var> .<ins class=
                   22484: "diff-new">When the method is invoked, the user agent must replace
                   22485: all the</ins> <a href="#space" title="space character"><ins class=
                   22486: "diff-new">space characters</ins></a> <ins class=
                   22487: "diff-new">in</ins> <var title=""><ins class=
                   22488: "diff-new">text</ins></var> <ins class="diff-new">with U+0020 SPACE
1.2     ! mike     22489: characters, and then must form a hypothetical infinitely wide CSS
        !          22490: line box containing a single inline box containing the text</ins>
        !          22491: <var title=""><ins class="diff-new">text</ins></var> ,<ins class=
        !          22492: "diff-new">with all the properties at their initial values except
        !          22493: the 'font' property of the inline element set to the current font
        !          22494: of the browsing context, as given by the</ins> <code title=
        !          22495: "dom-context-2d-font"><a href="#font"><ins class=
        !          22496: "diff-new">font</ins></a></code> <ins class="diff-new">attribute,
        !          22497: and must then</ins> return <del class="diff-old">false
        !          22498: otherwise.</del> <ins class="diff-chg">a new</ins> <code><a href=
        !          22499: "#textmetrics"><ins class="diff-chg">TextMetrics</ins></a></code>
        !          22500: <ins class="diff-chg">object with its</ins> <code title=
1.1       mike     22501: "dom-textmetrics-width"><a href="#width2"><ins class=
                   22502: "diff-chg">width</ins></a></code> <ins class="diff-chg">attribute
                   22503: set to the width of that inline box, in CSS pixels.</ins> <a href=
                   22504: "#references"><ins class="diff-chg">[CSS]</ins></a></p>
                   22505: <p><ins class="diff-chg">The</ins> <code><a href=
                   22506: "#textmetrics"><ins class="diff-chg">TextMetrics</ins></a></code>
                   22507: <ins class="diff-chg">interface is used for the objects returned
                   22508: from</ins> <code title="dom-context-2d-measureText"><a href=
                   22509: "#measuretext"><ins class="diff-chg">measureText()</ins></a></code>
                   22510: .<ins class="diff-chg">It has one attribute,</ins> <dfn id="width2"
                   22511: title="dom-textmetrics-width"><code><ins class=
                   22512: "diff-chg">width</ins></code></dfn> ,<ins class="diff-chg">which is
                   22513: set by the</ins> <code title="dom-context-2d-measureText"><a href=
                   22514: "#measuretext"><ins class="diff-chg">measureText()</ins></a></code>
                   22515: <ins class="diff-chg">method.</ins></p>
                   22516: <p class="note"><ins class="diff-chg">Glyphs rendered using</ins>
                   22517: <code title="dom-context-2d-fillText"><a href=
                   22518: "#filltext"><ins class="diff-chg">fillText()</ins></a></code>
                   22519: <ins class="diff-chg">and</ins> <code title=
                   22520: "dom-context-2d-strokeText"><a href="#stroketext"><ins class=
                   22521: "diff-chg">strokeText()</ins></a></code> <ins class="diff-chg">can
                   22522: spill out of the box given by the font size (the em square size)
                   22523: and the width returned by</ins> <code title=
                   22524: "dom-context-2d-measureText"><a href="#measuretext"><ins class=
                   22525: "diff-chg">measureText()</ins></a></code> <ins class=
                   22526: "diff-chg">(the text width). This version of the specification does
                   22527: not provide a way to obtain the bounding box dimensions of the
                   22528: text. If the text is to be rendered and removed, care needs to be
                   22529: taken to replace the entire area of the canvas that the clipping
                   22530: region covers, not just the box given by the em square height and
                   22531: measured text width.</ins></p>
                   22532: <p class="note"><ins class="diff-chg">A future version of the 2D
                   22533: context API may provide a way to render fragments of documents,
                   22534: rendered using CSS, straight to the canvas. This would be provided
                   22535: in preference to a dedicated way of doing multiline
                   22536: layout.</ins></p>
                   22537: <h6 id="images"><span class="secno"><del class=
                   22538: "diff-old">3.14.11.1.9.</del> <ins class=
                   22539: "diff-chg">3.12.11.1.10.</ins></span> Images</h6>
                   22540: <p>To draw images onto the canvas, the <dfn id="drawimage" title=
                   22541: "dom-context-2d-drawImage"><code>drawImage</code></dfn> method can
                   22542: be used.</p>
                   22543: <p>This method is overloaded with three variants: <code title=
                   22544: "">drawImage( <var title="">image</var> , <var title="">dx</var> ,
                   22545: <var title="">dy</var> )</code> , <code title="">drawImage(
                   22546: <var title="">image</var> , <var title="">dx</var> , <var title=
                   22547: "">dy</var> , <var title="">dw</var> , <var title="">dh</var>
                   22548: )</code> , and <code title="">drawImage( <var title="">image</var>
                   22549: , <var title="">sx</var> , <var title="">sy</var> , <var title=
                   22550: "">sw</var> , <var title="">sh</var> , <var title="">dx</var> ,
                   22551: <var title="">dy</var> , <var title="">dw</var> , <var title=
                   22552: "">dh</var> )</code> . (Actually it is overloaded with six; each of
                   22553: those three can take either an <code><a href=
                   22554: "#htmlimageelement">HTMLImageElement</a></code> or an
                   22555: <code><a href="#htmlcanvaselement">HTMLCanvasElement</a></code> for
                   22556: the <var title="">image</var> argument.) If not specified, the
                   22557: <var title="">dw</var> and <var title="">dh</var> arguments
                   22558: <ins class="diff-new">must</ins> default to the values of
                   22559: <var title="">sw</var> and <var title="">sh</var> , interpreted
                   22560: such that one CSS pixel in the image is treated as one unit in the
                   22561: canvas coordinate space. If the <var title="">sx</var> ,
                   22562: <var title="">sy</var> , <var title="">sw</var> , and <var title=
                   22563: "">sh</var> arguments are omitted, they <ins class=
                   22564: "diff-new">must</ins> default to 0, 0, the image's intrinsic width
                   22565: in image pixels, and the image's intrinsic height in image pixels,
                   22566: respectively.</p>
                   22567: <p>The <var title="">image</var> argument must be an instance of an
                   22568: <code><a href="#htmlimageelement">HTMLImageElement</a></code> or
                   22569: <code><a href="#htmlcanvaselement">HTMLCanvasElement</a></code> .
                   22570: If the <var title="">image</var> is of the wrong <del class=
                   22571: "diff-old">type,</del> <ins class="diff-chg">type or null,</ins>
                   22572: the implementation must raise a <code>TYPE_MISMATCH_ERR</code>
                   22573: exception.</p>
                   22574: <p>If <del class="diff-old">one of</del> the <var title=
                   22575: ""><del class="diff-old">sy</del> <ins class=
                   22576: "diff-chg">image</ins></var> <ins class="diff-chg">argument is
                   22577: an</ins> <code><a href="#htmlimageelement"><ins class=
                   22578: "diff-chg">HTMLImageElement</ins></a></code> <ins class=
                   22579: "diff-chg">object whose</ins> <code title=
                   22580: "dom-img-complete"><a href="#complete"><ins class=
                   22581: "diff-chg">complete</ins></a></code> <ins class=
                   22582: "diff-chg">attribute is false, then the implementation must raise
                   22583: an</ins> <code><ins class="diff-chg">INVALID_STATE_ERR</ins></code>
                   22584: <ins class="diff-chg">exception.</ins></p>
                   22585: <p><ins class="diff-chg">The source rectangle is the rectangle
                   22586: whose corners are the four points (</ins> <var title=""><ins class=
                   22587: "diff-chg">sx</ins></var> , <var title=""><ins class=
                   22588: "diff-new">sy</ins></var> <ins class="diff-new">), (</ins>
                   22589: <span><var title=""><ins class="diff-new">sx</ins></var>
                   22590: <ins class="diff-new">+</ins> <var title="">sw <del class=
                   22591: "diff-old">,</del></var></span> , <var title=""><ins class=
                   22592: "diff-chg">sy</ins></var> <ins class="diff-chg">), (</ins>
                   22593: <span><var title=""><ins class="diff-chg">sx</ins></var>
                   22594: <ins class="diff-chg">+</ins> <var title="">sw</var></span> ,
                   22595: <span><var title=""><ins class="diff-new">sy</ins></var>
                   22596: <ins class="diff-new">+</ins> <var title=""><ins class=
                   22597: "diff-new">sh</ins></var></span> <ins class="diff-new">), (</ins>
                   22598: <var title=""><ins class="diff-new">sx</ins></var> , <del class=
                   22599: "diff-old">and</del> <span><var title=""><ins class=
                   22600: "diff-chg">sy</ins></var> <ins class="diff-chg">+</ins> <var title=
                   22601: "">sh</var> <del class="diff-old">arguments is outside</del></span>
                   22602: <ins class="diff-chg">).</ins></p>
                   22603: <p><ins class="diff-chg">If</ins> the <del class="diff-old">size
                   22604: of</del> <ins class="diff-chg">source rectangle is not entirely
                   22605: within</ins> the <ins class="diff-new">source</ins> image, or if
                   22606: one of the <var title=""><del class="diff-old">dw</del> <ins class=
                   22607: "diff-chg">sw</ins></var> <del class="diff-old">and</del>
                   22608: <ins class="diff-chg">or</ins> <var title=""><del class=
                   22609: "diff-old">dh</del> <ins class="diff-chg">sh</ins></var> arguments
                   22610: is <del class="diff-old">negative,</del> <ins class=
                   22611: "diff-chg">zero,</ins> the implementation must raise an
                   22612: <code>INDEX_SIZE_ERR</code> exception. <del class=
                   22613: "diff-old">If</del></p>
1.2     ! mike     22614: <p><ins class="diff-chg">The destination rectangle is</ins> the
        !          22615: <ins class="diff-new">rectangle whose corners are the four points
1.1       mike     22616: (</ins> <var title=""><del class="diff-old">image</del> <ins class=
                   22617: "diff-chg">dx</ins></var> ,<var title=""><ins class=
                   22618: "diff-chg">dy</ins></var> <del class="diff-old">argument is
                   22619: an</del> <ins class="diff-chg">), (</ins> <span><del class=
                   22620: "diff-old">HTMLImageElement</del> <var title=""><ins class=
                   22621: "diff-chg">dx</ins></var> <ins class="diff-chg">+</ins> <var title=
                   22622: ""><ins class="diff-chg">dw</ins></var> <del class=
                   22623: "diff-old">object whose complete attribute is false, then the
                   22624: implementation must raise an INVALID_STATE_ERR
                   22625: exception.</del></span> , <var title=""><ins class=
                   22626: "diff-chg">dy</ins></var> <ins class="diff-chg">), (</ins>
                   22627: <span><var title=""><ins class="diff-chg">dx</ins></var>
                   22628: <ins class="diff-chg">+</ins> <var title=""><ins class=
                   22629: "diff-chg">dw</ins></var></span> ,<span><var title=""><ins class=
                   22630: "diff-chg">dy</ins></var> <ins class="diff-chg">+</ins> <var title=
                   22631: ""><ins class="diff-chg">dh</ins></var></span> <ins class=
                   22632: "diff-chg">), (</ins> <var title=""><ins class=
                   22633: "diff-chg">dx</ins></var> ,<span><var title=""><ins class=
                   22634: "diff-chg">dy</ins></var> <ins class="diff-chg">+</ins> <var title=
                   22635: ""><ins class="diff-chg">dh</ins></var></span> <ins class=
                   22636: "diff-chg">).</ins></p>
                   22637: <p>When <code title="dom-context-2d-drawImage"><a href=
                   22638: "#drawimage">drawImage()</a></code> is invoked, the <del class=
                   22639: "diff-old">specified</del> region of the image specified by the
                   22640: source rectangle <del class="diff-old">( sx , sy , sw , sh )</del>
                   22641: must be painted on the region of the canvas specified by the
                   22642: destination <del class="diff-old">rectangle ( dx , dy , dw , dh
                   22643: ),</del> <ins class="diff-chg">rectangle,</ins> after applying the
                   22644: <a href="#transformations0" title=
                   22645: "dom-context-2d-transformation">current transformation matrix
                   22646: <del class="diff-old">.</del></a> <ins class="diff-chg">to the
                   22647: points of the destination rectangle.</ins></p>
                   22648: <p><img alt="" src="images/drawImage.png"></p>
                   22649: <p class="note">When a canvas is drawn onto itself, the drawing
                   22650: model requires the source to be copied before the image is drawn
                   22651: back onto the canvas, so it is possible to copy parts of a canvas
                   22652: onto overlapping parts of itself.</p>
                   22653: <p><ins class="diff-new">When the</ins> <code title=
                   22654: "dom-context-2d-drawImage"><a href="#drawimage"><ins class=
                   22655: "diff-new">drawImage()</ins></a></code> <ins class=
                   22656: "diff-new">method is passed, as its</ins> <var title=""><ins class=
                   22657: "diff-new">image</ins></var> <ins class="diff-new">argument, an
                   22658: animated image, the poster frame of the animation, or the first
                   22659: frame of the animation if there is no poster frame, must be
                   22660: used.</ins></p>
                   22661: <p>Images are painted without affecting the current path, and are
                   22662: subject to <a href="#shadows0" title="shadows">shadow effects</a> ,
                   22663: <a href="#globalalpha" title="dom-context-2d-globalAlpha">global
                   22664: alpha</a> , <ins class="diff-chg">the</ins> <a href="#clipping"
                   22665: title="clipping region">clipping <del class="diff-old">paths</del>
                   22666: <ins class="diff-chg">region</ins></a> , and <a href=
                   22667: "#globalcompositeoperation" title=
                   22668: "dom-context-2d-globalCompositeOperation">global composition
                   22669: operators</a> .</p>
                   22670: <h6 id="pixel"><span class="secno"><del class=
                   22671: "diff-old">3.14.11.1.10.</del> <ins class=
                   22672: "diff-chg">3.12.11.1.11.</ins></span> <dfn id="pixel1">Pixel
                   22673: manipulation</dfn></h6>
                   22674: <p>The <dfn id="createimagedata" title=
                   22675: "dom-context-2d-createImageData"><code><ins class=
                   22676: "diff-new">createImageData(</ins> <var title=""><ins class=
                   22677: "diff-new">sw</ins></var> ,<var title=""><ins class=
                   22678: "diff-new">sh</ins></var> <ins class=
                   22679: "diff-new">)</ins></code></dfn> <ins class="diff-new">method must
                   22680: return an</ins> <code><a href="#imagedata"><ins class=
                   22681: "diff-new">ImageData</ins></a></code> <ins class="diff-new">object
                   22682: representing a rectangle with a width in CSS pixels equal to the
                   22683: absolute magnitude of</ins> <var title=""><ins class=
                   22684: "diff-new">sw</ins></var> <ins class="diff-new">and a height in CSS
                   22685: pixels equal to the absolute magnitude of</ins> <var title=
                   22686: ""><ins class="diff-new">sh</ins></var> ,<ins class=
                   22687: "diff-new">filled with transparent black.</ins></p>
                   22688: <p><ins class="diff-new">The</ins> <dfn id="getimagedata" title=
                   22689: "dom-context-2d-getImageData"><code>getImageData( <var title=
                   22690: "">sx</var> , <var title="">sy</var> , <var title="">sw</var> ,
                   22691: <var title="">sh</var> )</code></dfn> method must return an
                   22692: <code><a href="#imagedata">ImageData</a></code> object representing
                   22693: the underlying pixel data for the area of the canvas denoted by the
                   22694: rectangle <del class="diff-old">which has its top left corner
                   22695: at</del> <ins class="diff-chg">whose corners are</ins> the
                   22696: <ins class="diff-new">four points</ins> ( <var title="">sx</var> ,
                   22697: <var title="">sy</var> <del class="diff-old">) coordinate, and that
                   22698: has width</del> <ins class="diff-chg">), (</ins> <span><var title=
                   22699: ""><ins class="diff-chg">sx</ins></var> <ins class=
                   22700: "diff-chg">+</ins> <var title="">sw</var> <del class="diff-old">and
                   22701: height</del></span> , <var title=""><ins class=
                   22702: "diff-chg">sy</ins></var> <ins class="diff-chg">), (</ins>
                   22703: <span><var title=""><ins class="diff-chg">sx</ins></var>
                   22704: <ins class="diff-chg">+</ins> <var title=""><ins class=
                   22705: "diff-chg">sw</ins></var></span> ,<span><var title=""><ins class=
                   22706: "diff-chg">sy</ins></var> <ins class="diff-chg">+</ins> <var title=
                   22707: "">sh <del class="diff-old">.</del></var></span> <ins class=
                   22708: "diff-chg">), (</ins> <var title=""><ins class=
                   22709: "diff-chg">sx</ins></var> ,<span><var title=""><ins class=
                   22710: "diff-chg">sy</ins></var> <ins class="diff-chg">+</ins> <var title=
                   22711: ""><ins class="diff-chg">sh</ins></var></span> <ins class=
                   22712: "diff-chg">), in canvas coordinate space units.</ins> Pixels
                   22713: outside the canvas must be returned as transparent black. Pixels
                   22714: must be returned as non-premultiplied alpha values.</p>
                   22715: <p><ins class="diff-new">If any of the arguments to</ins>
                   22716: <code title="dom-context-2d-createImageData"><a href=
                   22717: "#createimagedata"><ins class=
                   22718: "diff-new">createImageData()</ins></a></code> <ins class=
                   22719: "diff-new">or</ins> <code title=
                   22720: "dom-context-2d-getImageData"><a href="#getimagedata"><ins class=
                   22721: "diff-new">getImageData()</ins></a></code> <ins class=
                   22722: "diff-new">are infinite or NaN, or if either the</ins> <var title=
                   22723: ""><ins class="diff-new">sw</ins></var> <ins class=
                   22724: "diff-new">or</ins> <var title=""><ins class=
                   22725: "diff-new">sh</ins></var> <ins class="diff-new">arguments are zero,
                   22726: the method must instead raise an</ins> <code><ins class=
                   22727: "diff-new">INDEX_SIZE_ERR</ins></code> <ins class=
                   22728: "diff-new">exception.</ins></p>
                   22729: <p><code><a href="#imagedata">ImageData</a></code> objects must be
                   22730: <del class="diff-old">initialised</del> <ins class=
                   22731: "diff-chg">initialized</ins> so that their <dfn id="width3" title=
                   22732: "dom-imagedata-width"><code>width</code></dfn> attribute is set to
                   22733: <var title="">w</var> , the number of physical device pixels per
                   22734: row in the image data, their <dfn id="height2" title=
                   22735: "dom-imagedata-height"><code>height</code></dfn> attribute is set
                   22736: to <var title="">h</var> , the number of rows in the image data,
                   22737: and the <dfn id="data1" title=
                   22738: "dom-imagedata-data"><code>data</code></dfn> attribute is
                   22739: <del class="diff-old">initialised</del> <ins class=
                   22740: "diff-chg">initialized</ins> to an array of <var title="">h</var> ×
                   22741: <var title="">w</var> ×4 integers. The pixels must be represented
                   22742: in this array in left-to-right order, row by row, starting at the
                   22743: top left, with each pixel's red, green, blue, and alpha components
                   22744: being given in that order. Each component of each device pixel
                   22745: represented in this array must be in the range 0..255, representing
                   22746: the 8 bit value for that component. At least one pixel must be
                   22747: returned.</p>
                   22748: <p>The values of the <code title="dom-imagedata-data"><a href=
                   22749: "#data1">data</a></code> array may be changed (the length of the
                   22750: array, and the other attributes in <code><a href=
                   22751: "#imagedata">ImageData</a></code> objects, are all read-only). On
                   22752: setting, JS <code>undefined</code> values must be converted to
                   22753: zero. Other values must first be converted to numbers using
                   22754: JavaScript's ToNumber algorithm, and if the result is <del class=
                   22755: "diff-old">not</del> a <del class="diff-old">number,</del>
                   22756: <ins class="diff-chg">NaN value,</ins> a
                   22757: <code>TYPE_MISMATCH_ERR</code> exception must be raised. If the
                   22758: result is less than 0, it must be clamped to zero. If the result is
                   22759: more than 255, it must be clamped to 255. If the number is not an
                   22760: integer, it must be rounded to the nearest integer using the IEEE
                   22761: 754r <i>roundTiesToEven</i> rounding mode. <a href=
                   22762: "#references">[ECMA262]</a> <a href=
                   22763: "#references">[IEEE754R]</a></p>
                   22764: <p class="note">The width and height ( <var title="">w</var> and
                   22765: <var title="">h</var> ) might be different from the <var title=
                   22766: "">sw</var> and <var title="">sh</var> arguments to the <del class=
                   22767: "diff-old">function,</del> <ins class="diff-chg">above
                   22768: methods,</ins> e.g. if the canvas is backed by a high-resolution
                   22769: <del class="diff-old">bitmap. If the getImageData( sx , sy , sw ,
                   22770: sh ) method is called with either</del> <ins class=
                   22771: "diff-chg">bitmap, or if</ins> the <var title="">sw</var>
                   22772: <del class="diff-old">or</del> <ins class="diff-chg">and</ins>
                   22773: <var title="">sh</var> arguments <del class="diff-old">set to zero
                   22774: or negative values, the method must raise an INDEX_SIZE_ERR
                   22775: exception.</del> <ins class="diff-chg">are negative.</ins></p>
                   22776: <p>The <dfn id="putimagedata" title=
                   22777: "dom-context-2d-putImageData"><code>putImageData( <var title=
                   22778: "">imagedata</var> , <var title="">dx</var> , <var title=
                   22779: "">dy</var> , <var title=""><ins class=
                   22780: "diff-new">dirtyX</ins></var> ,<var title=""><ins class=
                   22781: "diff-new">dirtyY</ins></var> ,<var title=""><ins class=
                   22782: "diff-new">dirtyWidth</ins></var> ,<var title=""><ins class=
                   22783: "diff-new">dirtyHeight</ins></var> )</code></dfn> method
                   22784: <del class="diff-old">must take the given</del> <ins class=
                   22785: "diff-chg">writes data from</ins> <code><a href=
                   22786: "#imagedata">ImageData</a></code> <del class="diff-old">structure,
                   22787: and place it at the specified location ( dx , dy ) in the canvas
                   22788: coordinate space, mapping each pixel represented by</del>
                   22789: <ins class="diff-chg">structures back to</ins> the <del class=
                   22790: "diff-old">ImageData structure into one device pixel.</del>
                   22791: <ins class="diff-chg">canvas.</ins></p>
                   22792: <p>If the first argument to the method is <ins class=
                   22793: "diff-new">null or</ins> not an <del class="diff-old">object whose
                   22794: [[Class]] property is</del> <code><a href=
                   22795: "#imagedata">ImageData</a> <del class="diff-old">, but all of the
                   22796: following conditions are true,</del></code> <ins class=
                   22797: "diff-chg">object that was returned by</ins> <code title=
                   22798: "dom-context-2d-createImageData"><a href=
                   22799: "#createimagedata"><ins class=
                   22800: "diff-chg">createImageData()</ins></a></code> <ins class=
                   22801: "diff-chg">or</ins> <code title=
                   22802: "dom-context-2d-getImageData"><a href="#getimagedata"><ins class=
                   22803: "diff-chg">getImageData()</ins></a></code> then the <del class=
                   22804: "diff-old">method must treat the first argument as if it was
                   22805: an</del> <code title="dom-context-2d-putImageData"><del class=
                   22806: "diff-old">ImageData</del> <a href="#putimagedata"><ins class=
                   22807: "diff-chg">putImageData()</ins></a></code> <del class=
                   22808: "diff-old">object (and thus not</del> <ins class="diff-chg">method
                   22809: must</ins> raise <del class="diff-old">the</del> <ins class=
                   22810: "diff-chg">a</ins> <code>TYPE_MISMATCH_ERR</code> <del class=
                   22811: "diff-old">exception): The method's first argument is</del>
                   22812: <ins class="diff-chg">exception.</ins></p>
                   22813: <p><ins class="diff-chg">If any of the arguments to the method are
                   22814: infinite or NaN, the method must raise</ins> an <del class=
                   22815: "diff-old">object with</del> <code><ins class=
                   22816: "diff-chg">INDEX_SIZE_ERR</ins></code> <ins class=
                   22817: "diff-chg">exception.</ins></p>
                   22818: <p><ins class="diff-chg">When the last four arguments are omitted,
                   22819: they must be assumed to have the values 0, 0, the</ins>
                   22820: <code title="dom-imagedata-width"><a href=
                   22821: "#width3">width</a></code> <ins class="diff-new">member of
                   22822: the</ins> <var title=""><ins class="diff-new">imagedata</ins></var>
                   22823: <ins class="diff-new">structure,</ins> and <ins class=
                   22824: "diff-new">the</ins> <code title="dom-imagedata-height"><a href=
                   22825: "#height2">height</a></code> <del class="diff-old">attributes</del>
                   22826: <ins class="diff-chg">member of the</ins> <var title=""><ins class=
                   22827: "diff-chg">imagedata</ins></var> <ins class="diff-chg">structure,
                   22828: respectively.</ins></p>
                   22829: <p><ins class="diff-chg">When invoked</ins> with <del class=
                   22830: "diff-old">integer values and a</del> <ins class=
                   22831: "diff-chg">arguments that do not, per the last few paragraphs,
                   22832: cause an exception to be raised, the</ins> <code title=
                   22833: "dom-context-2d-putImageData"><del class="diff-old">data</del>
                   22834: <a href="#putimagedata"><ins class=
                   22835: "diff-chg">putImageData()</ins></a></code> <del class=
                   22836: "diff-old">attribute whose value</del> <ins class="diff-chg">method
                   22837: must act as follows:</ins></p>
                   22838: <ol>
                   22839: <li>
                   22840: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   22841: "diff-chg">dx</ins> <sub><ins class=
                   22842: "diff-chg">device</ins></sub></var> <ins class="diff-chg">be the
                   22843: x-coordinate of the device pixel in the underlying pixel data of
                   22844: the canvas corresponding to the</ins> <var title=""><ins class=
                   22845: "diff-chg">dx</ins></var> <ins class="diff-chg">coordinate in the
                   22846: canvas coordinate space.</ins></p>
                   22847: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   22848: "diff-chg">dy</ins> <sub><ins class=
                   22849: "diff-chg">device</ins></sub></var> <ins class="diff-chg">be the
                   22850: y-coordinate of the device pixel in the underlying pixel data of
                   22851: the canvas corresponding to the</ins> <var title=""><ins class=
                   22852: "diff-chg">dy</ins></var> <ins class="diff-chg">coordinate in the
                   22853: canvas coordinate space.</ins></p>
                   22854: </li>
                   22855: <li>
                   22856: <p><ins class="diff-chg">If</ins> <var title=""><ins class=
                   22857: "diff-chg">dirtyWidth</ins></var> is <del class="diff-old">an
                   22858: enumerable list</del> <ins class="diff-chg">negative, let</ins>
                   22859: <var title=""><ins class="diff-chg">dirtyX</ins></var> <ins class=
                   22860: "diff-chg">be</ins> <span><var title=""><ins class=
                   22861: "diff-chg">dirtyX</ins></var> <ins class="diff-chg">+</ins>
                   22862: <var title=""><ins class="diff-chg">dirtyWidth</ins></var></span>
                   22863: ,<ins class="diff-chg">and let</ins> <var title=""><ins class=
                   22864: "diff-chg">dirtyWidth</ins></var> <ins class="diff-chg">be equal to
                   22865: the absolute magnitude</ins> of <del class="diff-old">values that
                   22866: are either JS Numbers or</del> <var title=""><ins class=
                   22867: "diff-chg">dirtyWidth</ins></var> .</p>
                   22868: <p><ins class="diff-chg">If</ins> <var title=""><ins class=
                   22869: "diff-chg">dirtyHeight</ins></var> <ins class="diff-chg">is
                   22870: negative, let</ins> <var title=""><ins class=
                   22871: "diff-chg">dirtyY</ins></var> <ins class="diff-chg">be</ins>
                   22872: <span><var title=""><ins class="diff-chg">dirtyY</ins></var>
                   22873: <ins class="diff-chg">+</ins> <var title=""><ins class=
                   22874: "diff-chg">dirtyHeight</ins></var></span> ,<ins class=
                   22875: "diff-chg">and let</ins> <var title=""><ins class=
                   22876: "diff-chg">dirtyHeight</ins></var> <ins class="diff-chg">be equal
                   22877: to</ins> the <del class="diff-old">JS value undefined .</del>
                   22878: <ins class="diff-chg">absolute magnitude of</ins> <var title=
                   22879: ""><ins class="diff-chg">dirtyHeight</ins></var> .</p>
                   22880: </li>
                   22881: <li><del class="diff-old">The</del>
                   22882: <p><ins class="diff-chg">If</ins> <var title=""><ins class=
                   22883: "diff-chg">dirtyX</ins></var> <ins class="diff-chg">is negative,
                   22884: let</ins> <var title=""><ins class=
                   22885: "diff-chg">dirtyWidth</ins></var> <ins class="diff-chg">be</ins>
                   22886: <span><del class="diff-old">ImageData</del> <var title=
                   22887: ""><ins class="diff-chg">dirtyWidth</ins></var> <ins class=
                   22888: "diff-chg">+</ins> <var title=""><ins class=
                   22889: "diff-chg">dirtyX</ins></var></span> ,<ins class="diff-chg">and
                   22890: let</ins> <var title=""><ins class="diff-chg">dirtyX</ins></var>
                   22891: <ins class="diff-chg">be zero.</ins></p>
                   22892: <p><ins class="diff-chg">If</ins> <var title=""><ins class=
                   22893: "diff-chg">dirtyY</ins></var> <ins class="diff-chg">is negative,
                   22894: let</ins> <var title=""><ins class=
                   22895: "diff-chg">dirtyHeight</ins></var> <ins class="diff-chg">be</ins>
                   22896: <span><var title=""><ins class="diff-chg">dirtyHeight</ins></var>
                   22897: <ins class="diff-chg">+</ins> <var title=""><ins class=
                   22898: "diff-chg">dirtyY</ins></var></span> ,<ins class="diff-chg">and
                   22899: let</ins> <var title=""><ins class="diff-chg">dirtyY</ins></var>
                   22900: <ins class="diff-chg">be zero.</ins></p>
                   22901: </li>
                   22902: <li>
                   22903: <p><ins class="diff-chg">If</ins> <span><var title=""><ins class=
                   22904: "diff-chg">dirtyX</ins></var> <ins class="diff-chg">+</ins>
                   22905: <var title=""><ins class="diff-chg">dirtyWidth</ins></var></span>
                   22906: <ins class="diff-chg">is greater than the</ins> <code title=
                   22907: "dom-imagedata-width"><a href="#width3"><ins class=
                   22908: "diff-chg">width</ins></a></code> <del class=
                   22909: "diff-old">object's</del> <ins class="diff-chg">attribute of
                   22910: the</ins> <var title=""><ins class="diff-chg">imagedata</ins></var>
                   22911: <ins class="diff-chg">argument, let</ins> <var title=""><ins class=
                   22912: "diff-chg">dirtyWidth</ins></var> <ins class="diff-chg">be the
                   22913: value of that</ins> <code title="dom-imagedata-width"><a href=
                   22914: "#width3">width</a></code> <ins class="diff-new">attribute, minus
                   22915: the value of</ins> <var title=""><ins class=
                   22916: "diff-new">dirtyX</ins></var> .</p>
                   22917: <p><ins class="diff-new">If</ins> <span><var title=""><ins class=
                   22918: "diff-new">dirtyY</ins></var> <ins class="diff-new">+</ins>
                   22919: <var title=""><ins class="diff-new">dirtyHeight</ins></var></span>
                   22920: is greater than <del class="diff-old">zero. The</del> <ins class=
                   22921: "diff-chg">the</ins> <code title="dom-imagedata-height"><del class=
                   22922: "diff-old">ImageData</del> <a href="#height2"><ins class=
                   22923: "diff-chg">height</ins></a></code> <del class=
                   22924: "diff-old">object's</del> <ins class="diff-chg">attribute of
                   22925: the</ins> <var title=""><ins class="diff-chg">imagedata</ins></var>
                   22926: <ins class="diff-chg">argument, let</ins> <var title=""><ins class=
                   22927: "diff-chg">dirtyHeight</ins></var> <ins class="diff-chg">be the
                   22928: value of that</ins> <code title="dom-imagedata-height"><a href=
                   22929: "#height2">height</a></code> <ins class="diff-new">attribute, minus
                   22930: the value of</ins> <var title=""><ins class=
                   22931: "diff-new">dirtyY</ins></var> .</p>
                   22932: </li>
                   22933: <li>
                   22934: <p><ins class="diff-new">If, after those changes, either</ins>
                   22935: <var title=""><ins class="diff-new">dirtyWidth</ins></var>
                   22936: <ins class="diff-new">or</ins> <var title=""><ins class=
                   22937: "diff-new">dirtyHeight</ins></var> is <del class="diff-old">greater
                   22938: than zero.</del> <ins class="diff-chg">negative or zero, stop these
                   22939: steps without affecting the canvas.</ins></p>
                   22940: </li>
                   22941: <li><del class="diff-old">The</del>
                   22942: <p><ins class="diff-chg">Otherwise, for all values of</ins>
                   22943: <var title=""><ins class="diff-chg">x</ins></var> <ins class=
                   22944: "diff-chg">and</ins> <var title=""><ins class=
                   22945: "diff-chg">y</ins></var> <ins class="diff-chg">where</ins>
                   22946: <span><del class="diff-old">ImageData</del> <var title=
                   22947: ""><ins class="diff-chg">dirtyX</ins></var> <ins class=
                   22948: "diff-chg">&nbsp;≤&nbsp;</ins> <var title=""><ins class=
                   22949: "diff-chg">x</ins></var> <ins class=
                   22950: "diff-chg">&nbsp;&lt;&nbsp;</ins> <span><del class=
                   22951: "diff-old">object's</del> <var title=""><ins class=
                   22952: "diff-chg">dirtyX</ins></var> <ins class="diff-chg">+</ins>
                   22953: <var title=""><ins class="diff-chg">dirtyWidth</ins></var>
                   22954: <del class="diff-old">width</del></span> <del class=
                   22955: "diff-old">multiplied by its</del></span> <ins class=
                   22956: "diff-chg">and</ins> <span><del class="diff-old">height</del>
                   22957: <var title=""><ins class="diff-chg">dirtyY</ins></var> <ins class=
                   22958: "diff-chg">&nbsp;≤&nbsp;</ins> <var title=""><ins class=
                   22959: "diff-chg">y</ins></var> <ins class=
                   22960: "diff-chg">&nbsp;&lt;&nbsp;</ins> <span><del class=
                   22961: "diff-old">multiplied by 4 is equal to</del> <var title=
                   22962: ""><ins class="diff-chg">dirtyY</ins></var> <ins class=
                   22963: "diff-chg">+</ins> <var title=""><ins class=
                   22964: "diff-chg">dirtyHeight</ins></var></span></span> ,<ins class=
                   22965: "diff-chg">copy</ins> the <del class="diff-old">number</del>
                   22966: <ins class="diff-chg">four channels</ins> of <del class=
                   22967: "diff-old">entries</del> <ins class="diff-chg">the pixel with
                   22968: coordinate (</ins> <var title=""><ins class=
                   22969: "diff-chg">x</ins></var> ,<var title=""><ins class=
                   22970: "diff-chg">y</ins></var> <ins class="diff-chg">)</ins> in the
                   22971: <var title=""><ins class="diff-chg">imagedata</ins></var>
                   22972: <ins class="diff-chg">data structure to the pixel with coordinate
                   22973: (</ins> <span><del class="diff-old">ImageData</del> <var title=
                   22974: ""><ins class="diff-chg">x</ins> <sub><ins class=
                   22975: "diff-chg">device</ins></sub> <del class=
                   22976: "diff-old">object's</del></var> <ins class="diff-chg">+</ins>
                   22977: <var title=""><ins class="diff-chg">x</ins></var> <del class=
                   22978: "diff-old">data</del></span> , <span><del class=
                   22979: "diff-old">property. In the</del> <var title=""><ins class=
                   22980: "diff-chg">y</ins> <sub><ins class="diff-chg">device</ins></sub>
                   22981: <del class="diff-old">data</del></var> <ins class=
                   22982: "diff-chg">+</ins> <var title=""><ins class=
                   22983: "diff-chg">y</ins></var> <del class="diff-old">property, undefined
                   22984: values must be treated as zero, any numbers below zero must be
                   22985: clamped to zero, any numbers above 255 must be clamped to 255, and
                   22986: any numbers that are not integers must be rounded to</del></span>
                   22987: <ins class="diff-chg">) in</ins> the <del class="diff-old">nearest
                   22988: integer using</del> <ins class="diff-chg">underlying pixel data
                   22989: of</ins> the <del class="diff-old">IEEE 754r roundTiesToEven
                   22990: rounding mode. [IEEE754R]</del> <ins class=
                   22991: "diff-chg">canvas.</ins></p>
                   22992: </li>
                   22993: </ol>
                   22994: <p>The handling of pixel rounding when the specified coordinates do
                   22995: not exactly map to the device coordinate space is not defined by
                   22996: this specification, except that the following must result in no
                   22997: visible changes to the rendering:</p>
                   22998: <pre>
                   22999: context.putImageData(context.getImageData(x,
                   23000: y,
                   23001: w,
                   23002: h),
                   23003: x,
                   23004: y);
                   23005: </pre>
                   23006: <p>...for any value of <var title="">x</var> and <var title=
                   23007: "">y</var> . In other words, while user agents may round the
                   23008: arguments of the two methods so that they map to device pixel
                   23009: boundaries, any rounding performed must be performed consistently
                   23010: for both the <code title="dom-context-2d-getImageData"><a href=
                   23011: "#getimagedata">getImageData()</a></code> and <code title=
                   23012: "dom-context-2d-putImageData"><a href=
                   23013: "#putimagedata">putImageData()</a></code> operations.</p>
                   23014: <p>The current path, <a href="#transformations0" title=
                   23015: "dom-context-2d-transformation">transformation matrix</a> ,
                   23016: <a href="#shadows0" title="shadows">shadow attributes</a> ,
                   23017: <a href="#globalalpha" title="dom-context-2d-globalAlpha">global
                   23018: alpha</a> , <ins class="diff-chg">the</ins> <a href="#clipping"
                   23019: title="clipping region">clipping <del class="diff-old">path</del>
                   23020: <ins class="diff-chg">region</ins></a> , and <a href=
                   23021: "#globalcompositeoperation" title=
                   23022: "dom-context-2d-globalCompositeOperation">global composition
                   23023: operator</a> must not affect the <code title=
                   23024: "dom-context-2d-getImageData"><a href=
                   23025: "#getimagedata">getImageData()</a></code> and <code title=
                   23026: "dom-context-2d-putImageData"><a href=
                   23027: "#putimagedata">putImageData()</a></code> methods.</p>
                   23028: <div class="example">
                   23029: <p>The data returned by <code title=
                   23030: "dom-context-2d-getImageData"><a href=
                   23031: "#getimagedata">getImageData()</a></code> is at the resolution of
                   23032: the canvas backing store, which is likely to not be one device
                   23033: pixel to each CSS pixel if the display used is a high resolution
                   23034: display. Thus, while one could create an <code><a href=
                   23035: "#imagedata">ImageData</a></code> object, one would not necessarily
                   23036: know what resolution the canvas expected (how many pixels the
                   23037: canvas wants to paint over one coordinate space unit pixel).</p>
                   23038: <p>In the following example, the script first obtains the size of
                   23039: the canvas backing store, and then generates a few new
                   23040: <code><a href="#imagedata">ImageData</a></code> objects which can
                   23041: be used.</p>
                   23042: <pre>
                   23043:   // canvas is a reference to a &lt;canvas&gt; element
                   23044: <del class=
                   23045: "diff-old">  // (note: this example uses JavaScript 1.7 features)
                   23046: </del>
                   23047:   var context = canvas.getContext('2d');
                   23048: <del class=
                   23049: "diff-old">  var backingStore = context.getImageData(0, 0, canvas.width, canvas.height);
                   23050:   var actualWidth = backingStore.width;
                   23051:   var actualHeight = backingStore.height;
                   23052:   function CreateImageData(w, h) {
                   23053:     return {
                   23054:       height: h,
                   23055:       width: w,
                   23056:       data: [i for (i in function (n) { for (let i = 0; i &lt; n; i += 1) yield 0 }(w*h*4)) ]
                   23057:     };
                   23058:   }
                   23059: </del>
                   23060:   // create a blank slate
                   23061: <del class=
                   23062: "diff-old">  var data = CreateImageData(actualWidth, actualHeight);
                   23063: </del>
                   23064: <ins class=
                   23065: "diff-chg">  var data = context.createImageData(canvas.width, canvas.height);
                   23066: </ins>
                   23067:   // create some plasma
                   23068:   FillPlasma(data, 'green'); // green plasma
                   23069:   // add a cloud to the plasma
                   23070: <del class=
                   23071: "diff-old">  AddCloud(data, actualWidth/2, actualHeight/2); // put a cloud in the middle
                   23072: </del>
                   23073: <ins class=
                   23074: "diff-chg">  AddCloud(data, data.width/2, data.height/2); // put a cloud in the middle
                   23075: </ins>
                   23076:   // paint the plasma+cloud on the canvas
                   23077:   context.putImageData(data, 0, 0);
                   23078:   // support methods
                   23079:   function FillPlasma(data, color) { ... }
                   23080: <del class="diff-old">  function AddCload(data, x, y) { ... }
                   23081: </del>
                   23082: <ins class="diff-chg">  function AddCloud(data, x, y) { ... }
                   23083: </ins>
                   23084: </pre></div>
                   23085: <div class="example">
                   23086: <p>Here is an example of using <code title=
                   23087: "dom-context-2d-getImageData"><a href=
                   23088: "#getimagedata">getImageData()</a></code> and <code title=
                   23089: "dom-context-2d-putImageData"><a href=
                   23090: "#putimagedata">putImageData()</a></code> to implement an edge
                   23091: detection filter.</p>
                   23092: <pre>
                   23093: &lt;!DOCTYPE HTML&gt;
                   23094: &lt;html&gt;
                   23095:  &lt;head&gt;
                   23096:   &lt;title&gt;Edge detection demo&lt;/title&gt;
                   23097:   &lt;script&gt;
                   23098:    var image = new Image();
                   23099:    function init() {
                   23100:      image.onload = demo;
                   23101:      image.src = "image.jpeg";
                   23102:    }
                   23103:    function demo() {
                   23104:      var canvas = document.getElementsByTagName('canvas')[0];
                   23105:      var context = canvas.getContext('2d');
                   23106:      // draw the image onto the canvas
                   23107:      context.drawImage(image, 0, 0);
                   23108:      // get the image data to manipulate
                   23109:      var input = context.getImageData(0, 0, canvas.width, canvas.height);
                   23110: <del class="diff-old">     // edge detection
                   23111: </del>
                   23112: <ins class=
                   23113: "diff-chg">     // get an empty slate to put the data into
                   23114:      var output = context.crateImageData(canvas.width, canvas.height);
                   23115:      // alias some variables for convenience
                   23116: </ins>
                   23117:      // notice that we are using input.width and input.height here
                   23118:      // as they might not be the same as canvas.width and canvas.height
                   23119:      // (in particular, they might be different on high-res displays)
                   23120:      var w = input.width, h = input.height;
                   23121:      var inputData = input.data;
                   23122: <del class="diff-old">     var outputData = new Array(w*h*4);
                   23123: </del>
                   23124: <ins class="diff-chg">     var outputData = output.data;
                   23125:      // edge detection
                   23126: </ins>
                   23127:      for (var y = 1; y &lt; h-1; y += 1) {
                   23128:        for (var x = 1; x &lt; w-1; x += 1) {
                   23129:          for (var c = 0; c &lt; 3; c += 1) {
                   23130:            var i = (y*w + x)*4 + c;
                   23131:            outputData[i] = 127 + -inputData[i - w*4 - 4] -   inputData[i - w*4] - inputData[i - w*4 + 4] +
                   23132:                                  -inputData[i - 4]       + 8*inputData[i]       - inputData[i + 4] +
                   23133:                                  -inputData[i + w*4 - 4] -   inputData[i + w*4] - inputData[i + w*4 + 4];
                   23134:          }
                   23135:          outputData[(y*w + x)*4 + 3] = 255; // alpha
                   23136:        }
                   23137:      }
                   23138:      // put the image data back after manipulation
                   23139: <del class="diff-old">     var output = {
                   23140:        width: w,
                   23141:        height: h,
                   23142:        data: outputData
                   23143:      };
                   23144: </del>
                   23145:      context.putImageData(output, 0, 0);
                   23146:    }
                   23147:   &lt;/script&gt;
                   23148:  &lt;/head&gt;
                   23149:  &lt;body onload="init()"&gt;
                   23150:   &lt;canvas&gt;&lt;/canvas&gt;
                   23151:  &lt;/body&gt;
                   23152: &lt;/html&gt;
                   23153: </pre></div>
                   23154: <h6 id="drawing"><span class="secno"><del class=
                   23155: "diff-old">3.14.11.1.11.</del> <ins class=
                   23156: "diff-chg">3.12.11.1.12.</ins></span> Drawing model</h6>
                   23157: <p>When a shape or image is painted, user agents must follow these
                   23158: steps, in the order given (or act as if they do):</p>
                   23159: <ol>
                   23160: <li>
                   23161: <p>Render the shape or image, creating image <var title="">A</var>
                   23162: , as described in the previous sections. For shapes, the current
                   23163: fill, stroke, and line styles must be <del class=
                   23164: "diff-old">honoured,</del> <ins class="diff-chg">honored,</ins> and
                   23165: the stroke must itself also be subjected to the current
                   23166: transformation matrix.</p>
                   23167: </li>
                   23168: <li>
                   23169: <p>If shadows are supported:</p>
                   23170: <ol>
                   23171: <li>
                   23172: <p>Render the shadow from image <var title="">A</var> , using the
                   23173: current shadow styles, creating image <var title="">B</var> .</p>
                   23174: </li>
                   23175: <li>
                   23176: <p>Multiply the alpha component of every pixel in <var title=
                   23177: "">B</var> by <code title="dom-context-2d-globalAlpha"><a href=
                   23178: "#globalalpha">globalAlpha</a></code> .</p>
                   23179: </li>
                   23180: <li>
                   23181: <p>Within the clipping <del class="diff-old">path,</del>
                   23182: <ins class="diff-chg">region,</ins> composite <var title="">B</var>
                   23183: over the current canvas bitmap using the current composition
                   23184: operator.</p>
                   23185: </li>
                   23186: </ol>
                   23187: </li>
                   23188: <li>
                   23189: <p>Multiply the alpha component of every pixel in <var title=
                   23190: "">A</var> by <code title="dom-context-2d-globalAlpha"><a href=
                   23191: "#globalalpha">globalAlpha</a></code> .</p>
                   23192: </li>
                   23193: <li>
                   23194: <p>Within the clipping <del class="diff-old">path,</del>
                   23195: <ins class="diff-chg">region,</ins> composite <var title="">A</var>
                   23196: over the current canvas bitmap using the current composition
                   23197: operator.</p>
                   23198: </li>
                   23199: </ol>
                   23200: <h5 id="color"><span class="secno"><del class=
                   23201: "diff-old">3.14.11.2.</del> <ins class=
                   23202: "diff-chg">3.12.11.2.</ins></span> Color spaces and color
                   23203: correction</h5>
                   23204: <p>The <code><a href="#canvas">canvas</a></code> APIs must perform
                   23205: <del class="diff-old">colour</del> <ins class=
                   23206: "diff-chg">color</ins> correction at only two points: when
                   23207: rendering images with their own gamma correction <ins class=
                   23208: "diff-new">and color space</ins> information onto the canvas, to
                   23209: convert the image to the color space used by the canvas (e.g. using
                   23210: the <code title="dom-context-2d-drawImage"><a href=
                   23211: "#drawimage">drawImage()</a></code> method with an <code><a href=
                   23212: "#htmlimageelement">HTMLImageElement</a></code> object), and when
                   23213: rendering the actual canvas bitmap to the output device.</p>
                   23214: <p class="note">Thus, in the 2D context, colors used to draw shapes
                   23215: onto the canvas will exactly match colors obtained through the
                   23216: <code title="dom-context-2d-getImageData"><a href=
                   23217: "#getimagedata">getImageData()</a></code> method.</p>
                   23218: <p>The <code title="dom-canvas-toDataURL"><a href=
                   23219: "#todataurl">toDataURL()</a></code> method must not include color
                   23220: space information in the resource returned. <ins class=
                   23221: "diff-new">Where the output format allows it, the color of pixels
                   23222: in resources created by</ins> <code title=
                   23223: "dom-canvas-toDataURL"><a href="#todataurl"><ins class=
                   23224: "diff-new">toDataURL()</ins></a></code> <ins class="diff-new">must
                   23225: match those returned by the</ins> <code title=
                   23226: "dom-context-2d-getImageData"><a href="#getimagedata"><ins class=
                   23227: "diff-new">getImageData()</ins></a></code> <ins class=
                   23228: "diff-new">method.</ins></p>
                   23229: <p>In user agents that support CSS, the color space used by a
                   23230: <code><a href="#canvas">canvas</a></code> element must match the
                   23231: color space used for processing any colors for that element in
                   23232: CSS.</p>
                   23233: <p><ins class="diff-new">The gamma correction and color space
                   23234: information of images must be handled in such a way that an image
                   23235: rendered directly using an</ins> <code><a href="#img"><ins class=
                   23236: "diff-new">img</ins></a></code> <ins class="diff-new">element would
                   23237: use the same colors as one painted on a</ins> <code><a href=
                   23238: "#canvas"><ins class="diff-new">canvas</ins></a></code> <ins class=
                   23239: "diff-new">element that is then itself rendered. Furthermore, the
                   23240: rendering of images that have no color correction information (such
                   23241: as those returned by the</ins> <code title=
                   23242: "dom-canvas-toDataURL"><a href="#todataurl"><ins class=
                   23243: "diff-new">toDataURL()</ins></a></code> <ins class=
                   23244: "diff-new">method) must be rendered with no color
                   23245: correction.</ins></p>
                   23246: <p class="note"><ins class="diff-new">Thus, in the 2D context,
                   23247: calling the</ins> <code title="dom-context-2d-drawImage"><a href=
                   23248: "#drawimage"><ins class="diff-new">drawImage()</ins></a></code>
                   23249: <ins class="diff-new">method to render the output of the</ins>
                   23250: <code title="dom-canvas-toDataURL"><a href="#todataurl"><ins class=
                   23251: "diff-new">toDataURL()</ins></a></code> <ins class=
                   23252: "diff-new">method to the canvas, given the appropriate dimensions,
                   23253: has no visible effect.</ins></p>
                   23254: <h5 id="security1"><span class="secno"><ins class=
                   23255: "diff-new">3.12.11.3.</ins></span> <ins class="diff-new">Security
                   23256: with</ins> <code><a href="#canvas"><ins class=
                   23257: "diff-new">canvas</ins></a></code> <ins class=
                   23258: "diff-new">elements</ins></h5>
                   23259: <p><strong><ins class="diff-new">Information leakage</ins></strong>
                   23260: <ins class="diff-new">can occur if scripts from one</ins> <a href=
                   23261: "#origin0"><ins class="diff-new">origin</ins></a> <ins class=
                   23262: "diff-new">are exposed to images from another origin (one that
                   23263: isn't the</ins> <a href="#same-origin" title=
                   23264: "same origin"><ins class="diff-new">same</ins></a> <ins class=
                   23265: "diff-new">).</ins></p>
                   23266: <p><ins class="diff-new">To mitigate this,</ins> <code><a href=
                   23267: "#canvas"><ins class="diff-new">canvas</ins></a></code> <ins class=
                   23268: "diff-new">elements are defined to have a flag indicating whether
                   23269: they are</ins> <i><ins class="diff-new">origin-clean</ins></i>
                   23270: .<ins class="diff-new">All</ins> <code><a href=
                   23271: "#canvas"><ins class="diff-new">canvas</ins></a></code> <ins class=
                   23272: "diff-new">elements must start with their</ins> <i><ins class=
                   23273: "diff-new">origin-clean</ins></i> <ins class="diff-new">set to
                   23274: true. The flag must be set to false if any of the following actions
                   23275: occur:</ins></p>
                   23276: <ul>
                   23277: <li>
                   23278: <p><ins class="diff-new">The element's 2D context's</ins>
                   23279: <code title="dom-context-2d-drawImage"><a href=
                   23280: "#drawimage"><ins class="diff-new">drawImage()</ins></a></code>
                   23281: <ins class="diff-new">method is called with an</ins> <code><a href=
                   23282: "#htmlimageelement"><ins class=
                   23283: "diff-new">HTMLImageElement</ins></a></code> <ins class=
                   23284: "diff-new">whose</ins> <a href="#origin0"><ins class=
                   23285: "diff-new">origin</ins></a> <ins class="diff-new">is not the</ins>
                   23286: <a href="#same-origin" title="same origin"><ins class=
                   23287: "diff-new">same</ins></a> <ins class="diff-new">as that of
                   23288: the</ins> <code><ins class="diff-new">Document</ins></code>
                   23289: <ins class="diff-new">object that owns the</ins> <code><a href=
                   23290: "#canvas"><ins class="diff-new">canvas</ins></a></code> <ins class=
                   23291: "diff-new">element.</ins></p>
                   23292: </li>
                   23293: <li>
                   23294: <p><ins class="diff-new">The element's 2D context's</ins>
                   23295: <code title="dom-context-2d-drawImage"><a href=
                   23296: "#drawimage"><ins class="diff-new">drawImage()</ins></a></code>
                   23297: <ins class="diff-new">method is called with an</ins> <code><a href=
                   23298: "#htmlcanvaselement"><ins class=
                   23299: "diff-new">HTMLCanvasElement</ins></a></code> <ins class=
                   23300: "diff-new">whose</ins> <i><ins class=
                   23301: "diff-new">origin-clean</ins></i> <ins class="diff-new">flag is
                   23302: false.</ins></p>
                   23303: </li>
                   23304: <li>
                   23305: <p><ins class="diff-new">The element's 2D context's</ins>
                   23306: <code title="dom-context-2d-fillStyle"><a href=
                   23307: "#fillstyle"><ins class="diff-new">fillStyle</ins></a></code>
                   23308: <ins class="diff-new">attribute is set to a</ins> <code><a href=
                   23309: "#canvaspattern0"><ins class=
                   23310: "diff-new">CanvasPattern</ins></a></code> <ins class=
                   23311: "diff-new">object that was created from an</ins> <code><a href=
                   23312: "#htmlimageelement"><ins class=
                   23313: "diff-new">HTMLImageElement</ins></a></code> <ins class=
                   23314: "diff-new">whose</ins> <a href="#origin0"><ins class=
                   23315: "diff-new">origin</ins></a> <ins class="diff-new">is not the</ins>
                   23316: <a href="#same-origin" title="same origin"><ins class=
                   23317: "diff-new">same</ins></a> <ins class="diff-new">as that of
                   23318: the</ins> <code><ins class="diff-new">Document</ins></code>
                   23319: <ins class="diff-new">object that owns the</ins> <code><a href=
                   23320: "#canvas"><ins class="diff-new">canvas</ins></a></code> <ins class=
                   23321: "diff-new">element.</ins></p>
                   23322: </li>
                   23323: <li>
                   23324: <p><ins class="diff-new">The element's 2D context's</ins>
                   23325: <code title="dom-context-2d-fillStyle"><a href=
                   23326: "#fillstyle"><ins class="diff-new">fillStyle</ins></a></code>
                   23327: <ins class="diff-new">attribute is set to a</ins> <code><a href=
                   23328: "#canvaspattern0"><ins class=
                   23329: "diff-new">CanvasPattern</ins></a></code> <ins class=
                   23330: "diff-new">object that was created from an</ins> <code><a href=
                   23331: "#htmlcanvaselement"><ins class=
                   23332: "diff-new">HTMLCanvasElement</ins></a></code> <ins class=
                   23333: "diff-new">whose</ins> <i><ins class=
                   23334: "diff-new">origin-clean</ins></i> <ins class="diff-new">flag is
                   23335: false.</ins></p>
                   23336: </li>
                   23337: <li>
                   23338: <p><ins class="diff-new">The element's 2D context's</ins>
                   23339: <code title="dom-context-2d-strokeStyle"><a href=
                   23340: "#strokestyle"><ins class="diff-new">strokeStyle</ins></a></code>
                   23341: <ins class="diff-new">attribute is set to a</ins> <code><a href=
                   23342: "#canvaspattern0"><ins class=
                   23343: "diff-new">CanvasPattern</ins></a></code> <ins class=
                   23344: "diff-new">object that was created from an</ins> <code><a href=
                   23345: "#htmlimageelement"><ins class=
                   23346: "diff-new">HTMLImageElement</ins></a></code> <ins class=
                   23347: "diff-new">whose</ins> <a href="#origin0"><ins class=
                   23348: "diff-new">origin</ins></a> <ins class="diff-new">is not the</ins>
                   23349: <a href="#same-origin" title="same origin"><ins class=
                   23350: "diff-new">same</ins></a> <ins class="diff-new">as that of
                   23351: the</ins> <code><ins class="diff-new">Document</ins></code>
                   23352: <ins class="diff-new">object that owns the</ins> <code><a href=
                   23353: "#canvas"><ins class="diff-new">canvas</ins></a></code> <ins class=
                   23354: "diff-new">element.</ins></p>
                   23355: </li>
                   23356: <li>
                   23357: <p><ins class="diff-new">The element's 2D context's</ins>
                   23358: <code title="dom-context-2d-strokeStyle"><a href=
                   23359: "#strokestyle"><ins class="diff-new">strokeStyle</ins></a></code>
                   23360: <ins class="diff-new">attribute is set to a</ins> <code><a href=
                   23361: "#canvaspattern0"><ins class=
                   23362: "diff-new">CanvasPattern</ins></a></code> <ins class=
                   23363: "diff-new">object that was created from an</ins> <code><a href=
                   23364: "#htmlcanvaselement"><ins class=
                   23365: "diff-new">HTMLCanvasElement</ins></a></code> <ins class=
                   23366: "diff-new">whose</ins> <i><ins class=
                   23367: "diff-new">origin-clean</ins></i> <ins class="diff-new">flag is
                   23368: false.</ins></p>
                   23369: </li>
                   23370: </ul>
                   23371: <p><ins class="diff-new">Whenever the</ins> <code title=
                   23372: "dom-canvas-toDataURL"><a href="#todataurl"><ins class=
                   23373: "diff-new">toDataURL()</ins></a></code> <ins class=
                   23374: "diff-new">method of a</ins> <code><a href="#canvas"><ins class=
                   23375: "diff-new">canvas</ins></a></code> <ins class="diff-new">element
                   23376: whose</ins> <i><ins class="diff-new">origin-clean</ins></i>
                   23377: <ins class="diff-new">flag is set to false is called, the method
                   23378: must immediately raise a security exception.</ins></p>
                   23379: <p><ins class="diff-new">Whenever the</ins> <code title=
                   23380: "dom-context-2d-getImageData"><a href="#getimagedata"><ins class=
                   23381: "diff-new">getImageData()</ins></a></code> <ins class=
                   23382: "diff-new">method of the 2D context of a</ins> <code><a href=
                   23383: "#canvas"><ins class="diff-new">canvas</ins></a></code> <ins class=
                   23384: "diff-new">element whose</ins> <i><ins class=
                   23385: "diff-new">origin-clean</ins></i> <ins class="diff-new">flag is set
                   23386: to false is called, the method must immediately raise a security
                   23387: exception.</ins></p>
                   23388: <h4 id="the-map"><span class="secno"><del class=
                   23389: "diff-old">3.14.12.</del> <ins class=
                   23390: "diff-chg">3.12.12</ins></span> The <dfn id=
                   23391: "map"><code>map</code></dfn> element</h4>
                   23392: <dl class="element">
                   23393: <dt>Categories</dt>
                   23394: <dd><del class="diff-old">Prose</del> <a href=
                   23395: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   23396: .</dd>
                   23397: <dt>Contexts in which this element may be used:</dt>
                   23398: <dd>Where <del class="diff-old">prose</del> <a href=
                   23399: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   23400: expected.</dd>
                   23401: <dt>Content model:</dt>
                   23402: <dd><del class="diff-old">Prose</del> <a href=
                   23403: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   23404: .</dd>
                   23405: <dt>Element-specific attributes:</dt>
                   23406: <dd><del class="diff-old">None, but the</del> <del class=
                   23407: "diff-old">id</del> <code title="attr-map-name"><a href=
                   23408: "#name7"><ins class="diff-chg">name</ins></a></code> <del class=
                   23409: "diff-old">global attribute has special requirements on this
                   23410: element.</del></dd>
                   23411: <dt>DOM interface:</dt>
                   23412: <dd>
                   23413: <pre class="idl">
                   23414: interface <dfn id="htmlmapelement">HTMLMapElement</dfn> : <a href=
                   23415: "#htmlelement">HTMLElement</a> {
                   23416: <ins class="diff-new">           attribute DOMString <a href=
                   23417: "#name8" title="dom-map-name">name</a>;
                   23418: </ins>
                   23419:   readonly attribute <a href=
                   23420: "#htmlcollection0">HTMLCollection</a> <a href="#areas" title=
                   23421: "dom-map-areas">areas</a>;
                   23422:   readonly attribute <a href=
                   23423: "#htmlcollection0">HTMLCollection</a> <a href="#images1" title=
                   23424: "dom-map-images">images</a>;
                   23425: };
                   23426: </pre></dd>
                   23427: </dl>
                   23428: <p>The <code><a href="#map">map</a></code> element, in <del class=
                   23429: "diff-old">conjuction</del> <ins class="diff-chg">conjunction</ins>
                   23430: with any <code><a href="#area">area</a></code> element descendants,
                   23431: defines an <a href="#image">image map</a> .</p>
                   23432: <p><del class="diff-old">There</del> <ins class=
                   23433: "diff-chg">The</ins> <dfn id="name7" title=
                   23434: "attr-map-name"><code><ins class="diff-chg">name</ins></code></dfn>
                   23435: <ins class="diff-chg">attribute gives the map a name so that it can
                   23436: be referenced. The attribute</ins> must <del class=
                   23437: "diff-old">always</del> be <del class="diff-old">an</del>
                   23438: <ins class="diff-chg">present and must have a non-empty value.
                   23439: Whitespace is significant in this attribute's value. If the</ins>
                   23440: <code title="attr-id"><a href="#id">id</a></code> attribute
                   23441: <del class="diff-old">present on map elements.</del> <ins class=
                   23442: "diff-chg">is also specified, both attributes must have the same
                   23443: value.</ins></p>
                   23444: <p>The <dfn id="areas" title=
                   23445: "dom-map-areas"><code>areas</code></dfn> attribute must return an
                   23446: <code><a href="#htmlcollection0">HTMLCollection</a></code> rooted
                   23447: at the <code><a href="#map">map</a></code> element, whose filter
                   23448: matches only <code><a href="#area">area</a></code> elements.</p>
                   23449: <p>The <dfn id="images1" title=
                   23450: "dom-map-images"><code>images</code></dfn> attribute must return an
                   23451: <code><a href="#htmlcollection0">HTMLCollection</a></code> rooted
                   23452: at the <code>Document</code> node, whose filter matches only
                   23453: <code><a href="#img">img</a></code> and <code><a href=
                   23454: "#object">object</a></code> elements that are associated with this
                   23455: <code><a href="#map">map</a></code> element according to the
                   23456: <a href="#image">image map</a> processing model.</p>
                   23457: <p><ins class="diff-new">The DOM attribute</ins> <dfn id="name8"
                   23458: title="dom-map-name"><code><ins class=
                   23459: "diff-new">name</ins></code></dfn> <ins class="diff-new">must</ins>
                   23460: <a href="#reflect"><ins class="diff-new">reflect</ins></a>
                   23461: <ins class="diff-new">the content attribute of the same
                   23462: name.</ins></p>
                   23463: <h4 id="the-area"><span class="secno"><del class=
                   23464: "diff-old">3.14.13.</del> <ins class=
                   23465: "diff-chg">3.12.13</ins></span> The <dfn id=
                   23466: "area"><code>area</code></dfn> element</h4>
                   23467: <dl class="element">
                   23468: <dt>Categories</dt>
                   23469: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   23470: <dt>Contexts in which this element may be used:</dt>
                   23471: <dd>Where <a href="#phrasing0">phrasing content</a> is expected,
                   23472: but only if there is a <code><a href="#map">map</a></code> element
                   23473: ancestor.</dd>
                   23474: <dt>Content model:</dt>
                   23475: <dd>Empty.</dd>
                   23476: <dt>Element-specific attributes:</dt>
                   23477: <dd><code title="attr-area-alt"><a href="#alt1">alt</a></code></dd>
                   23478: <dd><code title="attr-area-coords"><a href=
                   23479: "#coords">coords</a></code></dd>
                   23480: <dd><code title="attr-area-shape"><a href=
                   23481: "#shape">shape</a></code></dd>
                   23482: <dd><code title="attr-hyperlink-href"><a href=
                   23483: "#href6">href</a></code></dd>
                   23484: <dd><code title="attr-hyperlink-target"><a href=
                   23485: "#target3">target</a></code></dd>
                   23486: <dd><code title="attr-hyperlink-ping"><a href=
                   23487: "#ping">ping</a></code></dd>
                   23488: <dd><code title="attr-hyperlink-rel"><a href=
                   23489: "#rel3">rel</a></code></dd>
                   23490: <dd><code title="attr-hyperlink-media"><a href=
                   23491: "#media12">media</a></code></dd>
                   23492: <dd><code title="attr-hyperlink-hreflang"><a href=
                   23493: "#hreflang3">hreflang</a></code></dd>
                   23494: <dd><code title="attr-hyperlink-type"><a href=
                   23495: "#type17">type</a></code></dd>
                   23496: <dt>DOM interface:</dt>
                   23497: <dd>
                   23498: <pre class="idl">
                   23499: interface <dfn id=
                   23500: "htmlareaelement">HTMLAreaElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
                   23501:            attribute DOMString <a href="#alt2" title=
                   23502: "dom-area-alt">alt</a>;
                   23503:            attribute DOMString <a href="#coords0" title=
                   23504: "dom-area-coords">coords</a>;
                   23505:            attribute DOMString <a href="#shape0" title=
                   23506: "dom-area-shape">shape</a>;
                   23507:            attribute DOMString <a href="#href4" title=
                   23508: "dom-area-href">href</a>;
                   23509:            attribute DOMString <a href="#target2" title=
                   23510: "dom-area-target">target</a>;
                   23511:            attribute DOMString <a href="#ping1" title=
                   23512: "dom-area-ping">ping</a>;
                   23513:            attribute DOMString <a href="#rel2" title=
                   23514: "dom-area-rel">rel</a>;
                   23515:   readonly attribute DOMTokenList <a href="#rellist1" title=
                   23516: "dom-area-relList">relList</a>;
                   23517:            attribute DOMString <a href="#media11" title=
                   23518: "dom-area-media">media</a>;
                   23519:            attribute DOMString <a href="#hreflang2" title=
                   23520: "dom-area-hreflang">hreflang</a>;
                   23521:            attribute DOMString <a href="#type10" title=
                   23522: "dom-area-type">type</a>;
                   23523: };
                   23524: </pre></dd>
                   23525: </dl>
                   23526: <p>The <code><a href="#area">area</a></code> element represents
                   23527: either a hyperlink with some text and a corresponding area on an
                   23528: <a href="#image">image map</a> , or a dead area on an image
                   23529: map.</p>
                   23530: <p>If the <code><a href="#area">area</a></code> element has an
                   23531: <code title="attr-hyperlink-href"><a href="#href6">href</a></code>
                   23532: attribute, then the <code><a href="#area">area</a></code> element
                   23533: represents a <a href="#hyperlinks">hyperlink</a> ; the <dfn id=
                   23534: "alt1" title="attr-area-alt"><code>alt</code></dfn> attribute,
                   23535: which must then be present, specifies the text.</p>
                   23536: <p>However, if the <code><a href="#area">area</a></code> element
                   23537: has no <code title="attr-hyperlink-href"><a href=
                   23538: "#href6">href</a></code> attribute, then the area represented by
                   23539: the element cannot be selected, and the <code title=
                   23540: "attr-area-alt"><a href="#alt1">alt</a></code> attribute must be
                   23541: omitted.</p>
                   23542: <p>In both cases, the <code title="attr-area-shape"><a href=
                   23543: "#shape">shape</a></code> and <code title=
                   23544: "attr-area-coords"><a href="#coords">coords</a></code> attributes
                   23545: specify the area.</p>
                   23546: <p>The <dfn id="shape" title=
                   23547: "attr-area-shape"><code>shape</code></dfn> attribute is an <a href=
                   23548: "#enumerated">enumerated attribute</a> . The following table lists
                   23549: the keywords defined for this attribute. The states given in the
                   23550: first cell of the <del class="diff-old">the</del> rows with
                   23551: keywords give the states to which those keywords map. Some of the
                   23552: keywords are non-conforming, as noted in the last column.</p>
                   23553: <table>
                   23554: <thead>
                   23555: <tr>
                   23556: <th>State</th>
                   23557: <th>Keywords</th>
                   23558: <th>Notes</th>
                   23559: </tr>
                   23560: </thead>
                   23561: <tbody>
                   23562: <tr>
                   23563: <td rowspan="2"><dfn id="circle" title=
                   23564: "attr-area-shape-circle">Circle state</dfn></td>
                   23565: <td><code title="">circ</code></td>
                   23566: <td>Non-conforming</td>
                   23567: </tr>
                   23568: <tr>
                   23569: <td><code title="">circle</code></td>
                   23570: <td></td>
                   23571: </tr>
                   23572: <tr>
                   23573: <td><dfn id="default0" title="attr-area-shape-default">Default
                   23574: state</dfn></td>
                   23575: <td><code title="">default</code></td>
                   23576: <td></td>
                   23577: </tr>
                   23578: <tr>
                   23579: <td rowspan="2"><dfn id="polygon" title=
                   23580: "attr-area-shape-poly">Polygon state</dfn></td>
                   23581: <td><code title="">poly</code></td>
                   23582: <td></td>
                   23583: </tr>
                   23584: <tr>
                   23585: <td><code title="">polygon</code></td>
                   23586: <td>Non-conforming</td>
                   23587: </tr>
                   23588: <tr>
                   23589: <td rowspan="2"><dfn id="rectangle" title=
                   23590: "attr-area-shape-rect">Rectangle state</dfn></td>
                   23591: <td><code title="">rect</code></td>
                   23592: <td></td>
                   23593: </tr>
                   23594: <tr>
                   23595: <td><code title="">rectangle</code></td>
                   23596: <td>Non-conforming</td>
                   23597: </tr>
                   23598: </tbody>
                   23599: </table>
                   23600: <p>The attribute may be <del class="diff-old">ommited.</del>
                   23601: <ins class="diff-chg">omitted.</ins> The <i>missing value
                   23602: default</i> is the <a href="#rectangle" title=
                   23603: "attr-area-shape-rect">rectangle</a> state.</p>
                   23604: <p>The <dfn id="coords" title=
                   23605: "attr-area-coords"><code>coords</code></dfn> attribute must, if
                   23606: specified, contain a <a href="#valid4">valid list of integers</a> .
                   23607: This attribute gives the coordinates for the shape described by the
                   23608: <code title="attr-area-shape"><a href="#shape">shape</a></code>
                   23609: attribute. The processing for this attribute is described as part
                   23610: of the <a href="#image">image map</a> processing model.</p>
                   23611: <p>In the <a href="#circle" title="attr-area-shape-circle">circle
                   23612: state</a> , <code><a href="#area">area</a></code> elements must
                   23613: have a <code title="attr-area-coords"><a href=
                   23614: "#coords">coords</a></code> attribute present, with three integers,
                   23615: the last of which must be non-negative. The first integer must be
                   23616: the distance in CSS pixels from the left edge of the image to the
                   23617: center of the circle, the second integer must be the distance in
                   23618: CSS pixels from the top edge of the image to the center of the
                   23619: circle, and the third integer must be the radius of the circle,
                   23620: again in CSS pixels.</p>
                   23621: <p>In the <a href="#default0" title=
                   23622: "attr-area-shape-default">default state</a> state, <code><a href=
                   23623: "#area">area</a></code> elements must not have a <code title=
                   23624: "attr-area-coords"><a href="#coords">coords</a></code>
                   23625: attribute.</p>
                   23626: <p>In the <a href="#polygon" title="attr-area-shape-poly">polygon
                   23627: state</a> , <code><a href="#area">area</a></code> elements must
                   23628: have a <code title="attr-area-coords"><a href=
                   23629: "#coords">coords</a></code> attribute with at least six integers,
                   23630: and the number of integers must be even. Each pair of integers must
                   23631: represent a coordinate given as the distances from the left and the
                   23632: top of the image in CSS pixels respectively, and all the
                   23633: coordinates together must represent the points of the polygon, in
                   23634: order.</p>
                   23635: <p>In the <a href="#rectangle" title=
                   23636: "attr-area-shape-rect">rectangle state</a> , <code><a href=
                   23637: "#area">area</a></code> elements must have a <code title=
                   23638: "attr-area-coords"><a href="#coords">coords</a></code> attribute
                   23639: with exactly four integers, the first of which must be less than
                   23640: the third, and the second of which must be less than the fourth.
                   23641: The four points must represent, respectively, the distance from the
                   23642: left edge of the image to the top left side of the rectangle, the
                   23643: distance from the top edge to the top side, the distance from the
                   23644: left edge to the right side, and the distance from the top edge to
                   23645: the bottom side, all in CSS pixels.</p>
                   23646: <p>When user agents allow users to <a href="#following0" title=
                   23647: "following hyperlinks">follow hyperlinks</a> created using the
                   23648: <code><a href="#area">area</a></code> element, as described in the
                   23649: next section, the <code title="attr-hyperlink-href"><a href=
                   23650: "#href6">href</a></code> , <code title=
                   23651: "attr-hyperlink-target"><a href="#target3">target</a></code> and
                   23652: <code title="attr-hyperlink-ping"><a href="#ping">ping</a></code>
                   23653: attributes decide how the link is followed. The <code title=
                   23654: "attr-hyperlink-rel"><a href="#rel3">rel</a></code> , <code title=
                   23655: "attr-hyperlink-media"><a href="#media12">media</a></code> ,
                   23656: <code title="attr-hyperlink-hreflang"><a href=
                   23657: "#hreflang3">hreflang</a></code> , and <code title=
                   23658: "attr-hyperlink-type"><a href="#type17">type</a></code> attributes
                   23659: may be used to indicate to the user the likely nature of the target
                   23660: resource before the user follows the link.</p>
                   23661: <p>The <code title="attr-hyperlink-target"><a href=
                   23662: "#target3">target</a></code> , <code title=
                   23663: "attr-hyperlink-ping"><a href="#ping">ping</a></code> ,
                   23664: <code title="attr-hyperlink-rel"><a href="#rel3">rel</a></code> ,
                   23665: <code title="attr-hyperlink-media"><a href=
                   23666: "#media12">media</a></code> , <code title=
                   23667: "attr-hyperlink-hreflang"><a href="#hreflang3">hreflang</a></code>
                   23668: , and <code title="attr-hyperlink-type"><a href=
                   23669: "#type17">type</a></code> attributes must be omitted if the
                   23670: <code title="attr-hyperlink-href"><a href="#href6">href</a></code>
                   23671: attribute is not present.</p>
                   23672: <p>The <a href="#activation0">activation behavior</a> of
                   23673: <code><a href="#area">area</a></code> elements is to run the
                   23674: following steps:</p>
                   23675: <ol>
                   23676: <li>If the <code title="event-DOMActivate">DOMActivate</code> event
                   23677: in question is not <span title=
                   23678: "concept-events-trusted">trusted</span> (i.e. a <code title=
                   23679: "dom-click"><a href="#click">click()</a></code> method call was the
                   23680: reason for the event being dispatched), and the <code><a href=
                   23681: "#area">area</a></code> element's <code title=
                   23682: "attr-area-target">target</code> attribute is <span class=
                   23683: "big-issue">...</span> then raise an
                   23684: <code>INVALID_ACCESS_ERR</code> exception.</li>
                   23685: <li>Otherwise, the user agent must <a href="#following0" title=
                   23686: "following hyperlinks">follow the hyperlink</a> defined by the
                   23687: <code><a href="#area">area</a></code> element, if any.</li>
                   23688: </ol>
                   23689: <p class="note">One way that a user agent can enable users to
                   23690: follow hyperlinks is by allowing <code><a href=
                   23691: "#area">area</a></code> elements to be clicked, or focussed and
                   23692: activated by the keyboard. This <span title=
                   23693: "interactive elements">will cause</span> the aforementioned
                   23694: <a href="#activation0">activation behavior</a> to be invoked.</p>
                   23695: <p>The DOM attributes <dfn id="alt2" title=
                   23696: "dom-area-alt"><code>alt</code></dfn> , <dfn id="coords0" title=
                   23697: "dom-area-coords"><code>coords</code></dfn> , <del class=
                   23698: "diff-old">shape ,</del> <dfn id="href4" title=
                   23699: "dom-area-href"><code>href</code></dfn> , <dfn id="target2" title=
                   23700: "dom-area-target"><code>target</code></dfn> , <dfn id="ping1"
                   23701: title="dom-area-ping"><code>ping</code></dfn> , <dfn id="rel2"
                   23702: title="dom-area-rel"><code>rel</code></dfn> , <dfn id="media11"
                   23703: title="dom-area-media"><code>media</code></dfn> , <dfn id=
                   23704: "hreflang2" title="dom-area-hreflang"><code>hreflang</code></dfn> ,
                   23705: and <dfn id="type10" title="dom-area-type"><code>type</code></dfn>
                   23706: , each must <a href="#reflect">reflect</a> the respective content
                   23707: attributes of the same name.</p>
                   23708: <p>The DOM attribute <dfn id="shape0" title=
                   23709: "dom-area-shape"><code><ins class=
                   23710: "diff-new">shape</ins></code></dfn> <ins class=
                   23711: "diff-new">must</ins> <a href="#reflect"><ins class=
                   23712: "diff-new">reflect</ins></a> <ins class="diff-new">the</ins>
                   23713: <code title="attr-area-shape"><a href="#shape"><ins class=
                   23714: "diff-new">shape</ins></a></code> <ins class="diff-new">content
                   23715: attribute,</ins> <a href="#limited0"><ins class="diff-new">limited
                   23716: to only known values</ins></a> .</p>
                   23717: <p><ins class="diff-new">The DOM attribute</ins> <dfn id="rellist1"
                   23718: title="dom-area-rellist"><code>relList</code></dfn> must <a href=
                   23719: "#reflect">reflect</a> the <code title=
                   23720: "attr-hyperlink-rel"><a href="#rel3">rel</a></code> content
                   23721: attribute.</p>
                   23722: <h4 id="image-maps"><span class="secno"><del class=
                   23723: "diff-old">3.14.14.</del> <ins class=
                   23724: "diff-chg">3.12.14</ins></span> Image maps</h4>
                   23725: <p>An <dfn id="image">image map</dfn> allows geometric areas on an
                   23726: image to be associated with <a href="#hyperlinks" title=
                   23727: "hyperlink">hyperlinks</a> .</p>
                   23728: <p>An image, in the form of an <code><a href="#img">img</a></code>
                   23729: element or an <code><a href="#object">object</a></code> element
                   23730: representing an image, may be associated with an image map (in the
                   23731: form of a <code><a href="#map">map</a></code> element) by
                   23732: specifying a <dfn id="usemap1" title=
                   23733: "attr-hyperlink-usemap"><code>usemap</code></dfn> attribute on the
                   23734: <code><a href="#img">img</a></code> or <code><a href=
                   23735: "#object">object</a></code> element. The <code title=
                   23736: "attr-area-usemap">usemap</code> attribute, if specified, must be a
                   23737: <a href="#valid7">valid <del class="diff-old">hashed ID</del>
                   23738: <ins class="diff-chg">hash-name</ins> reference</a> to a
                   23739: <code><a href="#map">map</a></code> element.</p>
                   23740: <p>If an <code><a href="#img">img</a></code> element or an
                   23741: <code><a href="#object">object</a></code> element representing an
                   23742: image has a <code title="attr-area-usemap">usemap</code> attribute
                   23743: specified, user agents must process it as follows:</p>
                   23744: <ol>
                   23745: <li>
                   23746: <p>First, <a href="#rules5">rules for parsing a <del class=
                   23747: "diff-old">hashed ID</del> <ins class="diff-chg">hash-name</ins>
                   23748: reference</a> to a <code><a href="#map">map</a></code> element must
                   23749: be followed. This will return either an element (the <var title=
                   23750: "">map</var> ) or null.</p>
                   23751: </li>
                   23752: <li>
                   23753: <p>If that returned null, then abort these steps. The image is not
                   23754: associated with an image map after all.</p>
                   23755: </li>
                   23756: <li>
                   23757: <p>Otherwise, the user agent must collect all the <code><a href=
                   23758: "#area">area</a></code> elements that are descendants of the
                   23759: <var title="">map</var> . Let those be the <var title=
                   23760: "">areas</var> .</p>
                   23761: </li>
                   23762: </ol>
                   23763: <p>Having obtained the list of <code><a href=
                   23764: "#area">area</a></code> elements that form the image map (the
                   23765: <var title="">areas</var> ), interactive user agents must process
                   23766: the list in one of two ways.</p>
                   23767: <p>If the user agent intends to show the text that the
                   23768: <code><a href="#img">img</a></code> element represents, then it
                   23769: must use the following steps.</p>
                   23770: <p class="note">In user agents that do not support images, or that
                   23771: have images disabled, <code><a href="#object">object</a></code>
                   23772: elements cannot represent images, and thus this section never
                   23773: applies (the <a href="#fallback">fallback content</a> is shown
                   23774: instead). The following steps therefore only apply to
                   23775: <code><a href="#img">img</a></code> elements.</p>
                   23776: <ol>
                   23777: <li>
                   23778: <p>Remove all the <code><a href="#area">area</a></code> elements in
                   23779: <var title="">areas</var> that have no <code title=
                   23780: "attr-hyperlink-href"><a href="#href6">href</a></code>
                   23781: attribute.</p>
                   23782: </li>
                   23783: <li>
                   23784: <p>Remove all the <code><a href="#area">area</a></code> elements in
                   23785: <var title="">areas</var> that have no <code title=
                   23786: "attr-area-alt"><a href="#alt1">alt</a></code> attribute, or whose
                   23787: <code title="attr-area-alt"><a href="#alt1">alt</a></code>
                   23788: attribute's value is the empty string, <em>if</em> there is another
                   23789: <code><a href="#area">area</a></code> element in <var title=
                   23790: "">areas</var> with the same value in the <code title=
                   23791: "attr-hyperlink-href"><a href="#href6">href</a></code> attribute
                   23792: and with a non-empty <code title="attr-area-alt"><a href=
                   23793: "#alt1">alt</a></code> attribute.</p>
                   23794: </li>
                   23795: <li>
                   23796: <p>Each remaining <code><a href="#area">area</a></code> element in
                   23797: <var title="">areas</var> represents a <a href=
                   23798: "#hyperlinks">hyperlink</a> . Those hyperlinks should all be made
                   23799: available to the user in a manner associated with the text of the
                   23800: <code><a href="#img">img</a> <del class="diff-old">or input
                   23801: element.</del></code> .</p>
                   23802: <p>In this context, user agents may represent <code><a href=
                   23803: "#area">area</a></code> and <code><a href="#img">img</a></code>
                   23804: elements with no specified <code title="">alt</code> attributes, or
                   23805: whose <code title="">alt</code> attributes are the empty string or
                   23806: some other non-visible text, in a user-agent-defined fashion
                   23807: intended to indicate the lack of suitable author-provided text.</p>
                   23808: </li>
                   23809: </ol>
                   23810: <p>If the user agent intends to show the image and allow
                   23811: interaction with the image to select hyperlinks, then the image
                   23812: must be associated with a set of layered shapes, taken from the
                   23813: <code><a href="#area">area</a></code> elements in <var title=
                   23814: "">areas</var> , in reverse tree order (so the last specified
                   23815: <code><a href="#area">area</a></code> element in the <var title=
                   23816: "">map</var> is the bottom-most shape, and the first element in the
                   23817: <var title="">map</var> , in tree order, is the top-most
                   23818: shape).</p>
                   23819: <p>Each <code><a href="#area">area</a></code> element in
                   23820: <var title="">areas</var> must be processed as follows to obtain a
                   23821: shape to layer onto the image:</p>
                   23822: <ol>
                   23823: <li>
                   23824: <p>Find the state that the element's <code title=
                   23825: "attr-area-shape"><a href="#shape">shape</a></code> attribute
                   23826: represents.</p>
                   23827: </li>
                   23828: <li>
                   23829: <p>Use the <a href="#rules3">rules for parsing a list of
                   23830: integers</a> to parse the element's <code title=
                   23831: "attr-area-coords"><a href="#coords">coords</a></code> attribute,
                   23832: if it is present, and let the result be the <var title=
                   23833: "">coords</var> list. If the attribute is absent, let the
                   23834: <var title="">coords</var> list be the empty list.</p>
                   23835: </li>
                   23836: <li>
                   23837: <p>If the number of items in the <var title="">coords</var> list is
                   23838: less than the minimum number given for the <code><a href=
                   23839: "#area">area</a></code> element's current state, as per the
                   23840: following table, then the shape is empty; abort these steps.</p>
                   23841: <table>
                   23842: <thead>
                   23843: <tr>
                   23844: <th>State</th>
                   23845: <th>Minimum number of items</th>
                   23846: </tr>
                   23847: </thead>
                   23848: <tbody>
                   23849: <tr>
                   23850: <td><a href="#circle" title="attr-area-shape-circle">Circle
                   23851: state</a></td>
                   23852: <td>3</td>
                   23853: </tr>
                   23854: <tr>
                   23855: <td><a href="#default0" title="attr-area-shape-default">Default
                   23856: state</a></td>
                   23857: <td>0</td>
                   23858: </tr>
                   23859: <tr>
                   23860: <td><a href="#polygon" title="attr-area-shape-poly">Polygon
                   23861: state</a></td>
                   23862: <td>6</td>
                   23863: </tr>
                   23864: <tr>
                   23865: <td><a href="#rectangle" title="attr-area-shape-rect">Rectangle
                   23866: state</a></td>
                   23867: <td>4</td>
                   23868: </tr>
                   23869: </tbody>
                   23870: </table>
                   23871: </li>
                   23872: <li>
                   23873: <p>Check for excess items in the <var title="">coords</var> list as
                   23874: per the entry in the following list corresponding to the
                   23875: <code title="attr-area-shape"><a href="#shape">shape</a></code>
                   23876: attribute's state:</p>
                   23877: <dl class="switch">
                   23878: <dt><a href="#circle" title="attr-area-shape-circle">Circle
                   23879: state</a></dt>
                   23880: <dd>Drop any items in the list beyond the third.</dd>
                   23881: <dt><a href="#default0" title="attr-area-shape-default">Default
                   23882: state</a></dt>
                   23883: <dd>Drop all items in the list.</dd>
                   23884: <dt><a href="#polygon" title="attr-area-shape-poly">Polygon
                   23885: state</a></dt>
                   23886: <dd>Drop the last item if there's an odd number of items.</dd>
                   23887: <dt><a href="#rectangle" title="attr-area-shape-rect">Rectangle
                   23888: state</a></dt>
                   23889: <dd>Drop any items in the list beyond the fourth.</dd>
                   23890: </dl>
                   23891: </li>
                   23892: <li>
                   23893: <p>If the <code title="attr-area-shape"><a href=
                   23894: "#shape">shape</a></code> attribute represents the <a href=
                   23895: "#rectangle" title="attr-area-shape-rect">rectangle state</a> , and
                   23896: the first number in the list is numerically less than the third
                   23897: number in the list, then swap those two numbers around.</p>
                   23898: </li>
                   23899: <li>
                   23900: <p>If the <code title="attr-area-shape"><a href=
                   23901: "#shape">shape</a></code> attribute represents the <a href=
                   23902: "#rectangle" title="attr-area-shape-rect">rectangle state</a> , and
                   23903: the second number in the list is numerically less than the fourth
                   23904: number in the list, then swap those two numbers around.</p>
                   23905: </li>
                   23906: <li>
                   23907: <p>If the <code title="attr-area-shape"><a href=
                   23908: "#shape">shape</a></code> attribute represents the <a href=
                   23909: "#circle" title="attr-area-shape-circle">circle state</a> , and the
                   23910: third number in the list is less than or equal to zero, then the
                   23911: shape is empty; abort these steps.</p>
                   23912: </li>
                   23913: <li>
                   23914: <p>Now, the shape represented by the element is the one described
                   23915: for the entry in the list below corresponding to the state of the
                   23916: <code title="attr-area-shape"><a href="#shape">shape</a></code>
                   23917: attribute:</p>
                   23918: <dl class="switch">
                   23919: <dt><a href="#circle" title="attr-area-shape-circle">Circle
                   23920: state</a></dt>
                   23921: <dd>
                   23922: <p>Let <var title="">x</var> be the first number in <var title=
                   23923: "">coords</var> , <var title="">y</var> be the second number, and
                   23924: <var title="">r</var> be the third number.</p>
                   23925: <p>The shape is a circle whose center is <var title="">x</var> CSS
                   23926: pixels from the left edge of the image and <var title="">x</var>
                   23927: CSS pixels from the top edge of the image, and whose radius is
                   23928: <var title="">r</var> pixels.</p>
                   23929: </dd>
                   23930: <dt><a href="#default0" title="attr-area-shape-default">Default
                   23931: state</a></dt>
                   23932: <dd>
                   23933: <p>The shape is a rectangle that exactly covers the entire
                   23934: image.</p>
                   23935: </dd>
                   23936: <dt><a href="#polygon" title="attr-area-shape-poly">Polygon
                   23937: state</a></dt>
                   23938: <dd>
                   23939: <p>Let <var title="">x <sub title=""><var title=
                   23940: "">i</var></sub></var> be the <span>(2 <var title="">i</var>
                   23941: )</span> th entry in <var title="">coords</var> , and <var title=
                   23942: "">y <sub title=""><var title="">i</var></sub></var> be the
                   23943: <span>(2 <var title="">i</var> +1)</span> th entry in <var title=
                   23944: "">coords</var> (the first entry in <var title="">coords</var>
                   23945: being the one with index 0).</p>
                   23946: <p>Let <var title="">the coordinates</var> be ( <var title="">x
                   23947: <sub title=""><var title="">i</var></sub></var> , <var title="">y
                   23948: <sub title=""><var title="">i</var></sub></var> ), interpreted in
                   23949: CSS pixels measured from the top left of the image, for all integer
                   23950: values of <var title="">i</var> from 0 to <span>( <var title=
                   23951: "">N</var> /2)-1</span> , where <var title="">N</var> is the number
                   23952: of items in <var title="">coords</var> .</p>
                   23953: <p>The shape is a polygon whose vertices are given by <var title=
                   23954: "">the coordinates</var> , and whose interior is established using
                   23955: the even-odd rule. <a href="#references">[GRAPHICS]</a></p>
                   23956: </dd>
                   23957: <dt><a href="#rectangle" title="attr-area-shape-rect">Rectangle
                   23958: state</a></dt>
                   23959: <dd>
                   23960: <p>Let <var title="">x1</var> be the first number in <var title=
                   23961: "">coords</var> , <var title="">y1</var> be the second number,
                   23962: <var title="">x2</var> be the third number, and <var title=
                   23963: "">y2</var> be the fourth number.</p>
                   23964: <p>The shape is a rectangle whose top-left corner is given by the
                   23965: coordinate ( <var title="">x1</var> , <var title="">y1</var> ) and
                   23966: whose bottom right corner is given by the coordinate ( <var title=
                   23967: "">x2</var> , <var title="">y2</var> ), those coordinates being
                   23968: interpreted as CSS pixels from the top left corner of the
                   23969: image.</p>
                   23970: </dd>
                   23971: </dl>
                   23972: <p>For historical reasons, the coordinates must be interpreted
                   23973: relative to the <em>displayed</em> image, even if it stretched
                   23974: using CSS or the image element's <code title="">width</code> and
                   23975: <code title="">height</code> attributes.</p>
                   23976: </li>
                   23977: </ol>
                   23978: <p>Mouse clicks on an image associated with a set of layered shapes
                   23979: per the above algorithm must be dispatched to the top-most shape
                   23980: covering the point that the pointing device indicated (if any), and
                   23981: then, must be dispatched again (with a new <code>Event</code>
                   23982: object) to the image element itself. User agents may also allow
                   23983: individual <code><a href="#area">area</a></code> elements
                   23984: representing <a href="#hyperlinks" title="hyperlink">hyperlinks</a>
                   23985: to be selected and activated (e.g. using a keyboard); events from
                   23986: this are not also propagated to the image.</p>
                   23987: <p class="note">Because a <code><a href="#map">map</a></code>
                   23988: element (and its <code><a href="#area">area</a></code> elements)
                   23989: can be associated with multiple <code><a href="#img">img</a></code>
                   23990: and <code><a href="#object">object</a></code> elements, it is
                   23991: possible for an <code><a href="#area">area</a></code> element to
                   23992: correspond to multiple focusable areas of the document.</p>
                   23993: <p>Image maps are <em><a href="#live">live</a></em> ; if the DOM is
                   23994: mutated, then the user agent must act as if it had rerun the
                   23995: algorithms for image maps.</p>
                   23996: <h4 id="mathml"><span class="secno"><ins class=
                   23997: "diff-new">3.12.15</ins></span> <ins class=
                   23998: "diff-new">MathML</ins></h4>
                   23999: <p><ins class="diff-new">The</ins> <code><ins class=
                   24000: "diff-new">math</ins></code> <ins class="diff-new">element from
                   24001: the</ins> <a href="#mathml0"><ins class="diff-new">MathML
                   24002: namespace</ins></a> <ins class="diff-new">falls into the</ins>
                   24003: <a href="#embedded1"><ins class="diff-new">embedded
                   24004: content</ins></a> <ins class="diff-new">category for the purposes
                   24005: of the content models in this specification.</ins></p>
                   24006: <p><ins class="diff-new">User agents must handle text other
                   24007: than</ins> <a href="#inter-element"><ins class=
                   24008: "diff-new">inter-element whitespace</ins></a> <ins class=
                   24009: "diff-new">found in MathML elements whose content models do not
                   24010: allow raw text by pretending for the purposes of MathML content
                   24011: models, layout, and rendering that that text is actually wrapped in
                   24012: an</ins> <code title=""><ins class="diff-new">mtext</ins></code>
                   24013: <ins class="diff-new">element in the</ins> <a href=
                   24014: "#mathml0"><ins class="diff-new">MathML namespace</ins></a>
                   24015: .<ins class="diff-new">(Such text is not, however,
                   24016: conforming.)</ins></p>
                   24017: <p><ins class="diff-new">User agents must act as if any MathML
                   24018: element whose contents does not match the element's content model
                   24019: was replaced, for the purposes of MathML layout and rendering, by
                   24020: an</ins> <code title=""><ins class="diff-new">merror</ins></code>
                   24021: <ins class="diff-new">element in the</ins> <a href=
                   24022: "#mathml0"><ins class="diff-new">MathML namespace</ins></a>
                   24023: <ins class="diff-new">containing some appropriate error
                   24024: message.</ins></p>
                   24025: <p><ins class="diff-new">To enable authors to use MathML tools that
                   24026: only accept MathML in its XML form, interactive HTML user agents
                   24027: are encouraged to provide a way to export any MathML fragment as a
                   24028: namespace-well-formed XML fragment.</ins></p>
                   24029: <h4 id="svg"><span class="secno"><ins class=
                   24030: "diff-new">3.12.16</ins></span> <ins class=
                   24031: "diff-new">SVG</ins></h4>
                   24032: <p><ins class="diff-new">The</ins> <code><ins class=
                   24033: "diff-new">svg</ins></code> <ins class="diff-new">element from
                   24034: the</ins> <a href="#svg-namespace"><ins class="diff-new">SVG
                   24035: namespace</ins></a> <ins class="diff-new">falls into the</ins>
                   24036: <a href="#embedded1"><ins class="diff-new">embedded
                   24037: content</ins></a> <ins class="diff-new">category for the purposes
                   24038: of the content models in this specification.</ins></p>
                   24039: <p><ins class="diff-new">To enable authors to use SVG tools that
                   24040: only accept SVG in its XML form, interactive HTML user agents are
                   24041: encouraged to provide a way to export any SVG fragment as a
                   24042: namespace-well-formed XML fragment.</ins></p>
                   24043: <h4 id="dimension"><span class="secno"><del class=
                   24044: "diff-old">3.14.15.</del> <ins class=
                   24045: "diff-chg">3.12.17</ins></span> <dfn id="dimension0">Dimension
                   24046: attributes</dfn></h4>
                   24047: <p>The <dfn id="width4" title=
                   24048: "attr-dim-width"><code>width</code></dfn> and <dfn id="height3"
                   24049: title="attr-dim-height"><code>height</code></dfn> attributes on
                   24050: <code><a href="#img">img</a></code> , <code><a href=
                   24051: "#embed">embed</a></code> , <code><a href=
                   24052: "#object">object</a></code> , and <code><a href=
                   24053: "#video1">video</a></code> elements may be specified to give the
                   24054: dimensions of the visual content of the element (the width and
                   24055: height respectively, relative to the nominal direction of the
                   24056: output medium), in CSS pixels. The attributes, if specified, must
                   24057: have values that are <a href="#valid3">valid positive non-zero
                   24058: integers</a> .</p>
                   24059: <p>The specified dimensions given may differ from the dimensions
                   24060: specified in the resource itself, since the resource may have a
                   24061: resolution that differs from the CSS pixel resolution. (On screens,
                   24062: CSS pixels have a resolution of 96ppi, but in general the CSS pixel
                   24063: resolution depends on the reading distance.) If both attributes are
                   24064: specified, then the ratio of the specified width to the specified
                   24065: height must be the same as the ratio of the logical width to the
                   24066: logical height in the resource. The two attributes must be omitted
                   24067: if the resource in question does not have both a logical width and
                   24068: a logical height.</p>
                   24069: <p>To parse the attributes, user agents must use the <a href=
                   24070: "#rules2">rules for parsing dimension values</a> . This will return
                   24071: either an integer length, a percentage value, or nothing. The user
                   24072: agent requirements for processing the values obtained from parsing
                   24073: these attributes are described <a href="#sizing" title=
                   24074: "sizing of embedded content">in the rendering section</a> . If one
                   24075: of these attributes, when parsing, returns no value, it must be
                   24076: treated, for the purposes of those requirements, as if it was not
                   24077: specified.</p>
                   24078: <p>The <dfn id="width5" title=
                   24079: "dom-dim-width"><code>width</code></dfn> and <dfn id="height4"
                   24080: title="dom-dim-height"><code>height</code></dfn> DOM attributes on
                   24081: the <code><a href="#embed">embed</a></code> , <code><a href=
                   24082: "#object">object</a></code> , and <code><a href=
                   24083: "#video1">video</a></code> elements must <a href=
                   24084: "#reflect">reflect</a> the content attributes of the same name.</p>
                   24085: <h3 id="tabular"><span class="secno"><del class=
                   24086: "diff-old">3.15.</del> <ins class="diff-chg">3.13</ins></span>
                   24087: Tabular data</h3>
                   24088: <h4 id="table-intro"><span class="secno"><ins class=
                   24089: "diff-new">3.13.1</ins></span> <ins class=
                   24090: "diff-new">Introduction</ins></h4>
                   24091: <p><em><ins class="diff-new">This section is
                   24092: non-normative.</ins></em></p>
                   24093: <p class="big-issue">...examples,<ins class="diff-new">how to write
                   24094: tables accessibly, a brief mention of the table model,
                   24095: etc...</ins></p>
                   24096: <h4 id="the-table"><span class="secno"><del class=
                   24097: "diff-old">3.15.1.</del> <ins class="diff-chg">3.13.2</ins></span>
                   24098: The <dfn id="table"><code>table</code></dfn> element</h4>
                   24099: <dl class="element">
                   24100: <dt>Categories</dt>
                   24101: <dd><del class="diff-old">Prose</del> <a href=
                   24102: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   24103: .</dd>
                   24104: <dt>Contexts in which this element may be used:</dt>
                   24105: <dd>Where <del class="diff-old">prose</del> <a href=
                   24106: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   24107: expected.</dd>
                   24108: <dt>Content model:</dt>
                   24109: <dd>In this order: optionally a <code><a href=
                   24110: "#caption0">caption</a></code> element, followed by either zero or
                   24111: more <code><a href="#colgroup">colgroup</a></code> elements,
                   24112: followed optionally by a <code><a href="#thead0">thead</a></code>
                   24113: element, followed optionally by a <code><a href=
                   24114: "#tfoot0">tfoot</a></code> element, followed by either zero or more
                   24115: <code><a href="#tbody">tbody</a></code> elements <em>or</em> one or
                   24116: more <code><a href="#tr">tr</a></code> elements, followed
                   24117: optionally by a <code><a href="#tfoot0">tfoot</a></code> element
                   24118: (but there can only be one <code><a href="#tfoot0">tfoot</a></code>
                   24119: element child in total).</dd>
                   24120: <dt>Element-specific attributes:</dt>
                   24121: <dd>None.</dd>
                   24122: <dt>DOM interface:</dt>
                   24123: <dd>
                   24124: <pre class="idl">
                   24125: interface <dfn id=
                   24126: "htmltableelement">HTMLTableElement</dfn> : <a href=
                   24127: "#htmlelement">HTMLElement</a> {
                   24128:            attribute <span>HTMLTableCaptionElement</span> <a href=
                   24129: "#caption" title="dom-table-caption">caption</a>;
                   24130:   HTMLElement <a href="#createcaption" title=
                   24131: "dom-table-createCaption">createCaption</a>();
                   24132:   void <a href="#deletecaption" title=
                   24133: "dom-table-deleteCaption">deleteCaption</a>();
                   24134:            attribute <a href=
                   24135: "#htmltablesectionelement">HTMLTableSectionElement</a> <a href=
                   24136: "#thead" title="dom-table-tHead">tHead</a>;
                   24137:   HTMLElement <a href="#createthead" title=
                   24138: "dom-table-createTHead">createTHead</a>();
                   24139:   void <a href="#deletethead" title=
                   24140: "dom-table-deleteTHead">deleteTHead</a>();
                   24141:            attribute <a href=
                   24142: "#htmltablesectionelement">HTMLTableSectionElement</a> <a href=
                   24143: "#tfoot" title="dom-table-tFoot">tFoot</a>;
                   24144:   HTMLElement <a href="#createtfoot" title=
                   24145: "dom-table-createTFoot">createTFoot</a>();
                   24146:   void <a href="#deletetfoot" title=
                   24147: "dom-table-deleteTFoot">deleteTFoot</a>();
                   24148:   readonly attribute <a href=
                   24149: "#htmlcollection0">HTMLCollection</a> <a href="#tbodies" title=
                   24150: "dom-table-tBodies">tBodies</a>;
                   24151: <ins class="diff-new">  HTMLElement <a href="#createtbody" title=
                   24152: "dom-table-createTBody">createTBody</a>();
                   24153: </ins>
                   24154:   readonly attribute <a href=
                   24155: "#htmlcollection0">HTMLCollection</a> <a href="#rows" title=
                   24156: "dom-table-rows">rows</a>;
                   24157:   HTMLElement <a href="#insertrow" title=
                   24158: "dom-table-insertRow">insertRow</a>(in long index);
                   24159:   void <a href="#deleterow" title=
                   24160: "dom-table-deleteRow">deleteRow</a>(in long index);
                   24161: };
                   24162: </pre></dd>
                   24163: </dl>
                   24164: <p>The <code><a href="#table">table</a></code> element represents
                   24165: data with more than one dimension (a <a href="#table1" title=
                   24166: "concept-table">table</a> ).</p>
                   24167: <p class="big-issue">we need some editorial text on how layout
                   24168: tables are bad practice and non-conforming</p>
                   24169: <p>The children of a <code><a href="#table">table</a></code>
                   24170: element must be, in order:</p>
                   24171: <ol>
                   24172: <li>
                   24173: <p>Zero or one <code><a href="#caption0">caption</a></code>
                   24174: elements.</p>
                   24175: </li>
                   24176: <li>
                   24177: <p>Zero or more <code><a href="#colgroup">colgroup</a></code>
                   24178: elements.</p>
                   24179: </li>
                   24180: <li>
                   24181: <p>Zero or one <code><a href="#thead0">thead</a></code>
                   24182: elements.</p>
                   24183: </li>
                   24184: <li>
                   24185: <p>Zero or one <code><a href="#tfoot0">tfoot</a></code> elements,
                   24186: if the last element in the table is not a <code><a href=
                   24187: "#tfoot0">tfoot</a></code> element.</p>
                   24188: </li>
                   24189: <li>
                   24190: <p>Either:</p>
                   24191: <ul>
                   24192: <li>Zero or more <code><a href="#tbody">tbody</a></code> elements,
                   24193: or</li>
                   24194: <li>One or more <code><a href="#tr">tr</a></code> elements.
                   24195: <strong class="note"><ins class="diff-new">(Only expressible in
                   24196: the</ins> <span title=""><ins class="diff-new">XML
                   24197: serialization</ins></span> .)</strong></li>
                   24198: </ul>
                   24199: </li>
                   24200: <li>
                   24201: <p>Zero or one <code><a href="#tfoot0">tfoot</a></code> element, if
                   24202: there are no other <code><a href="#tfoot0">tfoot</a></code>
                   24203: elements in the table.</p>
                   24204: </li>
                   24205: </ol>
                   24206: <p>The <code><a href="#table">table</a></code> element takes part
                   24207: in the <a href="#table0">table model</a> .</p>
                   24208: <p>The <dfn id="caption" title=
                   24209: "dom-table-caption"><code>caption</code></dfn> DOM attribute must
                   24210: return, on getting, the first <code><a href=
                   24211: "#caption0">caption</a></code> element child of the <code><a href=
                   24212: "#table">table</a></code> <del class="diff-old">element.</del>
                   24213: <ins class="diff-chg">element, if any, or null otherwise.</ins> On
                   24214: setting, if the new value is a <code><a href=
                   24215: "#caption0">caption</a></code> element, the first <code><a href=
                   24216: "#caption0">caption</a></code> element child of the <code><a href=
                   24217: "#table">table</a></code> element, if any, must be removed, and the
                   24218: new value must be inserted as the first node of the <code><a href=
                   24219: "#table">table</a></code> element. If the new value is not a
                   24220: <code><a href="#caption0">caption</a></code> element, then a
                   24221: <code>HIERARCHY_REQUEST_ERR</code> DOM exception must be raised
                   24222: instead.</p>
                   24223: <p>The <dfn id="createcaption" title=
                   24224: "dom-table-createCaption"><code>createCaption()</code></dfn> method
                   24225: must return the first <code><a href="#caption0">caption</a></code>
                   24226: element child of the <code><a href="#table">table</a></code>
                   24227: element, if any; otherwise a new <code><a href=
                   24228: "#caption0">caption</a></code> element must be created, inserted as
                   24229: the first node of the <code><a href="#table">table</a></code>
                   24230: element, and then returned.</p>
                   24231: <p>The <dfn id="deletecaption" title=
                   24232: "dom-table-deleteCaption"><code>deleteCaption()</code></dfn> method
                   24233: must remove the first <code><a href="#caption0">caption</a></code>
                   24234: element child of the <code><a href="#table">table</a></code>
                   24235: element, if any.</p>
                   24236: <p>The <dfn id="thead" title=
                   24237: "dom-table-tHead"><code>tHead</code></dfn> DOM attribute must
                   24238: return, on getting, the first <code><a href=
                   24239: "#thead0">thead</a></code> element child of the <code><a href=
                   24240: "#table">table</a></code> <del class="diff-old">element.</del>
                   24241: <ins class="diff-chg">element, if any, or null otherwise.</ins> On
                   24242: setting, if the new value is a <code><a href=
                   24243: "#thead0">thead</a></code> element, the first <code><a href=
                   24244: "#thead0">thead</a></code> element child of the <code><a href=
                   24245: "#table">table</a></code> element, if any, must be removed, and the
                   24246: new value must be inserted immediately before the first element in
                   24247: the <code><a href="#table">table</a></code> element that is neither
                   24248: a <code><a href="#caption0">caption</a></code> element nor a
                   24249: <code><a href="#colgroup">colgroup</a></code> element, if any, or
                   24250: at the end of the table otherwise. If the new value is not a
                   24251: <code><a href="#thead0">thead</a></code> element, then a
                   24252: <code>HIERARCHY_REQUEST_ERR</code> DOM exception must be raised
                   24253: instead.</p>
                   24254: <p>The <dfn id="createthead" title=
                   24255: "dom-table-createTHead"><code>createTHead()</code></dfn> method
                   24256: must return the first <code><a href="#thead0">thead</a></code>
                   24257: element child of the <code><a href="#table">table</a></code>
                   24258: element, if any; otherwise a new <code><a href=
                   24259: "#thead0">thead</a></code> element must be created and inserted
                   24260: immediately before the first element in the <code><a href=
                   24261: "#table">table</a></code> element that is neither a <code><a href=
                   24262: "#caption0">caption</a></code> element nor a <code><a href=
                   24263: "#colgroup">colgroup</a></code> element, if any, or at the end of
                   24264: the table otherwise, and then that new element must be
                   24265: returned.</p>
                   24266: <p>The <dfn id="deletethead" title=
                   24267: "dom-table-deleteTHead"><code>deleteTHead()</code></dfn> method
                   24268: must remove the first <code><a href="#thead0">thead</a></code>
                   24269: element child of the <code><a href="#table">table</a></code>
                   24270: element, if any.</p>
                   24271: <p>The <dfn id="tfoot" title=
                   24272: "dom-table-tFoot"><code>tFoot</code></dfn> DOM attribute must
                   24273: return, on getting, the first <code><a href=
                   24274: "#tfoot0">tfoot</a></code> element child of the <code><a href=
                   24275: "#table">table</a></code> <del class="diff-old">element.</del>
                   24276: <ins class="diff-chg">element, if any, or null otherwise.</ins> On
                   24277: setting, if the new value is a <code><a href=
                   24278: "#tfoot0">tfoot</a></code> element, the first <code><a href=
                   24279: "#tfoot0">tfoot</a></code> element child of the <code><a href=
                   24280: "#table">table</a></code> element, if any, must be removed, and the
                   24281: new value must be inserted immediately before the first element in
                   24282: the <code><a href="#table">table</a></code> element that is neither
                   24283: a <code><a href="#caption0">caption</a></code> element, a
                   24284: <code><a href="#colgroup">colgroup</a></code> element, nor a
                   24285: <code><a href="#thead0">thead</a></code> element, if any, or at the
                   24286: end of the table if there are no such elements. If the new value is
                   24287: not a <code><a href="#tfoot0">tfoot</a></code> element, then a
                   24288: <code>HIERARCHY_REQUEST_ERR</code> DOM exception must be raised
                   24289: instead.</p>
                   24290: <p>The <dfn id="createtfoot" title=
                   24291: "dom-table-createTFoot"><code>createTFoot()</code></dfn> method
                   24292: must return the first <code><a href="#tfoot0">tfoot</a></code>
                   24293: element child of the <code><a href="#table">table</a></code>
                   24294: element, if any; otherwise a new <code><a href=
                   24295: "#tfoot0">tfoot</a></code> element must be created and inserted
                   24296: immediately before the first element in the <code><a href=
                   24297: "#table">table</a></code> element that is neither a <code><a href=
                   24298: "#caption0">caption</a></code> element, a <code><a href=
                   24299: "#colgroup">colgroup</a></code> element, nor a <code><a href=
                   24300: "#thead0">thead</a></code> element, if any, or at the end of the
                   24301: table if there are no such elements, and then that new element must
                   24302: be returned.</p>
                   24303: <p>The <dfn id="deletetfoot" title=
                   24304: "dom-table-deleteTFoot"><code>deleteTFoot()</code></dfn> method
                   24305: must remove the first <code><a href="#tfoot0">tfoot</a></code>
                   24306: element child of the <code><a href="#table">table</a></code>
                   24307: element, if any.</p>
                   24308: <p>The <dfn id="tbodies" title=
                   24309: "dom-table-tBodies"><code>tBodies</code></dfn> attribute must
                   24310: return an <code><a href=
                   24311: "#htmlcollection0">HTMLCollection</a></code> rooted at the
                   24312: <code><a href="#table">table</a></code> node, whose filter matches
                   24313: only <code><a href="#tbody">tbody</a></code> elements that are
                   24314: children of the <code><a href="#table">table</a></code>
                   24315: element.</p>
                   24316: <p>The <dfn id="createtbody" title=
                   24317: "dom-table-createTBody"><code><ins class=
                   24318: "diff-new">createTBody()</ins></code></dfn> <ins class=
                   24319: "diff-new">method must create a new</ins> <code><a href=
                   24320: "#tbody"><ins class="diff-new">tbody</ins></a></code> <ins class=
                   24321: "diff-new">element, insert it immediately after the last</ins>
                   24322: <code><a href="#tbody"><ins class="diff-new">tbody</ins></a></code>
                   24323: <ins class="diff-new">element in the</ins> <code><a href=
                   24324: "#table"><ins class="diff-new">table</ins></a></code> <ins class=
                   24325: "diff-new">element, if any, or at the end of the</ins>
                   24326: <code><a href="#table"><ins class="diff-new">table</ins></a></code>
                   24327: <ins class="diff-new">element if the</ins> <code><a href=
                   24328: "#table"><ins class="diff-new">table</ins></a></code> <ins class=
                   24329: "diff-new">element has no</ins> <code><a href="#tbody"><ins class=
                   24330: "diff-new">tbody</ins></a></code> <ins class="diff-new">element
                   24331: children, and then must return the new</ins> <code><a href=
                   24332: "#tbody"><ins class="diff-new">tbody</ins></a></code> <ins class=
                   24333: "diff-new">element.</ins></p>
                   24334: <p><ins class="diff-new">The</ins> <dfn id="rows" title=
                   24335: "dom-table-rows"><code>rows</code></dfn> attribute must return an
                   24336: <code><a href="#htmlcollection0">HTMLCollection</a></code> rooted
                   24337: at the <code><a href="#table">table</a></code> node, whose filter
                   24338: matches only <code><a href="#tr">tr</a></code> elements that are
                   24339: either children of the <code><a href="#table">table</a></code>
                   24340: element, or children of <code><a href="#thead0">thead</a></code> ,
                   24341: <code><a href="#tbody">tbody</a></code> , or <code><a href=
                   24342: "#tfoot0">tfoot</a></code> elements that are themselves children of
                   24343: the <code><a href="#table">table</a></code> element. The elements
                   24344: in the collection must be ordered such that those elements whose
                   24345: parent is a <code><a href="#thead0">thead</a></code> are included
                   24346: first, in tree order, followed by those elements whose parent is
                   24347: either a <code><a href="#table">table</a></code> or <code><a href=
                   24348: "#tbody">tbody</a></code> element, again in tree order, followed
                   24349: finally by those elements whose parent is a <code><a href=
                   24350: "#tfoot0">tfoot</a></code> element, still in tree order.</p>
                   24351: <p>The <del class="diff-old">behaviour</del> <ins class=
                   24352: "diff-chg">behavior</ins> of the <dfn id="insertrow" title=
                   24353: "dom-table-insertRow"><code>insertRow( <var title="">index</var>
                   24354: )</code></dfn> method depends on the state of the table. When it is
                   24355: called, the method must act as required by the first item in the
                   24356: following list of conditions that describes the state of the table
                   24357: and the <var title="">index</var> argument:</p>
                   24358: <dl class="switch">
                   24359: <dt>If <var title="">index</var> is less than <del class=
                   24360: "diff-old">-1</del> <ins class="diff-chg">−1</ins> or greater than
                   24361: the number of elements in <code title="dom-table-rows"><a href=
                   24362: "#rows">rows</a></code> collection:</dt>
                   24363: <dd>The method must raise an <code>INDEX_SIZE_ERR</code>
                   24364: exception.</dd>
                   24365: <dt>If the <code title="dom-table-rows"><a href=
                   24366: "#rows">rows</a></code> collection has zero elements in it, and the
                   24367: <code><a href="#table">table</a></code> has no <code><a href=
                   24368: "#tbody">tbody</a></code> elements in it:</dt>
                   24369: <dd>The method must create a <code><a href=
                   24370: "#tbody">tbody</a></code> element, then create a <code><a href=
                   24371: "#tr">tr</a></code> element, then append the <code><a href=
                   24372: "#tr">tr</a></code> element to the <code><a href=
                   24373: "#tbody">tbody</a></code> element, then append the <code><a href=
                   24374: "#tbody">tbody</a></code> element to the <code><a href=
                   24375: "#table">table</a></code> element, and finally return the
                   24376: <code><a href="#tr">tr</a></code> element.</dd>
                   24377: <dt>If the <code title="dom-table-rows"><a href=
                   24378: "#rows">rows</a></code> collection has zero elements in it:</dt>
                   24379: <dd>The method must create a <code><a href="#tr">tr</a></code>
                   24380: element, append it to the last <code><a href=
                   24381: "#tbody">tbody</a></code> element in the table, and return the
                   24382: <code><a href="#tr">tr</a></code> element.</dd>
                   24383: <dt>If <var title="">index</var> is equal to <del class=
                   24384: "diff-old">-1</del> <ins class="diff-chg">−1</ins> or equal to the
                   24385: number of items in <code title="dom-table-rows"><a href=
                   24386: "#rows">rows</a></code> collection:</dt>
                   24387: <dd>The method must create a <code><a href="#tr">tr</a></code>
                   24388: element, and append it to the parent of the last <code><a href=
                   24389: "#tr">tr</a></code> element in the <code title=
                   24390: "dom-table-rows"><a href="#rows">rows</a></code> collection. Then,
                   24391: the newly created <code><a href="#tr">tr</a></code> element must be
                   24392: returned.</dd>
                   24393: <dt>Otherwise:</dt>
                   24394: <dd>The method must create a <code><a href="#tr">tr</a></code>
                   24395: element, insert it immediately before the <var title="">index</var>
                   24396: th <code><a href="#tr">tr</a></code> element in the <code title=
                   24397: "dom-table-rows"><a href="#rows">rows</a></code> collection, in the
                   24398: same parent, and finally must return the newly created
                   24399: <code><a href="#tr">tr</a></code> element.</dd>
                   24400: </dl>
                   24401: <p><del class="diff-old">The</del> <ins class="diff-chg">When
                   24402: the</ins> <dfn id="deleterow" title=
                   24403: "dom-table-deleteRow"><code>deleteRow( <var title="">index</var>
                   24404: )</code></dfn> method <ins class="diff-new">is called, the user
                   24405: agent</ins> must <del class="diff-old">remove</del> <ins class=
                   24406: "diff-chg">run</ins> the <ins class="diff-new">following
                   24407: steps:</ins></p>
                   24408: <ol>
                   24409: <li>
                   24410: <p><ins class="diff-new">If</ins> <var title="">index</var>
                   24411: <del class="diff-old">th element</del> <ins class="diff-chg">is
                   24412: equal to −1, then</ins> <var title=""><ins class=
                   24413: "diff-chg">index</ins></var> <ins class="diff-chg">must be set to
                   24414: the number if items</ins> in the <code title=
                   24415: "dom-table-rows"><a href="#rows">rows</a></code> <del class=
                   24416: "diff-old">collection from its parent. If</del> <ins class=
                   24417: "diff-chg">collection, minus one.</ins></p>
                   24418: </li>
                   24419: <li>
                   24420: <p><ins class="diff-chg">Now, if</ins> <var title="">index</var> is
                   24421: less than <del class="diff-old">zero</del> <ins class=
                   24422: "diff-chg">zero,</ins> or greater than or equal to the number of
                   24423: elements in the <code title="dom-table-rows"><a href=
                   24424: "#rows">rows</a></code> collection, the method must instead raise
                   24425: an <code>INDEX_SIZE_ERR</code> <del class=
                   24426: "diff-old">exception.</del> <ins class="diff-chg">exception, and
                   24427: these steps must be aborted.</ins></p>
                   24428: </li>
                   24429: <li>
                   24430: <p><ins class="diff-chg">Otherwise, the method must remove
                   24431: the</ins> <var title=""><ins class="diff-chg">index</ins></var>
                   24432: <ins class="diff-chg">th element in the</ins> <code title=
                   24433: "dom-table-rows"><a href="#rows"><ins class=
                   24434: "diff-chg">rows</ins></a></code> <ins class="diff-chg">collection
                   24435: from its parent.</ins></p>
                   24436: </li>
                   24437: </ol>
                   24438: <h4 id="the-caption"><span class="secno"><del class=
                   24439: "diff-old">3.15.2.</del> <ins class="diff-chg">3.13.3</ins></span>
                   24440: The <dfn id="caption0"><code>caption</code></dfn> element</h4>
                   24441: <dl class="element">
                   24442: <dt>Categories</dt>
                   24443: <dd>None.</dd>
                   24444: <dt>Contexts in which this element may be used:</dt>
                   24445: <dd>As the first element child of a <code><a href=
                   24446: "#table">table</a></code> element.</dd>
                   24447: <dt>Content model:</dt>
                   24448: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   24449: <dt>Element-specific attributes:</dt>
                   24450: <dd>None.</dd>
                   24451: <dt>DOM interface:</dt>
                   24452: <dd><del class="diff-old">No difference from</del> <ins class=
                   24453: "diff-chg">Uses</ins> <code><a href=
                   24454: "#htmlelement">HTMLElement</a></code> .</dd>
                   24455: </dl>
                   24456: <p>The <code><a href="#caption0">caption</a></code> element
                   24457: represents the title of the <code><a href="#table">table</a></code>
                   24458: that is its parent, if it has a parent and that is a <code><a href=
                   24459: "#table">table</a></code> element.</p>
                   24460: <p>The <code><a href="#caption0">caption</a></code> element takes
                   24461: part in the <a href="#table0">table model</a> .</p>
                   24462: <h4 id="the-colgroup"><span class="secno"><del class=
                   24463: "diff-old">3.15.3.</del> <ins class="diff-chg">3.13.4</ins></span>
                   24464: The <dfn id="colgroup"><code>colgroup</code></dfn> element</h4>
                   24465: <dl class="element">
                   24466: <dt>Categories</dt>
                   24467: <dd>None.</dd>
                   24468: <dt>Contexts in which this element may be used:</dt>
                   24469: <dd>As a child of a <code><a href="#table">table</a></code>
                   24470: element, after any <code><a href="#caption0">caption</a></code>
                   24471: elements and before any <code><a href="#thead0">thead</a></code> ,
                   24472: <code><a href="#tbody">tbody</a></code> , <code><a href=
                   24473: "#tfoot0">tfoot</a></code> , and <code><a href="#tr">tr</a></code>
                   24474: elements.</dd>
                   24475: <dt>Content model:</dt>
                   24476: <dd>Zero or more <code><a href="#col">col</a></code> elements.</dd>
                   24477: <dt>Element-specific attributes:</dt>
                   24478: <dd><code title="attr-colgroup-span"><a href=
                   24479: "#span0">span</a></code></dd>
                   24480: <dt>DOM interface:</dt>
                   24481: <dd>
                   24482: <pre class="idl">
                   24483: interface <dfn id=
                   24484: "htmltablecolelement">HTMLTableColElement</dfn> : <a href=
                   24485: "#htmlelement">HTMLElement</a> {
                   24486:            attribute unsigned long <a href="#span1" title=
                   24487: "dom-colgroup-span">span</a>;
                   24488: };
                   24489: </pre></dd>
                   24490: </dl>
                   24491: <p>The <code><a href="#colgroup">colgroup</a></code> element
                   24492: represents a <a href="#column0" title=
                   24493: "concept-column-group">group</a> of one or more <a href="#column"
                   24494: title="concept-column">columns</a> in the <code><a href=
                   24495: "#table">table</a></code> that is its parent, if it has a parent
                   24496: and that is a <code><a href="#table">table</a></code> element.</p>
                   24497: <p>If the <code><a href="#colgroup">colgroup</a></code> element
                   24498: contains no <code><a href="#col">col</a></code> elements, then the
                   24499: element may have a <dfn id="span0" title=
                   24500: "attr-colgroup-span"><code>span</code></dfn> content attribute
                   24501: specified, whose value must be a <a href="#valid">valid
                   24502: non-negative integer</a> greater than zero. <del class=
                   24503: "diff-old">Its default value, which must be used if parsing the
                   24504: attribute as a non-negative integer returns either an error or
                   24505: zero, is 1.</del></p>
                   24506: <p>The <code><a href="#colgroup">colgroup</a></code> element and
                   24507: its <code title="attr-colgroup-span"><a href=
                   24508: "#span0">span</a></code> attribute take part in the <a href=
                   24509: "#table0">table model</a> .</p>
                   24510: <p>The <dfn id="span1" title=
                   24511: "dom-colgroup-span"><code>span</code></dfn> DOM attribute must
                   24512: <a href="#reflect">reflect</a> the content attribute of the same
                   24513: <del class="diff-old">name, with the exception that on setting, if
                   24514: the new</del> <ins class="diff-chg">name. The</ins> value
                   24515: <del class="diff-old">is 0, then an INDEX_SIZE_ERR exception</del>
                   24516: must be <del class="diff-old">raised.</del> <a href=
                   24517: "#limited1"><ins class="diff-chg">limited to only positive non-zero
                   24518: numbers</ins></a> .</p>
                   24519: <h4 id="the-col"><span class="secno"><del class=
                   24520: "diff-old">3.15.4.</del> <ins class="diff-chg">3.13.5</ins></span>
                   24521: The <dfn id="col"><code>col</code></dfn> element</h4>
                   24522: <dl class="element">
                   24523: <dt>Categories</dt>
                   24524: <dd>None.</dd>
                   24525: <dt>Contexts in which this element may be used:</dt>
                   24526: <dd>As a child of a <code><a href="#colgroup">colgroup</a></code>
                   24527: element that doesn't have a <code title="attr-col-span"><a href=
                   24528: "#span2">span</a></code> attribute.</dd>
                   24529: <dt>Content model:</dt>
                   24530: <dd>Empty.</dd>
                   24531: <dt>Element-specific attributes:</dt>
                   24532: <dd><code title="attr-col-span"><a href=
                   24533: "#span2">span</a></code></dd>
                   24534: <dt>DOM interface:</dt>
                   24535: <dd>
                   24536: <p><code><a href=
                   24537: "#htmltablecolelement">HTMLTableColElement</a></code> , same as for
                   24538: <code><a href="#colgroup">colgroup</a></code> elements. This
                   24539: interface defines one member, <code title="dom-col-span"><a href=
                   24540: "#span3">span</a></code> .</p>
                   24541: </dd>
                   24542: </dl>
                   24543: <p>If a <code><a href="#col">col</a></code> element has a parent
                   24544: and that is a <code><a href="#colgroup">colgroup</a></code> element
                   24545: that itself has a parent that is a <code><a href=
                   24546: "#table">table</a></code> element, then the <code><a href=
                   24547: "#col">col</a></code> element represents one or more <a href=
                   24548: "#column" title="concept-column">columns</a> in the <a href=
                   24549: "#column0" title="concept-column-group">column group</a>
                   24550: represented by that <code><a href="#colgroup">colgroup</a></code>
                   24551: .</p>
                   24552: <p>The element may have a <dfn id="span2" title=
                   24553: "attr-col-span"><code>span</code></dfn> content attribute
                   24554: specified, whose value must be a <a href="#valid">valid
                   24555: non-negative integer</a> greater than zero. <del class=
                   24556: "diff-old">Its default value, which must be used if parsing the
                   24557: attribute as a non-negative integer returns either an error or
                   24558: zero, is 1.</del></p>
                   24559: <p>The <code><a href="#col">col</a></code> element and its
                   24560: <code title="attr-col-span"><a href="#span2">span</a></code>
                   24561: attribute take part in the <a href="#table0">table model</a> .</p>
                   24562: <p>The <dfn id="span3" title="dom-col-span"><code>span</code></dfn>
                   24563: DOM attribute must <a href="#reflect">reflect</a> the content
                   24564: attribute of the same <del class="diff-old">name, with the
                   24565: exception that on setting, if the new</del> <ins class=
                   24566: "diff-chg">name. The</ins> value <del class="diff-old">is 0, then
                   24567: an INDEX_SIZE_ERR exception</del> must be <del class=
                   24568: "diff-old">raised.</del> <a href="#limited1"><ins class=
                   24569: "diff-chg">limited to only positive non-zero numbers</ins></a>
                   24570: .</p>
                   24571: <h4 id="the-tbody"><span class="secno"><del class=
                   24572: "diff-old">3.15.5.</del> <ins class="diff-chg">3.13.6</ins></span>
                   24573: The <dfn id="tbody"><code>tbody</code></dfn> element</h4>
                   24574: <dl class="element">
                   24575: <dt>Categories</dt>
                   24576: <dd>None.</dd>
                   24577: <dt>Contexts in which this element may be used:</dt>
                   24578: <dd>As a child of a <code><a href="#table">table</a></code>
                   24579: element, after any <code><a href="#caption0">caption</a></code> ,
                   24580: <code><a href="#colgroup">colgroup</a></code> , and <code><a href=
                   24581: "#thead0">thead</a></code> elements, but only if there are no
                   24582: <code><a href="#tr">tr</a></code> elements that are children of the
                   24583: <code><a href="#table">table</a></code> element.</dd>
                   24584: <dt>Content model:</dt>
                   24585: <dd><del class="diff-old">One</del> <ins class=
                   24586: "diff-chg">Zero</ins> or more <code><a href="#tr">tr</a></code>
                   24587: elements</dd>
                   24588: <dt>Element-specific attributes:</dt>
                   24589: <dd>None.</dd>
                   24590: <dt>DOM interface:</dt>
                   24591: <dd>
                   24592: <pre class="idl">
                   24593: interface <dfn id=
                   24594: "htmltablesectionelement">HTMLTableSectionElement</dfn> : <a href=
                   24595: "#htmlelement">HTMLElement</a> {
                   24596:   readonly attribute <a href=
                   24597: "#htmlcollection0">HTMLCollection</a> <a href="#rows0" title=
                   24598: "dom-tbody-rows">rows</a>;
                   24599:   <a href="#htmlelement">HTMLElement</a> <a href="#insertrow0"
                   24600: title="dom-tbody-insertRow">insertRow</a>(in long index);
                   24601:   void <a href="#deleterow0" title=
                   24602: "dom-tbody-deleteRow">deleteRow</a>(in long index);
                   24603: };
                   24604: </pre>
                   24605: <p>The <code><a href=
                   24606: "#htmltablesectionelement">HTMLTableSectionElement</a></code>
                   24607: interface is also used for <code><a href="#thead0">thead</a></code>
                   24608: and <code><a href="#tfoot0">tfoot</a></code> elements.</p>
                   24609: </dd>
                   24610: </dl>
                   24611: <p>The <code><a href="#tbody">tbody</a></code> element represents a
                   24612: <a href="#row-group" title="concept-row-group">block</a> of
                   24613: <a href="#row0" title="concept-row">rows</a> that consist of a body
                   24614: of data for the parent <code><a href="#table">table</a></code>
                   24615: element, if the <code><a href="#tbody">tbody</a></code> element has
                   24616: a parent and it is a <code><a href="#table">table</a></code> .</p>
                   24617: <p>The <code><a href="#tbody">tbody</a></code> element takes part
                   24618: in the <a href="#table0">table model</a> .</p>
                   24619: <p>The <dfn id="rows0" title=
                   24620: "dom-tbody-rows"><code>rows</code></dfn> attribute must return an
                   24621: <code><a href="#htmlcollection0">HTMLCollection</a></code> rooted
                   24622: at the element, whose filter matches only <code><a href=
                   24623: "#tr">tr</a></code> elements that are children of the element.</p>
                   24624: <p>The <dfn id="insertrow0" title=
                   24625: "dom-tbody-insertRow"><code>insertRow( <var title="">index</var>
                   24626: )</code></dfn> method must, when invoked on an element <var title=
                   24627: "">table section</var> , act as follows:</p>
                   24628: <p>If <var title="">index</var> is less than <del class=
                   24629: "diff-old">-1</del> <ins class="diff-chg">−1</ins> or greater than
                   24630: the number of elements in the <code title="dom-tbody-rows"><a href=
                   24631: "#rows0">rows</a></code> collection, the method must raise an
                   24632: <code>INDEX_SIZE_ERR</code> exception.</p>
                   24633: <p>If <var title="">index</var> is equal to <del class=
                   24634: "diff-old">-1</del> <ins class="diff-chg">−1</ins> or equal to the
                   24635: number of items in the <code title="dom-tbody-rows"><a href=
                   24636: "#rows0">rows</a></code> collection, the method must create a
                   24637: <code><a href="#tr">tr</a></code> element, append it to the element
                   24638: <var title="">table section</var> , and return the newly created
                   24639: <code><a href="#tr">tr</a></code> element.</p>
                   24640: <p>Otherwise, the method must create a <code><a href=
                   24641: "#tr">tr</a></code> element, insert it as a child of the
                   24642: <var title="">table section</var> element, immediately before the
                   24643: <var title="">index</var> th <code><a href="#tr">tr</a></code>
                   24644: element in the <code title="dom-tbody-rows"><a href=
                   24645: "#rows0">rows</a></code> collection, and finally must return the
                   24646: newly created <code><a href="#tr">tr</a></code> element.</p>
                   24647: <p>The <dfn id="deleterow0" title=
                   24648: "dom-tbody-deleteRow"><code>deleteRow( <var title="">index</var>
                   24649: )</code></dfn> method must remove the <var title="">index</var> th
                   24650: element in the <code title="dom-tbody-rows"><a href=
                   24651: "#rows0">rows</a></code> collection from its parent. If <var title=
                   24652: "">index</var> is less than zero or greater than or equal to the
                   24653: number of elements in the <code title="dom-tbody-rows"><a href=
                   24654: "#rows0">rows</a></code> collection, the method must instead raise
                   24655: an <code>INDEX_SIZE_ERR</code> exception.</p>
                   24656: <h4 id="the-thead"><span class="secno"><del class=
                   24657: "diff-old">3.15.6.</del> <ins class="diff-chg">3.13.7</ins></span>
                   24658: The <dfn id="thead0"><code>thead</code></dfn> element</h4>
                   24659: <dl class="element">
                   24660: <dt>Categories</dt>
                   24661: <dd>None.</dd>
                   24662: <dt>Contexts in which this element may be used:</dt>
                   24663: <dd>As a child of a <code><a href="#table">table</a></code>
                   24664: element, after any <code><a href="#caption0">caption</a></code> ,
                   24665: and <code><a href="#colgroup">colgroup</a></code> elements and
                   24666: before any <code><a href="#tbody">tbody</a></code> , <code><a href=
                   24667: "#tfoot0">tfoot</a></code> , and <code><a href="#tr">tr</a></code>
                   24668: elements, but only if there are no other <code><a href=
                   24669: "#thead0">thead</a></code> elements that are children of the
                   24670: <code><a href="#table">table</a></code> element.</dd>
                   24671: <dt>Content model:</dt>
                   24672: <dd><del class="diff-old">One</del> <ins class=
                   24673: "diff-chg">Zero</ins> or more <code><a href="#tr">tr</a></code>
                   24674: elements</dd>
                   24675: <dt>Element-specific attributes:</dt>
                   24676: <dd>None.</dd>
                   24677: <dt>DOM interface:</dt>
                   24678: <dd><code><a href=
                   24679: "#htmltablesectionelement">HTMLTableSectionElement</a></code> , as
                   24680: defined for <code><a href="#tbody">tbody</a></code> elements.</dd>
                   24681: </dl>
                   24682: <p>The <code><a href="#thead0">thead</a></code> element represents
                   24683: the <a href="#row-group" title="concept-row-group">block</a> of
                   24684: <a href="#row0" title="concept-row">rows</a> that consist of the
                   24685: column labels (headers) for the parent <code><a href=
                   24686: "#table">table</a></code> element, if the <code><a href=
                   24687: "#thead0">thead</a></code> element has a parent and it is a
                   24688: <code><a href="#table">table</a></code> .</p>
                   24689: <p>The <code><a href="#thead0">thead</a></code> element takes part
                   24690: in the <a href="#table0">table model</a> .</p>
                   24691: <h4 id="the-tfoot"><span class="secno"><del class=
                   24692: "diff-old">3.15.7.</del> <ins class="diff-chg">3.13.8</ins></span>
                   24693: The <dfn id="tfoot0"><code>tfoot</code></dfn> element</h4>
                   24694: <dl class="element">
                   24695: <dt>Categories</dt>
                   24696: <dd>None.</dd>
                   24697: <dt>Contexts in which this element may be used:</dt>
                   24698: <dd>As a child of a <code><a href="#table">table</a></code>
                   24699: element, after any <code><a href="#caption0">caption</a></code> ,
                   24700: <code><a href="#colgroup">colgroup</a></code> , and <code><a href=
                   24701: "#thead0">thead</a></code> elements and before any <code><a href=
                   24702: "#tbody">tbody</a></code> and <code><a href="#tr">tr</a></code>
                   24703: elements, but only if there are no other <code><a href=
                   24704: "#tfoot0">tfoot</a></code> elements that are children of the
                   24705: <code><a href="#table">table</a></code> element.</dd>
                   24706: <dd>As a child of a <code><a href="#table">table</a></code>
                   24707: element, after any <code><a href="#caption0">caption</a></code> ,
                   24708: <code><a href="#colgroup">colgroup</a></code> , <code><a href=
                   24709: "#thead0">thead</a></code> , <code><a href=
                   24710: "#tbody">tbody</a></code> , and <code><a href="#tr">tr</a></code>
                   24711: elements, but only if there are no other <code><a href=
                   24712: "#tfoot0">tfoot</a></code> elements that are children of the
                   24713: <code><a href="#table">table</a></code> element.</dd>
                   24714: <dt>Content model:</dt>
                   24715: <dd><del class="diff-old">One</del> <ins class=
                   24716: "diff-chg">Zero</ins> or more <code><a href="#tr">tr</a></code>
                   24717: elements</dd>
                   24718: <dt>Element-specific attributes:</dt>
                   24719: <dd>None.</dd>
                   24720: <dt>DOM interface:</dt>
                   24721: <dd><code><a href=
                   24722: "#htmltablesectionelement">HTMLTableSectionElement</a></code> , as
                   24723: defined for <code><a href="#tbody">tbody</a></code> elements.</dd>
                   24724: </dl>
                   24725: <p>The <code><a href="#tfoot0">tfoot</a></code> element represents
                   24726: the <a href="#row-group" title="concept-row-group">block</a> of
                   24727: <a href="#row0" title="concept-row">rows</a> that consist of the
                   24728: column summaries (footers) for the parent <code><a href=
                   24729: "#table">table</a></code> element, if the <code><a href=
                   24730: "#tfoot0">tfoot</a></code> element has a parent and it is a
                   24731: <code><a href="#table">table</a></code> .</p>
                   24732: <p>The <code><a href="#tfoot0">tfoot</a></code> element takes part
                   24733: in the <a href="#table0">table model</a> .</p>
                   24734: <h4 id="the-tr"><span class="secno"><del class=
                   24735: "diff-old">3.15.8.</del> <ins class="diff-chg">3.13.9</ins></span>
                   24736: The <dfn id="tr"><code>tr</code></dfn> element</h4>
                   24737: <dl class="element">
                   24738: <dt>Categories</dt>
                   24739: <dd>None.</dd>
                   24740: <dt>Contexts in which this element may be used:</dt>
                   24741: <dd>As a child of a <code><a href="#thead0">thead</a></code>
                   24742: element.</dd>
                   24743: <dd>As a child of a <code><a href="#tbody">tbody</a></code>
                   24744: element.</dd>
                   24745: <dd>As a child of a <code><a href="#tfoot0">tfoot</a></code>
                   24746: element.</dd>
                   24747: <dd>As a child of a <code><a href="#table">table</a></code>
                   24748: element, after any <code><a href="#caption0">caption</a></code> ,
                   24749: <code><a href="#colgroup">colgroup</a></code> , and <code><a href=
                   24750: "#thead0">thead</a></code> elements, but only if there are no
                   24751: <code><a href="#tbody">tbody</a></code> elements that are children
                   24752: of the <code><a href="#table">table</a></code> element.</dd>
                   24753: <dt>Content model:</dt>
                   24754: <dd><del class="diff-old">One</del> <ins class=
                   24755: "diff-chg">Zero</ins> or more <code><a href="#td">td</a></code> or
                   24756: <code><a href="#th">th</a></code> elements</dd>
                   24757: <dt>Element-specific attributes:</dt>
                   24758: <dd>None.</dd>
                   24759: <dt>DOM interface:</dt>
                   24760: <dd>
                   24761: <pre class="idl">
                   24762: interface <dfn id=
                   24763: "htmltablerowelement">HTMLTableRowElement</dfn> : <a href=
                   24764: "#htmlelement">HTMLElement</a> {
                   24765:   readonly attribute long <a href="#rowindex" title=
                   24766: "dom-tr-rowIndex">rowIndex</a>;
                   24767:   readonly attribute long <a href="#sectionrowindex" title=
                   24768: "dom-tr-sectionRowIndex">sectionRowIndex</a>;
                   24769:   readonly attribute <a href=
                   24770: "#htmlcollection0">HTMLCollection</a> <a href="#cells" title=
                   24771: "dom-tr-cells">cells</a>;
                   24772:   <a href="#htmlelement">HTMLElement</a> <a href="#insertcell"
                   24773: title="dom-tr-insertCell">insertCell</a>(in long index);
                   24774:   void <span>deleteCell</span>(in long index);
                   24775: };
                   24776: </pre></dd>
                   24777: </dl>
                   24778: <p>The <code><a href="#tr">tr</a></code> element represents a
                   24779: <a href="#row0" title="concept-row">row</a> of <a href="#cell"
                   24780: title="concept-cell">cells</a> in a <a href="#table1" title=
                   24781: "concept-table">table</a> .</p>
                   24782: <p>The <code><a href="#tr">tr</a></code> element takes part in the
                   24783: <a href="#table0">table model</a> .</p>
                   24784: <p>The <dfn id="rowindex" title=
                   24785: "dom-tr-rowIndex"><code>rowIndex</code></dfn> <del class=
                   24786: "diff-old">element</del> <ins class="diff-chg">attribute</ins>
                   24787: must, if the element has a parent <code><a href=
                   24788: "#table">table</a></code> element, or a parent <code><a href=
                   24789: "#tbody">tbody</a></code> , <code><a href=
                   24790: "#thead0">thead</a></code> , or <code><a href=
                   24791: "#tfoot0">tfoot</a></code> element and a <em>grandparent</em>
                   24792: <code><a href="#table">table</a></code> element, return the index
                   24793: of the <code><a href="#tr">tr</a></code> element in that
                   24794: <code><a href="#table">table</a></code> element's <code title=
                   24795: "dom-table-rows"><a href="#rows">rows</a></code> collection. If
                   24796: there is no such <code><a href="#table">table</a></code> element,
                   24797: then the attribute must return <del class="diff-old">0.</del>
                   24798: <ins class="diff-chg">−1.</ins></p>
                   24799: <p>The <dfn id="sectionrowindex" title=
                   24800: "dom-tr-sectionRowIndex"><code>sectionRowIndex</code></dfn>
                   24801: <del class="diff-old">DOM</del> attribute must, if the element has
                   24802: a parent <code><a href="#table">table</a></code> , <code><a href=
                   24803: "#tbody">tbody</a></code> , <code><a href=
                   24804: "#thead0">thead</a></code> , or <code><a href=
                   24805: "#tfoot0">tfoot</a></code> element, return the index of the
                   24806: <code><a href="#tr">tr</a></code> element in the parent element's
                   24807: <code title="">rows</code> collection (for tables, that's the
                   24808: <code title="dom-table-rows"><a href="#rows">rows</a></code>
                   24809: collection; for table sections, that's the <code title=
                   24810: "dom-tbody-rows"><a href="#rows0">rows</a></code> collection). If
                   24811: there is no such parent element, then the attribute must return
                   24812: <del class="diff-old">0.</del> <ins class="diff-chg">−1.</ins></p>
                   24813: <p>The <dfn id="cells" title=
                   24814: "dom-tr-cells"><code>cells</code></dfn> attribute must return an
                   24815: <code><a href="#htmlcollection0">HTMLCollection</a></code> rooted
                   24816: at the <code><a href="#tr">tr</a></code> element, whose filter
                   24817: matches only <code><a href="#td">td</a></code> and <code><a href=
                   24818: "#th">th</a></code> elements that are children of the
                   24819: <code><a href="#tr">tr</a></code> element.</p>
                   24820: <p>The <dfn id="insertcell" title=
                   24821: "dom-tr-insertCell"><code>insertCell( <var title="">index</var>
                   24822: )</code></dfn> method must act as follows:</p>
                   24823: <p>If <var title="">index</var> is less than <del class=
                   24824: "diff-old">-1</del> <ins class="diff-chg">−1</ins> or greater than
                   24825: the number of elements in the <code title="dom-tr-cells"><a href=
                   24826: "#cells">cells</a></code> collection, the method must raise an
                   24827: <code>INDEX_SIZE_ERR</code> exception.</p>
                   24828: <p>If <var title="">index</var> is equal to <del class=
                   24829: "diff-old">-1</del> <ins class="diff-chg">−1</ins> or equal to the
                   24830: number of items in <code title="dom-tr-cells"><a href=
                   24831: "#cells">cells</a></code> collection, the method must create a
                   24832: <code><a href="#td">td</a></code> element, append it to the
                   24833: <code><a href="#tr">tr</a></code> element, and return the newly
                   24834: created <code><a href="#td">td</a></code> element.</p>
                   24835: <p>Otherwise, the method must create a <code><a href=
                   24836: "#td">td</a></code> element, insert it as a child of the
                   24837: <code><a href="#tr">tr</a></code> element, immediately before the
                   24838: <var title="">index</var> th <code><a href="#td">td</a></code> or
                   24839: <code><a href="#th">th</a></code> element in the <code title=
                   24840: "dom-tr-cells"><a href="#cells">cells</a></code> collection, and
                   24841: finally must return the newly created <code><a href=
                   24842: "#td">td</a></code> element.</p>
                   24843: <p>The <dfn id="deletecell" title=
                   24844: "dom-tr-deleteCell"><code>deleteCell( <var title="">index</var>
                   24845: )</code></dfn> method must remove the <var title="">index</var> th
                   24846: element in the <code title="dom-tr-cells"><a href=
                   24847: "#cells">cells</a></code> collection from its parent. If
                   24848: <var title="">index</var> is less than zero or greater than or
                   24849: equal to the number of elements in the <code title=
                   24850: "dom-tr-cells"><a href="#cells">cells</a></code> collection, the
                   24851: method must instead raise an <code>INDEX_SIZE_ERR</code>
                   24852: exception.</p>
                   24853: <h4 id="the-td"><span class="secno"><del class=
                   24854: "diff-old">3.15.9.</del> <ins class="diff-chg">3.13.10</ins></span>
                   24855: The <dfn id="td"><code>td</code></dfn> element</h4>
                   24856: <dl class="element">
                   24857: <dt>Categories</dt>
                   24858: <dd><del class="diff-old">None.</del> <a href=
                   24859: "#sectioning1"><ins class="diff-chg">Sectioning root</ins></a>
                   24860: .</dd>
                   24861: <dt>Contexts in which this element may be used:</dt>
                   24862: <dd>As a child of a <code><a href="#tr">tr</a></code> element.</dd>
                   24863: <dt>Content model:</dt>
                   24864: <dd><del class="diff-old">Prose</del> <a href=
                   24865: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   24866: .</dd>
                   24867: <dt>Element-specific attributes:</dt>
                   24868: <dd><code title="attr-tdth-colspan"><a href=
                   24869: "#colspan">colspan</a></code></dd>
                   24870: <dd><code title="attr-tdth-rowspan"><a href=
                   24871: "#rowspan">rowspan</a></code></dd>
                   24872: <dd><code title="attr-td-headers"><a href="#headers"><ins class=
                   24873: "diff-new">headers</ins></a></code></dd>
                   24874: <dt>DOM interface:</dt>
                   24875: <dd>
                   24876: <pre>
                   24877: <del class="diff-old">     class=idl&gt;interface  {
                   24878:            attribute long ;
                   24879:            attribute long ;
                   24880:   readonly attribute long ;
                   24881: </del>
                   24882: <ins class="diff-chg">     class=idl&gt;interface <dfn id=
                   24883: "htmltabledatacellelement">HTMLTableDataCellElement</dfn> : <a href="#htmltablecellelement">HTMLTableCellElement</a> {
                   24884:            attribute DOMString <a href="#headers0" title=
                   24885: "dom-td-headers">headers</a>;
                   24886: </ins>
                   24887: };
                   24888: </pre></dd>
                   24889: </dl>
                   24890: <p>The <code><a href="#td">td</a></code> element represents a data
                   24891: <a href="#cell" title="concept-cell">cell</a> in a table.</p>
                   24892: <p>The <code><a href="#td">td</a></code> element may have a
                   24893: <dfn id="headers" title="attr-td-headers"><code><del class=
                   24894: "diff-old">colspan</del> <ins class=
                   24895: "diff-chg">headers</ins></code></dfn> content attribute <ins class=
                   24896: "diff-new">specified. The</ins> <code title=
                   24897: "attr-td-headers"><a href="#headers"><ins class=
                   24898: "diff-new">headers</ins></a></code> <ins class=
                   24899: "diff-new">attribute, if</ins> specified, <del class=
                   24900: "diff-old">whose value</del> must <del class="diff-old">be</del>
                   24901: <ins class="diff-chg">contain</ins> a <del class="diff-old">valid
                   24902: non-negative integer greater than zero. Its default value,</del>
                   24903: <ins class="diff-chg">string consisting of an</ins> <a href=
                   24904: "#unordered"><ins class="diff-chg">unordered set of unique
                   24905: space-separated tokens</ins></a> ,<ins class="diff-chg">each
                   24906: of</ins> which must <del class="diff-old">be used if parsing</del>
                   24907: <ins class="diff-chg">have</ins> the <del class=
                   24908: "diff-old">attribute as</del> <ins class="diff-chg">value of an ID
                   24909: of</ins> a <del class="diff-old">non-negative integer</del>
                   24910: <code><a href="#th"><ins class="diff-chg">th</ins></a> <del class=
                   24911: "diff-old">returns either an error or zero, is 1. The</del></code>
                   24912: <ins class="diff-chg">element taking part in the same</ins>
                   24913: <a href="#table1" title="concept-table"><ins class=
                   24914: "diff-chg">table</ins></a> <ins class="diff-chg">as the</ins>
                   24915: <code><a href="#td">td</a></code> element <del class="diff-old">may
                   24916: also have a rowspan content</del> <ins class="diff-chg">(as defined
                   24917: by the</ins> <a href="#table0"><ins class="diff-chg">table
                   24918: model</ins></a> <ins class="diff-chg">).</ins></p>
                   24919: <p><ins class="diff-chg">The exact effect of the</ins> attribute
                   24920: <del class="diff-old">specified, whose value must be a valid
                   24921: non-negative integer . Its default value,</del> <ins class=
                   24922: "diff-chg">is described in detail in the</ins> <a href=
                   24923: "#algorithm3"><ins class="diff-chg">algorithm for assigning header
                   24924: cells to data cells</ins></a> , which <ins class="diff-new">user
                   24925: agents</ins> must <del class="diff-old">be used if parsing</del>
                   24926: <ins class="diff-chg">apply to determine</ins> the <del class=
                   24927: "diff-old">attribute as a non-negative integer returns an error, is
                   24928: also 1.</del> <ins class="diff-chg">relationships between data
                   24929: cells and header cells.</ins></p>
                   24930: <p>The <code><a href="#td">td</a></code> element and its
                   24931: <code title="attr-tdth-colspan"><a href=
                   24932: "#colspan">colspan</a></code> and <code title=
                   24933: "attr-tdth-rowspan"><a href="#rowspan">rowspan</a></code>
                   24934: attributes take part in the <a href="#table0">table model</a> .</p>
                   24935: <p>The <del class="diff-old">colspan DOM attribute must reflect the
                   24936: content attribute of the same name, with the exception that on
                   24937: setting, if the new value is 0, then an INDEX_SIZE_ERR exception
                   24938: must be raised. The</del> <dfn id="headers0" title=
                   24939: "dom-td-headers"><code><del class="diff-old">rowspan</del>
                   24940: <ins class="diff-chg">headers</ins></code></dfn> DOM attribute must
                   24941: <a href="#reflect">reflect</a> the content attribute of the same
                   24942: name. <del class="diff-old">The cellIndex DOM attribute must, if
                   24943: the element has a parent tr element, return the index of the cell's
                   24944: element in the parent element's cells collection. If there is no
                   24945: such parent element, then the attribute must return 0. There has
                   24946: been some suggestion that the headers attribute from HTML4, or some
                   24947: other mechanism that is more powerful than scope="" , should be
                   24948: included. This has not yet been considered.</del></p>
                   24949: <h4 id="the-th"><span class="secno"><del class=
                   24950: "diff-old">3.15.10.</del> <ins class=
                   24951: "diff-chg">3.13.11</ins></span> The <dfn id=
                   24952: "th"><code>th</code></dfn> element</h4>
                   24953: <dl class="element">
                   24954: <dt>Categories</dt>
                   24955: <dd>None.</dd>
                   24956: <dt>Contexts in which this element may be used:</dt>
                   24957: <dd>As a child of a <code><a href="#tr">tr</a></code> element.</dd>
                   24958: <dt>Content model:</dt>
                   24959: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   24960: <dt>Element-specific attributes:</dt>
                   24961: <dd><code title="attr-tdth-colspan"><a href=
                   24962: "#colspan">colspan</a></code></dd>
                   24963: <dd><code title="attr-tdth-rowspan"><a href=
                   24964: "#rowspan">rowspan</a></code></dd>
                   24965: <dd><code title="attr-th-scope"><a href=
                   24966: "#scope0">scope</a></code></dd>
                   24967: <dt>DOM interface:</dt>
                   24968: <dd>
                   24969: <pre class="idl">
                   24970: interface <dfn id=
                   24971: "htmltableheadercellelement">HTMLTableHeaderCellElement</dfn> : <a href="#htmltablecellelement">HTMLTableCellElement</a> {
                   24972:            attribute DOMString <a href="#scope1" title=
                   24973: "dom-th-scope">scope</a>;
                   24974: };
                   24975: </pre></dd>
                   24976: </dl>
                   24977: <p>The <code><a href="#th">th</a></code> element represents a
                   24978: header <a href="#cell" title="concept-cell">cell</a> in a
                   24979: table.</p>
                   24980: <p>The <code><a href="#th">th</a></code> element may have a
                   24981: <del class="diff-old">colspan content attribute specified, whose
                   24982: value must be a valid non-negative integer greater than zero. Its
                   24983: default value, which must be used if parsing the attribute as a
                   24984: non-negative integer returns either an error or zero, is 1. The th
                   24985: element may also have a rowspan content attribute specified, whose
                   24986: value must be a valid non-negative integer . Its default value,
                   24987: which must be used if parsing the attribute as a non-negative
                   24988: integer returns an error, is also 1. The th element may have
                   24989: a</del> <dfn id="scope0" title=
                   24990: "attr-th-scope"><code>scope</code></dfn> content attribute
                   24991: specified. The <code title="attr-th-scope"><a href=
                   24992: "#scope0">scope</a></code> attribute is an <a href=
                   24993: "#enumerated">enumerated attribute</a> with five states, four of
                   24994: which have explicit keywords:</p>
                   24995: <dl>
                   24996: <dt>The <dfn id="row" title=
                   24997: "attr-th-scope-row"><code>row</code></dfn> keyword, which maps to
                   24998: the <em>row</em> state</dt>
                   24999: <dd>The <em>row</em> state means the header cell applies to all the
                   25000: remaining cells in the row.</dd>
                   25001: <dt>The <dfn id="col0" title=
                   25002: "attr-th-scope-col"><code>col</code></dfn> keyword, which maps to
                   25003: the <em>column</em> state</dt>
                   25004: <dd>The <em>column</em> state means the header cell applies to all
                   25005: the remaining cells in the column.</dd>
                   25006: <dt>The <dfn id="rowgroup" title=
                   25007: "attr-th-scope-rowgroup"><code>rowgroup</code></dfn> keyword, which
                   25008: maps to the <em>row group</em> state</dt>
                   25009: <dd>The <em>row group</em> state means the header cell applies to
                   25010: all the remaining cells in the row group.</dd>
                   25011: <dt>The <dfn id="colgroup0" title=
                   25012: "attr-th-scope-colgroup"><code>colgroup</code></dfn> keyword, which
                   25013: maps to the <em>column group</em> state</dt>
                   25014: <dd>The <em>column group</em> state means the header cell applies
                   25015: to all the remaining cells in the column group.</dd>
                   25016: <dt>The <em>auto</em> state</dt>
                   25017: <dd>The <em>auto</em> state makes the header cell apply to a set of
                   25018: cells selected based on context.</dd>
                   25019: </dl>
                   25020: <p>The <code title="attr-th-scope"><a href=
                   25021: "#scope0">scope</a></code> attribute's <em>missing value
                   25022: default</em> is the <em>auto</em> state.</p>
                   25023: <p>The exact effect of these values is described in detail in the
                   25024: <a href="#algorithm3">algorithm for assigning header cells to data
                   25025: cells</a> , which user agents must apply to determine the
                   25026: relationships between data cells and header cells.</p>
                   25027: <p>The <code><a href="#th">th</a></code> element and its
                   25028: <code title="attr-tdth-colspan"><a href="#colspan">colspan</a>
                   25029: <del class="diff-old">, rowspan ,</del></code> and <code title=
                   25030: "attr-tdth-rowspan"><del class="diff-old">scope</del> <a href=
                   25031: "#rowspan"><ins class="diff-chg">rowspan</ins></a></code>
                   25032: attributes take part in the <a href="#table0">table model</a> .</p>
                   25033: <p>The <dfn id="scope1" title=
                   25034: "dom-th-scope"><code>scope</code></dfn> DOM attribute must <a href=
                   25035: "#reflect">reflect</a> the content attribute of the same name.</p>
                   25036: <h4 id="attributes0"><span class="secno"><ins class=
                   25037: "diff-new">3.13.12</ins></span> <ins class="diff-new">Attributes
                   25038: common to</ins> <code><a href="#td"><ins class=
                   25039: "diff-new">td</ins></a></code> <ins class="diff-new">and</ins>
                   25040: <code><a href="#th"><ins class="diff-new">th</ins></a></code>
                   25041: <ins class="diff-new">elements</ins></h4>
                   25042: <p>The <code><del class="diff-old">HTMLTableHeaderCellElement</del>
                   25043: <a href="#td"><ins class="diff-chg">td</ins></a></code> <del class=
                   25044: "diff-old">interface inherits</del> <ins class="diff-chg">and</ins>
                   25045: <code><a href="#th"><ins class="diff-chg">th</ins></a></code>
                   25046: <ins class="diff-chg">elements may have a</ins> <dfn id="colspan"
                   25047: title="attr-tdth-colspan"><code><ins class=
                   25048: "diff-chg">colspan</ins></code></dfn> <ins class="diff-chg">content
                   25049: attribute specified, whose value must be a</ins> <a href=
                   25050: "#valid"><ins class="diff-chg">valid non-negative integer</ins></a>
                   25051: <ins class="diff-chg">greater than zero.</ins></p>
                   25052: <p><ins class="diff-chg">The</ins> <code><a href="#td"><ins class=
                   25053: "diff-chg">td</ins></a></code> <ins class="diff-chg">and</ins>
                   25054: <code><a href="#th"><ins class="diff-chg">th</ins></a></code>
                   25055: <ins class="diff-chg">elements may also have a</ins> <dfn id=
                   25056: "rowspan" title="attr-tdth-rowspan"><code><ins class=
                   25057: "diff-chg">rowspan</ins></code></dfn> <ins class="diff-chg">content
                   25058: attribute specified, whose value must be a</ins> <a href=
                   25059: "#valid"><ins class="diff-chg">valid non-negative integer</ins></a>
                   25060: .</p>
                   25061: <p><ins class="diff-chg">The</ins> <code><a href="#td"><ins class=
                   25062: "diff-chg">td</ins></a></code> <ins class="diff-chg">and</ins>
                   25063: <code><a href="#th"><ins class="diff-chg">th</ins></a></code>
                   25064: <ins class="diff-chg">elements implement interfaces that
                   25065: inherit</ins> from the <code><a href=
                   25066: "#htmltablecellelement">HTMLTableCellElement</a></code> <del class=
                   25067: "diff-old">interface and therefore</del> <ins class=
                   25068: "diff-chg">interface:</ins></p>
                   25069: <pre ins="" class="diff-chg">
                   25070:    class=idl&gt;interface <dfn id=
                   25071: "htmltablecellelement">HTMLTableCellElement</dfn> : <a href=
                   25072: "#htmlelement">HTMLElement</a> {
                   25073:            attribute long <a href="#colspan0" title=
                   25074: "dom-tdth-colSpan">colSpan</a>;
                   25075:            attribute long <a href="#rowspan0" title=
                   25076: "dom-tdth-rowSpan">rowSpan</a>;
                   25077:   readonly attribute long <a href="#cellindex" title=
                   25078: "dom-tdth-cellIndex">cellIndex</a>;
                   25079: };
                   25080: </pre>
                   25081: <p><ins class="diff-chg">The</ins> <dfn id="colspan0" title=
                   25082: "dom-tdth-colSpan"><code><ins class=
                   25083: "diff-chg">colSpan</ins></code></dfn> <ins class="diff-chg">DOM
                   25084: attribute must</ins> <a href="#reflect"><ins class=
                   25085: "diff-chg">reflect</ins></a> <ins class="diff-chg">the content
                   25086: attribute of the same name. The value must be</ins> <a href=
                   25087: "#limited1"><ins class="diff-chg">limited to only positive non-zero
                   25088: numbers</ins></a> .</p>
                   25089: <p><ins class="diff-chg">The</ins> <dfn id="rowspan0" title=
                   25090: "dom-tdth-rowSpan"><code><ins class=
                   25091: "diff-chg">rowSpan</ins></code></dfn> <ins class="diff-chg">DOM
                   25092: attribute must</ins> <a href="#reflect"><ins class=
                   25093: "diff-chg">reflect</ins></a> <ins class="diff-chg">the content
                   25094: attribute of the same name. Its default value, which must be used
                   25095: if</ins> <a href="#rules" title=
                   25096: "rules for parsing non-negative integers"><ins class=
                   25097: "diff-chg">parsing the attribute as a non-negative
                   25098: integer</ins></a> <ins class="diff-chg">returns an error, is</ins>
                   25099: also <ins class="diff-new">1.</ins></p>
                   25100: <p><ins class="diff-new">The</ins> <dfn id="cellindex" title=
                   25101: "dom-tdth-cellIndex"><code><ins class=
                   25102: "diff-new">cellIndex</ins></code></dfn> <ins class="diff-new">DOM
                   25103: attribute must, if the element</ins> has <ins class="diff-new">a
                   25104: parent</ins> <code><a href="#tr"><ins class=
                   25105: "diff-new">tr</ins></a></code> <ins class="diff-new">element,
                   25106: return</ins> the <del class="diff-old">DOM attributes defined
                   25107: above</del> <ins class="diff-chg">index of the cell's element</ins>
                   25108: in the <ins class="diff-chg">parent element's</ins> <code title=
                   25109: "dom-tr-cells"><del class="diff-old">td</del> <a href=
                   25110: "#cells"><ins class="diff-chg">cells</ins></a></code> <del class=
                   25111: "diff-old">section.</del> <ins class="diff-chg">collection. If
                   25112: there is no such parent element, then the attribute must return
                   25113: 0.</ins></p>
                   25114: <h4 id="processing"><span class="secno"><del class=
                   25115: "diff-old">3.15.11.</del> <ins class=
                   25116: "diff-chg">3.13.13</ins></span> Processing model</h4>
                   25117: <p>The various table elements and their content attributes together
                   25118: define the <dfn id="table0">table model</dfn> .</p>
                   25119: <p>A <dfn id="table1" title="concept-table">table</dfn> consists of
                   25120: cells aligned on a two-dimensional grid of <dfn id="slots" title=
                   25121: "concept-slots">slots</dfn> with coordinates ( <var title=
                   25122: "">x</var> , <var title="">y</var> ). The grid is finite, and is
                   25123: either empty or has one or more slots. If the grid has one or more
                   25124: slots, then the <var title="">x</var> coordinates are always in the
                   25125: range <span><del class="diff-old">1&nbsp;≤&nbsp;</del> <ins class=
                   25126: "diff-chg">0&nbsp;≤&nbsp;</ins> <var title="">x</var> <del class=
                   25127: "diff-old">&nbsp;≤&nbsp;</del> <ins class=
                   25128: "diff-chg">&nbsp;&lt;&nbsp;</ins> <var title="">x <sub title=
                   25129: ""><del class="diff-old">max</del> <ins class=
                   25130: "diff-chg">width</ins></sub></var></span> , and the <var title=
                   25131: "">y</var> coordinates are always in the range <span><del class=
                   25132: "diff-old">1&nbsp;≤&nbsp;</del> <ins class=
                   25133: "diff-chg">0&nbsp;≤&nbsp;</ins> <var title="">y</var> <del class=
                   25134: "diff-old">&nbsp;≤&nbsp;</del> <ins class=
                   25135: "diff-chg">&nbsp;&lt;&nbsp;</ins> <var title="">y <sub title=
                   25136: ""><del class="diff-old">max</del> <ins class=
                   25137: "diff-chg">height</ins></sub></var></span> . If one or both of
                   25138: <var title="">x <sub title=""><del class="diff-old">max</del>
                   25139: <ins class="diff-chg">width</ins></sub></var> and <var title="">y
                   25140: <sub title=""><del class="diff-old">max</del> <ins class=
                   25141: "diff-chg">height</ins></sub></var> are zero, then the table is
                   25142: empty (has no slots). Tables correspond to <code><a href=
                   25143: "#table">table</a></code> elements.</p>
                   25144: <p>A <dfn id="cell" title="concept-cell">cell</dfn> is a set of
                   25145: slots anchored at a slot ( <var title="">cell <sub title=
                   25146: "">x</sub></var> , <var title="">cell <sub title="">y</sub></var>
                   25147: ), and with a particular <var title="">width</var> and <var title=
                   25148: "">height</var> such that the cell covers all the slots with
                   25149: coordinates ( <var title="">x</var> , <var title="">y</var> ) where
                   25150: <span><var title="">cell <sub title="">x</sub></var> &nbsp;≤&nbsp;
                   25151: <var title="">x</var> &nbsp;&lt;&nbsp; <var title="">cell
                   25152: <sub title="">x</sub></var> + <var title="">width</var></span> and
                   25153: <span><var title="">cell <sub title="">y</sub></var> &nbsp;≤&nbsp;
                   25154: <var title="">y</var> &nbsp;&lt;&nbsp; <var title="">cell
                   25155: <sub title="">y</sub></var> + <var title="">height</var></span> .
                   25156: <del class="diff-old">Cell</del> <ins class="diff-chg">Cells</ins>
                   25157: can either be <em>data cells</em> or <em>header cells</em> . Data
                   25158: cells correspond to <code><a href="#td">td</a></code> elements, and
                   25159: have zero or more associated header cells. Header cells correspond
                   25160: to <code><a href="#th">th</a></code> elements.</p>
                   25161: <p>A <dfn id="row0" title="concept-row">row</dfn> is a complete set
                   25162: of slots from <span><var title="">x</var> <del class=
                   25163: "diff-old">=1</del> <ins class="diff-chg">=0</ins></span> to
                   25164: <span><var title="">x</var> = <var title="">x <sub title=
                   25165: ""><del class="diff-old">max</del> <ins class=
                   25166: "diff-chg">width</ins></sub></var> <ins class=
                   25167: "diff-chg">-1</ins></span> , for a particular value of <var title=
                   25168: "">y</var> . Rows correspond to <code><a href="#tr">tr</a></code>
                   25169: elements.</p>
                   25170: <p>A <dfn id="column" title="concept-column">column</dfn> is a
                   25171: complete set of slots from <span><var title="">y</var> <del class=
                   25172: "diff-old">=1</del> <ins class="diff-chg">=0</ins></span> to
                   25173: <span><var title="">y</var> = <var title="">y <sub title=
                   25174: ""><del class="diff-old">max</del> <ins class=
                   25175: "diff-chg">height</ins></sub></var> <ins class=
                   25176: "diff-chg">-1</ins></span> , for a particular value of <var title=
                   25177: "">x</var> . Columns can correspond to <code><a href=
                   25178: "#col">col</a></code> elements, but in the <del class=
                   25179: "diff-old">absense</del> <ins class="diff-chg">absence</ins> of
                   25180: <code><a href="#col">col</a></code> elements are implied.</p>
                   25181: <p>A <dfn id="row-group" title="concept-row-group">row group</dfn>
                   25182: is a set of <a href="#row0" title="concept-row">rows</a> anchored
                   25183: at a slot <del class="diff-old">(1,</del> <ins class=
                   25184: "diff-chg">(0,</ins> <var title="">group <sub title=
                   25185: "">y</sub></var> ) with a particular <var title="">height</var>
                   25186: such that the row group covers all the slots with coordinates (
                   25187: <var title="">x</var> , <var title="">y</var> ) where
                   25188: <span><del class="diff-old">1&nbsp;≤&nbsp;</del> <ins class=
                   25189: "diff-chg">0&nbsp;≤&nbsp;</ins> <var title="">x</var>
                   25190: &nbsp;&lt;&nbsp; <var title="">x <sub title=""><del class=
                   25191: "diff-old">max</del> <ins class=
                   25192: "diff-chg">width</ins></sub></var></span> and <span><var title=
                   25193: "">group <sub title="">y</sub></var> &nbsp;≤&nbsp; <var title=
                   25194: "">y</var> &nbsp;&lt;&nbsp; <var title="">group <sub title=
                   25195: "">y</sub></var> + <var title="">height</var></span> . Row groups
                   25196: correspond to <code><a href="#tbody">tbody</a></code> ,
                   25197: <code><a href="#thead0">thead</a></code> , and <code><a href=
                   25198: "#tfoot0">tfoot</a></code> elements. Not every row is necessarily
                   25199: in a row group.</p>
                   25200: <p>A <dfn id="column0" title="concept-column-group">column
                   25201: group</dfn> is a set of <a href="#column" title=
                   25202: "concept-column">columns</a> anchored at a slot ( <var title=
                   25203: "">group <sub title="">x</sub></var> , <del class=
                   25204: "diff-old">1)</del> <ins class="diff-chg">0)</ins> with a
                   25205: particular <var title="">width</var> such that the column group
                   25206: covers all the slots with coordinates ( <var title="">x</var> ,
                   25207: <var title="">y</var> ) where <span><var title="">group <sub title=
                   25208: "">x</sub></var> &nbsp;≤&nbsp; <var title="">x</var>
                   25209: &nbsp;&lt;&nbsp; <var title="">group <sub title="">x</sub></var> +
                   25210: <var title="">width</var></span> and <span><del class=
                   25211: "diff-old">1&nbsp;≤&nbsp;</del> <ins class=
                   25212: "diff-chg">0&nbsp;≤&nbsp;</ins> <var title="">y</var>
                   25213: &nbsp;&lt;&nbsp; <var title="">y <sub title=""><del class=
                   25214: "diff-old">max</del> <ins class=
                   25215: "diff-chg">height</ins></sub></var></span> . Column groups
                   25216: correspond to <code><a href="#colgroup">colgroup</a></code>
                   25217: elements. Not every column is necessarily in a column group.</p>
                   25218: <p><a href="#row-group" title="concept-row-group">Row groups</a>
                   25219: cannot overlap each other. Similarly, <a href="#column0" title=
                   25220: "concept-column-group">column groups</a> cannot overlap each
                   25221: other.</p>
                   25222: <p>A <a href="#cell" title="concept-cell">cell</a> cannot cover
                   25223: slots that are from two or more <a href="#row-group" title=
                   25224: "concept-row-group">row groups</a> . It is, however, possible for a
                   25225: cell to be in multiple <a href="#column0" title=
                   25226: "concept-column-group">column groups</a> . All the slots that form
                   25227: part of one cell are part of zero or one <a href="#row-group"
                   25228: title="concept-row-group">row groups</a> and zero or more <a href=
                   25229: "#column0" title="concept-column-group">column groups</a> .</p>
                   25230: <p>In addition to <a href="#cell" title="concept-cell">cells</a> ,
                   25231: <a href="#column" title="concept-column">columns</a> , <a href=
                   25232: "#row0" title="concept-row">rows</a> , <a href="#row-group" title=
                   25233: "concept-row-group">row groups</a> , and <a href="#column0" title=
                   25234: "concept-column-group">column groups</a> , <a href="#table1" title=
                   25235: "concept-table">tables</a> can have a <code><a href=
                   25236: "#caption0">caption</a></code> element associated with them. This
                   25237: gives the table a heading, or legend.</p>
                   25238: <p>A <dfn id="table2">table model error</dfn> is an error with the
                   25239: data represented by <code><a href="#table">table</a></code>
                   25240: elements and their descendants. Documents must not have table model
                   25241: errors.</p>
                   25242: <h5 id="forming"><span class="secno"><del class=
                   25243: "diff-old">3.15.11.1.</del> <ins class=
                   25244: "diff-chg">3.13.13.1.</ins></span> Forming a table</h5>
                   25245: <p>To determine which elements correspond to which slots in a
                   25246: <a href="#table1" title="concept-table">table</a> associated with a
                   25247: <code><a href="#table">table</a></code> element, to determine the
                   25248: dimensions of the table ( <var title="">x <sub title=""><del class=
                   25249: "diff-old">max</del> <ins class="diff-chg">width</ins></sub></var>
                   25250: and <var title="">y <sub title=""><del class="diff-old">max</del>
                   25251: <ins class="diff-chg">height</ins></sub></var> ), and to determine
                   25252: if there are any <a href="#table2" title="table model error">table
                   25253: model errors</a> , user agents must use the following
                   25254: algorithm:</p>
                   25255: <ol>
                   25256: <li>
                   25257: <p>Let <var title="">x <sub title=""><del class=
                   25258: "diff-old">max</del> <ins class="diff-chg">width</ins></sub></var>
                   25259: be zero.</p>
                   25260: </li>
                   25261: <li>
                   25262: <p>Let <var title="">y <sub title=""><del class=
                   25263: "diff-old">max</del> <ins class="diff-chg">height</ins></sub></var>
                   25264: be zero.</p>
                   25265: </li>
                   25266: <li>
                   25267: <p>Let <var title=""><ins class="diff-new">pending</ins>
                   25268: <code><a href="#tfoot0"><ins class=
                   25269: "diff-new">tfoot</ins></a></code> <ins class=
                   25270: "diff-new">elements</ins></var> <ins class="diff-new">be a list
                   25271: of</ins> <code><a href="#tfoot0"><ins class=
                   25272: "diff-new">tfoot</ins></a></code> <ins class="diff-new">elements,
                   25273: initially empty.</ins></p>
                   25274: </li>
                   25275: <li>
                   25276: <p><ins class="diff-new">Let</ins> <var title="">the table</var> be
                   25277: the <a href="#table1" title="concept-table">table</a> represented
                   25278: by the <code><a href="#table">table</a></code> element. The
                   25279: <var title="">x <sub title=""><del class="diff-old">max</del>
                   25280: <ins class="diff-chg">width</ins></sub></var> and <var title="">y
                   25281: <sub title=""><del class="diff-old">max</del> <ins class=
                   25282: "diff-chg">height</ins></sub></var> variables give <var title=
                   25283: "">the table</var> 's <del class="diff-old">extent.</del>
                   25284: <ins class="diff-chg">dimensions.</ins> <var title="">The
                   25285: table</var> is initially empty.</p>
                   25286: </li>
                   25287: <li>
                   25288: <p>If the <code><a href="#table">table</a></code> element has no
                   25289: <del class="diff-old">table children,</del> <ins class=
                   25290: "diff-chg">children elements,</ins> then return <var title="">the
                   25291: table</var> (which will be empty), and abort these steps.</p>
                   25292: </li>
                   25293: <li>
                   25294: <p><ins class="diff-new">Associate the first</ins> <code><a href=
                   25295: "#caption0"><ins class="diff-new">caption</ins></a></code>
                   25296: <ins class="diff-new">element child of the</ins> <code><a href=
                   25297: "#table"><ins class="diff-new">table</ins></a></code> <ins class=
                   25298: "diff-new">element with</ins> <var title=""><ins class=
                   25299: "diff-new">the table</ins></var> .<ins class="diff-new">If there
                   25300: are no such children, then it has no associated</ins>
                   25301: <code><a href="#caption0"><ins class=
                   25302: "diff-new">caption</ins></a></code> <ins class=
                   25303: "diff-new">element.</ins></p>
                   25304: </li>
                   25305: <li>
                   25306: <p>Let the <var title="">current element</var> be the first element
                   25307: child of the <code><a href="#table">table</a></code> element.</p>
                   25308: <p>If a step in this algorithm ever requires the <var title=
                   25309: "">current element</var> to be <dfn id="advanced" title=
                   25310: "concept-table-advance">advanced to the next child of the
                   25311: <code>table</code></dfn> when there is no such next child, then the
                   25312: <del class="diff-old">algorithm</del> <ins class="diff-chg">user
                   25313: agent</ins> must <del class="diff-old">be aborted at that point
                   25314: and</del> <ins class="diff-chg">jump to</ins> the <del class=
                   25315: "diff-old">algorithm must return</del> <ins class="diff-chg">step
                   25316: labeled</ins> <i><ins class="diff-chg">end</ins></i> ,<ins class=
                   25317: "diff-chg">near</ins> the <del class="diff-old">table .</del>
                   25318: <ins class="diff-chg">end of this algorithm.</ins></p>
                   25319: </li>
                   25320: <li>
                   25321: <p>While the <var title="">current element</var> is not one of the
                   25322: following elements, <a href="#advanced" title=
                   25323: "concept-table-advance">advance <del class="diff-old">the current
1.2     ! mike     25324: element to the next child of the table</del></a> <del class=
        !          25325: "diff-old">: caption colgroup thead tbody tfoot tr If the current
1.1       mike     25326: element is a caption , then that is the caption element associated
                   25327: with the table . Otherwise, it has no associated caption element.
                   25328: If the current element is a caption , then while the current
                   25329: element is not one of the following elements, advance</del> the
                   25330: <var title="">current element</var> to the next child of the
                   25331: <code><a href="#table">table</a></code> :</p>
                   25332: <ul class="brief">
                   25333: <li><code><a href="#colgroup">colgroup</a></code></li>
                   25334: <li><code><a href="#thead0">thead</a></code></li>
                   25335: <li><code><a href="#tbody">tbody</a></code></li>
                   25336: <li><code><a href="#tfoot0">tfoot</a></code></li>
                   25337: <li><code><a href="#tr">tr</a></code></li>
                   25338: </ul>
                   25339: <del class="diff-old">(Otherwise, the current element will already
                   25340: be one of those elements.)</del></li>
                   25341: <li>
                   25342: <p>If the <var title="">current element</var> is a <code><a href=
                   25343: "#colgroup">colgroup</a></code> , follow these substeps:</p>
                   25344: <ol>
                   25345: <li>
                   25346: <p><i>Column <del class="diff-old">groups.</del> <ins class=
                   25347: "diff-chg">groups</ins></i> : Process the <var title="">current
                   25348: element</var> according to the appropriate <del class=
                   25349: "diff-old">one of the following two cases:</del> <ins class=
                   25350: "diff-chg">case below:</ins></p>
                   25351: <dl class="switch">
                   25352: <dt>If the <var title="">current element</var> has any
                   25353: <code><a href="#col">col</a></code> element children</dt>
                   25354: <dd>
                   25355: <p>Follow these steps:</p>
                   25356: <ol>
                   25357: <li>
                   25358: <p>Let <var title="">x <sub title="">start</sub></var> have the
                   25359: value <ins class="diff-new">of</ins> <span><var title="">x
                   25360: <sub title=""><del class="diff-old">max</del> <ins class=
                   25361: "diff-chg">width</ins></sub></var> <del class=
                   25362: "diff-old">+1</del></span> .</p>
                   25363: </li>
                   25364: <li>
                   25365: <p>Let the <var title="">current column</var> be the first
                   25366: <code><a href="#col">col</a></code> element child of the
                   25367: <code><a href="#colgroup">colgroup</a></code> element.</p>
                   25368: </li>
                   25369: <li>
                   25370: <p><del class="diff-old">Columns.</del> <i><ins class=
                   25371: "diff-chg">Columns</ins></i> : If the <var title="">current
                   25372: column</var> <code><a href="#col">col</a></code> element has a
                   25373: <code title="attr-col-span"><a href="#span2">span</a></code>
                   25374: attribute, then parse its value using the <a href="#rules">rules
                   25375: for parsing non-negative integers</a> .</p>
                   25376: <p>If the result of parsing the value is not an error or zero, then
                   25377: let <var title="">span</var> be that value.</p>
                   25378: <p>Otherwise, if the <code><a href="#col">col</a></code> element
                   25379: has no <code title="attr-col-span"><a href="#span2">span</a></code>
                   25380: attribute, or if trying to parse the attribute's value resulted in
                   25381: an error, then let <var title="">span</var> be 1.</p>
                   25382: </li>
                   25383: <li>
                   25384: <p>Increase <var title="">x <sub title=""><del class=
                   25385: "diff-old">max</del> <ins class="diff-chg">width</ins></sub></var>
                   25386: by <var title="">span</var> .</p>
                   25387: </li>
                   25388: <li>
                   25389: <p>Let the last <var title="">span</var> <a href="#column" title=
                   25390: "concept-column">columns</a> in <var title="">the table</var>
                   25391: correspond to the <var title="">current column</var> <code><a href=
                   25392: "#col">col</a></code> element.</p>
                   25393: </li>
                   25394: <li>
                   25395: <p>If <var title="">current column</var> is not the last
                   25396: <code><a href="#col">col</a></code> element child of the
                   25397: <code><a href="#colgroup">colgroup</a></code> element, then let the
                   25398: <var title="">current column</var> be the next <code><a href=
                   25399: "#col">col</a></code> element child of the <code><a href=
                   25400: "#colgroup">colgroup</a></code> element, and return to the
                   25401: <del class="diff-old">third</del> step <del class="diff-old">of
                   25402: this innermost group of steps (columns).</del> <ins class=
                   25403: "diff-chg">labeled</ins> <i><ins class="diff-chg">columns</ins></i>
                   25404: .</p>
                   25405: </li>
                   25406: <li>
                   25407: <p>Let all the last <a href="#column" title=
                   25408: "concept-column">columns</a> in <var title="">the table</var> from
                   25409: <span>x= <var title="">x <sub title="">start</sub></var></span> to
                   25410: <span>x= <var title="">x <sub title=""><del class=
                   25411: "diff-old">max</del> <ins class="diff-chg">width</ins></sub></var>
                   25412: <ins class="diff-chg">-1</ins></span> form a new <a href="#column0"
                   25413: title="concept-column-group">column group</a> , anchored at the
                   25414: slot ( <var title="">x <sub title="">start</sub></var> ,
                   25415: <del class="diff-old">1),</del> <ins class="diff-chg">0),</ins>
                   25416: with width <span><var title="">x <sub title=""><del class=
                   25417: "diff-old">max</del> <ins class="diff-chg">width</ins></sub></var>
                   25418: - <var title="">x <sub title="">start</sub></var> <del class=
                   25419: "diff-old">-1,</del></span> , corresponding to the <code><a href=
                   25420: "#colgroup">colgroup</a></code> element.</p>
                   25421: </li>
                   25422: </ol>
                   25423: </dd>
                   25424: <dt>If the <var title="">current element</var> has no
                   25425: <code><a href="#col">col</a></code> element children</dt>
                   25426: <dd>
                   25427: <ol>
                   25428: <li>
                   25429: <p>If the <code><a href="#colgroup">colgroup</a></code> element has
                   25430: a <code title="attr-colgroup-span"><a href="#span0">span</a></code>
                   25431: attribute, then parse its value using the <a href="#rules">rules
                   25432: for parsing non-negative integers</a> .</p>
                   25433: <p>If the result of parsing the value is not an error or zero, then
                   25434: let <var title="">span</var> be that value.</p>
                   25435: <p>Otherwise, if the <code><a href="#colgroup">colgroup</a></code>
                   25436: element has no <code title="attr-col-span"><a href=
                   25437: "#span2">span</a></code> attribute, or if trying to parse the
                   25438: attribute's value resulted in an error, then let <var title=
                   25439: "">span</var> be 1.</p>
                   25440: </li>
                   25441: <li>
                   25442: <p>Increase <var title="">x <sub title=""><del class=
                   25443: "diff-old">max</del> <ins class="diff-chg">width</ins></sub></var>
                   25444: by <var title="">span</var> .</p>
                   25445: </li>
                   25446: <li>
                   25447: <p>Let the last <var title="">span</var> <a href="#column" title=
                   25448: "concept-column">columns</a> in <var title="">the table</var> form
                   25449: a new <a href="#column0" title="concept-column-group">column
                   25450: group</a> , anchored at the slot ( <span><var title="">x
                   25451: <sub title=""><del class="diff-old">max</del> <ins class=
                   25452: "diff-chg">width</ins></sub></var> - <var title="">span</var>
                   25453: <del class="diff-old">+1, 1),</del></span> , <ins class=
                   25454: "diff-chg">0),</ins> with width <var title="">span</var> ,
                   25455: corresponding to the <code><a href="#colgroup">colgroup</a></code>
                   25456: element.</p>
                   25457: </li>
                   25458: </ol>
                   25459: </dd>
                   25460: </dl>
                   25461: </li>
                   25462: <li>
                   25463: <p><a href="#advanced" title="concept-table-advance">Advance</a>
                   25464: the <var title="">current element</var> to the next child of the
                   25465: <code><a href="#table">table</a></code> .</p>
                   25466: </li>
                   25467: <li>
                   25468: <p>While the <var title="">current element</var> is not one of the
                   25469: following elements, <a href="#advanced" title=
                   25470: "concept-table-advance">advance</a> the <var title="">current
                   25471: element</var> to the next child of the <code><a href=
                   25472: "#table">table</a></code> :</p>
                   25473: <ul class="brief">
                   25474: <li><code><a href="#colgroup">colgroup</a></code></li>
                   25475: <li><code><a href="#thead0">thead</a></code></li>
                   25476: <li><code><a href="#tbody">tbody</a></code></li>
                   25477: <li><code><a href="#tfoot0">tfoot</a></code></li>
                   25478: <li><code><a href="#tr">tr</a></code></li>
                   25479: </ul>
                   25480: </li>
                   25481: <li>
                   25482: <p>If the <var title="">current element</var> is a <code><a href=
                   25483: "#colgroup">colgroup</a></code> element, jump to <ins class=
                   25484: "diff-new">the</ins> step <del class="diff-old">1 in these substeps
                   25485: (column groups).</del> <ins class="diff-chg">labeled</ins>
                   25486: <i><ins class="diff-chg">column groups</ins></i> <ins class=
                   25487: "diff-chg">above.</ins></p>
                   25488: </li>
                   25489: </ol>
                   25490: </li>
                   25491: <li>
                   25492: <p>Let <var title="">y <sub title="">current</sub></var> be zero.
                   25493: <del class="diff-old">When the algorithm is aborted, if y current
                   25494: does not equal y max , then that is a table model error .</del></p>
                   25495: </li>
                   25496: <li>
                   25497: <p>Let the <var title="">list of downward-growing cells</var> be an
                   25498: empty list.</p>
                   25499: </li>
                   25500: <li>
                   25501: <p><del class="diff-old">Rows.</del> <i><ins class=
                   25502: "diff-chg">Rows</ins></i> : While the <var title="">current
                   25503: element</var> is not one of the following elements, <a href=
                   25504: "#advanced" title="concept-table-advance">advance</a> the
                   25505: <var title="">current element</var> to the next child of the
                   25506: <code><a href="#table">table</a></code> :</p>
                   25507: <ul class="brief">
                   25508: <li><code><a href="#thead0">thead</a></code></li>
                   25509: <li><code><a href="#tbody">tbody</a></code></li>
                   25510: <li><code><a href="#tfoot0">tfoot</a></code></li>
                   25511: <li><code><a href="#tr">tr</a></code></li>
                   25512: </ul>
                   25513: </li>
                   25514: <li>
                   25515: <p>If the <var title="">current element</var> is a <code><a href=
                   25516: "#tr">tr</a></code> , then run the <a href="#algorithm1">algorithm
                   25517: for processing rows</a> , <a href="#advanced" title=
                   25518: "concept-table-advance"><ins class="diff-new">advance</ins></a>
                   25519: <del class="diff-old">(defined below),</del> <ins class=
                   25520: "diff-chg">the</ins> <var title=""><ins class="diff-chg">current
                   25521: element</ins></var> <ins class="diff-chg">to the next child of
                   25522: the</ins> <code><a href="#table"><ins class=
                   25523: "diff-chg">table</ins></a></code> ,<ins class="diff-chg">and return
                   25524: to the step labeled</ins> <i><ins class="diff-chg">rows</ins></i>
                   25525: .</p>
                   25526: </li>
                   25527: <li>
                   25528: <p><ins class="diff-chg">Run the</ins> <a href=
                   25529: "#algorithm0"><ins class="diff-chg">algorithm for ending a row
                   25530: group</ins></a> .</p>
                   25531: </li>
                   25532: <li>
                   25533: <p><ins class="diff-chg">If the</ins> <var title=""><ins class=
                   25534: "diff-chg">current element</ins></var> <ins class="diff-chg">is
                   25535: a</ins> <code><a href="#tfoot0"><ins class=
                   25536: "diff-chg">tfoot</ins></a></code> , then <ins class="diff-new">add
                   25537: that element to the list of</ins> <var title=""><ins class=
                   25538: "diff-new">pending</ins> <code><a href="#tfoot0"><ins class=
                   25539: "diff-new">tfoot</ins></a></code> <ins class=
                   25540: "diff-new">elements</ins></var> ,<a href="#advanced" title=
                   25541: "concept-table-advance"><ins class="diff-new">advance</ins></a>
                   25542: <ins class="diff-new">the</ins> <var title=""><ins class=
                   25543: "diff-new">current element</ins></var> <ins class="diff-new">to the
                   25544: next child of the</ins> <code><a href="#table"><ins class=
                   25545: "diff-new">table</ins></a></code> ,<ins class="diff-new">and</ins>
                   25546: return to the <del class="diff-old">previous</del> step <del class=
                   25547: "diff-old">(rows).</del> <ins class="diff-chg">labeled</ins>
                   25548: <i><ins class="diff-chg">rows</ins></i> .</p>
                   25549: </li>
                   25550: <li>
                   25551: <p><del class="diff-old">Otherwise,</del> <ins class=
                   25552: "diff-chg">The</ins> <var title=""><ins class="diff-chg">current
                   25553: element</ins></var> <ins class="diff-chg">is either a</ins>
                   25554: <code><a href="#thead0"><ins class=
                   25555: "diff-chg">thead</ins></a></code> <ins class="diff-chg">or a</ins>
                   25556: <code><a href="#tbody"><ins class="diff-chg">tbody</ins></a></code>
                   25557: .</p>
                   25558: <p><ins class="diff-chg">Run the</ins> <a href=
                   25559: "#algorithm"><ins class="diff-chg">algorithm for processing row
                   25560: groups</ins></a> .</p>
                   25561: </li>
                   25562: <li>
                   25563: <p><a href="#advanced" title="concept-table-advance"><ins class=
                   25564: "diff-chg">Advance</ins></a> <ins class="diff-chg">the</ins>
                   25565: <var title=""><ins class="diff-chg">current element</ins></var>
                   25566: <ins class="diff-chg">to the next child of the</ins> <code><a href=
                   25567: "#table"><ins class="diff-chg">table</ins></a></code> .</p>
                   25568: </li>
                   25569: <li>
                   25570: <p><ins class="diff-chg">Return to the step labeled</ins>
                   25571: <i><ins class="diff-chg">rows</ins></i> .</p>
                   25572: </li>
                   25573: <li>
                   25574: <p><i><ins class="diff-chg">End</ins></i> :<ins class=
                   25575: "diff-chg">For each</ins> <code><a href="#tfoot0"><ins class=
                   25576: "diff-chg">tfoot</ins></a></code> <ins class="diff-chg">element in
                   25577: the list of</ins> <var title=""><ins class="diff-chg">pending</ins>
                   25578: <code><a href="#tfoot0"><ins class=
                   25579: "diff-chg">tfoot</ins></a></code> <ins class=
                   25580: "diff-chg">elements</ins></var> ,<ins class="diff-chg">in tree
                   25581: order,</ins> run the <a href="#algorithm">algorithm for <del class=
                   25582: "diff-old">ending</del> <ins class="diff-chg">processing row
                   25583: groups</ins></a> .</p>
                   25584: </li>
                   25585: <li>
                   25586: <p><ins class="diff-chg">If there exists</ins> a <a href="#row0"
                   25587: title="concept-row">row <del class="diff-old">group</del></a>
                   25588: <ins class="diff-chg">or</ins> <a href="#column" title=
                   25589: "concept-column"><ins class="diff-chg">column</ins></a> <ins class=
                   25590: "diff-chg">in the</ins> <a href="#table1" title=
                   25591: "concept-table"><ins class="diff-chg">table</ins></a> <var title=
                   25592: ""><ins class="diff-chg">the table</ins></var> <ins class=
                   25593: "diff-chg">containing only</ins> <span title=
                   25594: "concept-slot"><ins class="diff-chg">slots</ins></span> <ins class=
                   25595: "diff-chg">that do not have a</ins> <a href="#cell" title=
                   25596: "concept-cell"><ins class="diff-chg">cell</ins></a> <ins class=
                   25597: "diff-chg">anchored to them, then this is a</ins> <a href=
                   25598: "#table2"><ins class="diff-chg">table model error</ins></a> .</p>
                   25599: </li>
                   25600: <li>
                   25601: <p><ins class="diff-new">Return</ins> <var title=""><ins class=
                   25602: "diff-new">the table</ins></var> .</p>
                   25603: </li>
                   25604: </ol>
                   25605: <p><ins class="diff-new">The</ins> <dfn id="algorithm"><ins class=
                   25606: "diff-new">algorithm for processing row groups</ins></dfn>
                   25607: ,<ins class="diff-new">which is invoked by the set of steps above
                   25608: for processing</ins> <code><a href="#thead0"><ins class=
                   25609: "diff-new">thead</ins></a></code> ,<code><a href=
                   25610: "#tbody"><ins class="diff-new">tbody</ins></a></code> ,<ins class=
                   25611: "diff-new">and</ins> <code><a href="#tfoot0"><ins class=
                   25612: "diff-new">tfoot</ins></a></code> <ins class="diff-new">elements,
                   25613: is:</ins></p>
                   25614: <ol>
                   25615: <li>
                   25616: <p>Let <var title="">y <sub title="">start</sub></var> have the
                   25617: value <ins class="diff-chg">of</ins> <var title="">y <sub title=
                   25618: ""><del class="diff-old">max</del> <ins class=
                   25619: "diff-chg">height</ins></sub> <del class="diff-old">+1
                   25620: .</del></var> .</p>
                   25621: </li>
                   25622: <li>
                   25623: <p>For each <code><a href="#tr">tr</a></code> element that is a
                   25624: child of the <del class="diff-old">current</del> element
                   25625: <del class="diff-old">,</del> <ins class="diff-chg">being
                   25626: processed,</ins> in tree order, run the <a href=
                   25627: "#algorithm1">algorithm for processing rows <del class=
                   25628: "diff-old">(defined below).</del></a> .</p>
                   25629: </li>
                   25630: <li>
                   25631: <p>If <span><var title="">y <sub title=""><del class=
                   25632: "diff-old">max</del> <ins class="diff-chg">height</ins></sub></var>
                   25633: <del class="diff-old">&nbsp;≥&nbsp;</del> <ins class=
                   25634: "diff-chg">&nbsp;&gt;&nbsp;</ins> <var title="">y <sub title=
                   25635: "">start</sub></var></span> , then let all the last <a href="#row0"
                   25636: title="concept-row">rows</a> in <var title="">the table</var> from
                   25637: <span>y= <var title="">y <sub title="">start</sub></var></span> to
                   25638: <span>y= <var title="">y <sub title=""><del class=
                   25639: "diff-old">max</del> <ins class="diff-chg">height</ins></sub></var>
                   25640: <ins class="diff-chg">-1</ins></span> form a new <a href=
                   25641: "#row-group" title="concept-row-group">row group</a> , anchored at
                   25642: the slot with coordinate <del class="diff-old">(1,</del>
                   25643: <ins class="diff-chg">(0,</ins> <var title="">y <sub title=
                   25644: "">start</sub></var> ), with height <span><var title="">y
                   25645: <sub title=""><del class="diff-old">max</del> <ins class=
                   25646: "diff-chg">height</ins></sub></var> - <var title="">y <sub title=
                   25647: "">start</sub></var> <del class="diff-old">+1,</del></span> ,
                   25648: corresponding to the <var title="">current element</var> .</p>
                   25649: </li>
                   25650: <li>
                   25651: <p>Run the <a href="#algorithm0">algorithm for ending a row group
                   25652: <del class="diff-old">again. Return to step 12 (rows).</del></a>
                   25653: .</p>
                   25654: </li>
                   25655: </ol>
                   25656: <p>The <dfn id="algorithm0">algorithm for ending a row group</dfn>
                   25657: , which is invoked by the set of steps above when starting and
                   25658: ending a block of rows, is:</p>
                   25659: <ol>
                   25660: <li>
                   25661: <p><del class="diff-old">If y current is less than y max , then
                   25662: this is a table model error .</del> While <var title="">y
                   25663: <sub title="">current</sub></var> is less than <var title="">y
                   25664: <sub title=""><del class="diff-old">max</del> <ins class=
                   25665: "diff-chg">height</ins></sub></var> , follow these steps:</p>
                   25666: <ol>
                   25667: <li>
                   25668: <p><ins class="diff-new">Run the</ins> <a href=
                   25669: "#algorithm2"><ins class="diff-new">algorithm for growing
                   25670: downward-growing cells</ins></a> .</p>
                   25671: </li>
                   25672: <li>
                   25673: <p>Increase <var title="">y <sub title="">current</sub></var> by
                   25674: 1.</p>
                   25675: <del class="diff-old">Run the algorithm for growing
                   25676: downward-growing cells .</del></li>
                   25677: </ol>
                   25678: </li>
                   25679: <li>
                   25680: <p>Empty the <var title="">list of downward-growing cells</var>
                   25681: .</p>
                   25682: </li>
                   25683: </ol>
                   25684: <p>The <dfn id="algorithm1">algorithm for processing rows</dfn> ,
                   25685: which is invoked by the set of steps above for processing
                   25686: <code><a href="#tr">tr</a></code> elements, is:</p>
                   25687: <ol>
                   25688: <li>
                   25689: <p><del class="diff-old">Increase</del> <ins class=
                   25690: "diff-chg">If</ins> <var title=""><ins class="diff-chg">y</ins>
                   25691: <sub title=""><ins class="diff-chg">height</ins></sub></var>
                   25692: <ins class="diff-chg">is equal to</ins> <var title="">y <sub title=
                   25693: "">current</sub></var> , <ins class="diff-new">then increase</ins>
                   25694: <var title=""><ins class="diff-new">y</ins> <sub title=
                   25695: ""><ins class="diff-new">height</ins></sub></var> by 1. <del class=
                   25696: "diff-old">Run the algorithm for growing downward-growing cells
                   25697: .</del> <ins class="diff-chg">(</ins> <var title=""><ins class=
                   25698: "diff-chg">y</ins> <sub title=""><ins class=
                   25699: "diff-chg">current</ins></sub></var> <ins class="diff-chg">is
                   25700: never</ins> <em><ins class="diff-chg">greater</ins></em>
                   25701: <ins class="diff-chg">than</ins> <var title=""><ins class=
                   25702: "diff-chg">y</ins> <sub title=""><ins class=
                   25703: "diff-chg">height</ins></sub></var> .)</p>
                   25704: </li>
                   25705: <li>
                   25706: <p>Let <var title="">x <sub title="">current</sub></var> be
                   25707: <del class="diff-old">1. If the tr element being processed contains
                   25708: no td or th elements, then abort this set of steps and return to
                   25709: the algorithm above.</del> <ins class="diff-chg">0.</ins></p>
                   25710: </li>
                   25711: <li>
                   25712: <p>Let <var title="">current cell</var> be the first <code><a href=
                   25713: "#td">td</a></code> or <code><a href="#th">th</a></code> element in
                   25714: the <code><a href="#tr">tr</a></code> element being processed.</p>
                   25715: </li>
                   25716: <li>
                   25717: <p><ins class="diff-new">Run the</ins> <a href=
                   25718: "#algorithm2"><ins class="diff-new">algorithm for growing
                   25719: downward-growing cells</ins></a> .</p>
                   25720: </li>
                   25721: <li>
                   25722: <p><del class="diff-old">Cells.</del> <i><ins class=
                   25723: "diff-chg">Cells</ins></i> : While <var title="">x <sub title=
                   25724: "">current</sub></var> is less than <del class="diff-old">or equal
                   25725: to</del> <var title="">x <sub title=""><del class=
                   25726: "diff-old">max</del> <ins class="diff-chg">width</ins></sub></var>
                   25727: and the slot with coordinate ( <var title="">x <sub title=
                   25728: "">current</sub></var> , <var title="">y <sub title=
                   25729: "">current</sub></var> ) already has a cell assigned to it,
                   25730: increase <var title="">x <sub title="">current</sub></var> by
                   25731: 1.</p>
                   25732: </li>
                   25733: <li>
                   25734: <p>If <var title="">x <sub title="">current</sub></var> is
                   25735: <del class="diff-old">greater than</del> <ins class=
                   25736: "diff-chg">equal to</ins> <var title="">x <sub title=""><del class=
                   25737: "diff-old">max</del> <ins class="diff-chg">width</ins></sub></var>
                   25738: , increase <var title="">x <sub title=""><del class=
                   25739: "diff-old">max</del> <ins class="diff-chg">width</ins></sub></var>
                   25740: by <del class="diff-old">1 (which will make them equal).</del>
                   25741: <ins class="diff-chg">1. (</ins> <var title=""><ins class=
                   25742: "diff-chg">x</ins> <sub title=""><ins class=
                   25743: "diff-chg">current</ins></sub></var> <ins class="diff-chg">is
                   25744: never</ins> <em><ins class="diff-chg">greater</ins></em>
                   25745: <ins class="diff-chg">than</ins> <var title=""><ins class=
                   25746: "diff-chg">x</ins> <sub title=""><ins class=
                   25747: "diff-chg">width</ins></sub></var> .)</p>
                   25748: </li>
                   25749: <li>
                   25750: <p>If the <var title="">current cell</var> has a <code title=
                   25751: "attr-tdth-colspan"><a href="#colspan">colspan</a></code>
                   25752: attribute, then <a href="#rules" title=
                   25753: "rules for parsing non-negative integers">parse that attribute's
                   25754: value <del class="diff-old">,</del></a> , and let <var title=
                   25755: "">colspan</var> be the result.</p>
                   25756: <p>If parsing that value failed, or returned zero, or if the
                   25757: attribute is absent, then let <var title="">colspan</var> be 1,
                   25758: instead.</p>
                   25759: </li>
                   25760: <li>
                   25761: <p>If the <var title="">current cell</var> has a <code title=
                   25762: "attr-tdth-rowspan"><a href="#rowspan">rowspan</a></code>
                   25763: attribute, then <a href="#rules" title=
                   25764: "rules for parsing non-negative integers">parse that attribute's
                   25765: value <del class="diff-old">,</del></a> , and let <var title=
                   25766: "">rowspan</var> be the result.</p>
                   25767: <p>If parsing that value failed or if the attribute is absent, then
                   25768: let <var title="">rowspan</var> be 1, instead.</p>
                   25769: </li>
                   25770: <li>
                   25771: <p>If <var title="">rowspan</var> is zero, then let <var title=
                   25772: "">cell grows downward</var> be true, and set <var title=
                   25773: "">rowspan</var> to 1. Otherwise, let <var title="">cell grows
                   25774: downward</var> be false.</p>
                   25775: </li>
                   25776: <li>
                   25777: <p>If <span><var title="">x <sub title=""><del class=
                   25778: "diff-old">max</del> <ins class="diff-chg">width</ins></sub></var>
                   25779: &nbsp;&lt;&nbsp; <var title="">x <sub title="">current</sub></var>
                   25780: + <var title="">colspan</var> <del class="diff-old">-1</del></span>
                   25781: , then let <var title="">x <sub title=""><del class=
                   25782: "diff-old">max</del> <ins class="diff-chg">width</ins></sub></var>
                   25783: be <span><var title="">x <sub title="">current</sub></var> +
                   25784: <var title="">colspan</var> <del class="diff-old">-1.</del></span>
                   25785: .</p>
                   25786: </li>
                   25787: <li>
                   25788: <p>If <span><var title="">y <sub title=""><del class=
                   25789: "diff-old">max</del> <ins class="diff-chg">height</ins></sub></var>
                   25790: &nbsp;&lt;&nbsp; <var title="">y <sub title="">current</sub></var>
                   25791: + <var title="">rowspan</var> <del class="diff-old">-1</del></span>
                   25792: , then let <var title="">y <sub title=""><del class=
                   25793: "diff-old">max</del> <ins class="diff-chg">height</ins></sub></var>
                   25794: be <span><var title="">y <sub title="">current</sub></var> +
                   25795: <var title="">rowspan</var> <del class="diff-old">-1.</del></span>
                   25796: .</p>
                   25797: </li>
                   25798: <li>
                   25799: <p>Let the slots with coordinates ( <var title="">x</var> ,
                   25800: <var title="">y</var> ) such that <span><var title="">x <sub title=
                   25801: "">current</sub></var> &nbsp;≤&nbsp; <var title="">x</var>
                   25802: &nbsp;&lt;&nbsp; <var title="">x <sub title="">current</sub></var>
                   25803: + <var title="">colspan</var></span> and <span><var title="">y
                   25804: <sub title="">current</sub></var> &nbsp;≤&nbsp; <var title=
                   25805: "">y</var> &nbsp;&lt;&nbsp; <var title="">y <sub title=
                   25806: "">current</sub></var> + <var title="">rowspan</var></span> be
                   25807: covered by a new <a href="#cell" title="concept-cell">cell</a>
                   25808: <var title="">c</var> , anchored at ( <var title="">x <sub title=
                   25809: "">current</sub></var> , <var title="">y <sub title=
                   25810: "">current</sub></var> ), which has width <var title=
                   25811: "">colspan</var> and height <var title="">rowspan</var> ,
                   25812: corresponding to the <var title="">current cell</var> element.</p>
                   25813: <p>If the <var title="">current cell</var> element is a
                   25814: <code><a href="#th">th</a></code> element, let this new cell
                   25815: <var title="">c</var> be a header cell; otherwise, let it be a data
                   25816: cell. To establish what header cells apply to a data cell, use the
                   25817: <a href="#algorithm3">algorithm for assigning header cells to data
                   25818: cells</a> described in the next section.</p>
                   25819: <p>If any of the slots involved already had a <a href="#cell"
                   25820: title="concept-cell">cell</a> covering them, then this is a
                   25821: <a href="#table2">table model error</a> . Those slots now have two
                   25822: cells overlapping.</p>
                   25823: </li>
                   25824: <li>
                   25825: <p>If <var title="">cell grows downward</var> is true, then add the
                   25826: tuple { <var title="">c</var> , <var title="">x <sub title=
                   25827: "">current</sub></var> , <var title="">colspan</var> } to the
                   25828: <var title="">list of downward-growing cells</var> .</p>
                   25829: </li>
                   25830: <li>
                   25831: <p>Increase <var title="">x <sub title="">current</sub></var> by
                   25832: <var title="">colspan</var> .</p>
                   25833: </li>
                   25834: <li>
                   25835: <p>If <var title="">current cell</var> is the last <code><a href=
                   25836: "#td">td</a></code> or <code><a href="#th">th</a></code> element in
                   25837: the <code><a href="#tr">tr</a></code> element being processed, then
                   25838: <ins class="diff-new">increase</ins> <var title=""><ins class=
                   25839: "diff-new">y</ins> <sub title=""><ins class=
                   25840: "diff-new">current</ins></sub></var> <ins class="diff-new">by
                   25841: 1,</ins> abort this set of <del class="diff-old">steps</del>
                   25842: <ins class="diff-chg">steps,</ins> and return to the algorithm
                   25843: above.</p>
                   25844: </li>
                   25845: <li>
                   25846: <p>Let <var title="">current cell</var> be the next <code><a href=
                   25847: "#td">td</a></code> or <code><a href="#th">th</a></code> element in
                   25848: the <code><a href="#tr">tr</a></code> element being processed.</p>
                   25849: </li>
                   25850: <li>
                   25851: <p>Return to step 5 (cells).</p>
                   25852: </li>
                   25853: </ol>
                   25854: <p><del class="diff-old">The</del> <ins class="diff-chg">When the
                   25855: algorithms above require the user agent to run the</ins> <dfn id=
                   25856: "algorithm2">algorithm for growing downward-growing cells</dfn> ,
1.2     ! mike     25857: <del class="diff-old">used when adding a new row, is as follows: If
        !          25858: the list of downward-growing cells is empty, do nothing. Abort
        !          25859: these steps; return to</del> the <del class="diff-old">step that
1.1       mike     25860: invoked this algorithm. Otherwise, if y max is less than y current
                   25861: , then increase y max by 1 (this will make it equal to y current ).
                   25862: For</del> <ins class="diff-chg">user agent must, for</ins> each {
                   25863: <var title="">cell</var> , <var title="">cell <sub title=
                   25864: "">x</sub></var> , <var title="">width</var> } tuple in the
                   25865: <var title="">list of downward-growing cells</var> , <ins class=
                   25866: "diff-new">if any,</ins> extend the <a href="#cell" title=
                   25867: "concept-cell">cell</a> <var title="">cell</var> so that it also
                   25868: covers the slots with coordinates ( <var title="">x</var> ,
                   25869: <var title="">y <sub title="">current</sub></var> ), where
                   25870: <span><var title="">cell <sub title="">x</sub></var> &nbsp;≤&nbsp;
                   25871: <var title="">x</var> &nbsp;&lt;&nbsp; <var title="">cell
                   25872: <sub title="">x</sub></var> + <var title="">width</var> <del class=
                   25873: "diff-old">-1</del></span> . <del class="diff-old">If, after
                   25874: establishing which elements correspond to which slots, there exists
                   25875: a column in the table containing only slots that do not have a cell
                   25876: anchored to them, then this is a table model error .</del></p>
                   25877: <h5 id="header-and-data-cell-semantics"><span class=
                   25878: "secno"><del class="diff-old">3.15.11.2.</del> <ins class=
                   25879: "diff-chg">3.13.13.2.</ins></span> Forming relationships between
                   25880: data cells and header cells</h5>
                   25881: <p>Each data cell can be assigned zero or more header cells. The
                   25882: <dfn id="algorithm3">algorithm for assigning header cells to data
                   25883: cells</dfn> is as follows.</p>
                   25884: <ol>
                   25885: <li>
                   25886: <p>For each header cell in the table, in <a href="#tree-order">tree
                   25887: order <del class="diff-old">:</del></a> , <ins class="diff-chg">run
                   25888: these substeps:</ins></p>
                   25889: <ol>
                   25890: <li>
                   25891: <p>Let ( <var title="">header <sub title="">x</sub></var> ,
                   25892: <var title="">header <sub title="">y</sub></var> ) be the
                   25893: coordinate of the slot to which the header cell is anchored.</p>
                   25894: </li>
                   25895: <li>
                   25896: <p><ins class="diff-new">Let</ins> <var title=""><ins class=
                   25897: "diff-new">header</ins> <sub title=""><ins class=
                   25898: "diff-new">width</ins></sub></var> <ins class="diff-new">be the
                   25899: width of the header cell.</ins></p>
                   25900: </li>
                   25901: <li>
                   25902: <p><ins class="diff-new">Let</ins> <var title=""><ins class=
                   25903: "diff-new">header</ins> <sub title=""><ins class=
                   25904: "diff-new">height</ins></sub></var> <ins class="diff-new">be the
                   25905: height of the header cell.</ins></p>
                   25906: </li>
                   25907: <li>
                   25908: <p><ins class="diff-new">Let</ins> <var title=""><ins class=
                   25909: "diff-new">data cells</ins></var> <ins class="diff-new">be a list
                   25910: of data cells, initially empty.</ins></p>
                   25911: </li>
                   25912: <li>
                   25913: <p>Examine the <code title="attr-th-scope"><a href=
                   25914: "#scope0">scope</a></code> attribute of the <code><a href=
                   25915: "#th">th</a></code> element corresponding to the header cell, and,
                   25916: based on its state, apply the appropriate substep:</p>
                   25917: <dl class="switch">
                   25918: <dt>If it is in the <em title="attr-th-scope-row"><a href=
                   25919: "#row">row</a></em> state</dt>
                   25920: <dd>
                   25921: <p><del class="diff-old">Assign</del> <ins class="diff-chg">Add
                   25922: all</ins> the <del class="diff-old">header cell to any</del> data
                   25923: cells <del class="diff-old">anchored at</del> <ins class=
                   25924: "diff-chg">that cover</ins> slots with coordinates ( <var title=
                   25925: ""><del class="diff-old">data</del> <ins class=
                   25926: "diff-chg">slot</ins> <sub title="">x</sub></var> , <var title=
                   25927: ""><del class="diff-old">data</del> <ins class=
                   25928: "diff-chg">slot</ins> <sub title="">y</sub></var> <del class=
                   25929: "diff-old">)</del> <ins class="diff-chg">),</ins> where
                   25930: <span><var title="">header <sub title="">x</sub></var> <del class=
                   25931: "diff-old">&nbsp;&lt;&nbsp;</del> <ins class="diff-chg">+</ins>
                   25932: <var title=""><del class="diff-old">data</del> <ins class=
                   25933: "diff-chg">header</ins> <sub title=""><del class="diff-old">x</del>
                   25934: <ins class="diff-chg">width</ins></sub></var> &nbsp;≤&nbsp;
                   25935: <var title=""><ins class="diff-new">slot</ins> <sub title=
                   25936: ""><ins class="diff-new">x</ins></sub></var> <ins class=
                   25937: "diff-new">&nbsp;&lt;&nbsp;</ins> <var title="">x <sub title=
                   25938: ""><del class="diff-old">max</del> <ins class=
                   25939: "diff-chg">width</ins></sub></var></span> and <span><var title=
                   25940: ""><del class="diff-old">data</del> <ins class=
                   25941: "diff-chg">header</ins> <sub title="">y</sub></var> <del class=
                   25942: "diff-old">&nbsp;=&nbsp;</del> <ins class=
                   25943: "diff-chg">&nbsp;≤&nbsp;</ins> <var title=""><ins class=
                   25944: "diff-chg">slot</ins> <sub title=""><ins class=
                   25945: "diff-chg">y</ins></sub></var> <ins class=
                   25946: "diff-chg">&nbsp;&lt;&nbsp;</ins> <var title="">header <sub title=
                   25947: "">y</sub></var> <ins class="diff-new">+</ins> <var title=
                   25948: ""><ins class="diff-new">header</ins> <sub title=""><ins class=
                   25949: "diff-new">height</ins></sub></var> <del class=
                   25950: "diff-old">.</del></span> , <ins class="diff-chg">to the</ins>
                   25951: <var title=""><ins class="diff-chg">data cells</ins></var>
                   25952: <ins class="diff-chg">list.</ins></p>
                   25953: </dd>
                   25954: <dt>If it is in the <em title="attr-th-scope-col"><a href=
                   25955: "#col0">column</a></em> state</dt>
                   25956: <dd>
                   25957: <p><del class="diff-old">Assign</del> <ins class="diff-chg">Add
                   25958: all</ins> the <del class="diff-old">header cell to any</del> data
                   25959: cells <del class="diff-old">anchored at</del> <ins class=
                   25960: "diff-chg">that cover</ins> slots with coordinates ( <var title=
                   25961: ""><del class="diff-old">data</del> <ins class=
                   25962: "diff-chg">slot</ins> <sub title="">x</sub></var> , <var title=
                   25963: ""><del class="diff-old">data</del> <ins class=
                   25964: "diff-chg">slot</ins> <sub title="">y</sub></var> <del class=
                   25965: "diff-old">)</del> <ins class="diff-chg">),</ins> where
                   25966: <span><var title=""><del class="diff-old">data</del> <ins class=
                   25967: "diff-chg">header</ins> <sub title="">x</sub></var> <del class=
                   25968: "diff-old">&nbsp;=&nbsp;</del> <ins class=
                   25969: "diff-chg">&nbsp;≤&nbsp;</ins> <var title=""><ins class=
                   25970: "diff-chg">slot</ins> <sub title=""><ins class=
                   25971: "diff-chg">x</ins></sub></var> <ins class=
                   25972: "diff-chg">&nbsp;&lt;&nbsp;</ins> <var title="">header <sub title=
                   25973: "">x</sub></var> <ins class="diff-new">+</ins> <var title=
                   25974: ""><ins class="diff-new">header</ins> <sub title=""><ins class=
                   25975: "diff-new">width</ins></sub></var></span> and <span><var title=
                   25976: "">header <sub title="">y</sub></var> <del class=
                   25977: "diff-old">&nbsp;&lt;&nbsp;</del> <ins class="diff-chg">+</ins>
                   25978: <var title=""><del class="diff-old">data</del> <ins class=
                   25979: "diff-chg">header</ins> <sub title=""><del class="diff-old">y</del>
                   25980: <ins class="diff-chg">height</ins></sub></var> &nbsp;≤&nbsp;
                   25981: <var title=""><ins class="diff-new">slot</ins> <sub title=
                   25982: ""><ins class="diff-new">y</ins></sub></var> <ins class=
                   25983: "diff-new">&nbsp;&lt;&nbsp;</ins> <var title="">y <sub title=
                   25984: ""><del class="diff-old">max</del> <ins class=
                   25985: "diff-chg">height</ins></sub></var> <del class=
                   25986: "diff-old">.</del></span> , <ins class="diff-chg">to the</ins>
                   25987: <var title=""><ins class="diff-chg">data cells</ins></var>
                   25988: <ins class="diff-chg">list.</ins></p>
                   25989: </dd>
                   25990: <dt>If it is in the <em title="attr-th-scope-rowgroup"><a href=
                   25991: "#rowgroup">row group</a></em> state</dt>
                   25992: <dd>
                   25993: <p>If the header cell is not in a <a href="#row-group" title=
                   25994: "concept-row-group">row group</a> , then <del class=
                   25995: "diff-old">don't assign the header cell to any data cells.</del>
                   25996: <ins class="diff-chg">do nothing.</ins></p>
                   25997: <p>Otherwise, let <del class="diff-old">(1,</del> <ins class=
                   25998: "diff-chg">(0,</ins> <var title="">group <sub title=
                   25999: "">y</sub></var> ) be the slot at which the row group is anchored,
                   26000: let <var title="">height</var> be the number of rows in the row
                   26001: group, and <del class="diff-old">assign</del> <ins class=
                   26002: "diff-chg">add all</ins> the <del class="diff-old">header cell to
                   26003: any</del> data cells <del class="diff-old">anchored at</del>
                   26004: <ins class="diff-chg">that cover</ins> slots with coordinates (
                   26005: <var title=""><del class="diff-old">data</del> <ins class=
                   26006: "diff-chg">slot</ins> <sub title="">x</sub></var> , <var title=
                   26007: ""><del class="diff-old">data</del> <ins class=
                   26008: "diff-chg">slot</ins> <sub title="">y</sub></var> <del class=
                   26009: "diff-old">)</del> <ins class="diff-chg">),</ins> where
                   26010: <span><var title="">header <sub title="">x</sub></var>
                   26011: &nbsp;≤&nbsp; <var title=""><del class="diff-old">data</del>
                   26012: <ins class="diff-chg">slot</ins> <sub title="">x</sub></var>
                   26013: <del class="diff-old">&nbsp;≤&nbsp;</del> <ins class=
                   26014: "diff-chg">&nbsp;&lt;&nbsp;</ins> <var title="">x <sub title=
                   26015: ""><del class="diff-old">max</del> <ins class=
                   26016: "diff-chg">width</ins></sub></var></span> and <span><var title=
                   26017: "">header <sub title="">y</sub></var> &nbsp;≤&nbsp; <var title=
                   26018: ""><del class="diff-old">data</del> <ins class=
                   26019: "diff-chg">slot</ins> <sub title="">y</sub></var> &nbsp;&lt;&nbsp;
                   26020: <var title="">group <sub title="">y</sub></var> + <var title=
                   26021: "">height</var> <del class="diff-old">.</del></span> , <ins class=
                   26022: "diff-chg">to the</ins> <var title=""><ins class="diff-chg">data
                   26023: cells</ins></var> <ins class="diff-chg">list.</ins></p>
                   26024: </dd>
                   26025: <dt>If it is in the <em title="attr-th-scope-colgroup"><a href=
                   26026: "#colgroup0">column group</a></em> state</dt>
                   26027: <dd>
                   26028: <p>If the header cell is not <ins class="diff-new">anchored</ins>
                   26029: in a <a href="#column0" title="concept-column-group">column
                   26030: group</a> , then <del class="diff-old">don't assign the header cell
                   26031: to any data cells.</del> <ins class="diff-chg">do
                   26032: nothing.</ins></p>
                   26033: <p>Otherwise, let ( <var title="">group <sub title="">x</sub></var>
                   26034: , <del class="diff-old">1)</del> <ins class="diff-chg">0)</ins> be
                   26035: the slot at which <del class="diff-old">the</del> <ins class=
                   26036: "diff-chg">that</ins> column group is anchored, let <var title=
                   26037: "">width</var> be the number of columns in the column group, and
                   26038: <del class="diff-old">assign</del> <ins class="diff-chg">add
                   26039: all</ins> the <del class="diff-old">header cell to any</del> data
                   26040: cells <del class="diff-old">anchored at</del> <ins class=
                   26041: "diff-chg">that cover</ins> slots with coordinates ( <var title=
                   26042: ""><del class="diff-old">data</del> <ins class=
                   26043: "diff-chg">slot</ins> <sub title="">x</sub></var> , <var title=
                   26044: ""><del class="diff-old">data</del> <ins class=
                   26045: "diff-chg">slot</ins> <sub title="">y</sub></var> <del class=
                   26046: "diff-old">)</del> <ins class="diff-chg">),</ins> where
                   26047: <span><var title="">header <sub title="">x</sub></var>
                   26048: &nbsp;≤&nbsp; <var title=""><del class="diff-old">data</del>
                   26049: <ins class="diff-chg">slot</ins> <sub title="">x</sub></var>
                   26050: &nbsp;&lt;&nbsp; <var title="">group <sub title="">x</sub></var> +
                   26051: <var title="">width</var></span> and <span><var title="">header
                   26052: <sub title="">y</sub></var> &nbsp;≤&nbsp; <var title=""><del class=
                   26053: "diff-old">data</del> <ins class="diff-chg">slot</ins> <sub title=
                   26054: "">y</sub></var> <del class="diff-old">&nbsp;≤&nbsp;</del>
                   26055: <ins class="diff-chg">&nbsp;&lt;&nbsp;</ins> <var title="">y
                   26056: <sub title=""><del class="diff-old">max</del> <ins class=
                   26057: "diff-chg">height</ins></sub></var> <del class=
                   26058: "diff-old">.</del></span> , <ins class="diff-chg">to the</ins>
                   26059: <var title=""><ins class="diff-chg">data cells</ins></var>
                   26060: <ins class="diff-chg">list.</ins></p>
                   26061: </dd>
                   26062: <dt>Otherwise, it is in the <em title="">auto</em> state</dt>
                   26063: <dd>
                   26064: <p><ins class="diff-new">Run these steps:</ins></p>
                   26065: <ol>
                   26066: <li>
                   26067: <p>If the header cell is <del class="diff-old">not in the first row
                   26068: of the table, or not in the first cell of</del> <a href=
                   26069: "#equivalent"><ins class="diff-chg">equivalent to</ins> a
                   26070: <del class="diff-old">row,</del> <ins class="diff-chg">wide
                   26071: cell</ins></a> ,<ins class="diff-chg">let</ins> <var title=
                   26072: ""><ins class="diff-chg">header</ins> <sub title=""><ins class=
                   26073: "diff-chg">width</ins></sub></var> <ins class=
                   26074: "diff-chg">equal</ins> <span><var title=""><ins class=
                   26075: "diff-chg">x</ins> <sub title=""><ins class=
                   26076: "diff-chg">width</ins></sub></var> <ins class="diff-chg">-</ins>
                   26077: <var title=""><ins class="diff-chg">header</ins> <sub title=
                   26078: ""><ins class="diff-chg">x</ins></sub></var></span> .<a href=
                   26079: "#references"><ins class="diff-chg">[UNICODE]</ins></a></p>
                   26080: </li>
                   26081: <li>
                   26082: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   26083: "diff-chg">x</ins></var> <ins class="diff-chg">equal</ins>
                   26084: <span><var title=""><ins class="diff-chg">header</ins> <sub title=
                   26085: ""><ins class="diff-chg">x</ins></sub></var> <ins class=
                   26086: "diff-chg">+</ins> <var title=""><ins class="diff-chg">header</ins>
                   26087: <sub title=""><ins class="diff-chg">width</ins></sub></var></span>
                   26088: .</p>
                   26089: </li>
                   26090: <li>
                   26091: <p><i><ins class="diff-chg">Horizontal</ins></i> :<ins class=
                   26092: "diff-chg">If</ins> <var title=""><ins class=
                   26093: "diff-chg">x</ins></var> <ins class="diff-chg">is equal to</ins>
                   26094: <var title=""><ins class="diff-chg">x</ins> <sub title=
                   26095: ""><ins class="diff-chg">width</ins></sub></var> , then <del class=
                   26096: "diff-old">don't assign</del> <ins class="diff-chg">jump down
                   26097: to</ins> the <ins class="diff-new">step below labeled</ins>
                   26098: <i><ins class="diff-new">vertical</ins></i> .</p>
                   26099: </li>
                   26100: <li>
                   26101: <p><ins class="diff-new">If there is a</ins> header cell
                   26102: <ins class="diff-new">anchored at (</ins> <var title=""><ins class=
                   26103: "diff-new">x</ins></var> ,<var title=""><ins class=
                   26104: "diff-new">header</ins> <sub title=""><ins class=
                   26105: "diff-new">y</ins></sub></var> <ins class="diff-new">) with
                   26106: height</ins> <var title=""><ins class="diff-new">header</ins>
                   26107: <sub title=""><ins class="diff-new">height</ins></sub></var>
                   26108: ,<ins class="diff-new">then jump down</ins> to <del class=
                   26109: "diff-old">any</del> <ins class="diff-chg">the step below
                   26110: labeled</ins> <i><ins class="diff-chg">vertical</ins></i> .</p>
                   26111: </li>
                   26112: <li>
                   26113: <p><ins class="diff-chg">Add all the</ins> data <del class=
                   26114: "diff-old">cells.</del> <ins class="diff-chg">cells that cover
                   26115: slots with coordinates (</ins> <var title=""><ins class=
                   26116: "diff-chg">slot</ins> <sub title=""><ins class=
                   26117: "diff-chg">x</ins></sub></var> ,<var title=""><ins class=
                   26118: "diff-chg">slot</ins> <sub title=""><ins class=
                   26119: "diff-chg">y</ins></sub></var> <ins class="diff-chg">), where</ins>
                   26120: <span><var title=""><ins class="diff-chg">slot</ins> <sub title=
                   26121: ""><ins class="diff-chg">x</ins></sub></var> <ins class=
                   26122: "diff-chg">&nbsp;=&nbsp;</ins> <var title=""><ins class=
                   26123: "diff-chg">x</ins></var></span> <ins class="diff-chg">and</ins>
                   26124: <span><var title=""><ins class="diff-chg">header</ins> <sub title=
                   26125: ""><ins class="diff-chg">y</ins></sub></var> <ins class=
                   26126: "diff-chg">&nbsp;≤&nbsp;</ins> <var title=""><ins class=
                   26127: "diff-chg">slot</ins> <sub title=""><ins class=
                   26128: "diff-chg">y</ins></sub></var> <ins class=
                   26129: "diff-chg">&nbsp;&lt;&nbsp;</ins> <var title=""><ins class=
                   26130: "diff-chg">header</ins> <sub title=""><ins class=
                   26131: "diff-chg">y</ins></sub></var> <ins class="diff-chg">+</ins>
                   26132: <var title=""><ins class="diff-chg">header</ins> <sub title=
                   26133: ""><ins class="diff-chg">height</ins></sub></var></span>
                   26134: ,<ins class="diff-chg">to the</ins> <var title=""><ins class=
                   26135: "diff-chg">data cells</ins></var> <ins class=
                   26136: "diff-chg">list.</ins></p>
                   26137: </li>
                   26138: <li>
                   26139: <p><del class="diff-old">Otherwise, if</del> <ins class=
                   26140: "diff-chg">Increase</ins> <var title=""><ins class=
                   26141: "diff-chg">x</ins></var> <ins class="diff-chg">by 1.</ins></p>
                   26142: </li>
                   26143: <li>
1.2     ! mike     26144: <p><ins class="diff-chg">Jump up to</ins> the <ins class=
        !          26145: "diff-new">step above labeled</ins> <i><ins class=
        !          26146: "diff-new">horizontal</ins></i> .</p>
1.1       mike     26147: </li>
                   26148: <li>
1.2     ! mike     26149: <p><i><ins class="diff-new">Vertical</ins></i> :<ins class=
        !          26150: "diff-new">Let</ins> <var title=""><ins class=
        !          26151: "diff-new">y</ins></var> <ins class="diff-new">equal</ins>
        !          26152: <span><var title="">header <sub title=""><ins class=
        !          26153: "diff-new">y</ins></sub></var> <ins class="diff-new">+</ins>
        !          26154: <var title=""><ins class="diff-new">header</ins> <sub title=
        !          26155: ""><ins class="diff-new">height</ins></sub></var></span> .</p>
1.1       mike     26156: </li>
                   26157: <li>
1.2     ! mike     26158: <p><ins class="diff-new">If</ins> <var title=""><ins class=
        !          26159: "diff-new">y</ins></var> <ins class="diff-new">is equal to</ins>
        !          26160: <var title=""><ins class="diff-new">y</ins> <sub title=
        !          26161: ""><ins class="diff-new">height</ins></sub></var> ,<ins class=
        !          26162: "diff-new">then jump to the step below labeled</ins> <i><ins class=
        !          26163: "diff-new">end</ins></i> .</p>
1.1       mike     26164: </li>
                   26165: <li>
1.2     ! mike     26166: <p><ins class="diff-new">If there is a header cell</ins>
        !          26167: <var title=""><ins class="diff-new">cell</ins></var> <ins class=
        !          26168: "diff-new">anchored at (</ins> <var title=""><ins class=
        !          26169: "diff-new">header</ins> <sub title=""><ins class=
        !          26170: "diff-new">x</ins></sub></var> ,<var title=""><ins class=
        !          26171: "diff-new">y</ins></var> <ins class="diff-new">), then follow these
1.1       mike     26172: substeps:</ins></p>
                   26173: <ol>
                   26174: <li>
1.2     ! mike     26175: <p><ins class="diff-new">If the header cell</ins> <var title=
        !          26176: "">cell</var> is <del class="diff-old">in</del> <a href=
        !          26177: "#equivalent"><ins class="diff-chg">equivalent to a wide
        !          26178: cell</ins></a> ,<ins class="diff-chg">then let</ins> <var title=
1.1       mike     26179: ""><ins class="diff-chg">width</ins></var> <ins class=
1.2     ! mike     26180: "diff-chg">be</ins> <span><var title=""><ins class=
        !          26181: "diff-chg">x</ins> <sub title=""><ins class=
        !          26182: "diff-chg">width</ins></sub></var> <ins class="diff-chg">-</ins>
        !          26183: <var title=""><ins class="diff-chg">header</ins> <sub title=
        !          26184: ""><ins class="diff-chg">x</ins></sub></var></span> .<ins class=
        !          26185: "diff-chg">Otherwise, let</ins> <var title=""><ins class=
        !          26186: "diff-chg">width</ins></var> <ins class="diff-chg">be</ins> the
        !          26187: <del class="diff-old">first row</del> <ins class=
        !          26188: "diff-chg">width</ins> of the <del class="diff-old">table, assign
        !          26189: the</del> header cell <var title=""><ins class=
        !          26190: "diff-new">cell</ins></var> .</p>
1.1       mike     26191: </li>
                   26192: <li>
                   26193: <p><ins class="diff-new">If</ins> <var title=""><ins class=
                   26194: "diff-new">width</ins></var> <ins class="diff-new">is equal</ins>
                   26195: to <del class="diff-old">any</del> <var title=""><ins class=
                   26196: "diff-chg">header</ins> <sub title=""><ins class=
                   26197: "diff-chg">width</ins></sub></var> ,<ins class="diff-chg">then jump
                   26198: to the step below labeled</ins> <i><ins class=
                   26199: "diff-chg">end</ins></i> .</p>
                   26200: </li>
                   26201: </ol>
                   26202: </li>
                   26203: <li>
                   26204: <p><ins class="diff-chg">Add all the</ins> data cells <del class=
                   26205: "diff-old">anchored at</del> <ins class="diff-chg">that cover</ins>
                   26206: slots with coordinates ( <var title=""><del class=
                   26207: "diff-old">data</del> <ins class="diff-chg">slot</ins> <sub title=
                   26208: "">x</sub></var> , <var title=""><del class="diff-old">data</del>
                   26209: <ins class="diff-chg">slot</ins> <sub title="">y</sub></var>
                   26210: <del class="diff-old">)</del> <ins class="diff-chg">),</ins> where
                   26211: <span><var title=""><del class="diff-old">data</del> <ins class=
                   26212: "diff-chg">header</ins> <sub title="">x</sub></var> <del class=
                   26213: "diff-old">&nbsp;=&nbsp;</del> <ins class=
                   26214: "diff-chg">&nbsp;≤&nbsp;</ins> <var title=""><ins class=
                   26215: "diff-chg">slot</ins> <sub title=""><ins class=
                   26216: "diff-chg">x</ins></sub></var> <ins class=
                   26217: "diff-chg">&nbsp;&lt;&nbsp;</ins> <var title="">header <sub title=
                   26218: "">x</sub></var> <ins class="diff-new">+</ins> <var title=
                   26219: ""><ins class="diff-new">header</ins> <sub title=""><ins class=
                   26220: "diff-new">width</ins></sub></var></span> and <span><var title=
                   26221: ""><del class="diff-old">header</del> <ins class=
                   26222: "diff-chg">slot</ins> <sub title="">y</sub></var> <del class=
                   26223: "diff-old">&nbsp;&lt;&nbsp;</del> <ins class=
                   26224: "diff-chg">&nbsp;=&nbsp;</ins> <var title=""><del class=
                   26225: "diff-old">data</del> y</var></span> , <ins class="diff-new">to
                   26226: the</ins> <var title=""><ins class="diff-new">data
                   26227: cells</ins></var> <del class="diff-old">&nbsp;≤&nbsp;</del>
                   26228: <ins class="diff-chg">list.</ins></p>
                   26229: </li>
                   26230: <li>
                   26231: <p><ins class="diff-chg">Increase</ins> <var title="">y <del class=
                   26232: "diff-old">max</del></var> <ins class="diff-chg">by 1.</ins></p>
                   26233: </li>
                   26234: <li>
                   26235: <p><ins class="diff-chg">Jump up to the step above labeled</ins>
                   26236: <i><ins class="diff-chg">vertical</ins></i> .</p>
                   26237: </li>
                   26238: <li>
                   26239: <p><i><ins class="diff-new">End</ins></i> :<ins class=
                   26240: "diff-new">Coalesce all the duplicate entries in the</ins>
                   26241: <var title=""><ins class="diff-new">data cells</ins></var>
                   26242: <ins class="diff-new">list, so that each data cell is only present
                   26243: once, in tree order.</ins></p>
                   26244: </li>
                   26245: </ol>
                   26246: </dd>
                   26247: </dl>
                   26248: </li>
                   26249: <li>
                   26250: <p><ins class="diff-new">Assign the header cell to all the data
                   26251: cells in the</ins> <var title=""><ins class="diff-new">data
                   26252: cells</ins></var> <ins class="diff-new">list that correspond
                   26253: to</ins> <code><del class="diff-old">.</del> <a href=
                   26254: "#td"><ins class="diff-chg">td</ins></a></code> <ins class=
                   26255: "diff-chg">elements that do not have a</ins> <code title=
                   26256: "attr-td-headers"><a href="#headers"><ins class=
                   26257: "diff-chg">headers</ins></a></code> <ins class="diff-chg">attribute
                   26258: specified.</ins></p>
                   26259: </li>
                   26260: </ol>
                   26261: </li>
                   26262: <li>
                   26263: <p><ins class="diff-chg">For each data cell in the table, in</ins>
                   26264: <a href="#tree-order"><ins class="diff-chg">tree order</ins></a>
                   26265: ,<ins class="diff-chg">run these substeps:</ins></p>
                   26266: <ol>
                   26267: <li>
1.2     ! mike     26268: <p><ins class="diff-chg">If the data cell corresponds to a</ins>
        !          26269: <code><a href="#td"><ins class="diff-chg">td</ins></a></code>
        !          26270: <ins class="diff-chg">element that does not have a</ins>
1.1       mike     26271: <code title="attr-td-headers"><a href="#headers"><ins class=
1.2     ! mike     26272: "diff-chg">headers</ins></a></code> <ins class="diff-chg">attribute
1.1       mike     26273: specified, then skip these substeps and move on to the next data
                   26274: cell (if any).</ins></p>
                   26275: </li>
                   26276: <li>
                   26277: <p>Otherwise, <ins class="diff-new">take the value of the</ins>
                   26278: <code title="attr-td-headers"><a href="#headers"><ins class=
                   26279: "diff-new">headers</ins></a></code> <ins class="diff-new">attribute
                   26280: and</ins> <a href="#split" title=
                   26281: "split a string on spaces"><ins class="diff-new">split it on
                   26282: spaces</ins></a> ,<ins class="diff-new">letting</ins> <var title=
                   26283: ""><ins class="diff-new">id list</ins></var> <ins class=
                   26284: "diff-new">be the list of tokens obtained.</ins></p>
                   26285: </li>
                   26286: <li>
                   26287: <p><ins class="diff-new">For each token in</ins> the <var title=
                   26288: ""><ins class="diff-new">id list</ins></var> ,<ins class=
                   26289: "diff-new">run the following steps:</ins></p>
                   26290: <ol>
                   26291: <li>
                   26292: <p><ins class="diff-new">Let</ins> <var title=""><ins class=
                   26293: "diff-new">id</ins></var> <ins class="diff-new">be the
                   26294: token.</ins></p>
                   26295: </li>
                   26296: <li>
                   26297: <p><ins class="diff-new">If there is a</ins> header cell
                   26298: <del class="diff-old">is</del> in the <del class="diff-old">first
                   26299: column of</del> <a href="#table1" title="concept-table"><ins class=
                   26300: "diff-chg">table</ins></a> <ins class="diff-chg">whose
                   26301: corresponding</ins> <code><a href="#th"><ins class=
                   26302: "diff-chg">th</ins></a></code> <ins class="diff-chg">element has an
                   26303: ID that is equal to</ins> the <del class="diff-old">table;</del>
                   26304: <ins class="diff-chg">value of</ins> <var title=""><ins class=
                   26305: "diff-chg">id</ins></var> ,<ins class="diff-chg">then</ins> assign
                   26306: <del class="diff-old">the</del> <ins class="diff-chg">that</ins>
                   26307: header cell to <del class="diff-old">any</del> <ins class=
                   26308: "diff-chg">the</ins> data <del class="diff-old">cells</del>
                   26309: <ins class="diff-chg">cell.</ins></p>
                   26310: </li>
                   26311: </ol>
                   26312: </li>
                   26313: </ol>
                   26314: </li>
                   26315: </ol>
                   26316: <p><ins class="diff-chg">A header cell</ins> anchored at
                   26317: <ins class="diff-new">(</ins> <var title=""><ins class=
                   26318: "diff-new">header</ins> <sub title=""><ins class=
                   26319: "diff-new">x</ins></sub></var> ,<var title=""><ins class=
                   26320: "diff-new">header</ins> <sub title=""><ins class=
                   26321: "diff-new">y</ins></sub></var> <ins class="diff-new">) with
                   26322: width</ins> <var title=""><ins class="diff-new">header</ins>
                   26323: <sub title=""><ins class="diff-new">width</ins></sub></var>
                   26324: <ins class="diff-new">and height</ins> <var title=""><ins class=
                   26325: "diff-new">header</ins> <sub title=""><ins class=
                   26326: "diff-new">height</ins></sub></var> <ins class="diff-new">is said
                   26327: to be</ins> <dfn id="equivalent"><ins class="diff-new">equivalent
                   26328: to a wide cell</ins></dfn> <ins class="diff-new">if all the</ins>
                   26329: slots with coordinates ( <var title=""><del class=
                   26330: "diff-old">data</del> <ins class="diff-chg">slot</ins> <sub title=
                   26331: "">x</sub></var> , <var title=""><del class="diff-old">data</del>
                   26332: <ins class="diff-chg">slot</ins> <sub title="">y</sub></var>
                   26333: <del class="diff-old">)</del> <ins class="diff-chg">),</ins> where
                   26334: <span><var title="">header <sub title="">x</sub></var> <del class=
                   26335: "diff-old">&nbsp;&lt;&nbsp;</del> <ins class="diff-chg">+</ins>
                   26336: <var title=""><del class="diff-old">data</del> <ins class=
                   26337: "diff-chg">header</ins> <sub title=""><del class="diff-old">x</del>
                   26338: <ins class="diff-chg">width</ins></sub></var> &nbsp;≤&nbsp;
                   26339: <var title=""><ins class="diff-new">slot</ins> <sub title=
                   26340: ""><ins class="diff-new">x</ins></sub></var> <ins class=
                   26341: "diff-new">&nbsp;&lt;&nbsp;</ins> <var title="">x <sub title=
                   26342: ""><del class="diff-old">max</del> <ins class=
                   26343: "diff-chg">width</ins></sub></var></span> and <span><var title=
                   26344: ""><del class="diff-old">data</del> <ins class=
                   26345: "diff-chg">header</ins> <sub title="">y</sub></var> <del class=
                   26346: "diff-old">&nbsp;=&nbsp;</del> <ins class=
                   26347: "diff-chg">&nbsp;≤&nbsp;</ins> <var title=""><ins class=
                   26348: "diff-chg">slot</ins> <sub title=""><ins class=
                   26349: "diff-chg">y</ins></sub></var> <ins class=
                   26350: "diff-chg">&nbsp;&lt;&nbsp;</ins> <var title="">header <sub title=
                   26351: "">y</sub></var> <ins class="diff-new">+</ins> <var title=
                   26352: ""><ins class="diff-new">header</ins> <sub title=""><ins class=
                   26353: "diff-new">height</ins></sub> <del class=
                   26354: "diff-old">.</del></var></span> , <ins class="diff-chg">are all
                   26355: either empty or covered by</ins> <a href="#empty0" title=
                   26356: "empty data cell"><ins class="diff-chg">empty data cells</ins></a>
                   26357: .</p>
                   26358: <p><ins class="diff-chg">A data cell is said to be an</ins>
                   26359: <dfn id="empty0"><ins class="diff-chg">empty data cell</ins></dfn>
                   26360: <ins class="diff-chg">if it contains no elements and its text
                   26361: content, if any, consists only of characters in the Unicode
                   26362: character class Zs.</ins> <a href="#references"><ins class=
                   26363: "diff-chg">[UNICODE]</ins></a></p>
                   26364: <p><ins class="diff-chg">User agents may remove</ins> <a href=
                   26365: "#empty0" title="empty data cell"><ins class="diff-chg">empty data
                   26366: cells</ins></a> <ins class="diff-chg">when analyzing data in
                   26367: a</ins> <a href="#table1" title="concept-table"><ins class=
                   26368: "diff-chg">table</ins></a> .</p>
                   26369: <h3 id="forms"><span class="secno"><del class=
                   26370: "diff-old">3.16.</del> <ins class="diff-chg">3.14</ins></span>
                   26371: Forms</h3>
                   26372: <p class="big-issue">This section will contain definitions of the
                   26373: <code>form</code> element and so forth.</p>
                   26374: <p class="big-issue">This section will be a rewrite of the HTML4
                   26375: Forms and Web Forms 2.0 specifications, with hopefully no normative
                   26376: changes.</p>
                   26377: <h4 id="the-form"><span class="secno"><del class=
                   26378: "diff-old">3.16.1.</del> <ins class="diff-chg">3.14.1</ins></span>
                   26379: The <code>form</code> element</h4>
                   26380: <h4 id="the-fieldset"><span class="secno"><del class=
                   26381: "diff-old">3.16.2.</del> <ins class="diff-chg">3.14.2</ins></span>
                   26382: The <code>fieldset</code> element</h4>
                   26383: <h4 id="the-input"><span class="secno"><del class=
                   26384: "diff-old">3.16.3.</del> <ins class="diff-chg">3.14.3</ins></span>
                   26385: The <code>input</code> element</h4>
                   26386: <h4 id="the-button"><span class="secno"><del class=
                   26387: "diff-old">3.16.4.</del> <ins class="diff-chg">3.14.4</ins></span>
                   26388: The <code>button</code> element</h4>
                   26389: <h4 id="the-label"><span class="secno"><del class=
                   26390: "diff-old">3.16.5.</del> <ins class="diff-chg">3.14.5</ins></span>
                   26391: The <code>label</code> element</h4>
                   26392: <h4 id="the-select"><span class="secno"><del class=
                   26393: "diff-old">3.16.6.</del> <ins class="diff-chg">3.14.6</ins></span>
                   26394: The <code>select</code> element</h4>
                   26395: <h4 id="the-datalist"><span class="secno"><del class=
                   26396: "diff-old">3.16.7.</del> <ins class="diff-chg">3.14.7</ins></span>
                   26397: The <code>datalist</code> element</h4>
                   26398: <h4 id="the-optgroup"><span class="secno"><del class=
                   26399: "diff-old">3.16.8.</del> <ins class="diff-chg">3.14.8</ins></span>
                   26400: The <code>optgroup</code> element</h4>
                   26401: <h4 id="the-option"><span class="secno"><del class=
                   26402: "diff-old">3.16.9.</del> <ins class="diff-chg">3.14.9</ins></span>
                   26403: The <code>option</code> element</h4>
                   26404: <h4 id="the-textarea"><span class="secno"><del class=
                   26405: "diff-old">3.16.10.</del> <ins class=
                   26406: "diff-chg">3.14.10</ins></span> The <code>textarea</code>
                   26407: element</h4>
                   26408: <h4 id="the-output"><span class="secno"><del class=
                   26409: "diff-old">3.16.11.</del> <ins class=
                   26410: "diff-chg">3.14.11</ins></span> The <code>output</code>
                   26411: element</h4>
                   26412: <h4 id="processing0"><span class="secno"><del class=
                   26413: "diff-old">3.16.12.</del> <ins class=
                   26414: "diff-chg">3.14.12</ins></span> Processing model</h4>
                   26415: <p class="big-issue">See <a href=
                   26416: "http://www.whatwg.org/specs/web-forms/current-work/#extend-form-controls">
                   26417: WF2</a> for now</p>
                   26418: <h5 id="form-submission"><span class="secno"><del class=
                   26419: "diff-old">3.16.12.1.</del> <ins class=
                   26420: "diff-chg">3.14.12.1.</ins></span> Form submission</h5>
                   26421: <p class="big-issue">See <a href=
                   26422: "http://www.whatwg.org/specs/web-forms/current-work/#form-submission">
                   26423: WF2</a> for now</p>
                   26424: <p class="big-issue" id="sandboxSubmitBlocked"><ins class=
                   26425: "diff-new">If a form is in a browsing context whose</ins> <a href=
                   26426: "#sandboxed3"><ins class="diff-new">sandboxed forms browsing
                   26427: context flag</ins></a> <ins class="diff-new">is set, it must not be
                   26428: submitted.</ins></p>
                   26429: <h3 id="scripting0"><span class="secno"><del class=
                   26430: "diff-old">3.17.</del> <ins class="diff-chg">3.15</ins></span>
                   26431: Scripting</h3>
                   26432: <p><ins class="diff-new">Scripts allow authors to add interactivity
                   26433: to their documents.</ins></p>
                   26434: <p><ins class="diff-new">Authors are encouraged to use declarative
                   26435: alternatives to scripting where possible, as declarative mechanisms
                   26436: are often more maintainable, and many users disable
                   26437: scripting.</ins></p>
                   26438: <div class="example">
                   26439: <p><ins class="diff-new">For example, instead of using script to
                   26440: show or hide a section to show more details, the</ins>
                   26441: <code><a href="#details"><ins class=
                   26442: "diff-new">details</ins></a></code> <ins class="diff-new">element
                   26443: could be used.</ins></p>
                   26444: </div>
                   26445: <p><ins class="diff-new">Authors are also encouraged to make their
                   26446: applications degrade gracefully in the absence of scripting
                   26447: support.</ins></p>
                   26448: <div class="example">
                   26449: <p><ins class="diff-new">For example, if an author provides a link
                   26450: in a table header to dynamically resort the table, the link could
                   26451: also be made to function without scripts by requesting the sorted
                   26452: table from the server.</ins></p>
                   26453: </div>
                   26454: <h4 id="script"><span class="secno"><del class=
                   26455: "diff-old">3.17.1.</del> <ins class="diff-chg">3.15.1</ins></span>
                   26456: The <dfn id="script1"><code>script</code></dfn> element</h4>
                   26457: <dl class="element">
                   26458: <dt>Categories</dt>
                   26459: <dd><a href="#metadata0">Metadata content</a> .</dd>
                   26460: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   26461: <dt>Contexts in which this element may be used:</dt>
                   26462: <dd>Where <a href="#metadata0">metadata content</a> is
                   26463: expected.</dd>
                   26464: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   26465: expected.</dd>
                   26466: <dt>Content model:</dt>
                   26467: <dd>If there is no <code title="attr-script-src"><a href=
                   26468: "#src9">src</a></code> attribute, depends on the value of the
                   26469: <code title="attr-script-type"><a href="#type11">type</a></code>
                   26470: attribute.</dd>
                   26471: <dd>If there <em>is</em> a <code title="attr-script-src"><a href=
                   26472: "#src9">src</a></code> attribute, the element must be empty.</dd>
                   26473: <dt>Element-specific attributes:</dt>
                   26474: <dd><code title="attr-script-src"><a href=
                   26475: "#src9">src</a></code></dd>
                   26476: <dd><code title="attr-script-async"><a href=
                   26477: "#async">async</a></code></dd>
                   26478: <dd><code title="attr-script-defer"><a href=
                   26479: "#defer">defer</a></code></dd>
                   26480: <dd><code title="attr-script-type"><a href=
                   26481: "#type11">type</a></code></dd>
                   26482: <dd><code title="attr-script-charset"><a href=
                   26483: "#charset2"><ins class="diff-new">charset</ins></a></code></dd>
                   26484: <dt>DOM interface:</dt>
                   26485: <dd>
                   26486: <pre class="idl">
                   26487: interface <dfn id=
                   26488: "htmlscriptelement">HTMLScriptElement</dfn> : <a href=
                   26489: "#htmlelement">HTMLElement</a> {
                   26490:            attribute DOMString <code title=
                   26491: "dom-script-src"><a href="#src10">src</a></code>;
                   26492:            attribute boolean <code title=
                   26493: "dom-script-async"><a href="#async0">async</a></code>;
                   26494:            attribute boolean <code title=
                   26495: "dom-script-defer"><a href="#defer0">defer</a></code>;
                   26496:            attribute DOMString <code title=
                   26497: "dom-script-type"><a href="#type12">type</a></code>;
                   26498: <del class="diff-old">           attribute DOMString ;
                   26499: </del>
                   26500: <ins class="diff-chg">           attribute DOMString <code title=
                   26501: "dom-script-charset"><a href="#charset3">charset</a></code>;
                   26502:            attribute DOMString <code title=
                   26503: "dom-script-text"><a href="#text1">text</a></code>;
                   26504: </ins>
                   26505: };
                   26506: </pre></dd>
                   26507: </dl>
                   26508: <p>The <code><a href="#script1">script</a></code> element allows
                   26509: authors to include dynamic script <ins class="diff-new">and script
                   26510: data</ins> in their documents.</p>
                   26511: <p>When <ins class="diff-new">used to include dynamic
                   26512: scripts,</ins> the <ins class="diff-chg">scripts may either be
                   26513: embedded inline or may be imported from an external file using
                   26514: the</ins> <code title="attr-script-src"><a href="#src9">src</a>
                   26515: <del class="diff-old">attribute</del></code> <ins class=
                   26516: "diff-chg">attribute. If the language</ins> is <del class=
                   26517: "diff-old">set,</del> <ins class="diff-chg">not that described by
                   26518: "</ins> <code title=""><ins class=
                   26519: "diff-chg">text/javascript</ins></code> <ins class="diff-chg">",
                   26520: then</ins> the <ins class="diff-chg">type of the script's language
                   26521: must be given using the</ins> <code title=
                   26522: "attr-script-type"><del class="diff-old">script</del> <a href=
                   26523: "#type11"><ins class="diff-chg">type</ins></a></code> <del class=
                   26524: "diff-old">element refers</del> <ins class=
                   26525: "diff-chg">attribute.</ins></p>
                   26526: <p><ins class="diff-chg">When used</ins> to <del class=
                   26527: "diff-old">an external file. The value</del> <ins class=
                   26528: "diff-chg">include script data, the script data must be embedded
                   26529: inline, the format</ins> of the <del class=
                   26530: "diff-old">attribute</del> <ins class="diff-chg">data</ins> must be
                   26531: <del class="diff-old">a URI (or IRI). If</del> <ins class=
                   26532: "diff-chg">given using the</ins> <code title=
                   26533: "attr-script-type"><a href="#type11"><ins class=
                   26534: "diff-chg">type</ins></a></code> <ins class="diff-chg">attribute,
                   26535: and</ins> the <code title="attr-script-src"><a href=
                   26536: "#src9">src</a></code> attribute <del class="diff-old">is</del>
                   26537: <ins class="diff-chg">must</ins> not <del class="diff-old">set,
                   26538: then</del> <ins class="diff-chg">be specified.</ins></p>
                   26539: <p><ins class="diff-chg">The</ins> <dfn id="type11" title=
                   26540: "attr-script-type"><code><ins class=
                   26541: "diff-chg">type</ins></code></dfn> <ins class="diff-chg">attribute
                   26542: gives</ins> the <del class="diff-old">script is given by</del>
                   26543: <ins class="diff-chg">language of</ins> the <del class=
                   26544: "diff-old">contents</del> <ins class="diff-chg">script or
                   26545: format</ins> of the <del class="diff-old">element.</del>
                   26546: <ins class="diff-chg">script data. If the attribute is present, its
                   26547: value must be a valid MIME type, optionally with parameters.
                   26548: The</ins> <code title=""><ins class="diff-chg">charset</ins></code>
                   26549: <ins class="diff-chg">parameter must not be specified. (The
                   26550: default, which is used if the attribute is absent, is "</ins>
                   26551: <code title=""><ins class="diff-chg">text/javascript</ins></code>
                   26552: <ins class="diff-chg">".)</ins> <a href="#references"><ins class=
                   26553: "diff-chg">[RFC2046]</ins></a></p>
                   26554: <p>The <del class="diff-old">language</del> <dfn id="src9" title=
                   26555: "attr-script-src"><code><ins class=
                   26556: "diff-chg">src</ins></code></dfn> <ins class="diff-chg">attribute,
                   26557: if specified, gives the address</ins> of the <ins class=
                   26558: "diff-new">external</ins> script <del class="diff-old">may</del>
                   26559: <ins class="diff-chg">resource to use. The value of the attribute
                   26560: must</ins> be <ins class="diff-new">a URI (or IRI) to a script
                   26561: resource of the type</ins> given by the <code title=
                   26562: "attr-script-type"><a href="#type11"><ins class=
                   26563: "diff-chg">type</ins></a></code> <ins class="diff-chg">attribute,
                   26564: if the attribute is present, or of the</ins> type <ins class=
                   26565: "diff-new">"</ins> <code title=""><ins class=
                   26566: "diff-new">text/javascript</ins></code> <ins class="diff-new">", if
                   26567: the attribute is absent.</ins></p>
                   26568: <p><ins class="diff-new">The</ins> <dfn id="charset2" title=
                   26569: "attr-script-charset"><code><ins class=
                   26570: "diff-new">charset</ins></code></dfn> <del class=
                   26571: "diff-old">attribute.</del> <ins class="diff-chg">attribute gives
                   26572: the character encoding of the external script resource. The
                   26573: attribute must not be specified if the</ins> <code title=
                   26574: "attr-script-src"><a href="#src9"><ins class=
                   26575: "diff-chg">src</ins></a></code> <ins class="diff-chg">attribute is
                   26576: not present.</ins> If the attribute is <del class=
                   26577: "diff-old">present,</del> <ins class="diff-chg">set,</ins> its
                   26578: value must be a valid <del class="diff-old">MIME type, optionally
                   26579: with parameters.</del> <ins class="diff-chg">character encoding
                   26580: name, and must be the preferred name for that encoding.</ins>
                   26581: <a href="#references"><del class="diff-old">[RFC2046]</del>
                   26582: <ins class="diff-chg">[IANACHARSET]</ins></a></p>
                   26583: <p><ins class="diff-chg">The encoding specified must be the
                   26584: encoding used by the script resource. If the</ins> <code title=
                   26585: "attr-script-charset"><a href="#charset2"><ins class=
                   26586: "diff-chg">charset</ins></a></code> <ins class="diff-new">attribute
                   26587: is omitted, the character encoding of the document will be used. If
                   26588: the script resource uses a different encoding than the document,
                   26589: then the attribute must be specified.</ins></p>
                   26590: <p>The <dfn id="async" title=
                   26591: "attr-script-async"><code>async</code></dfn> and <dfn id="defer"
                   26592: title="attr-script-defer"><code>defer</code></dfn> attributes are
                   26593: <a href="#boolean0" title="boolean attribute">boolean
                   26594: attributes</a> that indicate how the script should be executed.</p>
                   26595: <p>There are three possible modes that can be selected using these
                   26596: attributes. If the <code title="attr-script-async"><a href=
                   26597: "#async">async</a></code> attribute is present, then the script
                   26598: will be executed asynchronously, as soon as it is available. If the
                   26599: <code title="attr-script-async"><a href="#async">async</a></code>
                   26600: attribute is not present but the <code title=
                   26601: "attr-script-defer"><a href="#defer">defer</a></code> attribute is
                   26602: present, then the script is executed when the page has finished
                   26603: parsing. If neither attribute is present, then the script is
                   26604: downloaded and executed immediately, before the user agent
                   26605: continues parsing the page. The exact processing details for these
                   26606: attributes is described below.</p>
                   26607: <p>The <code title="attr-script-defer"><a href=
                   26608: "#defer">defer</a></code> attribute may be specified even if the
                   26609: <code title="attr-script-async"><a href="#async">async</a></code>
                   26610: attribute is specified, to cause legacy Web browsers that only
                   26611: support <code title="attr-script-defer"><a href=
                   26612: "#defer">defer</a></code> (and not <code title=
                   26613: "attr-script-async"><a href="#async">async</a></code> ) to fall
                   26614: back to the <code title="attr-script-defer"><a href=
                   26615: "#defer">defer</a></code> behavior instead of the synchronous
                   26616: blocking behavior that is the default.</p>
                   26617: <p>Changing the <code title="attr-script-src"><a href=
                   26618: "#src9">src</a></code> , <code title="attr-script-type"><a href=
                   26619: "#type11">type</a></code> , <code title=
                   26620: "attr-script-charset"><a href="#charset2"><ins class=
                   26621: "diff-new">charset</ins></a></code> , <code title=
                   26622: "attr-script-async"><a href="#async">async</a></code> , and
                   26623: <code title="attr-script-defer"><a href="#defer">defer</a></code>
                   26624: attributes dynamically has no direct effect; these attribute are
                   26625: only used at specific times described below (namely, when the
                   26626: element is inserted into the document).</p>
                   26627: <p><code><a href="#script1">script</a></code> elements have
                   26628: <del class="diff-old">three</del> <ins class="diff-chg">four</ins>
                   26629: associated pieces of metadata. The first is a flag indicating
                   26630: whether or not the script block has been <dfn id="already">"already
                   26631: executed"</dfn> . Initially, <code><a href=
                   26632: "#script1">script</a></code> elements must have this flag unset
                   26633: (script blocks, when created, are not "already executed"). When a
                   26634: <code><a href="#script1">script</a></code> element is cloned, the
                   26635: "already executed" flag, if set, must be propagated to the clone
                   26636: when it is created. The second is a flag indicating whether the
                   26637: element was <dfn id="parser-inserted">"parser-inserted"</dfn> .
                   26638: This flag is set by the <a href="#html-0">HTML parser</a> and is
                   26639: used to handle <code title="dom-document-write-HTML"><a href=
                   26640: "#document.write...">document.write()</a></code> calls. The third
                   26641: <del class="diff-old">piece</del> <ins class="diff-chg">and fourth
                   26642: pieces</ins> of metadata <del class="diff-old">is</del> <ins class=
                   26643: "diff-chg">are</ins> <dfn id="the-scripts"><var>the script's
                   26644: type</var></dfn> <ins class="diff-new">and</ins> <dfn id=
                   26645: "the-scripts0"><var><ins class="diff-new">the script's character
                   26646: encoding</ins></var></dfn> . <del class="diff-old">It is</del>
                   26647: <ins class="diff-chg">They are</ins> determined when the script is
                   26648: run, based on the attributes on the element at that time.</p>
                   26649: <p><dfn id="running" title="running a script">Running a
                   26650: script</dfn> : <del class="diff-old">when</del> <ins class=
                   26651: "diff-chg">When</ins> a script block is <span>inserted into a
                   26652: document</span> , the user agent must act as follows:</p>
                   26653: <ol>
                   26654: <li>
                   26655: <p>If the <code><a href="#script1">script</a></code> element has a
                   26656: <code title="attr-script-type"><a href="#type11">type</a></code>
                   26657: attribute <del class="diff-old">but</del> <ins class=
                   26658: "diff-chg">and</ins> its value is the empty string, or if the
                   26659: <code><a href="#script1">script</a></code> element has no
                   26660: <code title="attr-script-type"><a href="#type11">type</a></code>
                   26661: attribute but it has a <code title=
                   26662: "attr-script-language">language</code> <del class=
                   26663: "diff-old">attribute,</del> <ins class="diff-chg">attribute</ins>
                   26664: and <em>that</em> attribute's value is the empty string,
                   26665: <ins class="diff-new">or if the</ins> <code><a href=
                   26666: "#script1"><ins class="diff-new">script</ins></a></code>
                   26667: <ins class="diff-new">element has neither a</ins> <code title=
                   26668: "attr-script-type"><a href="#type11"><ins class=
                   26669: "diff-new">type</ins></a></code> <ins class="diff-new">attribute
                   26670: nor a</ins> <code title="attr-script-language"><ins class=
                   26671: "diff-new">language</ins></code> <ins class=
                   26672: "diff-new">attribute,</ins> let <var><a href="#the-scripts">the
                   26673: script's type</a></var> for this <code><a href=
                   26674: "#script1">script</a></code> element be " <code title=
                   26675: "">text/javascript</code> ".</p>
                   26676: <p>Otherwise, if the <code><a href="#script1">script</a></code>
                   26677: element has a <code title="attr-script-type"><a href=
                   26678: "#type11">type</a></code> attribute, let <var><a href=
                   26679: "#the-scripts">the script's type</a></var> for this <code><a href=
                   26680: "#script1">script</a></code> element be the value of that
                   26681: attribute.</p>
                   26682: <p>Otherwise, <del class="diff-old">if</del> the element has a
                   26683: <code title="attr-script-language">language</code> <del class=
                   26684: "diff-old">attribute,</del> <ins class="diff-chg">attribute;</ins>
                   26685: let <var><a href="#the-scripts">the script's type</a></var> for
                   26686: this <code><a href="#script1">script</a></code> element be the
                   26687: concatenation of the string " <code title="">text/</code> "
                   26688: followed by the value of the <code title=
                   26689: "attr-script-language">language</code> attribute.</p>
                   26690: </li>
                   26691: <li>
                   26692: <p>If <del class="diff-old">scripting is disabled , or if</del> the
                   26693: <code><del class="diff-old">Document</del> <a href=
                   26694: "#script1"><ins class="diff-chg">script</ins></a></code>
                   26695: <ins class="diff-new">element</ins> has <ins class=
                   26696: "diff-chg">a</ins> <code title="attr-script-charset"><del class=
                   26697: "diff-old">designMode</del> <a href="#charset2"><ins class=
                   26698: "diff-chg">charset</ins></a></code> <del class=
                   26699: "diff-old">enabled,</del> <ins class="diff-chg">attribute, then
                   26700: let</ins> <var><a href="#the-scripts0"><ins class="diff-chg">the
                   26701: script's character encoding</ins></a></var> <ins class=
                   26702: "diff-chg">for this</ins> <code><a href="#script1"><ins class=
                   26703: "diff-chg">script</ins></a></code> <ins class="diff-chg">element be
                   26704: the encoding given by the</ins> <code title=
                   26705: "attr-script-charset"><a href="#charset2"><ins class=
                   26706: "diff-chg">charset</ins></a></code> <ins class=
                   26707: "diff-chg">attribute.</ins></p>
                   26708: <p><ins class="diff-chg">Otherwise, let</ins> <var><a href=
                   26709: "#the-scripts0"><ins class="diff-chg">the script's character
                   26710: encoding</ins></a></var> <ins class="diff-chg">for this</ins>
                   26711: <code><a href="#script1"><ins class=
                   26712: "diff-chg">script</ins></a></code> <ins class="diff-chg">element be
                   26713: the same as</ins> <a href="#character1" title=
                   26714: "document's character encoding"><ins class="diff-chg">the encoding
                   26715: of the document itself</ins></a> .</p>
                   26716: </li>
                   26717: <li>
                   26718: <p><ins class="diff-chg">If the</ins> <code><a href=
                   26719: "#script1"><ins class="diff-chg">script</ins></a></code>
                   26720: <ins class="diff-chg">element is</ins> <a href=
                   26721: "#without"><ins class="diff-chg">without script</ins></a> , or if
                   26722: the <code><a href="#script1">script</a></code> element was created
                   26723: by an <span>XML parser</span> that itself was created as part of
                   26724: the processing of the <code title="dom-innerHTML-XML"><a href=
                   26725: "#innerhtml1">innerHTML</a></code> attribute's setter , or if the
                   26726: user agent does not <a href="#support">support the scripting
                   26727: language</a> given by <var><a href="#the-scripts">the script's
                   26728: type</a></var> for this <code><a href="#script1">script</a></code>
                   26729: element, or if the <code><a href="#script1">script</a></code>
                   26730: element has its <a href="#already">"already executed"</a> flag set,
                   26731: then the user agent must abort these steps at this point. The
                   26732: script is not executed.</p>
                   26733: </li>
                   26734: <li>
                   26735: <p>The user agent must set the element's <a href=
                   26736: "#already">"already executed"</a> flag.</p>
                   26737: </li>
                   26738: <li>
                   26739: <p>If the element has a <code title="attr-script-src"><a href=
                   26740: "#src9">src</a></code> attribute, then a load for the specified
                   26741: content must be started.</p>
                   26742: <p class="note">Later, once the load has completed, the user agent
                   26743: will have to complete <a href="#when-a" title=
                   26744: "when a script completes loading">the steps described below</a>
                   26745: .</p>
                   26746: <p>For performance reasons, user agents may start loading the
                   26747: script as soon as the attribute is set, instead, in the hope that
                   26748: the element will be inserted into the document. Either way, once
                   26749: the element is inserted into the document, the load must have
                   26750: started. If the UA performs such prefetching, but the element is
                   26751: never inserted in the document, or the <code title=
                   26752: "attr-script-src"><a href="#src9">src</a></code> attribute is
                   26753: dynamically changed, then the user agent will not execute the
                   26754: script, and the load will have been effectively wasted.</p>
                   26755: </li>
                   26756: <li>
                   26757: <p>Then, the first of the following options that describes the
                   26758: situation must be followed:</p>
                   26759: <dl class="switch">
                   26760: <dt>If the document is still being parsed, and the element has a
                   26761: <code title="attr-script-defer"><a href="#defer">defer</a></code>
                   26762: attribute, and the element does not have an <code title=
                   26763: "attr-script-async"><a href="#async">async</a></code>
                   26764: attribute</dt>
                   26765: <dd>The element must be added to the end of the <a href=
                   26766: "#list-of">list of scripts that will execute when the document has
                   26767: finished parsing</a> . The user agent must begin <a href="#when-a"
                   26768: title="when a script completes loading">the next set of steps</a>
                   26769: when the script is ready. <span class="big-issue">This isn't
                   26770: compatible with IE for inline deferred scripts, but then what IE
                   26771: does is pretty hard to pin down exactly. Do we want to keep this
                   26772: like it is? Be more compatible?</span></dd>
                   26773: <dt>If the element has an <code title="attr-script-async"><a href=
                   26774: "#async">async</a></code> attribute and a <code title=
                   26775: "attr-script-src"><a href="#src9">src</a></code> attribute</dt>
                   26776: <dd>The element must be added to the end of the <a href=
                   26777: "#list-of0">list of scripts that will execute asynchronously</a> .
                   26778: The user agent must jump to <a href="#when-a" title=
                   26779: "when a script completes loading">the next set of steps</a> once
                   26780: the script is ready.</dd>
                   26781: <dt>If the element has an <code title="attr-script-async"><a href=
                   26782: "#async">async</a></code> attribute but no <code title=
                   26783: "attr-script-src"><a href="#src9">src</a></code> attribute, and the
                   26784: <a href="#list-of0">list of scripts that will execute
                   26785: asynchronously</a> is not empty</dt>
                   26786: <dd>The element must be added to the end of the <a href=
                   26787: "#list-of0">list of scripts that will execute asynchronously</a>
                   26788: .</dd>
                   26789: <dt>If the element has a <code title="attr-script-src"><a href=
                   26790: "#src9">src</a></code> attribute and has been flagged as <a href=
                   26791: "#parser-inserted">"parser-inserted"</a></dt>
                   26792: <dd>The element is <a href="#the-script">the script that will
                   26793: execute as soon as the parser resumes</a> . (There can only be one
                   26794: such script at a time.)</dd>
                   26795: <dt>If the element has a <code title="attr-script-src"><a href=
                   26796: "#src9">src</a></code> attribute</dt>
                   26797: <dd>The element must be added to the end of the <a href=
                   26798: "#list-of1">list of scripts that will execute as soon as
                   26799: possible</a> . The user agent must jump to <a href="#when-a" title=
                   26800: "when a script completes loading">the next set of steps</a> when
                   26801: the script is ready.</dd>
                   26802: <dt>Otherwise</dt>
                   26803: <dd>The user agent must immediately <a href="#executing0" title=
                   26804: "executing a script block">execute the script</a> , even if other
                   26805: scripts are already executing.</dd>
                   26806: </dl>
                   26807: </li>
                   26808: </ol>
                   26809: <p><dfn id="when-a" title="when a script completes loading">When a
                   26810: script completes loading</dfn> : If a script whose element was
                   26811: added to one of the lists mentioned above completes loading while
                   26812: the document is still being parsed, then the parser handles it.
                   26813: Otherwise, when a script completes loading, the UA must run the
                   26814: following steps as soon as as any other scripts that may be
                   26815: executing have finished executing:</p>
                   26816: <dl class="switch">
                   26817: <dt>If the script's element was added to the <dfn id="list-of">list
                   26818: of scripts that will execute when the document has finished
                   26819: parsing</dfn> :</dt>
                   26820: <dd>
                   26821: <ol>
                   26822: <li>
                   26823: <p>If the script's element is not the first element in the list,
                   26824: then do nothing yet. Stop going through these steps.</p>
                   26825: </li>
                   26826: <li>
                   26827: <p>Otherwise, <a href="#executing0" title=
                   26828: "executing a script block">execute the script</a> (that is, the
                   26829: script associated with the first element in the list).</p>
                   26830: </li>
                   26831: <li>
                   26832: <p>Remove the script's element from the list (i.e. shift out the
                   26833: first entry in the list).</p>
                   26834: </li>
                   26835: <li>
                   26836: <p>If there are any more entries in the list, and if the script
                   26837: associated with the element that is now the first in the list is
                   26838: already loaded, then jump back to step two to execute it.</p>
                   26839: </li>
                   26840: </ol>
                   26841: </dd>
                   26842: <dt>If the script's element was added to the <dfn id=
                   26843: "list-of0">list of scripts that will execute asynchronously</dfn>
                   26844: :</dt>
                   26845: <dd>
                   26846: <ol>
                   26847: <li>
                   26848: <p>If the script is not the first element in the list, then do
                   26849: nothing yet. Stop going through these steps.</p>
                   26850: </li>
                   26851: <li>
                   26852: <p><a href="#executing0" title="executing a script block">Execute
                   26853: the script</a> (the script associated with the first element in the
                   26854: list).</p>
                   26855: </li>
                   26856: <li>
                   26857: <p>Remove the script's element from the list (i.e. shift out the
                   26858: first entry in the list).</p>
                   26859: </li>
                   26860: <li>
                   26861: <p>If there are any more scripts in the list, and the element now
                   26862: at the head of the list had no <code title=
                   26863: "attr-script-src"><a href="#src9">src</a></code> attribute when it
                   26864: was added to the list, or had one, but its associated script has
                   26865: finished loading, then jump back to step two to execute the script
                   26866: associated with this element.</p>
                   26867: </li>
                   26868: </ol>
                   26869: </dd>
                   26870: <dt>If the script's element was added to the <dfn id=
                   26871: "list-of1">list of scripts that will execute as soon as
                   26872: possible</dfn> :</dt>
                   26873: <dd>
                   26874: <ol>
                   26875: <li>
                   26876: <p><a href="#executing0" title="executing a script block">Execute
                   26877: the script</a> .</p>
                   26878: </li>
                   26879: <li>
                   26880: <p>Remove the script's element from the list.</p>
                   26881: </li>
                   26882: </ol>
                   26883: </dd>
                   26884: <dt>If the script is <dfn id="the-script">the script that will
                   26885: execute as soon as the parser resumes</dfn> :</dt>
                   26886: <dd>
                   26887: <p>The script will be handled <a href=
                   26888: "#scriptTagParserResumes">when the parser resumes</a> (amazingly
                   26889: enough).</p>
                   26890: </dd>
                   26891: </dl>
                   26892: <p>The download of an external script must <a href="#delays">delay
                   26893: the <code title="event-load">load</code> event</a> .</p>
                   26894: <p><dfn id="executing0" title="executing a script block">Executing
                   26895: a script block</dfn> : <ins class="diff-new">When the steps above
                   26896: require that the script be executed, the user agent must act as
                   26897: follows:</ins></p>
                   26898: <dl class="switch">
                   26899: <dt>If the load resulted in an error (for example a DNS error, or
                   26900: an HTTP 404 <del class="diff-old">error), then executing</del>
                   26901: <ins class="diff-chg">error)</ins></dt>
                   26902: <dd>
                   26903: <p><ins class="diff-chg">Executing</ins> the script must just
                   26904: consist of <a href="#firing5" title="fire an error event">firing an
                   26905: <code title="event-error">error</code> event</a> at the
                   26906: element.</p>
                   26907: </dd>
                   26908: <dt>If the load was <del class="diff-old">successful, then first
                   26909: the user agent must fire a load event at the element, and then, if
                   26910: scripting is enabled , and</del> <ins class=
                   26911: "diff-chg">successful</ins></dt>
                   26912: <dd>
                   26913: <ol>
                   26914: <li>
                   26915: <p><ins class="diff-chg">If</ins> the <code><del class=
                   26916: "diff-old">Document does not have</del> <del class=
                   26917: "diff-old">designMode</del> <a href="#script1"><ins class=
                   26918: "diff-chg">script</ins></a></code> <del class="diff-old">enabled,
                   26919: and the</del> <ins class="diff-chg">element's</ins>
                   26920: <code>Document</code> is the <a href="#active">active document</a>
                   26921: in its <a href="#browsing1">browsing context</a> , the user agent
                   26922: must execute the script:</p>
                   26923: <dl class="switch">
                   26924: <dt>If the script is from an external <del class="diff-old">file,
                   26925: then that</del> <ins class="diff-chg">file</ins></dt>
                   26926: <dd>
                   26927: <p><ins class="diff-chg">That</ins> file must be used as the file
                   26928: to execute.</p>
                   26929: <p><ins class="diff-new">The file must be interpreted using the
                   26930: character encoding given by</ins> <var><a href=
                   26931: "#the-scripts0"><ins class="diff-new">the script's character
                   26932: encoding</ins></a></var> ,<ins class="diff-new">regardless of any
                   26933: metadata given by the file's</ins> <a href="#content-type8" title=
                   26934: "Content-Type"><ins class="diff-new">Content-Type
                   26935: metadata</ins></a> .</p>
                   26936: <p class="big-issue"><ins class="diff-new">This means that a UTF-16
                   26937: document will always assume external scripts are UTF-16...? This
                   26938: applies, e.g., to document's created using createDocument()... It
                   26939: also means changing document.charSet will affect the character
                   26940: encoding used to interpret scripts, is that really what
                   26941: happens?</ins></p>
                   26942: </dd>
                   26943: <dt>If the script is <del class="diff-old">inline, then, for</del>
                   26944: <ins class="diff-chg">inline</ins></dt>
                   26945: <dd>
                   26946: <p><ins class="diff-chg">For</ins> scripting languages that consist
                   26947: of pure text, user agents must use the value of the DOM
                   26948: <code title="dom-script-text"><a href="#text1">text</a></code>
                   26949: attribute (defined below) as the script to execute, and for
                   26950: XML-based scripting languages, user agents must use all the child
                   26951: nodes of the <code><a href="#script1">script</a></code> element as
                   26952: the script to execute.</p>
                   26953: </dd>
                   26954: </dl>
                   26955: <p>In any case, the user agent must execute the script according to
                   26956: the semantics defined by the language associated with <var><a href=
                   26957: "#the-scripts">the script's type</a></var> (see the <a href=
                   26958: "#scriptingLanguages">scripting languages</a> section below).</p>
                   26959: <p><del class="diff-old">Scripts</del> <ins class=
                   26960: "diff-chg">The</ins> <a href="#script2"><ins class=
                   26961: "diff-chg">script execution context</ins></a> <ins class=
                   26962: "diff-chg">of the script</ins> must be <del class=
                   26963: "diff-old">executed in</del> the <del class="diff-old">scope</del>
                   26964: <code><a href="#window"><ins class=
                   26965: "diff-chg">Window</ins></a></code> <ins class=
                   26966: "diff-chg">object</ins> of <del class="diff-old">the</del>
                   26967: <ins class="diff-chg">that</ins> <a href="#browsing1">browsing
                   26968: context <del class="diff-old">of the element's Document .</del></a>
                   26969: .</p>
                   26970: <p class="note">The element's attributes' values might have changed
                   26971: between when the element was inserted into the document and when
                   26972: the script has finished loading, as may its other attributes;
                   26973: similarly, the element itself might have been taken back out of the
                   26974: DOM, or had other changes made. These changes do not in any way
                   26975: affect the above steps; only the values of the attributes at the
                   26976: time the <code><a href="#script1">script</a></code> element is
                   26977: first inserted into the document matter.</p>
                   26978: </li>
                   26979: <li>
                   26980: <p><ins class="diff-new">Then, the user agent must</ins> <a href=
                   26981: "#firing4"><ins class="diff-new">fire a</ins> <code title=
                   26982: "event-load"><ins class="diff-new">load</ins></code> <ins class=
                   26983: "diff-new">event</ins></a> <ins class="diff-new">at the</ins>
                   26984: <code><a href="#script1"><ins class=
                   26985: "diff-new">script</ins></a></code> <ins class=
                   26986: "diff-new">element.</ins></p>
                   26987: </li>
                   26988: </ol>
                   26989: </dd>
                   26990: </dl>
                   26991: <p>The DOM attributes <dfn id="src10" title=
                   26992: "dom-script-src"><code>src</code></dfn> , <dfn id="type12" title=
                   26993: "dom-script-type"><code>type</code></dfn> , <dfn id="charset3"
                   26994: title="dom-script-charset"><code><ins class=
                   26995: "diff-new">charset</ins></code></dfn> , <dfn id="async0" title=
                   26996: "dom-script-async"><code>async</code></dfn> , and <dfn id="defer0"
                   26997: title="dom-script-defer"><code>defer</code></dfn> , each must
                   26998: <a href="#reflect">reflect</a> the respective content attributes of
                   26999: the same name.</p>
                   27000: <p>The DOM attribute <dfn id="text1" title=
                   27001: "dom-script-text"><code>text</code></dfn> must return a
                   27002: concatenation of the contents of all the <a href="#text-node"
                   27003: title="text node">text nodes</a> that are direct children of the
                   27004: <code><a href="#script1">script</a></code> element (ignoring any
                   27005: other nodes such as comments or elements), in tree order. On
                   27006: setting, it must act the same way as the <code><a href=
                   27007: "#textcontent">textContent</a></code> DOM attribute.</p>
                   27008: <h5 id="scriptingLanguages"><span class="secno"><del class=
                   27009: "diff-old">3.17.1.1.</del> <ins class=
                   27010: "diff-chg">3.15.1.1.</ins></span> Scripting languages</h5>
                   27011: <p>A user agent is said to <dfn id="support">support the scripting
                   27012: language</dfn> if <var><a href="#the-scripts">the script's
                   27013: type</a></var> matches the MIME type of a scripting language that
                   27014: the user agent implements.</p>
                   27015: <p>The following lists some MIME types and the languages to which
                   27016: they refer:</p>
                   27017: <dl>
                   27018: <dt><code>text/javascript</code></dt>
                   27019: <dd>ECMAScript. <a href="#references">[ECMA262]</a></dd>
                   27020: <dt><code>text/javascript;e4x=1</code></dt>
                   27021: <dd>ECMAScript with ECMAScript for XML. <a href=
                   27022: "#references">[ECMA357]</a></dd>
                   27023: </dl>
                   27024: <p>User agents may support other MIME types and other
                   27025: languages.</p>
                   27026: <p>When examining types to determine if they support the language,
                   27027: user agents must not ignore unknown MIME parameters — types with
                   27028: unknown parameters must be assumed to be unsupported.</p>
                   27029: <h4 id="the-noscript"><span class="secno"><del class=
                   27030: "diff-old">3.17.2.</del> <ins class="diff-chg">3.15.2</ins></span>
                   27031: The <dfn id="noscript"><code>noscript</code></dfn> element</h4>
                   27032: <dl class="element">
                   27033: <dt>Categories</dt>
                   27034: <dd><a href="#metadata0">Metadata content</a> .</dd>
                   27035: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   27036: <dt>Contexts in which this element may be used:</dt>
                   27037: <dd>In a <code><a href="#head">head</a></code> element of an
                   27038: <a href="#html-" title="&gt; HTML documents">HTML document</a> , if
                   27039: there are no ancestor <code><a href="#noscript">noscript</a></code>
                   27040: elements.</dd>
                   27041: <dd>Where <a href="#phrasing0">phrasing content</a> is expected in
                   27042: <a href="#html-">HTML documents</a> , if there are no ancestor
                   27043: <code><a href="#noscript">noscript</a></code> elements.</dd>
                   27044: <dt>Content model:</dt>
                   27045: <dd><del class="diff-old">When scripting is disabled</del> <a href=
                   27046: "#without"><ins class="diff-chg">Without script</ins></a> , in a
                   27047: <code><a href="#head">head</a></code> element: in any order, zero
                   27048: or more <code><a href="#link">link</a></code> elements, zero or
                   27049: more <code><a href="#style1">style</a></code> elements, and zero or
                   27050: more <code><a href="#meta0">meta</a></code> elements.</dd>
                   27051: <dd><del class="diff-old">When scripting is disabled</del> <a href=
                   27052: "#without"><ins class="diff-chg">Without script</ins></a> , not in
                   27053: a <code><a href="#head">head</a></code> element: <a href=
                   27054: "#transparent0">transparent</a> , but there must be no
                   27055: <code><a href="#noscript">noscript</a></code> element
                   27056: descendants.</dd>
                   27057: <dd><del class="diff-old">When scripting is enabled</del> <a href=
                   27058: "#with-script"><ins class="diff-chg">With script</ins></a> : text
                   27059: that conforms to the requirements given in the prose.</dd>
                   27060: <dt>Element-specific attributes:</dt>
                   27061: <dd>None.</dd>
                   27062: <dt>DOM interface:</dt>
                   27063: <dd><del class="diff-old">No difference from</del> <ins class=
                   27064: "diff-chg">Uses</ins> <code><a href=
                   27065: "#htmlelement">HTMLElement</a></code> .</dd>
                   27066: </dl>
                   27067: <p>The <code><a href="#noscript">noscript</a></code> element does
                   27068: not represent anything. It is used to present different markup to
                   27069: user agents that support scripting and those that don't support
                   27070: scripting, by affecting how the document is parsed.</p>
                   27071: <p>The <code><a href="#noscript">noscript</a></code> element must
                   27072: not be used in <a href="#xml-documents">XML documents</a> .</p>
                   27073: <p class="note"><strong><ins class="diff-new">The</ins>
                   27074: <code><a href="#noscript"><ins class=
                   27075: "diff-new">noscript</ins></a></code> <ins class="diff-new">element
                   27076: is only effective in the</ins> <span title=""><ins class=
                   27077: "diff-new">HTML serialization</ins></span> <ins class="diff-new">,
                   27078: it has no effect in the</ins> <span title=""><ins class=
                   27079: "diff-new">XML serialization</ins></span> .</strong></p>
                   27080: <p>When used in <a href="#html-">HTML documents</a> , the allowed
                   27081: content model <del class="diff-old">depends on whether
                   27082: scripting</del> is <del class="diff-old">enabled or not, and
                   27083: whether the element is in</del> <ins class="diff-chg">as
                   27084: follows:</ins></p>
                   27085: <p><ins class="diff-chg">In</ins> a <code><a href=
                   27086: "#head">head</a></code> <del class="diff-old">element or not. In
                   27087: a</del> <ins class="diff-chg">element, if the</ins>
                   27088: <code><del class="diff-old">head</del> <a href=
                   27089: "#noscript"><ins class="diff-chg">noscript</ins></a></code>
                   27090: <del class="diff-old">element, if scripting</del> <ins class=
                   27091: "diff-chg">element</ins> is <del class="diff-old">disabled</del>
                   27092: <a href="#without"><ins class="diff-chg">without script</ins></a> ,
                   27093: then the content model of a <code><a href=
                   27094: "#noscript">noscript</a></code> element must contain only
                   27095: <code><a href="#link">link</a></code> , <code><a href=
                   27096: "#style1">style</a></code> , and <code><a href=
                   27097: "#meta0">meta</a></code> elements. If <del class=
                   27098: "diff-old">scripting</del> <ins class="diff-chg">the</ins>
                   27099: <code><a href="#noscript"><ins class=
                   27100: "diff-chg">noscript</ins></a></code> <ins class=
                   27101: "diff-chg">element</ins> is <del class="diff-old">enabled</del>
                   27102: <a href="#with-script"><ins class="diff-chg">with script</ins></a>
                   27103: , then the content model of a <code><a href=
                   27104: "#noscript">noscript</a></code> element is text, except that
                   27105: invoking the <a href="#html-fragment0">HTML fragment parsing
                   27106: algorithm</a> with the <code><a href=
                   27107: "#noscript">noscript</a></code> element as the <var title=
                   27108: "">context</var> <ins class="diff-new">element</ins> and the text
                   27109: contents as the <var title="">input</var> must result in a list of
                   27110: nodes that consists only of <code><a href="#link">link</a></code> ,
                   27111: <code><a href="#style1">style</a></code> , and <code><a href=
                   27112: "#meta0">meta</a></code> elements.</p>
                   27113: <p>Outside of <code><a href="#head">head</a></code> elements, if
                   27114: <del class="diff-old">scripting</del> <ins class=
                   27115: "diff-chg">the</ins> <code><a href="#noscript"><ins class=
                   27116: "diff-chg">noscript</ins></a></code> <ins class=
                   27117: "diff-chg">element</ins> is <del class="diff-old">disabled</del>
                   27118: <a href="#without"><ins class="diff-chg">without script</ins></a> ,
                   27119: then the content model of a <code><a href=
                   27120: "#noscript">noscript</a></code> element is <a href=
                   27121: "#transparent0">transparent</a> , with the additional restriction
                   27122: that a <code><a href="#noscript">noscript</a></code> element must
                   27123: not have a <code><a href="#noscript">noscript</a></code> element as
                   27124: an ancestor (that is, <code><a href="#noscript">noscript</a></code>
                   27125: can't be nested).</p>
                   27126: <p>Outside of <code><a href="#head">head</a></code> elements, if
                   27127: <del class="diff-old">scripting</del> <ins class=
                   27128: "diff-chg">the</ins> <code><a href="#noscript"><ins class=
                   27129: "diff-chg">noscript</ins></a></code> <ins class=
                   27130: "diff-chg">element</ins> is <del class="diff-old">enabled</del>
                   27131: <a href="#with-script"><ins class="diff-chg">with script</ins></a>
                   27132: , then the content model of a <code><a href=
                   27133: "#noscript">noscript</a></code> element is text, except that the
                   27134: text must be such that running the following algorithm results in a
                   27135: conforming document with no <code><a href=
                   27136: "#noscript">noscript</a></code> elements and no <code><a href=
                   27137: "#script1">script</a></code> elements, and such that no step in the
                   27138: algorithm causes an <a href="#html-0">HTML parser</a> to flag a
                   27139: <a href="#parse1">parse error</a> :</p>
                   27140: <ol>
                   27141: <li>Remove every <code><a href="#script1">script</a></code> element
                   27142: from the document.</li>
                   27143: <li>Make a list of every <code><a href=
                   27144: "#noscript">noscript</a></code> element in the document. For every
                   27145: <code><a href="#noscript">noscript</a></code> element in that list,
                   27146: perform the following steps:
                   27147: <ol>
                   27148: <li>Let the <var title="">parent element</var> be the parent
                   27149: element of the <code><a href="#noscript">noscript</a></code>
                   27150: element.</li>
                   27151: <li>Take all the children of the <var title="">parent element</var>
                   27152: that come before the <code><a href="#noscript">noscript</a></code>
                   27153: element, and call these elements <var title="">the before
                   27154: children</var> .</li>
                   27155: <li>Take all the children of the <var title="">parent element</var>
                   27156: that come <em>after</em> the <code><a href=
                   27157: "#noscript">noscript</a></code> element, and call these elements
                   27158: <var title="">the after children</var> .</li>
                   27159: <li>Let <var title="">s</var> be the concatenation of all the
                   27160: <a href="#text-node">text node</a> children of the <code><a href=
                   27161: "#noscript">noscript</a></code> element.</li>
                   27162: <li>Set the <code title="dom-innerHTML-HTML"><a href=
                   27163: "#innerhtml0">innerHTML</a></code> attribute of the <var title=
                   27164: "">parent element</var> to the value of <var title="">s</var> .
                   27165: (This, as a side-effect, causes the <code><a href=
                   27166: "#noscript">noscript</a></code> element to be removed from the
                   27167: document.)</li>
                   27168: <li>Insert <var title="">the before children</var> at the start of
                   27169: the <var title="">parent element</var> , preserving their original
                   27170: relative order.</li>
                   27171: <li>Insert <var title="">the after children</var> at the end of the
                   27172: <var title="">parent element</var> , preserving their original
                   27173: relative order.</li>
                   27174: </ol>
                   27175: </li>
                   27176: </ol>
                   27177: <p>The <code><a href="#noscript">noscript</a></code> element has no
                   27178: other requirements. In particular, children of the <code><a href=
                   27179: "#noscript">noscript</a></code> element are not exempt from form
                   27180: submission, scripting, and so forth, even when <del class=
                   27181: "diff-old">scripting</del> <ins class="diff-chg">the element</ins>
                   27182: is <del class="diff-old">enabled.</del> <a href=
                   27183: "#with-script"><ins class="diff-chg">with script</ins></a> .</p>
                   27184: <p class="note">All these contortions are required because, for
                   27185: historical reasons, the <code><a href=
                   27186: "#noscript">noscript</a></code> element <del class=
                   27187: "diff-old">causes</del> <ins class="diff-chg">is handled
                   27188: differently by</ins> the <a href="#html-0">HTML parser</a>
                   27189: <del class="diff-old">to act differently</del> based on whether
                   27190: <a href="#scripting2" title="scripting flag">scripting <del class=
                   27191: "diff-old">is</del> <ins class="diff-chg">was</ins> enabled or
                   27192: <del class="diff-old">not.</del> <ins class=
                   27193: "diff-chg">not</ins></a> <ins class="diff-chg">when the parser was
                   27194: invoked.</ins> The element is not allowed in XML, because in XML
                   27195: the parser is not affected by such state, and thus the element
                   27196: would not have the desired effect.</p>
                   27197: <p class="note"><ins class="diff-new">The</ins> <code><a href=
                   27198: "#noscript"><ins class="diff-new">noscript</ins></a></code>
                   27199: <ins class="diff-new">element interacts poorly with the</ins>
                   27200: <code title="dom-document-designMode"><a href=
                   27201: "#designMode"><ins class="diff-new">designMode</ins></a></code>
                   27202: <ins class="diff-new">feature. Authors are encouraged to not
                   27203: use</ins> <code><a href="#noscript"><ins class=
                   27204: "diff-new">noscript</ins></a></code> <ins class="diff-new">elements
                   27205: on pages that will have</ins> <code title=
                   27206: "dom-document-designMode"><a href="#designMode"><ins class=
                   27207: "diff-new">designMode</ins></a></code> <ins class=
                   27208: "diff-new">enabled.</ins></p>
                   27209: <h4 id="the-event-source"><span class="secno"><del class=
                   27210: "diff-old">3.17.3.</del> <ins class="diff-chg">3.15.3</ins></span>
                   27211: The <dfn id="event-source"><code>event-source</code></dfn>
                   27212: element</h4>
                   27213: <dl class="element">
                   27214: <dt>Categories</dt>
                   27215: <dd><a href="#metadata0">Metadata content</a> .</dd>
                   27216: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   27217: <dt>Contexts in which this element may be used:</dt>
                   27218: <dd>Where <a href="#metadata0">metadata content</a> is
                   27219: expected.</dd>
                   27220: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   27221: expected.</dd>
                   27222: <dt>Content model:</dt>
                   27223: <dd>Empty.</dd>
                   27224: <dt>Element-specific attributes:</dt>
                   27225: <dd><code title="attr-event-source-src"><a href=
                   27226: "#src11">src</a></code></dd>
                   27227: <dt>DOM interface:</dt>
                   27228: <dd>
                   27229: <pre class="idl">
                   27230: interface <dfn id=
                   27231: "htmleventsourceelement">HTMLEventSourceElement</dfn> : <a href=
                   27232: "#htmlelement">HTMLElement</a> {
                   27233:            attribute DOMString <a href="#src12" title=
                   27234: "dom-event-source-src">src</a>;
                   27235: };
                   27236: </pre></dd>
                   27237: </dl>
                   27238: <p>The <code><a href="#event-source">event-source</a></code>
                   27239: element represents a target for events generated by a remote
                   27240: server.</p>
                   27241: <p>The <dfn id="src11" title=
                   27242: "attr-event-source-src"><code>src</code></dfn> attribute, if
                   27243: specified, must give a URI (or IRI) pointing to a resource that
                   27244: uses the <code><del class=
                   27245: "diff-old">application/x-dom-event-stream</del> <ins class=
                   27246: "diff-chg">text/event-stream</ins></code> format.</p>
                   27247: <p>When the element is inserted into the document, if it has the
                   27248: <code title="attr-event-source-src"><a href="#src11">src</a></code>
                   27249: attribute specified, the user agent must act as if the <code title=
                   27250: "dom-remoteEventTarget-addEventSource"><a href=
                   27251: "#addeventsource">addEventSource()</a></code> method on the
                   27252: <code><a href="#event-source">event-source</a></code> element had
                   27253: been invoked with the URI resulting from resolving the <code title=
                   27254: "attr-event-source-src"><a href="#src11">src</a></code> attribute's
                   27255: value to an absolute URI.</p>
                   27256: <p>While the element is in a document, if its <code title=
                   27257: "attr-event-source-src"><a href="#src11">src</a></code> attribute
                   27258: is mutated, the user agent must act as if first the <code title=
                   27259: "dom-remoteEventTarget-removeEventSource"><a href=
                   27260: "#removeeventsource">removeEventSource()</a></code> method on the
                   27261: <code><a href="#event-source">event-source</a></code> element had
                   27262: been invoked with the URI resulting from resolving the old value of
                   27263: the attribute to an absolute URI, and then as if the <code title=
                   27264: "dom-remoteEventTarget-addEventSource"><a href=
                   27265: "#addeventsource">addEventSource()</a></code> method on the element
                   27266: had been invoked with the URI resulting from resolving the
                   27267: <em>new</em> value of the <code title=
                   27268: "attr-event-source-src"><a href="#src11">src</a></code> attribute
                   27269: to an absolute URI.</p>
                   27270: <p>When the element is removed from the document, if it has the
                   27271: <code title="attr-event-source-src"><a href="#src11">src</a></code>
                   27272: attribute specified, or, when the <code title=
                   27273: "attr-event-source-src"><a href="#src11">src</a></code> attribute
                   27274: is about to be removed, the user agent must act as if the
                   27275: <code title="dom-remoteEventTarget-removeEventSource"><a href=
                   27276: "#removeeventsource">removeEventSource()</a></code> method on the
                   27277: <code><a href="#event-source">event-source</a></code> element had
                   27278: been invoked with the URI resulting from resolving the <code title=
                   27279: "attr-event-source-src"><a href="#src11">src</a></code> attribute's
                   27280: value to an absolute URI.</p>
                   27281: <p>There can be more than one <code><a href=
                   27282: "#event-source">event-source</a></code> element per document, but
                   27283: authors should take care to avoid opening multiple connections to
                   27284: the same server as HTTP recommends a limit to the number of
                   27285: simultaneous connections that a user agent can open per server.</p>
                   27286: <p>The <dfn id="src12" title=
                   27287: "dom-event-source-src"><code>src</code></dfn> DOM attribute must
                   27288: <a href="#reflect">reflect</a> the content attribute of the same
                   27289: name.</p>
                   27290: <h3 id="interactive-elements"><span class="secno"><del class=
                   27291: "diff-old">3.18.</del> <ins class="diff-chg">3.16</ins></span>
                   27292: Interactive elements</h3>
                   27293: <h4 id="the-details"><span class="secno"><del class=
                   27294: "diff-old">3.18.1.</del> <ins class="diff-chg">3.16.1</ins></span>
                   27295: The <dfn id="details"><code>details</code></dfn> element</h4>
                   27296: <dl class="element">
                   27297: <dt>Categories</dt>
                   27298: <dd><span><del class="diff-old">Prose</del> <ins class=
                   27299: "diff-chg">Flow</ins> element</span> .</dd>
                   27300: <dt>Contexts in which this element may be used:</dt>
                   27301: <dd>Where <del class="diff-old">prose</del> <a href=
                   27302: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   27303: expected.</dd>
                   27304: <dt>Content model:</dt>
                   27305: <dd>One <code><a href="#legend">legend</a></code> element followed
                   27306: by <del class="diff-old">prose</del> <a href=
                   27307: "#flow-content0"><ins class="diff-chg">flow</ins> content</a>
                   27308: .</dd>
                   27309: <dt>Element-specific attributes:</dt>
                   27310: <dd><code title="attr-details-open"><a href=
                   27311: "#open0">open</a></code></dd>
                   27312: <dt>DOM interface:</dt>
                   27313: <dd>
                   27314: <pre class="idl">
                   27315: interface <dfn id=
                   27316: "htmldetailselement">HTMLDetailsElement</dfn> : <a href=
                   27317: "#htmlelement">HTMLElement</a> {
                   27318: <del class="diff-old">  attribute boolean ;
                   27319: </del>
                   27320: <ins class="diff-chg">           attribute boolean <a href="#open1"
                   27321: title="dom-details-open">open</a>;
                   27322: </ins>
                   27323: };
                   27324: </pre></dd>
                   27325: </dl>
                   27326: <p>The <code><a href="#details">details</a></code> element
                   27327: represents additional information or controls which the user can
                   27328: obtain on demand.</p>
                   27329: <p>The first element child of a <code><a href=
                   27330: "#details">details</a></code> element, if it is a <code><a href=
                   27331: "#legend">legend</a></code> element, represents the summary of the
                   27332: details.</p>
                   27333: <p>If the first element is not a <code><a href=
                   27334: "#legend">legend</a></code> element, the UA should provide its own
                   27335: legend (e.g. "Details").</p>
                   27336: <p>The <dfn id="open0" title=
                   27337: "attr-details-open"><code>open</code></dfn> content attribute is a
                   27338: <a href="#boolean0">boolean attribute</a> . If present, it
                   27339: indicates that the details should be shown to the user. If the
                   27340: attribute is absent, the details should not be shown.</p>
                   27341: <p>If the attribute is removed, then the details should be hidden.
                   27342: If the attribute is added, the details should be shown.</p>
                   27343: <p>The user should be able to request that the details be shown or
                   27344: hidden.</p>
                   27345: <p>The <dfn id="open1" title=
                   27346: "dom-details-open"><code>open</code></dfn> attribute must <a href=
                   27347: "#reflect">reflect</a> the <code title="attr-details-open"><a href=
                   27348: "#open0">open</a></code> content attribute.</p>
                   27349: <p class="big-issue">Rendering will be described in the Rendering
                   27350: section in due course. Basically CSS :open and :closed match the
                   27351: element, it's a block-level element by default, and when it matches
                   27352: :closed it renders as if it had an XBL binding attached to it whose
                   27353: template was just <code>&lt;template&gt; ▶&lt;content
                   27354: includes="legend:first-child"&gt;Details&lt;/content&gt;
                   27355: &lt;/template&gt;</code> , and when it's :open it acts as if it had
                   27356: an XBL binding attached to it whose template was just
                   27357: <code>&lt;template&gt; ▼&lt;content
                   27358: includes="legend:first-child"&gt;Details&lt;/content&gt;
                   27359: &lt;content/&gt; &lt;/template&gt;</code> or some such.</p>
                   27360: <p class="big-issue">Clicking the legend would make it open/close
                   27361: (and would change the content attribute). Question: Do we want the
                   27362: content attribute to reflect the actual state like this? I think we
                   27363: do, the DOM not reflecting state has been a pain in the neck
                   27364: before. But is it semantically ok?</p>
                   27365: <h4 id="datagrid"><span class="secno"><del class=
                   27366: "diff-old">3.18.2.</del> <ins class="diff-chg">3.16.2</ins></span>
                   27367: The <dfn id="datagrid0"><code>datagrid</code></dfn> element</h4>
                   27368: <dl class="element">
                   27369: <dt>Categories</dt>
                   27370: <dd><span><del class="diff-old">Prose</del> <ins class=
                   27371: "diff-chg">Flow</ins> element</span> .</dd>
                   27372: <dd><span>Interactive element</span> .</dd>
                   27373: <dd><a href="#sectioning1"><ins class="diff-new">Sectioning
                   27374: root</ins></a> .</dd>
                   27375: <dt>Contexts in which this element may be used:</dt>
                   27376: <dd>Where <del class="diff-old">prose</del> <a href=
                   27377: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   27378: expected.</dd>
                   27379: <dt>Content model:</dt>
                   27380: <dd>Either: Nothing.</dd>
                   27381: <dd>Or: <del class="diff-old">Prose</del> <a href=
                   27382: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a> , but
                   27383: where the first element child node, if any, is not a <code><a href=
                   27384: "#table">table</a></code> , <code><ins class=
                   27385: "diff-new">select</ins></code> ,<ins class="diff-new">or</ins>
                   27386: <code><ins class="diff-new">datalist</ins></code> element.</dd>
                   27387: <dd>Or: A single <code><a href="#table">table</a></code>
                   27388: element.</dd>
                   27389: <dd>Or: A single <code>select</code> element.</dd>
                   27390: <dd>Or: A single <code>datalist</code> element.</dd>
                   27391: <dt>Element-specific attributes:</dt>
                   27392: <dd><code title="attr-datagrid-multiple"><a href=
                   27393: "#multiple0">multiple</a></code></dd>
                   27394: <dd><code title="attr-datagrid-disabled"><a href=
                   27395: "#disabled3">disabled</a></code></dd>
                   27396: <dt>DOM interface:</dt>
                   27397: <dd>
                   27398: <pre class="idl">
                   27399: interface <dfn id=
                   27400: "htmldatagridelement">HTMLDataGridElement</dfn> : <a href=
                   27401: "#htmlelement">HTMLElement</a> {
                   27402:            attribute <a href=
                   27403: "#datagriddataprovider">DataGridDataProvider</a> <a href="#data2"
                   27404: title="dom-datagrid-data">data</a>;
                   27405:   readonly attribute <a href=
                   27406: "#datagridselection">DataGridSelection</a> <a href="#selection0"
                   27407: title="dom-datagrid-selection">selection</a>;
                   27408:            attribute boolean <a href="#multiple" title=
                   27409: "dom-datagrid-multiple">multiple</a>;
                   27410:            attribute boolean <a href="#disabled2" title=
                   27411: "dom-datagrid-disabled">disabled</a>;
                   27412:   void <a href="#updateeverything" title=
                   27413: "dom-datagrid-updateEverything">updateEverything</a>();
                   27414:   void <a href="#updaterowschanged" title=
                   27415: "dom-datagrid-updateRowsChanged">updateRowsChanged</a>(in <a href=
                   27416: "#rowspecification">RowSpecification</a> row, in unsigned long count);
                   27417:   void <a href="#updaterowsinserted" title=
                   27418: "dom-datagrid-updateRowsInserted">updateRowsInserted</a>(in <a href="#rowspecification">RowSpecification</a> row, in unsigned long count);
                   27419:   void <a href="#updaterowsremoved" title=
                   27420: "dom-datagrid-updateRowsRemoved">updateRowsRemoved</a>(in <a href=
                   27421: "#rowspecification">RowSpecification</a> row, in unsigned long count);
                   27422:   void <a href="#updaterowchanged" title=
                   27423: "dom-datagrid-updateRowChanged">updateRowChanged</a>(in <a href=
                   27424: "#rowspecification">RowSpecification</a> row);
                   27425:   void <a href="#updatecolumnchanged" title=
                   27426: "dom-datagrid-updateColumnChanged">updateColumnChanged</a>(in unsigned long column);
                   27427:   void <a href="#updatecellchanged" title=
                   27428: "dom-datagrid-updateCellChanged">updateCellChanged</a>(in <a href=
                   27429: "#rowspecification">RowSpecification</a> row, in unsigned long column);
                   27430: };
                   27431: </pre></dd>
                   27432: </dl>
                   27433: <p class="big-issue">One possible thing to be added is a way to
                   27434: detect when a row/selection has been deleted, activated, etc, by
                   27435: the user (delete key, enter key, etc).</p>
                   27436: <p class="big-issue">This element is defined as interactive, which
                   27437: means it can't contain other interactive elements, despite the fact
                   27438: that we expect it to work with other interactive elements e.g.
                   27439: checkboxes and input fields. It should be called something like a
                   27440: Leaf Interactive Element or something, which counts for ancestors
                   27441: looking in and not descendants looking out.</p>
                   27442: <p>The <code><a href="#datagrid0">datagrid</a></code> element
                   27443: represents an interactive representation of tree, list, or tabular
                   27444: data.</p>
                   27445: <p>The data being presented can come either from the content, as
                   27446: elements given as children of the <code><a href=
                   27447: "#datagrid0">datagrid</a></code> element, or from a scripted data
                   27448: provider given by the <code title="dom-datagrid-data"><a href=
                   27449: "#data2">data</a></code> DOM attribute.</p>
                   27450: <p>The <code title="attr-datagrid-multiple"><a href=
                   27451: "#multiple0">multiple</a></code> and <code title=
                   27452: "attr-datagrid-disabled"><a href="#disabled3">disabled</a></code>
                   27453: attributes are <a href="#boolean0" title=
                   27454: "boolean attribute">boolean attributes</a> . Their effects are
                   27455: described in the processing model sections below.</p>
                   27456: <p>The <dfn id="multiple" title=
                   27457: "dom-datagrid-multiple"><code>multiple</code></dfn> and <dfn id=
                   27458: "disabled2" title=
                   27459: "dom-datagrid-disabled"><code>disabled</code></dfn> DOM attributes
                   27460: must <a href="#reflect">reflect</a> the <code title=
                   27461: "attr-datagrid-multiple"><a href="#multiple0">multiple</a></code>
                   27462: and <code title="attr-datagrid-disabled"><a href=
                   27463: "#disabled3">disabled</a></code> content attributes
                   27464: respectively.</p>
                   27465: <h5 id="the-datagrid"><span class="secno"><del class=
                   27466: "diff-old">3.18.2.1.</del> <ins class=
                   27467: "diff-chg">3.16.2.1.</ins></span> The <code><a href=
                   27468: "#datagrid0">datagrid</a></code> data model</h5>
                   27469: <p><em>This section is non-normative.</em></p>
                   27470: <p>In the <code><a href="#datagrid0">datagrid</a></code> data
                   27471: model, data is structured as a set of rows representing a tree,
                   27472: each row being split into a number of columns. The columns are
                   27473: always present in the data model, although individual columns may
                   27474: be hidden in the presentation.</p>
                   27475: <p>Each row can have child rows. Child rows may be hidden or shown,
                   27476: by closing or opening (respectively) the parent row.</p>
                   27477: <p>Rows are referred to by the path along the tree that one would
                   27478: take to reach the row, using zero-based indices. Thus, the first
                   27479: row of a list is row "0", the second row is row "1"; the first
                   27480: child row of the first row is row "0,0", the second child row of
                   27481: the first row is row "0,1"; the fourth child of the seventh child
                   27482: of the third child of the tenth row is "9,2,6,3", etc.</p>
                   27483: <p>The columns can have captions. Those captions are not considered
                   27484: a row in their own right, they are obtained separately.</p>
                   27485: <p>Selection of data in a <code><a href=
                   27486: "#datagrid0">datagrid</a></code> operates at the row level. If the
                   27487: <code title="attr-datagrid-multiple"><a href=
                   27488: "#multiple0">multiple</a></code> attribute is present, multiple
                   27489: rows can be selected at once, otherwise the user can only select
                   27490: one row at a time.</p>
                   27491: <p>The <code><a href="#datagrid0">datagrid</a></code> element can
                   27492: be disabled entirely by setting the <code title=
                   27493: "attr-datagrid-disabled"><a href="#disabled3">disabled</a></code>
                   27494: attribute.</p>
                   27495: <p>Columns, rows, and cells can each have specific flags, known as
                   27496: classes, applied to them by the data provider. These classes
                   27497: <a href="#datagridClassSummary">affect the functionality</a> of the
                   27498: <code><a href="#datagrid0">datagrid</a></code> element, and are
                   27499: also <a href="#datagridPseudos">passed to the style system</a> .
                   27500: They are similar in concept to the <code title=
                   27501: "attr-class"><a href="#class">class</a></code> attribute, except
                   27502: that they are not specified on elements but are given by scripted
                   27503: data providers.</p>
                   27504: <h5 id="how-rows"><span class="secno"><del class=
                   27505: "diff-old">3.18.2.2.</del> <ins class=
                   27506: "diff-chg">3.16.2.2.</ins></span> How rows are identified</h5>
                   27507: <p>The chains of numbers that give a row's path, or identifier, are
                   27508: represented by objects that implement the <a href=
                   27509: "#rowspecification">RowSpecification</a> interface. <del class=
                   27510: "diff-old">{</del></p>
                   27511: <pre>
                   27512: <ins class=
                   27513: "diff-chg">   class=idl&gt;[NoInterfaceObject] interface <dfn id=
                   27514: "rowspecification">RowSpecification</dfn> {
                   27515: </ins>
                   27516:   // binding-specific interface
                   27517: };
                   27518: </pre>
                   27519: <p>In ECMAScript, two classes of objects are said to implement this
                   27520: interface: Numbers representing non-negative integers, and
                   27521: homogeneous arrays of Numbers representing non-negative integers.
                   27522: Thus, <code>[1,0,9]</code> is a <a href=
                   27523: "#rowspecification">RowSpecification</a> , as is <code>1</code> on
                   27524: its own. However, <code>[1,0.2,9]</code> is not a <a href=
                   27525: "#rowspecification">RowSpecification</a> object, since its second
                   27526: value is not an integer.</p>
                   27527: <p>User agents must always represent <code><a href=
                   27528: "#rowspecification">RowSpecification</a></code> s in ECMAScript by
                   27529: using arrays, even if the path only has one number.</p>
                   27530: <p>The root of the tree is represented by the empty path; in
                   27531: ECMAScript, this is the empty array ( <code>[]</code> ). Only the
                   27532: <code title="dom-provider-getRowCount"><a href=
                   27533: "#getrowcount">getRowCount()</a></code> and <code title=
                   27534: "dom-provider-getChildAtPosition"><a href=
                   27535: "#getchildatposition">GetChildAtPosition()</a></code> methods ever
                   27536: get called with the empty path.</p>
                   27537: <h5 id="the-data"><span class="secno"><del class=
                   27538: "diff-old">3.18.2.3.</del> <ins class=
                   27539: "diff-chg">3.16.2.3.</ins></span> The data provider interface</h5>
                   27540: <p><em>The conformance criteria in this section apply to any
                   27541: implementation of the <code><a href=
                   27542: "#datagriddataprovider">DataGridDataProvider</a></code> , including
                   27543: (and most commonly) the content author's
                   27544: implementation(s).</em></p>
                   27545: <pre class="idl">
                   27546: // To be implemented by Web authors as a JS object
                   27547: <del class="diff-old">interface  {
                   27548: </del>
                   27549: <ins class="diff-chg">[NoInterfaceObject] interface <dfn id=
                   27550: "datagriddataprovider">DataGridDataProvider</dfn> {
                   27551: </ins>
                   27552:   void <a href="#initialize" title=
                   27553: "dom-provider-initialize">initialize</a>(in HTMLDataGridElement datagrid);
                   27554:   unsigned long <a href="#getrowcount" title=
                   27555: "dom-provider-getRowCount">getRowCount</a>(in <a href=
                   27556: "#rowspecification">RowSpecification</a> row);
                   27557:   unsigned long <a href="#getchildatposition" title=
                   27558: "dom-provider-getChildAtPosition">getChildAtPosition</a>(in <a href="#rowspecification">RowSpecification</a> parentRow, in unsigned long position);
                   27559:   unsigned long <a href="#getcolumncount" title=
                   27560: "dom-provider-getColumnCount">getColumnCount</a>();
                   27561:   DOMString <a href="#getcaptiontext" title=
                   27562: "dom-provider-getCaptionText">getCaptionText</a>(in unsigned long column);
                   27563:   void <a href="#getcaptionclasses" title=
                   27564: "dom-provider-getCaptionClasses">getCaptionClasses</a>(in unsigned long column, in DOMTokenList classes);
                   27565:   DOMString <a href="#getrowimage" title=
                   27566: "dom-provider-getRowImage">getRowImage</a>(in <a href=
                   27567: "#rowspecification">RowSpecification</a> row);
                   27568:   <a href="#htmlmenuelement">HTMLMenuElement</a> <a href=
                   27569: "#getrowmenu" title=
                   27570: "dom-provider-getRowMenu">getRowMenu</a>(in <a href=
                   27571: "#rowspecification">RowSpecification</a> row);
                   27572:   void <a href="#getrowclasses" title=
                   27573: "dom-provider-getRowClasses">getRowClasses</a>(in <a href=
                   27574: "#rowspecification">RowSpecification</a> row, in DOMTokenList classes);
                   27575:   DOMString <a href="#getcelldata" title=
                   27576: "dom-provider-getCellData">getCellData</a>(in <a href=
                   27577: "#rowspecification">RowSpecification</a> row, in unsigned long column);
                   27578:   void <a href="#getcellclasses" title=
                   27579: "dom-provider-getCellClasses">getCellClasses</a>(in <a href=
                   27580: "#rowspecification">RowSpecification</a> row, in unsigned long column, in DOMTokenList classes);
                   27581:   void <a href="#togglecolumnsortstate" title=
                   27582: "dom-provider-toggleColumnSortState">toggleColumnSortState</a>(in unsigned long column);
                   27583:   void <a href="#setcellcheckedstate" title=
                   27584: "dom-provider-setCellCheckedState">setCellCheckedState</a>(in <a href="#rowspecification">RowSpecification</a> row, in unsigned long column, in long state);
                   27585:   void <a href="#cyclecell" title=
                   27586: "dom-provider-cycleCell">cycleCell</a>(in <a href=
                   27587: "#rowspecification">RowSpecification</a> row, in unsigned long column);
                   27588:   void <a href="#editcell" title=
                   27589: "dom-provider-editCell">editCell</a>(in <a href=
                   27590: "#rowspecification">RowSpecification</a> row, in unsigned long column, in DOMString data);
                   27591: };
                   27592: </pre>
                   27593: <p>The <code><a href=
                   27594: "#datagriddataprovider">DataGridDataProvider</a></code> interface
                   27595: represents the interface that objects must implement to be used as
                   27596: custom data views for <code><a href=
                   27597: "#datagrid0">datagrid</a></code> elements.</p>
                   27598: <p>Not all the methods are required. The minimum number of methods
                   27599: that must be implemented in a useful view is two: the <code title=
                   27600: "dom-provider-getRowCount"><a href=
                   27601: "#getrowcount">getRowCount()</a></code> and <code title=
                   27602: "dom-provider-getCellData"><a href=
                   27603: "#getcelldata">getCellData()</a></code> methods.</p>
                   27604: <p>Once the object is written, it must be hooked up to the
                   27605: <code><a href="#datagrid0">datagrid</a></code> using the <dfn id=
                   27606: "data2" title="dom-datagrid-data"><code>data</code></dfn> DOM
                   27607: attribute.</p>
                   27608: <p>The following methods may be usefully implemented:</p>
                   27609: <dl>
                   27610: <dt><dfn id="initialize" title=
                   27611: "dom-provider-initialize"><code>initialize( <var title=
                   27612: "">datagrid</var> )</code></dfn></dt>
                   27613: <dd>Called by the <code><a href="#datagrid0">datagrid</a></code>
                   27614: element (the one given by the <var title="">datagrid</var>
                   27615: argument) after it has first populated itself. This would typically
                   27616: be used to set the initial selection of the <code><a href=
                   27617: "#datagrid0">datagrid</a></code> element when it is first loaded.
                   27618: The data provider could also use this method call to register a
                   27619: <code title="event-select"><a href="#select">select</a></code>
                   27620: event handler on the <code><a href="#datagrid0">datagrid</a></code>
                   27621: in order to monitor selection changes.</dd>
                   27622: <dt><dfn id="getrowcount" title=
                   27623: "dom-provider-getRowCount"><code>getRowCount( <var title=
                   27624: "">row</var> )</code></dfn></dt>
                   27625: <dd>Must return the number of rows that are children of the
                   27626: specified <var title="">row</var> , including rows that are
                   27627: off-screen. If <var title="">row</var> is empty, then the number of
                   27628: rows at the top level must be returned. If the value that this
                   27629: method would return for a given <var title="">row</var> changes,
                   27630: the relevant update methods on the <code><a href=
                   27631: "#datagrid0">datagrid</a></code> must be called first. Otherwise,
                   27632: this method must always return the same number. For a list (as
                   27633: opposed to a tree), this method must return 0 whenever it is called
                   27634: with a <var title="">row</var> identifier that is not empty.</dd>
                   27635: <dt><dfn id="getchildatposition" title=
                   27636: "dom-provider-getChildAtPosition"><code>getChildAtPosition(
                   27637: <var title="">parentRow</var> , <var title="">position</var>
                   27638: )</code></dfn></dt>
                   27639: <dd>Must return the index of the row that is a child of <var title=
                   27640: "">parentRow</var> and that is to be positioned as the <var title=
                   27641: "">position</var> th row under <var title="">parentRow</var> when
                   27642: rendering the children of <var title="">parentRow</var> . If
                   27643: <var title="">parentRow</var> is empty, then <var title=
                   27644: "">position</var> refers to the <var title="">position</var> th row
                   27645: at the top level of the data grid. May be omitted if the rows are
                   27646: always to be sorted in the natural order. (The natural order is the
                   27647: one where the method always returns <var title="">position</var> .)
                   27648: For a given <var title="">parentRow</var> , this method must never
                   27649: return the same value for different values of <var title=
                   27650: "">position</var> . The returned value <var title="">x</var> must
                   27651: be in the range 0&nbsp;≤&nbsp; <var title="">x</var>
                   27652: &nbsp;&lt;&nbsp; <var title="">n</var> , where <var title=
                   27653: "">n</var> is the value returned by <code title=
                   27654: "dom-provider-getRowCount"><a href="#getrowcount">getRowCount(
                   27655: <var title="">parentRow</var> )</a></code> .</dd>
                   27656: <dt><dfn id="getcolumncount" title=
                   27657: "dom-provider-getColumnCount"><code>getColumnCount()</code></dfn></dt>
                   27658: <dd>Must return the number of columns currently in the data model
                   27659: (including columns that might be hidden). May be omitted if there
                   27660: is only one column. If the value that this method would return
                   27661: changes, the <code><a href="#datagrid0">datagrid</a></code> 's
                   27662: <code title="dom-datagrid-updateEverything"><a href=
                   27663: "#updateeverything">updateEverything()</a></code> method must be
                   27664: called.</dd>
                   27665: <dt><dfn id="getcaptiontext" title=
                   27666: "dom-provider-getCaptionText"><code>getCaptionText( <var title=
                   27667: "">column</var> )</code></dfn></dt>
                   27668: <dd>Must return the caption, or label, for column <var title=
                   27669: "">column</var> . May be omitted if the columns have no captions.
                   27670: If the value that this method would return changes, the
                   27671: <code><a href="#datagrid0">datagrid</a></code> 's <code title=
                   27672: "dom-datagrid-updateColumnChanged"><a href=
                   27673: "#updatecolumnchanged">updateColumnChanged()</a></code> method must
                   27674: be called with the appropriate column index.</dd>
                   27675: <dt><dfn id="getcaptionclasses" title=
                   27676: "dom-provider-getCaptionClasses"><code>getCaptionClasses(
                   27677: <var title="">column</var> , <var title="">classes</var>
                   27678: )</code></dfn></dt>
                   27679: <dd>Must add the classes that apply to column <var title=
                   27680: "">column</var> to the <var title="">classes</var> object. May be
                   27681: omitted if the columns have no special classes. If the classes that
                   27682: this method would add changes, the <code><a href=
                   27683: "#datagrid0">datagrid</a></code> 's <code title=
                   27684: "dom-datagrid-updateColumnChanged"><a href=
                   27685: "#updatecolumnchanged">updateColumnChanged()</a></code> method must
                   27686: be called with the appropriate column index. Some classes have
                   27687: <a href="#datagridClassSummary">predefined meanings</a> .</dd>
                   27688: <dt><dfn id="getrowimage" title=
                   27689: "dom-provider-getRowImage"><code>getRowImage( <var title=
                   27690: "">row</var> )</code></dfn></dt>
                   27691: <dd>Must return a URI to an image that represents row <var title=
                   27692: "">row</var> , or the empty string if there is no applicable image.
                   27693: May be omitted if no rows have associated images. If the value that
                   27694: this method would return changes, the <code><a href=
                   27695: "#datagrid0">datagrid</a></code> 's update methods must be called
                   27696: to update the row in question.</dd>
                   27697: <dt><dfn id="getrowmenu" title=
                   27698: "dom-provider-getRowMenu"><code>getRowMenu( <var title="">row</var>
                   27699: )</code></dfn></dt>
                   27700: <dd>Must return an <code><a href=
                   27701: "#htmlmenuelement">HTMLMenuElement</a></code> object that is to be
                   27702: used as a context menu for row <var title="">row</var> , or null if
                   27703: there is no particular context menu. May be omitted if none of the
                   27704: rows have a special context menu. As this method is called
                   27705: immediately before showing the menu in question, no precautions
                   27706: need to be taken if the return value of this method changes.</dd>
                   27707: <dt><dfn id="getrowclasses" title=
                   27708: "dom-provider-getRowClasses"><code>getRowClasses( <var title=
                   27709: "">row</var> , <var title="">classes</var> )</code></dfn></dt>
                   27710: <dd>Must add the classes that apply to row <var title="">row</var>
                   27711: to the <var title="">classes</var> object. May be omitted if the
                   27712: rows have no special classes. If the classes that this method would
                   27713: add changes, the <code><a href="#datagrid0">datagrid</a></code> 's
                   27714: update methods must be called to update the row in question. Some
                   27715: classes have <a href="#datagridClassSummary">predefined
                   27716: meanings</a> .</dd>
                   27717: <dt><dfn id="getcelldata" title=
                   27718: "dom-provider-getCellData"><code>getCellData( <var title=
                   27719: "">row</var> , <var title="">column</var> )</code></dfn></dt>
                   27720: <dd>Must return the value of the cell on row <var title=
                   27721: "">row</var> in column <var title="">column</var> . For text cells,
                   27722: this must be the text to show for that cell. For <a href=
                   27723: "#progress1" title="datagrid-cell-class-progress">progress bar
                   27724: cells</a> , this must be either a floating point number in the
                   27725: range 0.0 to 1.0 (converted to a string representation ),
                   27726: indicating the fraction of the progress bar to show as full (1.0
                   27727: meaning complete), or the empty string, indicating an indeterminate
                   27728: progress bar. If the value that this method would return changes,
                   27729: the <code><a href="#datagrid0">datagrid</a></code> 's update
                   27730: methods must be called to update the rows that changed. If only one
                   27731: cell changed, the <code title=
                   27732: "dom-datagrid-updateCellChanged"><a href=
                   27733: "#updatecellchanged">updateCellChanged()</a></code> method may be
                   27734: used.</dd>
                   27735: <dt><dfn id="getcellclasses" title=
                   27736: "dom-provider-getCellClasses"><code>getCellClasses( <var title=
                   27737: "">row</var> , <var title="">column</var> , <var title=
                   27738: "">classes</var> )</code></dfn></dt>
                   27739: <dd>Must add the classes that apply to the cell on row <var title=
                   27740: "">row</var> in column <var title="">column</var> to the
                   27741: <var title="">classes</var> object. May be omitted if the cells
                   27742: have no special classes. If the classes that this method would add
                   27743: changes, the <code><a href="#datagrid0">datagrid</a></code> 's
                   27744: update methods must be called to update the rows or cells in
                   27745: question. Some classes have <a href=
                   27746: "#datagridClassSummary">predefined meanings</a> .</dd>
                   27747: <dt><dfn id="togglecolumnsortstate" title=
                   27748: "dom-provider-toggleColumnSortState"><code>toggleColumnSortState(
                   27749: <var title="">column</var> )</code></dfn></dt>
                   27750: <dd>Called by the <code><a href="#datagrid0">datagrid</a></code>
                   27751: when the user tries to sort the data using a particular column
                   27752: <var title="">column</var> . The data provider must update its
                   27753: state so that the <code title=
                   27754: "dom-provider-getChildAtPosition"><a href=
                   27755: "#getchildatposition">GetChildAtPosition()</a></code> method
                   27756: returns the new order, and the classes of the columns returned by
                   27757: <code title="dom-provider-getCaptionClasses"><a href=
                   27758: "#getcaptionclasses">getCaptionClasses()</a></code> represent the
                   27759: new sort status. There is no need to tell the <code><a href=
                   27760: "#datagrid0">datagrid</a></code> that it the data has changed, as
                   27761: the <code><a href="#datagrid0">datagrid</a></code> automatically
                   27762: assumes that the entire data model will need updating.</dd>
                   27763: <dt><dfn id="setcellcheckedstate" title=
                   27764: "dom-provider-setCellCheckedState"><code>setCellCheckedState(
                   27765: <var title="">row</var> , <var title="">column</var> , <var title=
                   27766: "">state</var> )</code></dfn></dt>
                   27767: <dd>Called by the <code><a href="#datagrid0">datagrid</a></code>
                   27768: when the user changes the state of a checkbox cell on row
                   27769: <var title="">row</var> , column <var title="">column</var> . The
                   27770: checkbox should be toggled to the state given by <var title=
                   27771: "">state</var> , which is a positive integer (1) if the checkbox is
                   27772: to be checked, zero (0) if it is to be unchecked, and a negative
                   27773: number <del class="diff-old">(-1)</del> <ins class=
                   27774: "diff-chg">(−1)</ins> if it is to be set to the indeterminate
                   27775: state. There is no need to tell the <code><a href=
                   27776: "#datagrid0">datagrid</a></code> that the cell has changed, as the
                   27777: <code><a href="#datagrid0">datagrid</a></code> automatically
                   27778: assumes that the given cell will need updating.</dd>
                   27779: <dt><dfn id="cyclecell" title=
                   27780: "dom-provider-cycleCell"><code>cycleCell( <var title="">row</var> ,
                   27781: <var title="">column</var> )</code></dfn></dt>
                   27782: <dd>Called by the <code><a href="#datagrid0">datagrid</a></code>
                   27783: when the user changes the state of a cyclable cell on row
                   27784: <var title="">row</var> , column <var title="">column</var> . The
                   27785: data provider should change the state of the cell to the new state,
                   27786: as appropriate. There is no need to tell the <code><a href=
                   27787: "#datagrid0">datagrid</a></code> that the cell has changed, as the
                   27788: <code><a href="#datagrid0">datagrid</a></code> automatically
                   27789: assumes that the given cell will need updating.</dd>
                   27790: <dt><dfn id="editcell" title=
                   27791: "dom-provider-editCell"><code>editCell( <var title="">row</var> ,
                   27792: <var title="">column</var> , <var title="">data</var>
                   27793: )</code></dfn></dt>
                   27794: <dd>Called by the <code><a href="#datagrid0">datagrid</a></code>
                   27795: when the user edits the cell on row <var title="">row</var> ,
                   27796: column <var title="">column</var> . The new value of the cell is
                   27797: given by <var title="">data</var> . The data provider should update
                   27798: the cell accordingly. There is no need to tell the <code><a href=
                   27799: "#datagrid0">datagrid</a></code> that the cell has changed, as the
                   27800: <code><a href="#datagrid0">datagrid</a></code> automatically
                   27801: assumes that the given cell will need updating.</dd>
                   27802: </dl>
                   27803: <p>The following classes (for rows, columns, and cells) may be
                   27804: usefully used in conjunction with this interface:</p>
                   27805: <table id="datagridClassSummary">
                   27806: <tbody>
                   27807: <tr>
                   27808: <th>Class name</th>
                   27809: <th>Applies to</th>
                   27810: <th>Description</th>
                   27811: </tr>
                   27812: <tr>
                   27813: <td><dfn id="checked" title=
                   27814: "datagrid-cell-class-checked"><code>checked</code></dfn></td>
                   27815: <td>Cells</td>
                   27816: <td>The cell has a checkbox and it is checked. (The <code title=
                   27817: "datagrid-cell-class-cyclable"><a href=
                   27818: "#cyclable">cyclable</a></code> and <code title=
                   27819: "datagrid-cell-class-progress"><a href=
                   27820: "#progress1">progress</a></code> classes override this,
                   27821: though.)</td>
                   27822: </tr>
                   27823: <tr>
                   27824: <td><dfn id="cyclable" title=
                   27825: "datagrid-cell-class-cyclable"><code>cyclable</code></dfn></td>
                   27826: <td>Cells</td>
                   27827: <td>The cell can be cycled through multiple values. (The
                   27828: <code title="datagrid-cell-class-progress"><a href=
                   27829: "#progress1">progress</a></code> class overrides this,
                   27830: though.)</td>
                   27831: </tr>
                   27832: <tr>
                   27833: <td><dfn id="editable" title=
                   27834: "datagrid-cell-class-editable"><code>editable</code></dfn></td>
                   27835: <td>Cells</td>
                   27836: <td>The cell can be edited. (The <code title=
                   27837: "datagrid-cell-class-cyclable"><a href=
                   27838: "#cyclable">cyclable</a></code> , <code title=
                   27839: "datagrid-cell-class-progress"><a href=
                   27840: "#progress1">progress</a></code> , <code title=
                   27841: "datagrid-cell-class-checked"><a href="#checked">checked</a></code>
                   27842: , <code title="datagrid-cell-class-checked"><a href=
                   27843: "#checked">unchecked</a></code> and <code title=
                   27844: "datagrid-cell-class-checked"><a href=
                   27845: "#checked">indeterminate</a></code> classes override this,
                   27846: though.)</td>
                   27847: </tr>
                   27848: <tr>
                   27849: <td><dfn id="header0" title=
                   27850: "datagrid-row-class-header"><code>header</code></dfn></td>
                   27851: <td>Rows</td>
                   27852: <td>The row is a heading, not a data row.</td>
                   27853: </tr>
                   27854: <tr>
                   27855: <td><dfn id="indeterminate" title=
                   27856: "datagrid-cell-class-indeterminate"><code>indeterminate</code></dfn></td>
                   27857: <td>Cells</td>
                   27858: <td>The cell has a checkbox, and it can be set to an indeterminate
                   27859: state. If neither the <code title=
                   27860: "datagrid-cell-class-checked"><a href="#checked">checked</a></code>
                   27861: nor <code title="datagrid-cell-class-checked"><a href=
                   27862: "#checked">unchecked</a></code> classes are present, then the
                   27863: checkbox is in that state, too. (The <code title=
                   27864: "datagrid-cell-class-cyclable"><a href=
                   27865: "#cyclable">cyclable</a></code> and <code title=
                   27866: "datagrid-cell-class-progress"><a href=
                   27867: "#progress1">progress</a></code> classes override this,
                   27868: though.)</td>
                   27869: </tr>
                   27870: <tr>
                   27871: <td><dfn id="initially-hidden" title=
                   27872: "datagrid-column-class-initially-hidden"><code>initially-hidden</code></dfn></td>
                   27873: <td>Columns</td>
                   27874: <td>The column will not be shown when the <code><a href=
                   27875: "#datagrid0">datagrid</a></code> is initially rendered. If this
                   27876: class is not present on the column when the <code><a href=
                   27877: "#datagrid0">datagrid</a></code> is initially rendered, the column
                   27878: will be visible if space allows.</td>
                   27879: </tr>
                   27880: <tr>
                   27881: <td><dfn id="initially-closed" title=
                   27882: "datagrid-row-class-initially-closed"><code>initially-closed</code></dfn></td>
                   27883: <td>Rows</td>
                   27884: <td>The row will be closed when the <code><a href=
                   27885: "#datagrid0">datagrid</a></code> is initially rendered. If neither
                   27886: this class nor the <code title=
                   27887: "datagrid-row-class-initially-open"><a href=
                   27888: "#initially-open">initially-open</a></code> class is present on the
                   27889: row when the <code><a href="#datagrid0">datagrid</a></code> is
                   27890: initially rendered, the initial state will depend on platform
                   27891: conventions.</td>
                   27892: </tr>
                   27893: <tr>
                   27894: <td><dfn id="initially-open" title=
                   27895: "datagrid-row-class-initially-open"><code>initially-open</code></dfn></td>
                   27896: <td>Rows</td>
                   27897: <td>The row will be opened when the <code><a href=
                   27898: "#datagrid0">datagrid</a></code> is initially rendered. If neither
                   27899: this class nor the <code title=
                   27900: "datagrid-row-class-initially-closed"><a href=
                   27901: "#initially-closed">initially-closed</a></code> class is present on
                   27902: the row when the <code><a href="#datagrid0">datagrid</a></code> is
                   27903: initially rendered, the initial state will depend on platform
                   27904: conventions.</td>
                   27905: </tr>
                   27906: <tr>
                   27907: <td><dfn id="progress1" title=
                   27908: "datagrid-cell-class-progress"><code>progress</code></dfn></td>
                   27909: <td>Cells</td>
                   27910: <td>The cell is a progress bar.</td>
                   27911: </tr>
                   27912: <tr>
                   27913: <td><dfn id="reversed1" title=
                   27914: "datagrid-column-class-reversed"><code>reversed</code></dfn></td>
                   27915: <td>Columns</td>
                   27916: <td>If the cell is sorted, the sort direction is descending,
                   27917: instead of ascending.</td>
                   27918: </tr>
                   27919: <tr>
                   27920: <td><dfn id="selectable-separator" title=
                   27921: "datagrid-row-class-selectable-separator"><code>selectable-separator</code></dfn></td>
                   27922: <td>Rows</td>
                   27923: <td>The row is a normal, selectable, data row, except that instead
                   27924: of having data, it only has a separator. (The <code title=
                   27925: "datagrid-row-class-header"><a href="#header0">header</a></code>
                   27926: and <code title="datagrid-row-class-separator"><a href=
                   27927: "#separator">separator</a></code> classes override this,
                   27928: though.)</td>
                   27929: </tr>
                   27930: <tr>
                   27931: <td><dfn id="separator" title=
                   27932: "datagrid-row-class-separator"><code>separator</code></dfn></td>
                   27933: <td>Rows</td>
                   27934: <td>The row is a separator row, not a data row. (The <code title=
                   27935: "datagrid-row-class-header"><a href="#header0">header</a></code>
                   27936: class overrides this, though.)</td>
                   27937: </tr>
                   27938: <tr>
                   27939: <td><dfn id="sortable" title=
                   27940: "datagrid-column-class-sortable"><code>sortable</code></dfn></td>
                   27941: <td>Columns</td>
                   27942: <td>The data can be sorted by this column.</td>
                   27943: </tr>
                   27944: <tr>
                   27945: <td><dfn id="sorted" title=
                   27946: "datagrid-column-class-sorted"><code>sorted</code></dfn></td>
                   27947: <td>Columns</td>
                   27948: <td>The data is sorted by this column. Unless the <code title=
                   27949: "datagrid-column-class-reversed"><a href=
                   27950: "#reversed1">reversed</a></code> class is also present, the sort
                   27951: direction is ascending.</td>
                   27952: </tr>
                   27953: <tr>
                   27954: <td><dfn id="unchecked" title=
                   27955: "datagrid-cell-class-unchecked"><code>unchecked</code></dfn></td>
                   27956: <td>Cells</td>
                   27957: <td>The cell has a checkbox and, unless the <code title=
                   27958: "datagrid-cell-class-checked"><a href="#checked">checked</a></code>
                   27959: class is present as well, it is unchecked. (The <code title=
                   27960: "datagrid-cell-class-cyclable"><a href=
                   27961: "#cyclable">cyclable</a></code> and <code title=
                   27962: "datagrid-cell-class-progress"><a href=
                   27963: "#progress1">progress</a></code> classes override this,
                   27964: though.)</td>
                   27965: </tr>
                   27966: </tbody>
                   27967: </table>
                   27968: <h5 id="the-default"><span class="secno"><del class=
                   27969: "diff-old">3.18.2.4.</del> <ins class=
                   27970: "diff-chg">3.16.2.4.</ins></span> The default data provider</h5>
                   27971: <p>The user agent must supply a default data provider for the case
                   27972: where the <code><a href="#datagrid0">datagrid</a></code> 's
                   27973: <code title="dom-datagrid-data"><a href="#data2">data</a></code>
                   27974: attribute is null. It must act as described in this section.</p>
                   27975: <p>The <del class="diff-old">behaviour</del> <ins class=
                   27976: "diff-chg">behavior</ins> of the default data provider depends on
                   27977: the nature of the first element child of the <code><a href=
                   27978: "#datagrid0">datagrid</a></code> .</p>
                   27979: <dl class="switch">
                   27980: <dt>While the first element child is a <code><a href=
                   27981: "#table">table</a></code> element</dt>
                   27982: <dd>
                   27983: <p><strong><code title="dom-provider-getRowCount"><a href=
                   27984: "#getrowcount">getRowCount( <var title="">row</var>
                   27985: )</a></code></strong> : The number of rows returned by the default
                   27986: data provider for the root of the tree (when <var title=
                   27987: "">row</var> is empty) must be the total number of <code><a href=
                   27988: "#tr">tr</a></code> elements that are children of <code><a href=
                   27989: "#tbody">tbody</a></code> elements that are children of the
                   27990: <code><a href="#table">table</a></code> , if there are any such
                   27991: child <code><a href="#tbody">tbody</a></code> elements. If there
                   27992: are no such <code><a href="#tbody">tbody</a></code> elements then
                   27993: the number of rows returned for the root must be the number of
                   27994: <code><a href="#tr">tr</a></code> elements that are children of the
                   27995: <code><a href="#table">table</a></code> .</p>
                   27996: <p>When <var title="">row</var> is not empty, the number of rows
                   27997: returned must be zero.</p>
                   27998: <p class="note">The <code><a href="#table">table</a></code> -based
                   27999: default data provider cannot represent a tree.</p>
                   28000: <p class="note">Rows in <code><a href="#thead0">thead</a></code>
                   28001: elements do not contribute to the number of rows returned, although
                   28002: they do affect the columns and column captions. Rows in
                   28003: <code><a href="#tfoot0">tfoot</a></code> elements are <a href=
                   28004: "#ignored" title="ignore">ignored</a> completely by this
                   28005: algorithm.</p>
                   28006: <p id="defaultDataProviderTableMapper"><strong><code title=
                   28007: "dom-provider-getChildAtPosition"><a href=
                   28008: "#getchildatposition">getChildAtPosition( <var title="">row</var> ,
                   28009: <var title="">i</var> )</a></code></strong> : The default data
                   28010: provider must return the mapping appropriate to the <a href=
                   28011: "#defaultDataProviderTableSort">current sort order</a> .</p>
                   28012: <p><strong><code title="dom-provider-getColumnCount"><a href=
                   28013: "#getcolumncount">getColumnCount()</a></code></strong> : The number
                   28014: of columns returned must be the number of <code><a href=
                   28015: "#td">td</a></code> element children in the first <code><a href=
                   28016: "#tr">tr</a></code> element child of the first <code><a href=
                   28017: "#tbody">tbody</a></code> element child of the <code><a href=
                   28018: "#table">table</a></code> , if there are any such <code><a href=
                   28019: "#tbody">tbody</a></code> elements. If there are no such
                   28020: <code><a href="#tbody">tbody</a></code> elements, then it must be
                   28021: the number of <code><a href="#td">td</a></code> element children in
                   28022: the first <code><a href="#tr">tr</a></code> element child of the
                   28023: <code><a href="#table">table</a></code> , if any, or otherwise 1.
                   28024: If the number that would be returned by these rules is 0, then 1
                   28025: must be returned instead.</p>
                   28026: <p><strong><code title="dom-provider-getCaptionText"><a href=
                   28027: "#getcaptiontext">getCaptionText( <var title="">i</var>
                   28028: )</a></code></strong> : If the <code><a href=
                   28029: "#table">table</a></code> has no <code><a href=
                   28030: "#thead0">thead</a></code> element child, or if its first
                   28031: <code><a href="#thead0">thead</a></code> element child has no
                   28032: <code><a href="#tr">tr</a></code> element child, the default data
                   28033: provider must return the empty string for all captions. Otherwise,
                   28034: the value of the <code><a href=
                   28035: "#textcontent">textContent</a></code> attribute of the <var title=
                   28036: "">i</var> th <code><a href="#th">th</a></code> element child of
                   28037: the first <code><a href="#tr">tr</a></code> element child of the
                   28038: first <code><a href="#thead0">thead</a></code> element child of the
                   28039: <code><a href="#table">table</a></code> element must be returned.
                   28040: If there is no such <code><a href="#th">th</a></code> element, the
                   28041: empty string must be returned.</p>
                   28042: <p><strong><code title="dom-provider-getCaptionClasses"><a href=
                   28043: "#getcaptionclasses">getCaptionClasses( <var title="">i</var> ,
                   28044: <var title="">classes</var> )</a></code></strong> : If the
                   28045: <code><a href="#table">table</a></code> has no <code><a href=
                   28046: "#thead0">thead</a></code> element child, or if its first
                   28047: <code><a href="#thead0">thead</a></code> element child has no
                   28048: <code><a href="#tr">tr</a></code> element child, the default data
                   28049: provider must not add any classes for any of the captions.
                   28050: Otherwise, each class in the <code title="attr-class"><a href=
                   28051: "#class">class</a></code> attribute of the <var title="">i</var> th
                   28052: <code><a href="#th">th</a></code> element child of the first
                   28053: <code><a href="#tr">tr</a></code> element child of the first
                   28054: <code><a href="#thead0">thead</a></code> element child of the
                   28055: <code><a href="#table">table</a></code> element must be added to
                   28056: the <var title="">classes</var> . If there is no such
                   28057: <code><a href="#th">th</a></code> element, no classes must be
                   28058: added. The user agent must then:</p>
                   28059: <ol>
                   28060: <li>Remove the <code title="datagrid-column-class-sorted"><a href=
                   28061: "#sorted">sorted</a></code> and <code title=
                   28062: "datagrid-column-class-reversed"><a href=
                   28063: "#reversed1">reversed</a></code> classes.</li>
                   28064: <li>If the <code><a href="#table">table</a></code> element has a
                   28065: <code title="attr-class"><a href="#class">class</a></code>
                   28066: attribute that includes the <code title="">sortable</code> class,
                   28067: add the <code title="datagrid-column-class-sortable"><a href=
                   28068: "#sortable">sortable</a></code> class.</li>
                   28069: <li>If the column is the one currently being used to sort the data,
                   28070: add the <code title="datagrid-column-class-sorted"><a href=
                   28071: "#sorted">sorted</a></code> class.</li>
                   28072: <li>If the column is the one currently being used to sort the data,
                   28073: and it is sorted in descending order, add the <code title=
                   28074: "datagrid-column-class-reversed"><a href=
                   28075: "#reversed1">reversed</a></code> class as well.</li>
                   28076: </ol>
                   28077: <p>The various row- and cell- related methods operate relative to a
                   28078: particular element, the element of the row or cell specified by
                   28079: their arguments.</p>
                   28080: <p><strong>For rows</strong> : Since the default data provider for
                   28081: a <code><a href="#table">table</a></code> always returns 0 as the
                   28082: number of children for any row other than the root, the path to the
                   28083: row passed to these methods will always consist of a single number.
                   28084: In the prose below, this number is referred to as <var title=
                   28085: "">i</var> .</p>
                   28086: <p>If the <code><a href="#table">table</a></code> has
                   28087: <code><a href="#tbody">tbody</a></code> element children, the
                   28088: element for the <var title="">i</var> th row is the <var title=
                   28089: "">i</var> th <code><a href="#tr">tr</a></code> element that is a
                   28090: child of a <code><a href="#tbody">tbody</a></code> element that is
                   28091: a child of the <code><a href="#table">table</a></code> element. If
                   28092: the <code><a href="#table">table</a></code> does not have
                   28093: <code><a href="#tbody">tbody</a></code> element children, then the
                   28094: element for the <var title="">i</var> th real row is the
                   28095: <var title="">i</var> th <code><a href="#tr">tr</a></code> element
                   28096: that is a child of the <code><a href="#table">table</a></code>
                   28097: element.</p>
                   28098: <p><strong>For cells</strong> : Given a row and its element, the
                   28099: row's <var title="">i</var> th cell's element is the <var title=
                   28100: "">i</var> th <code><a href="#td">td</a></code> element child of
                   28101: the row element.</p>
                   28102: <p class="note">The <code>colspan</code> and <code>rowspan</code>
                   28103: attributes are <a href="#ignored" title="ignore">ignored</a> by
                   28104: this algorithm.</p>
                   28105: <p><strong><code title="dom-provider-getRowImage"><a href=
                   28106: "#getrowimage">getRowImage( <var title="">i</var>
                   28107: )</a></code></strong> : If the row's first cell's element has an
                   28108: <code><a href="#img">img</a></code> element child, then the URI of
                   28109: the row's image is the URI of the first <code><a href=
                   28110: "#img">img</a></code> element child of the row's first cell's
                   28111: element. Otherwise, the URI of the row's image is the empty
                   28112: string.</p>
                   28113: <p><strong><code title="dom-provider-getRowMenu"><a href=
                   28114: "#getrowmenu">getRowMenu( <var title="">i</var>
                   28115: )</a></code></strong> : If the row's first cell's element has a
                   28116: <code><a href="#menu">menu</a></code> element child, then the row's
                   28117: menu is the first <code><a href="#menu">menu</a></code> element
                   28118: child of the row's first cell's element. Otherwise, the row has no
                   28119: menu.</p>
                   28120: <p><strong><code title="dom-provider-getRowClasses"><a href=
                   28121: "#getrowclasses">getRowClasses( <var title="">i</var> , <var title=
                   28122: "">classes</var> )</a></code></strong> : The default data provider
                   28123: must never add a class to the row's classes.</p>
                   28124: <p id="defaultDataProviderTableSort"><strong><code title=
                   28125: "dom-provider-toggleColumnSortState"><a href=
                   28126: "#togglecolumnsortstate">toggleColumnSortState( <var title=
                   28127: "">i</var> )</a></code></strong> : If the data is already being
                   28128: sorted on the given column, then the user agent must change the
                   28129: current sort mapping to be the inverse of the current sort mapping;
                   28130: if the sort order was ascending before, it is now descending,
                   28131: otherwise it is now ascending. Otherwise, if the current sort
                   28132: column is another column, or the data model is currently not
                   28133: sorted, the user agent must create a new mapping, which maps rows
                   28134: in the data model to rows in the DOM so that the rows in the data
                   28135: model are sorted by the specified column, in ascending order.
                   28136: (Which sort comparison operator to use is left up to the UA to
                   28137: decide.)</p>
                   28138: <p>When the sort mapping is changed, the values returned by the
                   28139: <code title="dom-provider-getChildAtPosition"><a href=
                   28140: "#getchildatposition">getChildAtPosition()</a></code> method for
                   28141: the default data provider <a href=
                   28142: "#defaultDataProviderTableMapper">will change appropriately</a>
                   28143: .</p>
                   28144: <p><strong><code title="dom-provider-getCellData"><a href=
                   28145: "#getcelldata">getCellData( <var title="">i</var> , <var title=
                   28146: "">j</var> )</a></code> , <code title=
                   28147: "dom-provider-getCellClasses"><a href=
                   28148: "#getcellclasses">getCellClasses( <var title="">i</var> ,
                   28149: <var title="">j</var> , <var title="">classes</var> )</a></code> ,
                   28150: <code title="dom-provider-setCellCheckedState"><a href=
                   28151: "#setcellcheckedstate">getCellCheckedState( <var title="">i</var> ,
                   28152: <var title="">j</var> , <var title="">state</var> )</a></code> ,
                   28153: <code title="dom-provider-cycleCell"><a href=
                   28154: "#cyclecell">cycleCell( <var title="">i</var> , <var title=
                   28155: "">j</var> )</a></code> , and <code title=
                   28156: "dom-provider-editCell"><a href="#editcell">editCell( <var title=
                   28157: "">i</var> , <var title="">j</var> , <var title="">data</var>
                   28158: )</a></code></strong> : See <a href=
                   28159: "#commonDefaultDataGridMethodDefinitions">the common definitions
                   28160: below</a> .</p>
                   28161: <p>The data provider must call the <code><a href=
                   28162: "#datagrid0">datagrid</a></code> 's update methods appropriately
                   28163: whenever the descendants of the <code><a href=
                   28164: "#datagrid0">datagrid</a></code> mutate. For example, if a
                   28165: <code><a href="#tr">tr</a></code> is removed, then the <code title=
                   28166: "dom-datagrid-updateRowsRemoved"><a href=
                   28167: "#updaterowsremoved">updateRowsRemoved()</a></code> methods would
                   28168: probably need to be invoked, and any change to a cell or its
                   28169: descendants must cause the cell to be updated. If the
                   28170: <code><a href="#table">table</a></code> element stops being the
                   28171: first child of the <code><a href="#datagrid0">datagrid</a></code> ,
                   28172: then the data provider must call the <code title=
                   28173: "dom-datagrid-updateEverything"><a href=
                   28174: "#updateeverything">updateEverything()</a></code> method on the
                   28175: <code><a href="#datagrid0">datagrid</a></code> . Any change to a
                   28176: cell that is in the column that the data provider is currently
                   28177: using as its sort column must also cause the sort to be
                   28178: reperformed, with a call to <code title=
                   28179: "dom-datagrid-updateEverything"><a href=
                   28180: "#updateeverything">updateEverything()</a></code> if the change did
                   28181: affect the sort order.</p>
                   28182: </dd>
                   28183: <dt>While the first element child is a <code>select</code> or
                   28184: <code>datalist</code> element</dt>
                   28185: <dd>
                   28186: <p>The default data provider must return 1 for the column count,
                   28187: the empty string for the column's caption, and must not add any
                   28188: classes to the column's classes.</p>
                   28189: <p>For the rows, assume the existence of a node filter view of the
                   28190: descendants of the first element child of the <code><a href=
                   28191: "#datagrid0">datagrid</a></code> element (the <code>select</code>
                   28192: or <code>datalist</code> element), that skips all nodes other than
                   28193: <code>optgroup</code> and <code>option</code> elements, as well as
                   28194: any descendents of any <code>option</code> elements.</p>
                   28195: <p>Given a path <var title="">row</var> , the corresponding element
                   28196: is the one obtained by drilling into the view, taking the child
                   28197: given by the path each time.</p>
                   28198: <div class="example">
                   28199: <p>Given the following XML markup:</p>
                   28200: <pre>
                   28201: &lt;datagrid&gt;
                   28202:  &lt;select&gt;
                   28203:   &lt;!-- the options and optgroups have had their labels and values removed
                   28204:        to make the underlying structure clearer --&gt;
                   28205:   &lt;optgroup&gt;
                   28206:    &lt;option/&gt;
                   28207:    &lt;option/&gt;
                   28208:   &lt;/optgroup&gt;
                   28209:   &lt;optgroup&gt;
                   28210:    &lt;option/&gt;
                   28211:    &lt;optgroup id="a"&gt;
                   28212:     &lt;option/&gt;
                   28213:     &lt;option/&gt;
                   28214:     &lt;bogus/&gt;
                   28215:     &lt;option id="b"/&gt;
                   28216:    &lt;/optgroup&gt;
                   28217:    &lt;option/&gt;
                   28218:   &lt;/optgroup&gt;
                   28219:  &lt;/select&gt;
                   28220: &lt;/datagrid&gt;
                   28221: </pre>
                   28222: <p>The path "1,1,2" would select the element with ID "b". In the
                   28223: filtered view, the text nodes, comment nodes, and bogus elements
                   28224: are ignored; so for instance, the element with ID "a" (path "1,1")
                   28225: has only 3 child nodes in the view.</p>
                   28226: </div>
                   28227: <p><code title="dom-provider-getRowCount"><a href=
                   28228: "#getrowcount">getRowCount( <var title="">row</var> )</a></code>
                   28229: must drill through the view to find the element corresponding to
                   28230: the method's argument, and return the number of child nodes in the
                   28231: filtered view that the corresponding element has. (If the
                   28232: <var title="">row</var> is empty, the corresponding element is the
                   28233: <code>select</code> element at the root of the filtered view.)</p>
                   28234: <p><code title="dom-provider-getChildAtPosition"><a href=
                   28235: "#getchildatposition">getChildAtPosition( <var title="">row</var> ,
                   28236: <var title="">position</var> )</a></code> must return <var title=
                   28237: "">position</var> . (The <code>select</code> /
                   28238: <code>datalist</code> default data provider does not support
                   28239: sorting the data grid.)</p>
                   28240: <p><code title="dom-provider-getRowImage"><a href=
                   28241: "#getrowimage">getRowImage( <var title="">i</var> )</a></code> must
                   28242: return the empty string, <code title=
                   28243: "dom-provider-getRowMenu"><a href="#getrowmenu">getRowMenu(
                   28244: <var title="">i</var> )</a></code> must return null.</p>
                   28245: <p><code title="dom-provider-getRowClasses"><a href=
                   28246: "#getrowclasses">getRowClasses( <var title="">row</var> ,
                   28247: <var title="">classes</var> )</a></code> must add the classes from
                   28248: the following list to <var title="">classes</var> when their
                   28249: condition is met:</p>
                   28250: <ul>
                   28251: <li>If the <var title="">row</var> 's corresponding element is an
                   28252: <code>optgroup</code> element: <code title=
                   28253: "datagrid-row-class-header"><a href=
                   28254: "#header0">header</a></code></li>
                   28255: <li>If the <var title="">row</var> 's corresponding element
                   28256: contains other elements that are also in the view, and the
                   28257: element's <code title="attr-class"><a href=
                   28258: "#class">class</a></code> attribute contains the <code title=
                   28259: "">closed</code> class: <code title=
                   28260: "datagrid-row-class-initially-closed"><a href=
                   28261: "#initially-closed">initially-closed</a></code></li>
                   28262: <li>If the <var title="">row</var> 's corresponding element
                   28263: contains other elements that are also in the view, and the
                   28264: element's <code title="attr-class"><a href=
                   28265: "#class">class</a></code> attribute contains the <code title=
                   28266: "">open</code> class: <code title=
                   28267: "datagrid-row-class-initially-open"><a href=
                   28268: "#initially-open">initially-open</a></code></li>
                   28269: </ul>
                   28270: <p>The <code title="dom-provider-getCellData"><a href=
                   28271: "#getcelldata">getCellData( <var title="">row</var> , <var title=
                   28272: "">cell</var> )</a></code> method must return the value of the
                   28273: <code title="attr-optgroup-label">label</code> attribute if the
                   28274: <var title="">row</var> 's corresponding element is an
                   28275: <code>optgroup</code> element, otherwise, if the <var title=
                   28276: "">row</var> 's corresponding element is an <code>option</code>
                   28277: element, its <code title="attr-option-label">label</code> attribute
                   28278: if it has one, otherwise the value of its <code><a href=
                   28279: "#textcontent">textContent</a></code> DOM attribute.</p>
                   28280: <p>The <code title="dom-provider-getCellClasses"><a href=
                   28281: "#getcellclasses">getCellClasses( <var title="">row</var> ,
                   28282: <var title="">cell</var> , <var title="">classes</var> )</a></code>
                   28283: method must add no classes.</p>
                   28284: <p class="big-issue">autoselect some rows when <del class=
                   28285: "diff-old">initialised,</del> <ins class=
                   28286: "diff-chg">initialized,</ins> reflect the selection in the select,
                   28287: reflect the multiple attribute somehow.</p>
                   28288: <p>The data provider must call the <code><a href=
                   28289: "#datagrid0">datagrid</a></code> 's update methods appropriately
                   28290: whenever the descendants of the <code><a href=
                   28291: "#datagrid0">datagrid</a></code> mutate.</p>
                   28292: </dd>
                   28293: <dt>While the first element child is another element</dt>
                   28294: <dd>
                   28295: <p>The default data provider must return 1 for the column count,
                   28296: the empty string for the column's caption, and must not add any
                   28297: classes to the column's classes.</p>
                   28298: <p>For the rows, assume the existence of a node filter view of the
                   28299: descendants of the <code><a href="#datagrid0">datagrid</a></code>
                   28300: that skips all nodes other than <code><a href="#li">li</a></code> ,
                   28301: <code><a href="#h1">h1</a></code> <del class="diff-old">-</del>
                   28302: <ins class="diff-chg">–</ins> <code><a href="#h6">h6</a></code> ,
                   28303: and <code><a href="#hr">hr</a></code> elements, and skips any
                   28304: descendants of <code><a href="#menu">menu</a></code> elements.</p>
                   28305: <p>Given this view, each element in the view represents a row in
                   28306: the data model. The element corresponding to a path <var title=
                   28307: "">row</var> is the one obtained by drilling into the view, taking
                   28308: the child given by the path each time. The element of the row of a
                   28309: particular method call is the element given by drilling into the
                   28310: view along the path given by the method's arguments.</p>
                   28311: <p><code title="dom-provider-getRowCount"><a href=
                   28312: "#getrowcount">getRowCount( <var title="">row</var> )</a></code>
                   28313: must return the number of child elements in this view for the given
                   28314: row, or the number of elements at the root of the view if the
                   28315: <var title="">row</var> is empty.</p>
                   28316: <div class="example">
                   28317: <p>In the following example, the elements are identified by the
                   28318: paths given by their child text nodes:</p>
                   28319: <pre>
                   28320: &lt;datagrid&gt;
                   28321:  &lt;ol&gt;
                   28322:   &lt;li&gt; row 0 &lt;/li&gt;
                   28323:   &lt;li&gt; row 1
                   28324:    &lt;ol&gt;
                   28325:     &lt;li&gt; row 1,0 &lt;/li&gt;
                   28326:    &lt;/ol&gt;
                   28327:   &lt;/li&gt;
                   28328:   &lt;li&gt; row 2 &lt;/li&gt;
                   28329:  &lt;/ol&gt;
                   28330: &lt;/datagrid&gt;
                   28331: </pre>
                   28332: <p>In this example, only the <code><a href="#li">li</a></code>
                   28333: elements actually appear in the data grid; the <code><a href=
                   28334: "#ol">ol</a></code> element does not affect the data grid's
                   28335: processing model.</p>
                   28336: </div>
                   28337: <p><code title="dom-provider-getChildAtPosition"><a href=
                   28338: "#getchildatposition">getChildAtPosition( <var title="">row</var> ,
                   28339: <var title="">position</var> )</a></code> must return <var title=
                   28340: "">position</var> . (The generic default data provider does not
                   28341: support sorting the data grid.)</p>
                   28342: <p><code title="dom-provider-getRowImage"><a href=
                   28343: "#getrowimage">getRowImage( <var title="">i</var> )</a></code> must
                   28344: return the URI of the image given by the first <code><a href=
                   28345: "#img">img</a></code> element descendant (in the real DOM) of the
                   28346: row's element, that is not also a descendant of another element in
                   28347: the filtered view that is a descendant of the row's element.</p>
                   28348: <div class="example">
                   28349: <p>In the following example, the row with path "1,0" returns
                   28350: "http://example.com/a" as its image URI, and the other rows
                   28351: (including the row with path "1") return the empty string:</p>
                   28352: <pre>
                   28353: &lt;datagrid&gt;
                   28354:  &lt;ol&gt;
                   28355:   &lt;li&gt; row 0 &lt;/li&gt;
                   28356:   &lt;li&gt; row 1
                   28357:    &lt;ol&gt;
                   28358:     &lt;li&gt; row 1,0 &lt;img src="http://example.com/a" alt=""&gt; &lt;/li&gt;
                   28359:    &lt;/ol&gt;
                   28360:   &lt;/li&gt;
                   28361:   &lt;li&gt; row 2 &lt;/li&gt;
                   28362:  &lt;/ol&gt;
                   28363: &lt;/datagrid&gt;
                   28364: </pre></div>
                   28365: <p><code title="dom-provider-getRowMenu"><a href=
                   28366: "#getrowmenu">getRowMenu( <var title="">i</var> )</a></code> must
                   28367: return the first <code><a href="#menu">menu</a></code> element
                   28368: descendant (in the real DOM) of the row's element, that is not also
                   28369: a descendant of another element in the filtered view that is a
                   28370: <del class="diff-old">decsendant</del> <ins class=
                   28371: "diff-chg">descendant</ins> of the row's element. (This is
                   28372: analogous to the image case above.)</p>
                   28373: <p><code title="dom-provider-getRowClasses"><a href=
                   28374: "#getrowclasses">getRowClasses( <var title="">i</var> , <var title=
                   28375: "">classes</var> )</a></code> must add the classes from the
                   28376: following list to <var title="">classes</var> when their condition
                   28377: is met:</p>
                   28378: <ul>
                   28379: <li>If the row's element contains other elements that are also in
                   28380: the view, and the element's <code title="attr-class"><a href=
                   28381: "#class">class</a></code> attribute contains the <code title=
                   28382: "">closed</code> class: <code title=
                   28383: "datagrid-row-class-initially-closed"><a href=
                   28384: "#initially-closed">initially-closed</a></code></li>
                   28385: <li>If the row's element contains other elements that are also in
                   28386: the view, and the element's <code title="attr-class"><a href=
                   28387: "#class">class</a></code> attribute contains the <code title=
                   28388: "">open</code> class: <code title=
                   28389: "datagrid-row-class-initially-open"><a href=
                   28390: "#initially-open">initially-open</a></code></li>
                   28391: <li>If the row's element is an <code><a href="#h1">h1</a></code>
                   28392: <del class="diff-old">-</del> <ins class="diff-chg">–</ins>
                   28393: <code><a href="#h6">h6</a></code> element: <code title=
                   28394: "datagrid-row-class-header"><a href=
                   28395: "#header0">header</a></code></li>
                   28396: <li>If the row's element is an <code><a href="#hr">hr</a></code>
                   28397: element: <code title="datagrid-row-class-separator"><a href=
                   28398: "#separator">separator</a></code></li>
                   28399: </ul>
                   28400: <p>The <code title="dom-provider-getCellData"><a href=
                   28401: "#getcelldata">getCellData( <var title="">i</var> , <var title=
                   28402: "">j</var> )</a></code> , <code title=
                   28403: "dom-provider-getCellClasses"><a href=
                   28404: "#getcellclasses">getCellClasses( <var title="">i</var> ,
                   28405: <var title="">j</var> , <var title="">classes</var> )</a></code> ,
                   28406: <code title="dom-provider-setCellCheckedState"><a href=
                   28407: "#setcellcheckedstate">getCellCheckedState( <var title="">i</var> ,
                   28408: <var title="">j</var> , <var title="">state</var> )</a></code> ,
                   28409: <code title="dom-provider-cycleCell"><a href=
                   28410: "#cyclecell">cycleCell( <var title="">i</var> , <var title=
                   28411: "">j</var> )</a></code> , and <code title=
                   28412: "dom-provider-editCell"><a href="#editcell">editCell( <var title=
                   28413: "">i</var> , <var title="">j</var> , <var title="">data</var>
                   28414: )</a></code> methods must act as described in <a href=
                   28415: "#commonDefaultDataGridMethodDefinitions">the common definitions
                   28416: below</a> , treating the row's element as being the cell's
                   28417: element.</p>
                   28418: <p class="big-issue" id="generic-provider-selection">selection
                   28419: handling?</p>
                   28420: <p>The data provider must call the <code><a href=
                   28421: "#datagrid0">datagrid</a></code> 's update methods appropriately
                   28422: whenever the descendants of the <code><a href=
                   28423: "#datagrid0">datagrid</a></code> mutate.</p>
                   28424: </dd>
                   28425: <dt>Otherwise, while there is no element child</dt>
                   28426: <dd>
                   28427: <p>The data provider must return 0 for the number of rows, 1 for
                   28428: the number of columns, the empty string for the first column's
                   28429: caption, and must add no classes when asked for that column's
                   28430: classes. If the <code><a href="#datagrid0">datagrid</a></code> 's
                   28431: child list changes such that there is a first element child, then
                   28432: the data provider must call the <code title=
                   28433: "dom-datagrid-updateEverything"><a href=
                   28434: "#updateeverything">updateEverything()</a></code> method on the
                   28435: <code><a href="#datagrid0">datagrid</a></code> .</p>
                   28436: </dd>
                   28437: </dl>
                   28438: <h6 id="commonDefaultDataGridMethodDefinitions"><span class=
                   28439: "secno"><del class="diff-old">3.18.2.4.1.</del> <ins class=
                   28440: "diff-chg">3.16.2.4.1.</ins></span> Common default data provider
                   28441: method definitions for cells</h6>
                   28442: <p>These definitions are used for the cell-specific methods of the
                   28443: default data providers (other than in the <code>select</code> /
                   28444: <code>datalist</code> case). How they behave is based on the
                   28445: contents of an element that represents the cell given by their
                   28446: first two arguments. Which element that is is defined in the
                   28447: previous section.</p>
                   28448: <dl>
                   28449: <dt>Cyclable cells</dt>
                   28450: <dd>
                   28451: <p>If the first element child of a cell's element is a
                   28452: <code>select</code> element that has a no <code title=
                   28453: "attr-select-multiple">multiple</code> attribute and has at least
                   28454: one <code>option</code> element descendent, then the cell acts as a
                   28455: cyclable cell.</p>
                   28456: <p>The "current" <code>option</code> element is the selected
                   28457: <code>option</code> element, or the first <code>option</code>
                   28458: element if none is selected.</p>
                   28459: <p>The <code title="dom-provider-getCellData"><a href=
                   28460: "#getcelldata">getCellData()</a></code> method must return the
                   28461: <code><a href="#textcontent">textContent</a></code> of the current
                   28462: <code>option</code> element (the <code title=
                   28463: "attr-option-label">label</code> attribute is <a href="#ignored"
                   28464: title="ignore">ignored</a> in this context as the
                   28465: <code>optgroup</code> s are not displayed).</p>
                   28466: <p>The <code title="dom-provider-getCellClasses"><a href=
                   28467: "#getcellclasses">getCellClasses()</a></code> method must add the
                   28468: <code title="datagrid-cell-class-cyclable"><a href=
                   28469: "#cyclable">cyclable</a></code> class and then all the classes of
                   28470: the current <code>option</code> element.</p>
                   28471: <p>The <code title="dom-provider-cycleCell"><a href=
                   28472: "#cyclecell">cycleCell()</a></code> method must change the
                   28473: selection of the <code>select</code> element such that the next
                   28474: <code>option</code> element after the current <code>option</code>
                   28475: element is the only one that is selected (in <a href=
                   28476: "#tree-order">tree order</a> ). If the current <code>option</code>
                   28477: element is the last <code>option</code> element descendent of the
                   28478: <code>select</code> , then the first <code>option</code> element
                   28479: descendent must be selected instead.</p>
                   28480: <p>The <code title="dom-provider-setCellCheckedState"><a href=
                   28481: "#setcellcheckedstate">setCellCheckedState()</a></code> and
                   28482: <code title="dom-provider-editCell"><a href=
                   28483: "#editcell">editCell()</a></code> methods must do nothing.</p>
                   28484: </dd>
                   28485: <dt>Progress bar cells</dt>
                   28486: <dd>
                   28487: <p>If the first element child of a cell's element is a
                   28488: <code><a href="#progress">progress</a></code> element, then the
                   28489: cell acts as a progress bar cell.</p>
                   28490: <p>The <code title="dom-provider-getCellData"><a href=
                   28491: "#getcelldata">getCellData()</a></code> method must return the
                   28492: value returned by the <code><a href="#progress">progress</a></code>
                   28493: element's <code title="dom-progress-position"><a href=
                   28494: "#position">position</a></code> DOM attribute.</p>
                   28495: <p>The <code title="dom-provider-getCellClasses"><a href=
                   28496: "#getcellclasses">getCellClasses()</a></code> method must add the
                   28497: <code title="datagrid-cell-class-progress"><a href=
                   28498: "#progress1">progress</a></code> class.</p>
                   28499: <p>The <code title="dom-provider-setCellCheckedState"><a href=
                   28500: "#setcellcheckedstate">setCellCheckedState()</a></code> ,
                   28501: <code title="dom-provider-cycleCell"><a href=
                   28502: "#cyclecell">cycleCell()</a></code> , and <code title=
                   28503: "dom-provider-editCell"><a href="#editcell">editCell()</a></code>
                   28504: methods must do nothing.</p>
                   28505: </dd>
                   28506: <dt>Checkbox cells</dt>
                   28507: <dd>
                   28508: <p>If the first element child of a cell's element is an
                   28509: <code>input</code> element that has a <code title=
                   28510: "attr-input-type">type</code> attribute with the value <code title=
                   28511: "">checkbox</code> , then the cell acts as a check box cell.</p>
                   28512: <p>The <code title="dom-provider-getCellData"><a href=
                   28513: "#getcelldata">getCellData()</a></code> method must return the
                   28514: <code><a href="#textcontent">textContent</a></code> of the cell
                   28515: element.</p>
                   28516: <p>The <code title="dom-provider-getCellClasses"><a href=
                   28517: "#getcellclasses">getCellClasses()</a></code> method must add the
                   28518: <code title="datagrid-cell-class-checked"><a href=
                   28519: "#checked">checked</a></code> class if the <code>input</code>
                   28520: element is <span title="dom-input-checked">checked</span> , and the
                   28521: <code title="datagrid-cell-class-unchecked"><a href=
                   28522: "#unchecked">unchecked</a></code> class otherwise.</p>
                   28523: <p>The <code title="dom-provider-setCellCheckedState"><a href=
                   28524: "#setcellcheckedstate">setCellCheckedState()</a></code> method must
                   28525: set the <code>input</code> element's checkbox <span title=
                   28526: "dom-input-checked">state</span> to checked if the method's third
                   28527: argument is 1, and to unchecked otherwise.</p>
                   28528: <p>The <code title="dom-provider-cycleCell"><a href=
                   28529: "#cyclecell">cycleCell()</a></code> and <code title=
                   28530: "dom-provider-editCell"><a href="#editcell">editCell()</a></code>
                   28531: methods must do nothing.</p>
                   28532: </dd>
                   28533: <dt>Editable cells</dt>
                   28534: <dd>
                   28535: <p>If the first element child of a cell's element is an
                   28536: <code>input</code> element that has a <code title=
                   28537: "attr-input-type">type</code> attribute with the value <code title=
                   28538: "">text</code> or that has no <code title=
                   28539: "attr-input-type">type</code> attribute at all, then the cell acts
                   28540: as an editable cell.</p>
                   28541: <p>The <code title="dom-provider-getCellData"><a href=
                   28542: "#getcelldata">getCellData()</a></code> method must return the
                   28543: <code title="dom-input-value">value</code> of the
                   28544: <code>input</code> element.</p>
                   28545: <p>The <code title="dom-provider-getCellClasses"><a href=
                   28546: "#getcellclasses">getCellClasses()</a></code> method must add the
                   28547: <code title="datagrid-cell-class-editable"><a href=
                   28548: "#editable">editable</a></code> class.</p>
                   28549: <p>The <code title="dom-provider-editCell"><a href=
                   28550: "#editcell">editCell()</a></code> method must set the
                   28551: <code>input</code> element's <code title=
                   28552: "dom-input-value">value</code> DOM attribute to the value of the
                   28553: third argument to the method.</p>
                   28554: <p>The <code title="dom-provider-setCellCheckedState"><a href=
                   28555: "#setcellcheckedstate">setCellCheckedState()</a></code> and
                   28556: <code title="dom-provider-cycleCell"><a href=
                   28557: "#cyclecell">cycleCell()</a></code> methods must do nothing.</p>
                   28558: </dd>
                   28559: </dl>
                   28560: <h5 id="populating"><span class="secno"><del class=
                   28561: "diff-old">3.18.2.5.</del> <ins class=
                   28562: "diff-chg">3.16.2.5.</ins></span> Populating the <code><a href=
                   28563: "#datagrid0">datagrid</a></code> element</h5>
                   28564: <p>A <code><a href="#datagrid0">datagrid</a></code> must be
                   28565: disabled until its end tag has been parsed (in the case of a
                   28566: <code><a href="#datagrid0">datagrid</a></code> element in the
                   28567: original document markup) or until it has been inserted into the
                   28568: document (in the case of a dynamically created element). After that
                   28569: point, the element must fire a single <code title=
                   28570: "event-load"><a href="#load0">load</a></code> event at itself,
                   28571: which doesn't bubble and cannot be canceled.</p>
                   28572: <p class="big-issue">The end-tag parsing thing should be moved to
                   28573: the parsing section.</p>
                   28574: <p>The <code><a href="#datagrid0">datagrid</a></code> must then
                   28575: populate itself using the data provided by the data provider
                   28576: assigned to the <code title="dom-datagrid-data"><a href=
                   28577: "#data2">data</a></code> DOM attribute. After the view is populated
                   28578: (using the methods described below), the <code><a href=
                   28579: "#datagrid0">datagrid</a></code> must invoke the <code title=
                   28580: "dom-provider-initialize"><a href=
                   28581: "#initialize">initialize()</a></code> method on the data provider
                   28582: specified by the <code title="dom-datagrid-data"><a href=
                   28583: "#data2">data</a></code> attribute, passing itself (the
                   28584: <code><a href="#htmldatagridelement">HTMLDataGridElement</a></code>
                   28585: object) as the only argument.</p>
                   28586: <p>When the <code title="dom-datagrid-data"><a href=
                   28587: "#data2">data</a></code> attribute is null, the <code><a href=
                   28588: "#datagrid0">datagrid</a></code> must use the default data provider
                   28589: described in the previous section.</p>
                   28590: <p>To obtain data from the data provider, the element must invoke
                   28591: methods on the data provider object in the following ways:</p>
                   28592: <dl>
                   28593: <dt>To determine the total number of columns</dt>
                   28594: <dd>Invoke the <code title="dom-provider-getColumnCount"><a href=
                   28595: "#getcolumncount">getColumnCount()</a></code> method with no
                   28596: arguments. The return value is the number of columns. If the return
                   28597: value is zero or negative, not an integer, or simply not a numeric
                   28598: type, or if the method is not defined, then 1 must be used
                   28599: instead.</dd>
                   28600: <dt>To get the captions to use for the columns</dt>
                   28601: <dd>Invoke the <code title="dom-provider-getCaptionText"><a href=
                   28602: "#getcaptiontext">getCaptionText()</a></code> method with the index
                   28603: of the column in question. The index <var title="">i</var> must be
                   28604: in the range 0 ≤ <var title="">i</var> &lt; <var title="">N</var> ,
                   28605: where <var title="">N</var> is the total number of columns. The
                   28606: return value is the string to use when referring to that column. If
                   28607: the method returns null or the empty string, the column has no
                   28608: caption. If the method is not defined, then none of the columns
                   28609: have any captions.</dd>
                   28610: <dt>To establish what classes apply to a column</dt>
                   28611: <dd>Invoke the <code title=
                   28612: "dom-provider-getCaptionClasses"><a href="#getcaptionclasses">getCaptionClasses()</a></code>
                   28613: method with the index of the column in question, and an object
                   28614: implementing the <code><a href=
                   28615: "#domtokenlist0">DOMTokenList</a></code> interface, associated with
                   28616: an anonymous empty string. The index <var title="">i</var> must be
                   28617: in the range 0 ≤ <var title="">i</var> &lt; <var title="">N</var> ,
                   28618: where <var title="">N</var> is the total number of columns. The
                   28619: tokens contained in the string underlying <code><a href=
                   28620: "#domtokenlist0">DOMTokenList</a></code> object when the method
                   28621: returns represent the classes that apply to the given column. If
                   28622: the method is not defined, no classes apply to the column.</dd>
                   28623: <dt>To establish whether a column should be initially included in
                   28624: the visible columns</dt>
                   28625: <dd>Check whether the <code title=
                   28626: "datagrid-column-class-initially-hidden"><a href=
                   28627: "#initially-hidden">initially-hidden</a></code> class applies to
                   28628: the column. If it does, then the column should not be initially
                   28629: included; if it does not, then the column should be initially
                   28630: included.</dd>
                   28631: <dt id="columnType2">To establish whether the data can be sorted
                   28632: relative to a particular column</dt>
                   28633: <dd>Check whether the <code title=
                   28634: "datagrid-column-class-sortable"><a href=
                   28635: "#sortable">sortable</a></code> class applies to the column. If it
                   28636: does, then the user should be able to ask the UA to display the
                   28637: data sorted by that column; if it does not, then the user agent
                   28638: must not allow the user to ask for the data to be sorted by that
                   28639: column.</dd>
                   28640: <dt>To establish if a column is a sorted column</dt>
                   28641: <dd>If the user agent can handle multiple columns being marked as
                   28642: sorted simultaneously: Check whether the <code title=
                   28643: "datagrid-column-class-sorted"><a href="#sorted">sorted</a></code>
                   28644: class applies to the column. If it does, then that column is the
                   28645: sorted column, otherwise it is not.</dd>
                   28646: <dd>If the user agent can only handle one column being marked as
                   28647: sorted at a time: Check each column in turn, starting with the
                   28648: first one, to see whether the <code title=
                   28649: "datagrid-column-class-sorted"><a href="#sorted">sorted</a></code>
                   28650: class applies to that column. The first column that has that class,
                   28651: if any, is the sorted column. If none of the columns have that
                   28652: class, there is no sorted column.</dd>
                   28653: <dt>To establish the sort direction of a sorted column</dt>
                   28654: <dd>Check whether the <code title=
                   28655: "datagrid-column-class-reversed"><a href=
                   28656: "#reversed1">reversed</a></code> class applies to the column. If it
                   28657: does, then the sort direction is descending (down; first rows have
                   28658: the highest values), otherwise it is ascending (up; first rows have
                   28659: the lowest values).</dd>
                   28660: <dt>To determine the total number of rows</dt>
                   28661: <dd>Determine the number of rows for the root of the data grid, and
                   28662: determine the number of child rows for each open row. The total
                   28663: number of rows is the sum of all these numbers.</dd>
                   28664: <dt>To determine the number of rows for the root of the data
                   28665: grid</dt>
                   28666: <dd>Invoke the <code title="dom-provider-getRowCount"><a href=
                   28667: "#getrowcount">getRowCount()</a></code> method with a
                   28668: <code><a href="#rowspecification">RowSpecification</a></code>
                   28669: object representing the empty path as its only argument. The return
                   28670: value is the number of rows at the top level of the data grid. If
                   28671: the return value of the method is negative, not an integer, or
                   28672: simply not a numeric type, or if the method is not defined, then
                   28673: zero must be used instead.</dd>
                   28674: <dt>To determine the number of child rows for a row</dt>
                   28675: <dd>Invoke the <code title="dom-provider-getRowCount"><a href=
                   28676: "#getrowcount">getRowCount()</a></code> method with a
                   28677: <code><a href="#rowspecification">RowSpecification</a></code>
                   28678: object representing the path to the row in question. The return
                   28679: value is the number of child rows for the given row. If the return
                   28680: value of the method is negative, not an integer, or simply not a
                   28681: numeric type, or if the method is not defined, then zero must be
                   28682: used instead.</dd>
                   28683: <dt>To determine what order to render rows in</dt>
                   28684: <dd>
                   28685: <p>Invoke the <code title=
                   28686: "dom-provider-getChildAtPosition"><a href="#getchildatposition">getChildAtPosition()</a></code>
                   28687: method with a <code><a href=
                   28688: "#rowspecification">RowSpecification</a></code> object representing
                   28689: the path to the parent of the rows that are being rendered as the
                   28690: first argument, and the position that is being rendered as the
                   28691: second argument. The return value is the index of the row to render
                   28692: in that position.</p>
                   28693: <div class="example">
                   28694: <p>If the rows are:</p>
                   28695: <ol>
                   28696: <li>Row "0"
                   28697: <ol>
                   28698: <li>Row "0,0"</li>
                   28699: <li>Row "0,1"</li>
                   28700: </ol>
                   28701: </li>
                   28702: <li>Row "1"
                   28703: <ol>
                   28704: <li>Row "1,0"</li>
                   28705: <li>Row "1,1"</li>
                   28706: </ol>
                   28707: </li>
                   28708: </ol>
                   28709: <p>...and the <code title=
                   28710: "dom-provider-getChildAtPosition"><a href="#getchildatposition">getChildAtPosition()</a></code>
                   28711: method is implemented as follows:</p>
                   28712: <pre>
                   28713: function getChildAtPosition(parent, child) {
                   28714:   // always return the reverse order
                   28715:   return getRowCount(parent)-child-1;
                   28716: }
                   28717: </pre>
                   28718: <p>...then the rendering would actually be:</p>
                   28719: <ol>
                   28720: <li>Row "1"
                   28721: <ol>
                   28722: <li>Row "1,1"</li>
                   28723: <li>Row "1,0"</li>
                   28724: </ol>
                   28725: </li>
                   28726: <li>Row "0"
                   28727: <ol>
                   28728: <li>Row "0,1"</li>
                   28729: <li>Row "0,0"</li>
                   28730: </ol>
                   28731: </li>
                   28732: </ol>
                   28733: </div>
                   28734: <p>If the return value of the method is negative, larger than the
                   28735: number of rows that the <code title=
                   28736: "dom-provider-getRowCount"><a href=
                   28737: "#getrowcount">getRowCount()</a></code> method reported for that
                   28738: parent, not an integer, or simply not a numeric type, then the
                   28739: entire data grid should be disabled. Similarly, if the method
                   28740: returns the same value for two or more different values for the
                   28741: second argument (with the same first argument, and assuming that
                   28742: the data grid hasn't had relevant update methods invoked in the
                   28743: meantime), then the data grid should be disabled. Instead of
                   28744: disabling the data grid, the user agent may act as if the
                   28745: <code title="dom-provider-getChildAtPosition"><a href=
                   28746: "#getchildatposition">getChildAtPosition()</a></code> method was
                   28747: not defined on the data provider (thus disabling sorting for that
                   28748: data grid, but still letting the user interact with the data). If
                   28749: the method is not defined, then the return value must be assumed to
                   28750: be the same as the second argument (an <del class=
                   28751: "diff-old">indentity</del> <ins class="diff-chg">identity</ins>
                   28752: transform; the data is rendered in its natural order).</p>
                   28753: </dd>
                   28754: <dt>To establish what classes apply to a row</dt>
                   28755: <dd>Invoke the <code title="dom-provider-getRowClasses"><a href=
                   28756: "#getrowclasses">getRowClasses()</a></code> method with a
                   28757: <code><a href="#rowspecification">RowSpecification</a></code>
                   28758: object representing the row in question, and a <code><a href=
                   28759: "#domtokenlist0">DOMTokenList</a></code> associated with an empty
                   28760: string. The tokens contained in the <code><a href=
                   28761: "#domtokenlist0">DOMTokenList</a></code> object's underlying string
                   28762: when the method returns represent the classes that apply to the row
                   28763: in question. If the method is not defined, no classes apply to the
                   28764: row.</dd>
                   28765: <dt>To establish whether a row is a data row or a special row</dt>
                   28766: <dd>Examine the classes that apply to the row. If the <code title=
                   28767: "datagrid-row-class-header"><a href="#header0">header</a></code>
                   28768: class applies to the row, then it is not a data row, it is a
                   28769: subheading. The data from the first cell of the row is the text of
                   28770: the subheading, the rest of the cells must be ignored. Otherwise,
                   28771: if the <code title="datagrid-row-class-separator"><a href=
                   28772: "#separator">separator</a></code> class applies to the row, then in
                   28773: the place of the row, a separator should be shown. Otherwise, if
                   28774: the <code title="datagrid-row-class-selectable-separator"><a href=
                   28775: "#selectable-separator">selectable-separator</a></code> class
                   28776: applies to the row, then the row should be a data row, but
                   28777: represented as a separator. (The difference between a <code title=
                   28778: "datagrid-row-class-separator"><a href=
                   28779: "#separator">separator</a></code> and a <code title=
                   28780: "datagrid-row-class-selectable-separator"><a href=
                   28781: "#selectable-separator">selectable-separator</a></code> is that the
                   28782: former is not an item that can be actually selected, whereas the
                   28783: second can be selected and thus has a context menu that applies to
                   28784: it, and so forth.) For both kinds of separator rows, the data of
                   28785: the rows' cells must all be ignored. If none of those three classes
                   28786: apply then the row is a simple data row.</dd>
                   28787: <dt id="rowType1">To establish whether a row is openable</dt>
                   28788: <dd>Determine the number of child rows for that row. If there are
                   28789: one or more child rows, then the row is openable.</dd>
                   28790: <dt>To establish whether a row should be initially open or
                   28791: closed</dt>
                   28792: <dd>If <a href="#rowType1">the row is openable</a> , examine the
                   28793: classes that apply to the row. If the <code title=
                   28794: "datagrid-row-class-initially-open"><a href=
                   28795: "#initially-open">initially-open</a></code> class applies to the
                   28796: row, then it should be initially open. Otherwise, if the
                   28797: <code title="datagrid-row-class-initially-closed"><a href=
                   28798: "#initially-closed">initially-closed</a></code> class applies to
                   28799: the row, then it must be initially closed. Otherwise, if neither
                   28800: class applies to the row, or if the row is not openable, then the
                   28801: initial state of the row <del class="diff-old">is entirely up to
                   28802: the UA.</del> <ins class="diff-chg">should be based on platform
                   28803: conventions.</ins></dd>
                   28804: <dt>To obtain a URI to an image representing a row</dt>
                   28805: <dd>Invoke the <code title="dom-provider-getRowImage"><a href=
                   28806: "#getrowimage">getRowImage()</a></code> method with a
                   28807: <code><a href="#rowspecification">RowSpecification</a></code>
                   28808: object representing the row in question. The return value is a
                   28809: string representing a URI (or IRI) to an image. Relative URIs must
                   28810: be interpreted relative to the <code><a href=
                   28811: "#datagrid0">datagrid</a></code> 's <a href="#elements2" title=
                   28812: "element's base URI">base <del class="diff-old">URI.</del>
                   28813: <ins class="diff-chg">URI</ins></a> . If the method returns the
                   28814: empty string, null, or if the method is not defined, then the row
                   28815: has no associated image.</dd>
                   28816: <dt>To obtain a context menu appropriate for a particular row</dt>
                   28817: <dd>Invoke the <code title="dom-provider-getRowMenu"><a href=
                   28818: "#getrowmenu">getRowMenu()</a></code> method with a <code><a href=
                   28819: "#rowspecification">RowSpecification</a></code> object representing
                   28820: the row in question. The return value is a reference to an object
                   28821: implementing the <code><a href=
                   28822: "#htmlmenuelement">HTMLMenuElement</a></code> interface, i.e. a
                   28823: <code><a href="#menu">menu</a></code> element DOM node. (This
                   28824: element must then be interpreted as described in the section on
                   28825: context menus to obtain the actual context menu to use. ) If the
                   28826: method returns something that is not an <code><a href=
                   28827: "#htmlmenuelement">HTMLMenuElement</a></code> , or if the method is
                   28828: not defined, then the row has no associated context menu. User
                   28829: agents may provide their own default context menu, and may add
                   28830: items to the author-provided context menu. For example, such a menu
                   28831: could allow the user to change the presentation of the
                   28832: <code><a href="#datagrid0">datagrid</a></code> element.</dd>
                   28833: <dt>To establish the value of a particular cell</dt>
                   28834: <dd>Invoke the <code title="dom-provider-getCellData"><a href=
                   28835: "#getcelldata">getCellData()</a></code> method with the first
                   28836: argument being a <code><a href=
                   28837: "#rowspecification">RowSpecification</a></code> object representing
                   28838: the row of the cell in question and the second argument being the
                   28839: index of the cell's column. The second argument must be a
                   28840: non-negative integer less than the total number of columns. The
                   28841: return value is the value of the cell. If the return value is null
                   28842: or the empty string, or if the method is not defined, then the cell
                   28843: has no data. (For progress bar cells, the cell's value must be
                   28844: further interpreted, as described below.)</dd>
                   28845: <dt>To establish what classes apply to a cell</dt>
                   28846: <dd>Invoke the <code title="dom-provider-getCellClasses"><a href=
                   28847: "#getcellclasses">getCellClasses()</a></code> method with the first
                   28848: argument being a <code><a href=
                   28849: "#rowspecification">RowSpecification</a></code> object representing
                   28850: the row of the cell in question, the second argument being the
                   28851: index of the cell's column, and the third being an object
                   28852: implementing the <code><a href=
                   28853: "#domtokenlist0">DOMTokenList</a></code> interface, associated with
                   28854: an empty string. The second argument must be a non-negative integer
                   28855: less than the total number of columns. The tokens contained in the
                   28856: <code><a href="#domtokenlist0">DOMTokenList</a></code> object's
                   28857: underlying string when the method returns represent the classes
                   28858: that apply to that cell. If the method is not defined, no classes
                   28859: apply to the cell.</dd>
                   28860: <dt id="cellType1">To establish how the type of a cell</dt>
                   28861: <dd>Examine the classes that apply to the cell. If the <code title=
                   28862: "datagrid-cell-class-progress"><a href=
                   28863: "#progress1">progress</a></code> class applies to the cell, it is a
                   28864: progress bar. Otherwise, if the <code title=
                   28865: "datagrid-cell-class-cyclable"><a href=
                   28866: "#cyclable">cyclable</a></code> class applies to the cell, it is a
                   28867: cycling cell whose value can be cycled between multiple states.
                   28868: Otherwise, none of these classes apply, and the cell is a simple
                   28869: text cell.</dd>
                   28870: <dt>To establish the value of a progress bar cell</dt>
                   28871: <dd>If the value <var title="">x</var> of the cell is a string that
                   28872: can be <a href="#rules1" title=
                   28873: "rules for parsing floating point number values">converted to a
                   28874: floating-point number</a> in the range 0.0&nbsp;≤&nbsp; <var title=
                   28875: "">x</var> &nbsp;≤&nbsp;1.0, then the progress bar has that value
                   28876: (0.0 means no progress, 1.0 means complete). Otherwise, the
                   28877: progress bar is an indeterminate progress bar.</dd>
                   28878: <dt id="cellType2">To establish how a simple text cell should be
                   28879: presented</dt>
                   28880: <dd>Check whether one of the <code title=
                   28881: "datagrid-cell-class-checked"><a href="#checked">checked</a></code>
                   28882: , <code title="datagrid-cell-class-unchecked"><a href=
                   28883: "#unchecked">unchecked</a></code> , or <code title=
                   28884: "datagrid-cell-class-indeterminate"><a href=
                   28885: "#indeterminate">indeterminate</a></code> classes applies to the
                   28886: cell. If any of these are present, then the cell has a checkbox,
                   28887: otherwise none are present and the cell does not have a checkbox.
                   28888: If the cell has no checkbox, check whether the <code title=
                   28889: "datagrid-cell-class-editable"><a href=
                   28890: "#editable">editable</a></code> class applies to the cell. If it
                   28891: does, then the cell value is editable, otherwise the cell value is
                   28892: static.</dd>
                   28893: <dt>To establish the state of a cell's checkbox, if it has one</dt>
                   28894: <dd>Check whether the <code title=
                   28895: "datagrid-cell-class-checked"><a href="#checked">checked</a></code>
                   28896: class applies to the cell. If it does, the cell is checked.
                   28897: Otherwise, check whether the <code title=
                   28898: "datagrid-cell-class-unchecked"><a href=
                   28899: "#unchecked">unchecked</a></code> class applies to the cell. If it
                   28900: does, the cell is unchecked. Otherwise, the <code title=
                   28901: "datagrid-cell-class-indeterminate"><a href=
                   28902: "#indeterminate">indeterminate</a></code> class <del class=
                   28903: "diff-old">appplies</del> <ins class="diff-chg">applies</ins> to
                   28904: the cell and the cell's checkbox is in an indeterminate state. When
                   28905: the <code title="datagrid-cell-class-indeterminate"><a href=
                   28906: "#indeterminate">indeterminate</a></code> class <del class=
                   28907: "diff-old">appplies</del> <ins class="diff-chg">applies</ins> to
                   28908: the cell, the checkbox is a tristate checkbox, and the user can set
                   28909: it to the indeterminate state. Otherwise, only the <code title=
                   28910: "datagrid-cell-class-checked"><a href="#checked">checked</a></code>
                   28911: and/or <code title="datagrid-cell-class-unchecked"><a href=
                   28912: "#unchecked">unchecked</a></code> classes apply to the cell, and
                   28913: the cell can only be toggled <del class="diff-old">betwen</del>
                   28914: <ins class="diff-chg">between</ins> those two states.</dd>
                   28915: </dl>
                   28916: <p>If the data provider ever raises an exception while the
                   28917: <code><a href="#datagrid0">datagrid</a></code> is invoking one of
                   28918: its methods, the <code><a href="#datagrid0">datagrid</a></code>
                   28919: must act, for the purposes of that particular method call, as if
                   28920: the relevant method had not been defined.</p>
                   28921: <p>A <code><a href="#rowspecification">RowSpecification</a></code>
                   28922: object <var title="">p</var> with <var title="">n</var> path
                   28923: components passed to a method of the data provider must fulfill the
                   28924: constraint <span>0&nbsp;≤&nbsp; <var title="">p <sub title=
                   28925: ""><var title="">i</var></sub></var> &nbsp;&lt;&nbsp; <var title=
                   28926: "">m</var> -1</span> for all integer values of <var title=
                   28927: "">i</var> in the range <span>0&nbsp;≤&nbsp; <var title="">i</var>
                   28928: &nbsp;&lt;&nbsp; <var title="">n</var> -1</span> , where
                   28929: <var title="">m</var> is the value that was last returned by the
                   28930: <code title="dom-provider-getRowCount"><a href=
                   28931: "#getrowcount">getRowCount()</a></code> method when it was passed
                   28932: the <code><a href="#rowspecification">RowSpecification</a></code>
                   28933: object <var title="">q</var> with <span><var title="">i</var>
                   28934: -1</span> items, where <span><var title="">p <sub title=
                   28935: ""><var title="">i</var></sub></var> &nbsp;=&nbsp; <var title="">q
                   28936: <sub title=""><var title="">i</var></sub></var></span> for all
                   28937: integer values of <var title="">i</var> in the range
                   28938: <span>0&nbsp;≤&nbsp; <var title="">i</var> &nbsp;&lt;&nbsp;
                   28939: <var title="">n</var> -1</span> , with any changes implied by the
                   28940: update methods taken into account.</p>
                   28941: <p id="inconsistentDataProvider">The data model is considered
                   28942: stable: user agents may assume that subsequent calls to the data
                   28943: provider methods will return the same data, until one of the update
                   28944: methods is called on the <code><a href=
                   28945: "#datagrid0">datagrid</a></code> element. If a user agent is
                   28946: returned inconsistent data, for example if the number of rows
                   28947: returned by <code title="dom-provider-getRowCount"><a href=
                   28948: "#getrowcount">getRowCount()</a></code> varies in ways that do not
                   28949: match the calls made to the update methods, the user agent may
                   28950: disable the <code><a href="#datagrid0">datagrid</a></code> . User
                   28951: agents that do not disable the <code><a href=
                   28952: "#datagrid0">datagrid</a></code> in inconsistent cases must
                   28953: <del class="diff-old">honour</del> <ins class=
                   28954: "diff-chg">honor</ins> the most recently returned values.</p>
                   28955: <p>User agents may cache returned values so that the data provider
                   28956: is never asked for data that could contradict earlier data. User
                   28957: agents must not cache the return value of the <code title=
                   28958: "dom-provider-getRowMenu"><a href=
                   28959: "#getrowmenu">getRowMenu</a></code> method.</p>
                   28960: <p>The exact algorithm used to populate the data grid is not
                   28961: defined here, since it will differ based on the presentation used.
                   28962: However, the <del class="diff-old">behaviour</del> <ins class=
                   28963: "diff-chg">behavior</ins> of user agents must be consistent with
                   28964: the descriptions above. For example, it would be non-conformant for
                   28965: a user agent to make cells have both a checkbox and be editable, as
                   28966: the descriptions above state that cells that have a checkbox cannot
                   28967: be edited.</p>
                   28968: <h5 id="updating"><span class="secno"><del class=
                   28969: "diff-old">3.18.2.6.</del> <ins class=
                   28970: "diff-chg">3.16.2.6.</ins></span> Updating the <code><a href=
                   28971: "#datagrid0">datagrid</a></code></h5>
                   28972: <p>Whenever the <code title="dom-datagrid-data"><a href=
                   28973: "#data2">data</a></code> attribute is set to a new value, the
                   28974: <code><a href="#datagrid0">datagrid</a></code> must clear the
                   28975: current selection, remove all the displayed rows, and plan to
                   28976: repopulate itself using the information from the new data provider
                   28977: at the earliest opportunity.</p>
                   28978: <p>There are a number of update methods that can be invoked on the
                   28979: <code><a href="#datagrid0">datagrid</a></code> element to cause it
                   28980: to refresh itself in slightly less drastic ways:</p>
                   28981: <p>When the <dfn id="updateeverything" title=
                   28982: "dom-datagrid-updateEverything"><code>updateEverything()</code></dfn>
                   28983: method is called, the user agent must repopulate the entire
                   28984: <code><a href="#datagrid0">datagrid</a></code> . If the number of
                   28985: rows decreased, the selection must be updated appropriately. If the
                   28986: number of rows increased, the new rows should be left
                   28987: unselected.</p>
                   28988: <p>When the <dfn id="updaterowschanged" title=
                   28989: "dom-datagrid-updateRowsChanged"><code>updateRowsChanged(
                   28990: <var title="">row</var> , <var title="">count</var> )</code></dfn>
                   28991: method is called, the user agent must refresh the rendering of the
                   28992: rows starting from the row specified by <var title="">row</var> ,
                   28993: and including the <var title="">count</var> next siblings of the
                   28994: row (or as many next siblings as it has, if that is less than
                   28995: <var title="">count</var> ), including all descendant rows.</p>
                   28996: <p>When the <dfn id="updaterowsinserted" title=
                   28997: "dom-datagrid-updateRowsInserted"><code>updateRowsInserted(
                   28998: <var title="">row</var> , <var title="">count</var> )</code></dfn>
                   28999: method is called, the user agent must assume that <var title=
                   29000: "">count</var> new rows have been inserted, such that the first new
                   29001: row is <del class="diff-old">indentified</del> <ins class=
                   29002: "diff-chg">identified</ins> by <var title="">row</var> . The user
                   29003: agent must update its rendering and the selection accordingly. The
                   29004: new rows should not be selected.</p>
                   29005: <p>When the <dfn id="updaterowsremoved" title=
                   29006: "dom-datagrid-updateRowsRemoved"><code>updateRowsRemoved(
                   29007: <var title="">row</var> , <var title="">count</var> )</code></dfn>
                   29008: method is called, the user agent must assume that <var title=
                   29009: "">count</var> rows have been removed starting from the row that
                   29010: used to be identifier by <var title="">row</var> . The user agent
                   29011: must update its rendering and the selection accordingly.</p>
                   29012: <p>The <dfn id="updaterowchanged" title=
                   29013: "dom-datagrid-updateRowChanged"><code>updateRowChanged( <var title=
                   29014: "">row</var> )</code></dfn> method must be exactly equivalent to
                   29015: calling <code title="dom-datagrid-updateRowsChanged"><a href=
                   29016: "#updaterowschanged">updateRowsChanged( <var title="">row</var> ,
                   29017: 1)</a></code> .</p>
                   29018: <p>When the <dfn id="updatecolumnchanged" title=
                   29019: "dom-datagrid-updateColumnChanged"><code>updateColumnChanged(
                   29020: <var title="">column</var> )</code></dfn> method is called, the
                   29021: user agent must refresh the rendering of the specified column
                   29022: <var title="">column</var> , for all rows.</p>
                   29023: <p>When the <dfn id="updatecellchanged" title=
                   29024: "dom-datagrid-updateCellChanged"><code>updateCellChanged(
                   29025: <var title="">row</var> , <var title="">column</var> )</code></dfn>
                   29026: method is called, the user agent must refresh the rendering of the
                   29027: cell on row <var title="">row</var> , in column <var title=
                   29028: "">column</var> .</p>
                   29029: <p>Any effects the update methods have on the <code><a href=
                   29030: "#datagrid0">datagrid</a></code> 's selection is not considered a
                   29031: change to the selection, and must therefore not fire the
                   29032: <code title="event-select"><a href="#select">select</a></code>
                   29033: event.</p>
                   29034: <p>These update methods should <del class="diff-old">only</del> be
                   29035: called <ins class="diff-new">only</ins> by the data provider, or
                   29036: code acting on behalf of the data provider. In particular, calling
                   29037: the <code title="dom-datagrid-updateRowsInserted"><a href=
                   29038: "#updaterowsinserted">updateRowsInserted()</a></code> and
                   29039: <code title="dom-datagrid-updateRowsRemoved"><a href=
                   29040: "#updaterowsremoved">updateRowsRemoved()</a></code> methods without
                   29041: actually inserting or removing rows from the data provider is
                   29042: <a href="#inconsistentDataProvider">likely to result in
                   29043: inconsistent renderings</a> , and the user agent is likely to
                   29044: disable the data grid.</p>
                   29045: <h5 id="requirements"><span class="secno"><del class=
                   29046: "diff-old">3.18.2.7.</del> <ins class=
                   29047: "diff-chg">3.16.2.7.</ins></span> Requirements for interactive user
                   29048: agents</h5>
                   29049: <p><em>This section only applies to interactive user
                   29050: agents.</em></p>
                   29051: <p>If the <code><a href="#datagrid0">datagrid</a></code> element
                   29052: has a <dfn id="disabled3" title=
                   29053: "attr-datagrid-disabled"><code>disabled</code></dfn> attribute,
                   29054: then the user agent must disable the <code><a href=
                   29055: "#datagrid0">datagrid</a></code> , preventing the user from
                   29056: interacting with it. The <code><a href=
                   29057: "#datagrid0">datagrid</a></code> element should still continue to
                   29058: update itself when the data provider signals changes to the data,
                   29059: though. Obviously, conformance requirements stating that
                   29060: <code><a href="#datagrid0">datagrid</a></code> elements must react
                   29061: to users in particular ways do not apply when one is disabled.</p>
                   29062: <p>If <a href="#rowType1">a row is openable</a> , then the user
                   29063: should be able to toggle its open/closed state. When a row's
                   29064: open/closed state changes, the user agent must update the rendering
                   29065: to match the new state.</p>
                   29066: <p>If a cell is a cell whose value <a href="#cellType1">can be
                   29067: cycled between multiple states</a> , then the user must be able to
                   29068: activate the cell to cycle its value. When the user activates this
                   29069: "cycling" <del class="diff-old">behaviour</del> <ins class=
                   29070: "diff-chg">behavior</ins> of a cell, then the <code><a href=
                   29071: "#datagrid0">datagrid</a></code> must invoke the data provider's
                   29072: <code title="dom-provider-cycleCell"><a href=
                   29073: "#cyclecell">cycleCell()</a></code> method, with a <code><a href=
                   29074: "#rowspecification">RowSpecification</a></code> object representing
                   29075: the cell's row as the first argument and the cell's column index as
                   29076: the second. The <code><a href="#datagrid0">datagrid</a></code> must
                   29077: act as if the <code><a href="#datagrid0">datagrid</a></code> 's
                   29078: <code title="dom-datagrid-updateCellChanged"><a href=
                   29079: "#updatecellchanged">updateCellChanged()</a></code> method had been
                   29080: invoked with those same arguments immediately before the provider's
                   29081: method was invoked.</p>
                   29082: <p>When a cell <a href="#cellType2">has a checkbox</a> , the user
                   29083: must be able to set the checkbox's state. When the user changes the
                   29084: state of a checkbox in such a cell, the <code><a href=
                   29085: "#datagrid0">datagrid</a></code> must invoke the data provider's
                   29086: <code title="dom-provider-setCellCheckedState"><a href=
                   29087: "#setcellcheckedstate">setCellCheckedState()</a></code> method,
                   29088: with a <code><a href=
                   29089: "#rowspecification">RowSpecification</a></code> object representing
                   29090: the cell's row as the first argument, the cell's column index as
                   29091: the second, and the checkbox's new state as the third. The state
                   29092: should be represented by the number 1 if the new state is checked,
                   29093: 0 if the new state is unchecked, and <del class="diff-old">-1</del>
                   29094: <ins class="diff-chg">−1</ins> if the new state is indeterminate
                   29095: (which must <del class="diff-old">only</del> be possible
                   29096: <ins class="diff-new">only</ins> if the cell has the <code title=
                   29097: "datagrid-cell-class-indeterminate"><a href=
                   29098: "#indeterminate">indeterminate</a></code> class set). The
                   29099: <code><a href="#datagrid0">datagrid</a></code> must act as if the
                   29100: <code><a href="#datagrid0">datagrid</a></code> 's <code title=
                   29101: "dom-datagrid-updateCellChanged"><a href=
                   29102: "#updatecellchanged">updateCellChanged()</a></code> method had been
                   29103: invoked, specifying the same cell, immediately before the
                   29104: provider's method was invoked.</p>
                   29105: <p>If a cell <a href="#cellType2">is editable</a> , the user must
                   29106: be able to edit the data for that cell, and doing so must cause the
                   29107: user agent to invoke the <code title=
                   29108: "dom-provider-editCell"><a href="#editcell">editCell()</a></code>
                   29109: method of the data provider with three arguments: a <code><a href=
                   29110: "#rowspecification">RowSpecification</a></code> object representing
                   29111: the cell's row, the cell's column's index, and the new text entered
                   29112: by the user. The user agent must act as if the <code title=
                   29113: "dom-datagrid-updateCellChanged"><a href=
                   29114: "#updatecellchanged">updateCellChanged()</a></code> method had been
                   29115: invoked, with the same row and column specified, immediately before
                   29116: the provider's method was invoked.</p>
                   29117: <h5 id="the-selection"><span class="secno"><del class=
                   29118: "diff-old">3.18.2.8.</del> <ins class=
                   29119: "diff-chg">3.16.2.8.</ins></span> The selection</h5>
                   29120: <p><em>This section only applies to interactive user agents. For
                   29121: other user agents, the <code title=
                   29122: "dom-datagrid-selection"><a href="#selection0">selection</a></code>
                   29123: attribute must return null.</em></p>
                   29124: <pre class="idl">
                   29125: interface <dfn id="datagridselection">DataGridSelection</dfn> {
                   29126:   readonly attribute unsigned long <span title=
                   29127: "dom-DataGridSelection-count">length</span>;
                   29128: <del class="diff-old">  (in unsigned long index);
                   29129: </del>
                   29130: <ins class="diff-chg">  [IndexGetter] <a href=
                   29131: "#rowspecification">RowSpecification</a> <span title=
                   29132: "dom-DataGridSelection-">item</span>(in unsigned long index);
                   29133: </ins>
                   29134:   boolean <a href="#isselected" title=
                   29135: "dom-DataGridSelection-isSelected">isSelected</a>(in <a href=
                   29136: "#rowspecification">RowSpecification</a> row);
                   29137:   void <a href="#setselected" title=
                   29138: "dom-DataGridSelection-setSelected">setSelected</a>(in <a href=
                   29139: "#rowspecification">RowSpecification</a> row, in boolean selected);
                   29140:   void <a href="#selectall" title=
                   29141: "dom-DataGridSelection-selectAll">selectAll</a>();
                   29142:   void <a href="#invert" title=
                   29143: "dom-DataGridSelection-invert">invert</a>();
                   29144:   void <a href="#clear" title=
                   29145: "dom-DataGridSelection-clear">clear</a>();
                   29146: };
                   29147: </pre>
                   29148: <p>Each <code><a href="#datagrid0">datagrid</a></code> element must
                   29149: keep track of which rows are currently selected. Initially no rows
                   29150: are selected, but this can be changed via the methods described in
                   29151: this section.</p>
                   29152: <p>The selection of a <code><a href=
                   29153: "#datagrid0">datagrid</a></code> is represented by its <dfn id=
                   29154: "selection0" title=
                   29155: "dom-datagrid-selection"><code>selection</code></dfn> DOM
                   29156: attribute, which must be a <code><a href=
                   29157: "#datagridselection">DataGridSelection</a></code> object.</p>
                   29158: <p><code><a href="#datagridselection">DataGridSelection</a></code>
                   29159: objects represent the rows in the selection. In the selection the
                   29160: rows must be ordered in the natural order of the data provider (and
                   29161: not, e.g., the rendered order). Rows that are not rendered because
                   29162: one of their ancestors is closed must share the same selection
                   29163: state as their nearest rendered ancestor. Such rows are not
                   29164: considered part of the selection for the purposes of iterating over
                   29165: the selection.</p>
                   29166: <p class="note">This selection API doesn't allow for hidden rows to
                   29167: be selected because it is trivial to create a data provider that
                   29168: has infinite depth, which would then require the selection to be
                   29169: infinite if every row, including every hidden row, was
                   29170: selected.</p>
                   29171: <p>The <dfn id="length5" title=
                   29172: "dom-DataGridSelection-length"><code>length</code></dfn> attribute
                   29173: must return the number of rows currently present in the selection.
                   29174: The <dfn id="itemindex3" title=
                   29175: "dom-DataGridSelection-item"><code>item( <var title="">index</var>
                   29176: )</code></dfn> method must return the <var title="">index</var> th
                   29177: row in the selection. If the argument is out of range (less than
                   29178: zero or greater than the number of selected rows minus one), then
                   29179: it must raise an <code>INDEX_SIZE_ERR</code> exception. <a href=
                   29180: "#references">[DOM3CORE]</a></p>
                   29181: <p>The <dfn id="isselected" title=
                   29182: "dom-DataGridSelection-isSelected"><code>isSelected()</code></dfn>
                   29183: method must return the selected state of the row specified by its
                   29184: argument. If the specified row exists and is selected, it must
                   29185: return true, otherwise it must return false.</p>
                   29186: <p>The <dfn id="setselected" title=
                   29187: "dom-DataGridSelection-setSelected"><code>setSelected()</code></dfn>
                   29188: method takes two arguments, <var title="">row</var> and <var title=
                   29189: "">selected</var> . When invoked, it must set the selection state
                   29190: of row <var title="">row</var> to selected if <var title=
                   29191: "">selected</var> is true, and unselected if it is false. If
                   29192: <var title="">row</var> is not a row in the data grid, the method
                   29193: must raise an <code>INDEX_SIZE_ERR</code> exception. If the
                   29194: specified row is not rendered because one of its ancestors is
                   29195: closed, the method must do nothing.</p>
                   29196: <p>The <dfn id="selectall" title=
                   29197: "dom-DataGridSelection-selectAll"><code>selectAll()</code></dfn>
                   29198: method must mark all the rows in the data grid as selected. After a
                   29199: call to <code title="dom-DataGridSelection-selectAll"><a href=
                   29200: "#selectall">selectAll()</a></code> , the <code title=
                   29201: "dom-DataGridSelection-length"><a href="#length5">length</a></code>
                   29202: attribute will return the number of rows in the data grid, not
                   29203: counting children of closed rows.</p>
                   29204: <p>The <dfn id="invert" title=
                   29205: "dom-DataGridSelection-invert"><code>invert()</code></dfn> method
                   29206: must cause all the rows in the selection that were marked as
                   29207: selected to now be marked as not selected, and vice versa.</p>
                   29208: <p>The <dfn id="clear" title=
                   29209: "dom-DataGridSelection-clear"><code>clear()</code></dfn> method
                   29210: must mark all the rows in the data grid to be marked as not
                   29211: selected. After a call to <code title=
                   29212: "dom-DataGridSelection-clear"><a href="#clear">clear()</a></code> ,
                   29213: the <code title="dom-DataGridSelection-length"><a href=
                   29214: "#length5">length</a></code> attribute will return zero.</p>
                   29215: <p>If the <code><a href="#datagrid0">datagrid</a></code> element
                   29216: has a <dfn id="multiple0" title=
                   29217: "attr-datagrid-multiple"><code>multiple</code></dfn> attribute,
                   29218: then the user must be able to select any number of rows (zero or
                   29219: more). If the attribute is not present, then the user must
                   29220: <del class="diff-old">only</del> <ins class="diff-chg">not</ins> be
                   29221: able to select <ins class="diff-new">more than</ins> a single row
                   29222: at a time, and selecting another one must unselect all the other
                   29223: rows.</p>
                   29224: <p class="note">This only applies to the user. Scripts can select
                   29225: multiple rows even when the <code title=
                   29226: "attr-datagrid-multiple"><a href="#multiple0">multiple</a></code>
                   29227: attribute is absent.</p>
                   29228: <p>Whenever the selection of a <code><a href=
                   29229: "#datagrid0">datagrid</a></code> changes, whether due to the user
                   29230: interacting with the element, or as a result of calls to methods of
                   29231: the <code title="dom-datagrid-selection"><a href=
                   29232: "#selection0">selection</a></code> object, a <dfn id="select"
                   29233: title="event-select"><code>select</code></dfn> event that bubbles
                   29234: but is not cancelable must be fired on the <code><a href=
                   29235: "#datagrid0">datagrid</a></code> element. If changes are made to
                   29236: the selection via calls to the object's methods during the
                   29237: execution of a script, then the <code title="event-select"><a href=
                   29238: "#select">select</a></code> events must be coalesced into one,
                   29239: which must then be fired when the script execution has
                   29240: completed.</p>
                   29241: <p class="note">The <code><a href=
                   29242: "#datagridselection">DataGridSelection</a></code> interface has no
                   29243: relation to the <code><a href="#selection1">Selection</a></code>
                   29244: interface.</p>
                   29245: <h5 id="columns"><span class="secno"><del class=
                   29246: "diff-old">3.18.2.9.</del> <ins class=
                   29247: "diff-chg">3.16.2.9.</ins></span> Columns and captions</h5>
                   29248: <p><em>This section only applies to interactive user
                   29249: agents.</em></p>
                   29250: <p>Each <code><a href="#datagrid0">datagrid</a></code> element must
                   29251: keep track of which columns are currently being rendered. User
                   29252: agents should initially show all the columns except those with the
                   29253: <code title="datagrid-column-class-initially-hidden"><a href=
                   29254: "#initially-hidden">initially-hidden</a></code> class, but may
                   29255: allow users to hide or show columns. User agents should initially
                   29256: display the columns in the order given by the data provider, but
                   29257: may allow this order to be changed by the user.</p>
                   29258: <p>If columns are not being used, as might be the case if the data
                   29259: grid is being presented in an icon view, or if an overview of data
                   29260: is being read in an aural context, then the text of the first
                   29261: column of each row should be used to represent the row.</p>
                   29262: <p>If none of the columns have any captions (i.e. if the data
                   29263: provider does not provide a <code title=
                   29264: "dom-provider-getCaptionText"><a href=
                   29265: "#getcaptiontext">getCaptionText()</a></code> method), then user
                   29266: agents may avoid showing the column headers at all. This may
                   29267: prevent the user from performing actions on the columns (such as
                   29268: reordering them, changing the sort column, and so on).</p>
                   29269: <p class="note">Whatever the order used for rendering, and
                   29270: irrespective of what columns are being shown or hidden, the "first
                   29271: column" as referred to in this specification is always the column
                   29272: with index zero, and the "last column" is always the column with
                   29273: the index one less than the value returned by the <code title=
                   29274: "dom-provider-getcolumnCount"><a href=
                   29275: "#getcolumncount">getColumnCount()</a></code> method of the data
                   29276: provider.</p>
                   29277: <p>If <a href="#columnType2">a column is sortable</a> , then the
                   29278: user must be able to invoke it to sort the data. When the user does
                   29279: so, then the <code><a href="#datagrid0">datagrid</a></code> must
                   29280: invoke the data provider's <code title=
                   29281: "dom-provider-toggleColumnSortState"><a href=
                   29282: "#togglecolumnsortstate">toggleColumnSortState()</a></code> method,
                   29283: with the column's index as the only argument. The <code><a href=
                   29284: "#datagrid0">datagrid</a></code> must <em>then</em> act as if the
                   29285: <code><a href="#datagrid0">datagrid</a></code> 's <code title=
                   29286: "dom-datagrid-updateEverything"><a href=
                   29287: "#updateeverything">updateEverything()</a></code> method had been
                   29288: invoked.</p>
                   29289: <h4 id="the-command"><span class="secno"><del class=
                   29290: "diff-old">3.18.3.</del> <ins class="diff-chg">3.16.3</ins></span>
                   29291: The <dfn id="command0"><code>command</code></dfn> element</h4>
                   29292: <dl class="element">
                   29293: <dt>Categories</dt>
                   29294: <dd><a href="#metadata0">Metadata content</a> .</dd>
                   29295: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   29296: <dt>Contexts in which this element may be used:</dt>
                   29297: <dd>Where <a href="#metadata0">metadata content</a> is
                   29298: expected.</dd>
                   29299: <dd>Where <a href="#phrasing0">phrasing content</a> is
                   29300: expected.</dd>
                   29301: <dt>Content model:</dt>
                   29302: <dd>Empty.</dd>
                   29303: <dt>Element-specific attributes:</dt>
                   29304: <dd><code title="attr-command-type"><a href=
                   29305: "#type13">type</a></code></dd>
                   29306: <dd><code title="attr-command-label"><a href=
                   29307: "#label">label</a></code></dd>
                   29308: <dd><code title="attr-command-icon"><a href=
                   29309: "#icon">icon</a></code></dd>
                   29310: <dd><code title="attr-command-hidden"><a href=
                   29311: "#hidden">hidden</a></code></dd>
                   29312: <dd><code title="attr-command-disabled"><a href=
                   29313: "#disabled4">disabled</a></code></dd>
                   29314: <dd><code title="attr-command-checked"><a href=
                   29315: "#checked0">checked</a></code></dd>
                   29316: <dd><code title="attr-command-radiogroup"><a href=
                   29317: "#radiogroup">radiogroup</a></code></dd>
                   29318: <dd><code title="attr-command-default"><a href=
                   29319: "#default1">default</a></code></dd>
                   29320: <dd>Also, the <code title="attr-command-title"><a href=
                   29321: "#title6">title</a></code> attribute has special semantics on this
                   29322: element.</dd>
                   29323: <dt>DOM interface:</dt>
                   29324: <dd>
                   29325: <pre class="idl">
                   29326: interface <dfn id=
                   29327: "htmlcommandelement">HTMLCommandElement</dfn> : <a href=
                   29328: "#htmlelement">HTMLElement</a> {
                   29329:            attribute DOMString <a href="#type14" title=
                   29330: "dom-command-type">type</a>;
                   29331:            attribute DOMString <a href="#label0" title=
                   29332: "dom-command-label">label</a>;
                   29333:            attribute DOMString <a href="#icon0" title=
                   29334: "dom-command-icon">icon</a>;
                   29335:            attribute boolean <a href="#hidden0" title=
                   29336: "dom-command-hidden">hidden</a>;
                   29337:            attribute boolean <a href="#disabled5" title=
                   29338: "dom-command-disabled">disabled</a>;
                   29339:            attribute boolean <a href="#checked1" title=
                   29340: "dom-command-checked">checked</a>;
                   29341:            attribute DOMString <a href="#radiogroup0" title=
                   29342: "dom-command-radiogroup">radiogroup</a>;
                   29343:            attribute boolean <a href="#default2" title=
                   29344: "dom-command-default">default</a>;
                   29345:  void <a href="#click0" title=
                   29346: "dom-command-click">click</a>(); // shadows <code><a href=
                   29347: "#htmlelement">HTMLElement</a></code>.<code title=
                   29348: "dom-click"><a href="#click">click()</a></code>
                   29349: };
                   29350: </pre>
                   29351: <p>The <code title="command-ro"><a href=
                   29352: "#command2">Command</a></code> interface must also be implemented
                   29353: by this element.</p>
                   29354: </dd>
                   29355: </dl>
                   29356: <p>The <code><a href="#command0">command</a></code> element
                   29357: represents a command that the user can invoke.</p>
                   29358: <p>The <dfn id="type13" title=
                   29359: "attr-command-type"><code>type</code></dfn> attribute indicates the
                   29360: kind of command: either a normal command with an associated action,
                   29361: or a state or option that can be toggled, or a selection of one
                   29362: item from a list of items.</p>
                   29363: <p>The attribute's value must be either " <code title=
                   29364: "">command</code> ", " <code title="">checkbox</code> ", or "
                   29365: <code title="">radio</code> ", denoting each of these three types
                   29366: of commands respectively. The attribute may also be omitted if the
                   29367: element is to represent the first of these types, a simple
                   29368: command.</p>
                   29369: <p>The <dfn id="label" title=
                   29370: "attr-command-label"><code>label</code></dfn> attribute gives the
                   29371: name of the command, as shown to the user.</p>
                   29372: <p>The <dfn id="title6" title=
                   29373: "attr-command-title"><code>title</code></dfn> attribute gives a
                   29374: hint describing the command, which might be shown to the user to
                   29375: help him.</p>
                   29376: <p>The <dfn id="icon" title=
                   29377: "attr-command-icon"><code>icon</code></dfn> attribute gives a
                   29378: picture that represents the command. If the attribute is specified,
                   29379: the attribute's value must contain a URI (or IRI).</p>
                   29380: <p>The <dfn id="hidden" title=
                   29381: "attr-command-hidden"><code>hidden</code></dfn> attribute is a
                   29382: <a href="#boolean0">boolean attribute</a> that, if present,
                   29383: indicates that the command is not relevant and is to be hidden.</p>
                   29384: <p>The <dfn id="disabled4" title=
                   29385: "attr-command-disabled"><code>disabled</code></dfn> attribute is a
                   29386: <a href="#boolean0">boolean attribute</a> that, if present,
                   29387: indicates that the command is not available in the current
                   29388: state.</p>
                   29389: <p class="note">The distinction between <a href="#disabled6" title=
                   29390: "command-facet-DisabledState">Disabled State</a> and <a href=
                   29391: "#hidden1" title="command-facet-HiddenState">Hidden State</a> is
                   29392: subtle. A command should be Disabled if, in the same context, it
                   29393: could be enabled if only certain aspects of the situation were
                   29394: changed. A command should be marked as Hidden if, in that
                   29395: situation, the command will never be enabled. For example, in the
                   29396: context menu for a water faucet, the command "open" might be
                   29397: Disabled if the faucet is already open, but the command "eat" would
                   29398: be marked Hidden since the faucet could never be eaten.</p>
                   29399: <p>The <dfn id="checked0" title=
                   29400: "attr-command-checked"><code>checked</code></dfn> attribute is a
                   29401: <a href="#boolean0">boolean attribute</a> that, if present,
                   29402: indicates that the command is selected.</p>
                   29403: <p>The <dfn id="radiogroup" title=
                   29404: "attr-command-radiogroup"><code>radiogroup</code></dfn> attribute
                   29405: gives the name of the group of commands that will be toggled when
                   29406: the command itself is toggled, for commands whose <code title=
                   29407: "attr-command-type"><a href="#type13">type</a></code> attribute has
                   29408: the value " <code title="">radio</code> ". The scope of the name is
                   29409: the child list of the parent element.</p>
                   29410: <p>If the <code><a href="#command0">command</a></code> element is
                   29411: used when <span title="menu generation">generating</span> a
                   29412: <span>context menu</span> , then the <dfn id="default1" title=
                   29413: "attr-command-default"><code>default</code></dfn> attribute
                   29414: indicates, if present, that the command is the one that would have
                   29415: been invoked if the user had directly activated the menu's subject
                   29416: instead of using its context menu. The <code title=
                   29417: "attr-command-default"><a href="#default1">default</a></code>
                   29418: attribute is a <a href="#boolean0">boolean attribute</a> .</p>
                   29419: <div class="example">
                   29420: <p class="big-issue">Need an example that shows an element that, if
                   29421: double-clicked, invokes an action, but that also has a context
                   29422: menu, showing the various <code><a href=
                   29423: "#command0">command</a></code> attributes off, and that has a
                   29424: default command.</p>
                   29425: </div>
                   29426: <p>The <dfn id="type14" title=
                   29427: "dom-command-type"><code>type</code></dfn> , <dfn id="label0"
                   29428: title="dom-command-label"><code>label</code></dfn> , <dfn id=
                   29429: "icon0" title="dom-command-icon"><code>icon</code></dfn> , <dfn id=
                   29430: "hidden0" title="dom-command-hidden"><code>hidden</code></dfn> ,
                   29431: <dfn id="disabled5" title=
                   29432: "dom-command-disabled"><code>disabled</code></dfn> , <dfn id=
                   29433: "checked1" title="dom-command-checked"><code>checked</code></dfn> ,
                   29434: <dfn id="radiogroup0" title=
                   29435: "dom-command-radiogroup"><code>radiogroup</code></dfn> , and
                   29436: <dfn id="default2" title=
                   29437: "dom-command-default"><code>default</code></dfn> DOM attributes
                   29438: must <a href="#reflect">reflect</a> their respective namesake
                   29439: content attributes.</p>
                   29440: <p>The <dfn id="click0" title=
                   29441: "dom-command-click"><code>click()</code></dfn> method's <del class=
                   29442: "diff-old">behaviour</del> <ins class="diff-chg">behavior</ins>
                   29443: depends on the value of the <code title=
                   29444: "attr-command-type"><a href="#type13">type</a></code> attribute of
                   29445: the element, as follows:</p>
                   29446: <dl class="switch">
                   29447: <dt>If the <code title="attr-command-type"><a href=
                   29448: "#type13">type</a></code> attribute has the value <code title=
                   29449: "">checkbox</code></dt>
                   29450: <dd>
                   29451: <p>If the element has a <code title="attr-command-checked"><a href=
                   29452: "#checked0">checked</a></code> attribute, the UA must remove that
                   29453: attribute. Otherwise, the UA must add a <code title=
                   29454: "attr-command-checked"><a href="#checked0">checked</a></code>
                   29455: attribute, with the literal value <code title="">checked</code> .
                   29456: The UA must then <a href="#firing">fire a <code title=
                   29457: "">click</code> event</a> at the element.</p>
                   29458: </dd>
                   29459: <dt>If the <code title="attr-command-type"><a href=
                   29460: "#type13">type</a></code> attribute has the value <code title=
                   29461: "">radio</code></dt>
                   29462: <dd>
                   29463: <p>If the element has a parent, then the UA must walk the list of
                   29464: child nodes of that parent element, and for each node that is a
                   29465: <code><a href="#command0">command</a></code> element, if that
                   29466: element has a <code title="attr-command-radiogroup"><a href=
                   29467: "#radiogroup">radiogroup</a></code> attribute whose value exactly
                   29468: matches the current element's (treating missing <code title=
                   29469: "attr-command-radiogroup"><a href=
                   29470: "#radiogroup">radiogroup</a></code> attributes as if they were the
                   29471: empty string), and has a <code title=
                   29472: "attr-command-checked"><a href="#checked0">checked</a></code>
                   29473: attribute, must remove that attribute and <a href="#firing">fire a
                   29474: <code title="">click</code> event</a> at the element.</p>
                   29475: <p>Then, the element's <code title="attr-command-checked"><a href=
                   29476: "#checked0">checked</a></code> attribute attribute must be set to
                   29477: the literal value <code title="">checked</code> and a <span title=
                   29478: "file a click event"><code title="">click</code> event must be
                   29479: fired</span> at the element.</p>
                   29480: </dd>
                   29481: <dt>Otherwise</dt>
                   29482: <dd>
                   29483: <p>The UA must <a href="#firing">fire a <code title="">click</code>
                   29484: event</a> at the element.</p>
                   29485: </dd>
                   29486: </dl>
                   29487: <p class="note">Firing a synthetic <code title=
                   29488: "event-click">click</code> event at the element does not cause any
                   29489: of the actions described above to happen.</p>
                   29490: <p class="big-issue">should change all the above so it actually is
                   29491: just <del class="diff-old">trigged</del> <ins class=
                   29492: "diff-chg">triggered</ins> by a click event, then we could remove
                   29493: the shadowing click() method and rely on actual events.</p>
                   29494: <p class="big-issue">Need to define the command="" attribute</p>
                   29495: <p class="note"><code><a href="#command0">command</a></code>
                   29496: elements are not rendered unless they <a href="#menu" title=
                   29497: "menu">form part of a menu</a> .</p>
                   29498: <h4 id="menus"><span class="secno"><del class=
                   29499: "diff-old">3.18.4.</del> <ins class="diff-chg">3.16.4</ins></span>
                   29500: The <dfn id="menu"><code>menu</code></dfn> element</h4>
                   29501: <dl class="element">
                   29502: <dt>Categories</dt>
                   29503: <dd><del class="diff-old">Prose</del> <a href=
                   29504: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   29505: .</dd>
                   29506: <dd>If there is a <code><a href="#menu">menu</a></code> element
                   29507: ancestor: <a href="#phrasing0">phrasing content</a> .</dd>
                   29508: <dt>Contexts in which this element may be used:</dt>
                   29509: <dd>Where <del class="diff-old">prose</del> <a href=
                   29510: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   29511: expected.</dd>
                   29512: <dd>If there is a <code><a href="#menu">menu</a></code> element
                   29513: ancestor: where <a href="#phrasing0">phrasing content</a> is
                   29514: expected.</dd>
                   29515: <dt>Content model:</dt>
                   29516: <dd>Either: Zero or more <code><a href="#li">li</a></code>
                   29517: elements.</dd>
                   29518: <dd>Or: <a href="#phrasing0">Phrasing content</a> .</dd>
                   29519: <dt>Element-specific attributes:</dt>
                   29520: <dd><code title="attr-menu-type"><a href=
                   29521: "#type15">type</a></code></dd>
                   29522: <dd><code title="attr-menu-label"><a href=
                   29523: "#label1">label</a></code></dd>
                   29524: <dd><code title="attr-menu-autosubmit"><a href=
                   29525: "#autosubmit">autosubmit</a></code></dd>
                   29526: <dt>DOM interface:</dt>
                   29527: <dd>
                   29528: <pre class="idl">
                   29529: interface <dfn id=
                   29530: "htmlmenuelement">HTMLMenuElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
                   29531:            attribute DOMString <span title=
                   29532: "dom-menu-type">type</span>;
                   29533:            attribute DOMString <span title=
                   29534: "dom-menu-label">label</span>;
                   29535:            attribute boolean <span title=
                   29536: "dom-menu-autosubmit">autosubmit</span>;
                   29537: };
                   29538: </pre></dd>
                   29539: </dl>
                   29540: <p>The <code><a href="#menu">menu</a></code> element represents a
                   29541: list of commands.</p>
                   29542: <p>The <dfn id="type15" title=
                   29543: "attr-menu-type"><code>type</code></dfn> attribute is an <a href=
                   29544: "#enumerated">enumerated attribute</a> indicating the kind of menu
                   29545: being declared. The attribute has three states. The <code title=
                   29546: "attr-menu-type-context">context</code> keyword maps to the
                   29547: <dfn id="context1" title="context menu state">context menu</dfn>
                   29548: state, in which the element is declaring a context menu. The
                   29549: <code title="attr-menu-type-toolbar">toolbar</code> keyword maps to
                   29550: the <dfn id="tool-bar" title="tool bar state">tool bar</dfn> state,
                   29551: in which the element is <del class="diff-old">declaraing</del>
                   29552: <ins class="diff-chg">declaring</ins> a tool bar. The attribute may
                   29553: also be omitted. The <i>missing value default</i> is the <dfn id=
                   29554: "list" title="list state">list</dfn> state, which indicates that
                   29555: the element is merely a list of commands that is neither declaring
                   29556: a context menu nor defining a tool bar.</p>
                   29557: <p>If a <code><a href="#menu">menu</a></code> element's
                   29558: <code title="attr-menu-type"><a href="#type15">type</a></code>
                   29559: attribute is in the <a href="#context1" title=
                   29560: "context menu state">context menu</a> state, then the element
                   29561: represents the commands of a context menu, and the user can only
                   29562: interact with the commands if that context menu is activated.</p>
                   29563: <p>If a <code><a href="#menu">menu</a></code> element's
                   29564: <code title="attr-menu-type"><a href="#type15">type</a></code>
                   29565: attribute is in the <a href="#tool-bar" title="tool bar state">tool
                   29566: bar</a> state, then the element represents a list of active
                   29567: commands that the user can immediately interact with.</p>
                   29568: <p>If a <code><a href="#menu">menu</a></code> element's
                   29569: <code title="attr-menu-type"><a href="#type15">type</a></code>
                   29570: attribute is in the <a href="#list" title="list state">list</a>
                   29571: state, then the element either represents an unordered list of
                   29572: items (each represented by an <code><a href="#li">li</a></code>
                   29573: element), each of which represents a command that the user may
                   29574: perform or activate, or, if the element has no <code><a href=
                   29575: "#li">li</a></code> element children, <del class=
                   29576: "diff-old">prose</del> <a href="#flow-content0"><ins class=
                   29577: "diff-chg">flow</ins> content</a> describing available
                   29578: commands.</p>
                   29579: <p>The <dfn id="label1" title=
                   29580: "attr-menu-label"><code>label</code></dfn> attribute gives the
                   29581: label of the menu. It is used by user agents to display nested
                   29582: menus in the UI. For example, a context menu containing another
                   29583: menu would use the nested menu's <code title=
                   29584: "attr-menu-label"><a href="#label1">label</a></code> attribute for
                   29585: the submenu's menu label.</p>
                   29586: <p>The <dfn id="autosubmit" title=
                   29587: "attr-menu-autosubmit"><code>autosubmit</code></dfn> attribute is a
                   29588: <a href="#boolean0">boolean attribute</a> that, if present,
                   29589: indicates that selections made to form controls in this menu are to
                   29590: result in the control's form being immediately submitted.</p>
                   29591: <p>If a <code title="event-change">change</code> event bubbles
                   29592: through a <code><a href="#menu">menu</a></code> element, then, in
                   29593: addition to any other default action that that event might have,
                   29594: the UA must act as if the following was an additional default
                   29595: action for that event: if (when it comes time to execute the
                   29596: default action) the <code><a href="#menu">menu</a></code> element
                   29597: has an <code title="attr-menu-autosubmit"><a href=
                   29598: "#autosubmit">autosubmit</a></code> attribute, and the target of
                   29599: the event is an <code>input</code> element, and that element has a
                   29600: <code title="attr-input-type">type</code> attribute whose value is
                   29601: either <code title="">radio</code> or <code title=
                   29602: "">checkbox</code> , and the <code>input</code> element in question
                   29603: has a non-null <code title="dom-input-form">form</code> DOM
                   29604: attribute, then the UA must invoke the <code title=
                   29605: "dom-form-submit">submit()</code> method of the <code>form</code>
                   29606: element indicated by that DOM attribute.</p>
                   29607: <h5 id="menus-intro"><span class="secno"><del class=
                   29608: "diff-old">3.18.4.1.</del> <ins class=
                   29609: "diff-chg">3.16.4.1.</ins></span> Introduction</h5>
                   29610: <p><em>This section is non-normative.</em></p>
                   29611: <p class="big-issue">...</p>
                   29612: <h5 id="building"><span class="secno"><del class=
                   29613: "diff-old">3.18.4.2.</del> <ins class=
                   29614: "diff-chg">3.16.4.2.</ins></span> <dfn id="building0">Building
                   29615: menus and tool bars</dfn></h5>
                   29616: <p>A menu (or tool bar) consists of a list of zero or more of the
                   29617: following components:</p>
                   29618: <ul class="brief">
                   29619: <li><a href="#command1" title="concept-command">Commands</a> ,
                   29620: which can be marked as default commands</li>
                   29621: <li>Separators</li>
                   29622: <li>Other menus (which allows the list to be nested)</li>
                   29623: </ul>
                   29624: <p>The list corresponding to a particular <code><a href=
                   29625: "#menu">menu</a></code> element is built by iterating over its
                   29626: child nodes. For each child node in <a href="#tree-order">tree
                   29627: order</a> , the required <del class="diff-old">behaviour</del>
                   29628: <ins class="diff-chg">behavior</ins> depends on what the node is,
                   29629: as follows:</p>
                   29630: <dl class="switch">
                   29631: <dt>An element that <a href="#command1" title=
                   29632: "concept-command">defines a command</a></dt>
                   29633: <dd>Append the command to the menu. If the element is a
                   29634: <code><a href="#command0">command</a></code> element with a
                   29635: <code title="attr-command-default"><a href=
                   29636: "#default1">default</a></code> attribute, mark the command as being
                   29637: a default command.</dd>
                   29638: <dt>An <code><a href="#hr">hr</a></code> element</dt>
                   29639: <dt>An <code>option</code> element that has a <code title=
                   29640: "attr-option-value">value</code> attribute set to the empty string,
                   29641: and has a <code title="attr-option-disabled">disabled</code>
                   29642: attribute, and whose <code><a href=
                   29643: "#textcontent">textContent</a></code> consists of a string of one
                   29644: or more hyphens (U+002D HYPHEN-MINUS)</dt>
                   29645: <dd>Append a separator to the menu.</dd>
                   29646: <dt>An <code><a href="#li">li</a></code> element</dt>
                   29647: <dd>Iterate over the children of the <code><a href=
                   29648: "#li">li</a></code> element.</dd>
                   29649: <dt>A <code><a href="#menu">menu</a></code> element with no
                   29650: <code title="attr-menu-label"><a href="#label1">label</a></code>
                   29651: attribute</dt>
                   29652: <dt>A <code>select</code> element</dt>
                   29653: <dd>Append a separator to the menu, then iterate over the children
                   29654: of the <code><a href="#menu">menu</a></code> or <code>select</code>
                   29655: element, then append another separator.</dd>
                   29656: <dt>A <code><a href="#menu">menu</a></code> element with a
                   29657: <code title="attr-menu-label"><a href="#label1">label</a></code>
                   29658: attribute</dt>
                   29659: <dt>An <code>optgroup</code> element</dt>
                   29660: <dd>Append a submenu to the menu, using the value of the element's
                   29661: <code title="">label</code> attribute as the label of the menu. The
                   29662: submenu must be constructed by taking the element and creating a
                   29663: new menu for it using the complete process described in this
                   29664: section.</dd>
                   29665: <dt>Any other node</dt>
                   29666: <dd><a href="#ignored">Ignore</a> the node.</dd>
                   29667: </dl>
                   29668: <p class="issue">We should support <code>label</code> in the
                   29669: algorithm above -- just iterate through the contents like with
                   29670: <code><a href="#li">li</a></code> , to support <code>input</code>
                   29671: elements in <code>label</code> elements. Also,
                   29672: <code>optgroup</code> elements without labels should be ignored
                   29673: (maybe? or at least should say they have no label so that they are
                   29674: dropped below), and <code>select</code> elements inside
                   29675: <code>label</code> elements may need special processing.</p>
                   29676: <p>Once all the nodes have been processed as described above, the
                   29677: user agent must the post-process the menu as follows:</p>
                   29678: <ol>
                   29679: <li>Any menu item with no label, or whose label is the empty
                   29680: string, must be removed.</li>
                   29681: <li>Any sequence of two or more separators in a row must be
                   29682: collapsed to a single separator.</li>
                   29683: <li>Any separator at the start or end of the menu must be
                   29684: removed.</li>
                   29685: </ol>
                   29686: <h5 id="context"><span class="secno"><del class=
                   29687: "diff-old">3.18.4.3.</del> <ins class=
                   29688: "diff-chg">3.16.4.3.</ins></span> <dfn id="context2">Context
                   29689: menus</dfn></h5>
                   29690: <p>The <dfn id="contextmenu" title=
                   29691: "attr-contextmenu"><code>contextmenu</code></dfn> attribute gives
                   29692: the element's <a href="#context2" title="context menus">context
                   29693: menu</a> . The value must be the ID of a <code><a href=
                   29694: "#menu">menu</a></code> element in the DOM. If the node that would
                   29695: be obtained by the invoking the <code>getElementById()</code>
                   29696: method using the attribute's value as the only argument is null or
                   29697: not a <code><a href="#menu">menu</a></code> element, then the
                   29698: element has no assigned context menu. Otherwise, the element's
                   29699: assigned context menu is the element so identified.</p>
                   29700: <p>When an element's context menu is requested (e.g. by the user
                   29701: right-clicking the element, or pressing a context menu key), the UA
                   29702: must <a href="#firing1">fire a <code title="">contextmenu</code>
                   29703: event</a> on the element for which the menu was requested.</p>
                   29704: <p class="note">Typically, therefore, the firing of the
                   29705: <code title="event-contextmenu">contextmenu</code> event will be
                   29706: the default action of a <code title="mouseup">mouseup</code> or
                   29707: <code title="event-keyup">keyup</code> event. The exact sequence of
                   29708: events is UA-dependent, as it will vary based on platform
                   29709: conventions.</p>
                   29710: <p>The default action of the <code title=
                   29711: "event-contextmenu">contextmenu</code> event depends on whether the
                   29712: element has a context menu assigned (using the <code title=
                   29713: "attr-contextmenu"><a href="#contextmenu">contextmenu</a></code>
                   29714: attribute) or not. If it does not, the default action must be for
                   29715: the user agent to show its default context menu, if it has one.</p>
                   29716: <p class="big-issue"><ins class="diff-new">Context menus should
                   29717: inherit (so clicking on a span in a paragraph with a context menu
                   29718: should show the menu).</ins></p>
                   29719: <p>If the element <em>does</em> have a context menu assigned, then
                   29720: the user agent must <a href="#firing3">fire a <code title=
                   29721: "">show</code> event</a> on the relevant <code><a href=
                   29722: "#menu">menu</a></code> element.</p>
                   29723: <p>The default action of <em>this</em> event is that the user agent
                   29724: must show a context menu <a href="#building0" title=
                   29725: "building menus and tool bars">built</a> from the <code><a href=
                   29726: "#menu">menu</a></code> element.</p>
                   29727: <p>The user agent may also provide access to its default context
                   29728: menu, if any, with the context menu shown. For example, it could
                   29729: merge the menu items from the two menus together, or provide the
                   29730: page's context menu as a submenu of the default menu.</p>
                   29731: <p>If the user dismisses the menu without making a selection,
                   29732: nothing in particular happens.</p>
                   29733: <p>If the user selects a menu item that represents a <span title=
                   29734: "concept-commands">command</span> , then the UA must invoke that
                   29735: command's <a href="#action" title="command-facet-Action">Action</a>
                   29736: .</p>
                   29737: <p>Context menus must not, while being shown, reflect changes in
                   29738: the DOM; they are constructed as the default action of the
                   29739: <code title="event-show">show</code> event and must remain like
                   29740: that until dismissed.</p>
                   29741: <p>User agents may provide means for bypassing the context menu
                   29742: processing model, ensuring that the user can always access the UA's
                   29743: default context menus. For example, the user agent could handle
                   29744: right-clicks that have the Shift key depressed in such a way that
                   29745: it does not fire the <code title=
                   29746: "event-contextmenu">contextmenu</code> event and instead always
                   29747: shows the default context menu.</p>
                   29748: <p>The <dfn id="contextmenu0" title=
                   29749: "dom-contextMenu"><code>contextMenu</code></dfn> attribute must
                   29750: <a href="#reflect">reflect</a> the <code title=
                   29751: "attr-contextmenu"><a href="#contextmenu">contextmenu</a></code>
                   29752: content attribute.</p>
                   29753: <h5 id="toolbars"><span class="secno"><del class=
                   29754: "diff-old">3.18.4.4.</del> <ins class=
                   29755: "diff-chg">3.16.4.4.</ins></span> Toolbars</h5>
                   29756: <p><dfn id="toolbars0">Toolbars</dfn> are a kind of menu that is
                   29757: always visible.</p>
                   29758: <p>When a <code><a href="#menu">menu</a></code> element has a
                   29759: <code title="attr-menu-type"><a href="#type15">type</a></code>
                   29760: attribute with the value <code title="">toolbar</code> , then the
                   29761: user agent must <a href="#building0" title=
                   29762: "building menus and tool bars">build</a> the menu for that
                   29763: <code><a href="#menu">menu</a></code> element and <span title=
                   29764: "render-toolbar">render</span> it in the document in a position
                   29765: appropriate for that <code><a href="#menu">menu</a></code>
                   29766: element.</p>
                   29767: <p>The user agent must reflect changes made to the <code><a href=
                   29768: "#menu">menu</a></code> 's DOM immediately in the UI.</p>
                   29769: <h4 id="commands"><span class="secno"><del class=
                   29770: "diff-old">3.18.5.</del> <ins class="diff-chg">3.16.5</ins></span>
                   29771: Commands</h4>
                   29772: <p>A <dfn id="command1" title="concept-command">command</dfn> is
                   29773: the abstraction behind menu items, buttons, and links. Once a
                   29774: command is defined, other parts of the interface can refer to the
                   29775: same command, allowing many access points to a single feature to
                   29776: share aspects such as the disabled state.</p>
                   29777: <p id="facets">Commands are defined to have the following
                   29778: <em>facets</em> :</p>
                   29779: <dl>
                   29780: <dt><dfn id="type16" title="command-facet-Type">Type</dfn></dt>
                   29781: <dd>The kind of command: "command", meaning it is a normal command;
                   29782: "radio", meaning that triggering the command will, amongst other
                   29783: things, set the <a href="#checked2" title=
                   29784: "command-facet-CheckedState">Checked State</a> to true (and
                   29785: probably uncheck some other commands); or "checkbox", meaning that
                   29786: triggering the command will, amongst other things, toggle the value
                   29787: of the <a href="#checked2" title=
                   29788: "command-facet-CheckedState">Checked State</a> .</dd>
                   29789: <dt><dfn id="id1" title="command-facet-ID">ID</dfn></dt>
                   29790: <dd>The name of the command, for referring to the command from the
                   29791: markup or from script. If a command has no ID, it is an <dfn id=
                   29792: "anonymous">anonymous command</dfn> .</dd>
                   29793: <dt><dfn id="label2" title="command-facet-Label">Label</dfn></dt>
                   29794: <dd>The name of the command as seen by the user.</dd>
                   29795: <dt><dfn id="hint" title="command-facet-Hint">Hint</dfn></dt>
                   29796: <dd>A helpful or descriptive string that can be shown to the
                   29797: user.</dd>
                   29798: <dt><dfn id="icon1" title="command-facet-Icon">Icon</dfn></dt>
                   29799: <dd>A graphical image that represents the action.</dd>
                   29800: <dt><dfn id="hidden1" title="command-facet-HiddenState">Hidden
                   29801: State</dfn></dt>
                   29802: <dd>Whether the command is hidden or not (basically, whether it
                   29803: should be shown in menus).</dd>
                   29804: <dt><dfn id="disabled6" title=
                   29805: "command-facet-DisabledState">Disabled State</dfn></dt>
                   29806: <dd>Whether the command can be triggered or not. If the <a href=
                   29807: "#hidden1" title="command-facet-HiddenState">Hidden State</a> is
                   29808: true (hidden) then the <a href="#disabled6" title=
                   29809: "command-facet-DisabledState">Disabled State</a> will be true
                   29810: (disabled) regardless. <span class="issue">We could make this into
                   29811: a string value that acts as a Hint for why the command is
                   29812: disabled.</span></dd>
                   29813: <dt><dfn id="checked2" title="command-facet-CheckedState">Checked
                   29814: State</dfn></dt>
                   29815: <dd>Whether the command is checked or not.</dd>
                   29816: <dt><dfn id="action" title="command-facet-Action">Action</dfn></dt>
                   29817: <dd>The actual effect that triggering the command will have. This
                   29818: could be a scripted event handler, a URI to which to navigate, or a
                   29819: form submission.</dd>
                   29820: <dt><dfn id="triggers" title=
                   29821: "command-facet-Triggers">Triggers</dfn></dt>
                   29822: <dd>The list of elements that can trigger the command. The element
                   29823: defining a command is always in the list of elements that can
                   29824: trigger the command. For anonymous commands, only the element
                   29825: defining the command is on the list, since other elements have no
                   29826: way to refer to it.</dd>
                   29827: </dl>
                   29828: <p>Commands are represented by elements in the DOM. Any element
                   29829: that can define a command also implements the <code title=
                   29830: "command-ro"><a href="#command2">Command</a></code> interface:</p>
                   29831: <p class="big-issue"><ins class="diff-new">Actually even better
                   29832: would be to just mix it straight into those interfaces
                   29833: somehow.</ins></p>
                   29834: <pre>
                   29835: <del class="diff-old">   class=idl&gt;interface  {
                   29836: </del>
                   29837: <ins class=
                   29838: "diff-chg">   class=idl&gt;[NoInterfaceObject] interface <dfn id=
                   29839: "command2" title="command-ro">Command</dfn> {
                   29840: </ins>
                   29841:   readonly attribute DOMString <a href="#commandtype" title=
                   29842: "dom-command-ro-commandType">commandType</a>;          
                   29843:   readonly attribute DOMString <a href="#id2" title=
                   29844: "dom-command-ro-id">id</a>;
                   29845:   readonly attribute DOMString <a href="#label3" title=
                   29846: "dom-command-ro-label">label</a>;
                   29847:   readonly attribute DOMString <a href="#title7" title=
                   29848: "dom-command-ro-title">title</a>;
                   29849:   readonly attribute DOMString <a href="#icon2" title=
                   29850: "dom-command-ro-icon">icon</a>;
                   29851:   readonly attribute boolean <a href="#hidden2" title=
                   29852: "dom-command-ro-hidden">hidden</a>;
                   29853:   readonly attribute boolean <a href="#disabled7" title=
                   29854: "dom-command-ro-disabled">disabled</a>;              
                   29855:   readonly attribute boolean <a href="#checked3" title=
                   29856: "dom-command-ro-checked">checked</a>;              
                   29857:   void <a href="#click1" title="dom-command-ro-click">click</a>();
                   29858:   readonly attribute <a href=
                   29859: "#htmlcollection0">HTMLCollection</a> <a href="#triggers0" title=
                   29860: "dom-command-ro-triggers">triggers</a>;
                   29861:   readonly attribute <a href="#command0">Command</a> <span title=
                   29862: "dom-command-ro-command">command</span>;
                   29863: };
                   29864: </pre>
                   29865: <p>The <code title="command-ro"><a href=
                   29866: "#command2">Command</a></code> interface is implemented by any
                   29867: element capable of defining a command. (If an element can define a
                   29868: command, its definition will list this interface explicitly.) All
                   29869: the attributes of the <code title="command-ro"><a href=
                   29870: "#command2">Command</a></code> interface are read-only. Elements
                   29871: implementing this interface may implement other interfaces that
                   29872: have attributes with identical names but that are mutable; in
                   29873: bindings that <del class="diff-old">simply</del> flatten all
                   29874: supported interfaces on the object, the mutable attributes must
                   29875: shadow the readonly attributes defined in the <code title=
                   29876: "command-ro"><a href="#command2">Command</a></code> interface.</p>
                   29877: <p>The <dfn id="commandtype" title=
                   29878: "dom-command-ro-commandType"><code>commandType</code></dfn>
                   29879: attribute must return a string whose value is either " <code title=
                   29880: "">command</code> ", " <code title="">radio</code> ", or "
                   29881: <code title="">checked</code> ", depending on whether the <a href=
                   29882: "#type16" title="command-facet-Type">Type</a> of the command
                   29883: defined by the element is "command", "radio", or "checked"
                   29884: respectively. If the element does not define a command, it must
                   29885: return null.</p>
                   29886: <p>The <dfn id="id2" title=
                   29887: "dom-command-ro-id"><code>id</code></dfn> attribute must return the
                   29888: command's <a href="#id1" title="command-facet-ID">ID</a> , or null
                   29889: if the element does not define a command or defines an <a href=
                   29890: "#anonymous">anonymous command</a> . This attribute will be
                   29891: shadowed by the <code title="dom-id"><a href="#id0">id</a></code>
                   29892: DOM attribute on the <code><a href=
                   29893: "#htmlelement">HTMLElement</a></code> interface.</p>
                   29894: <p>The <dfn id="label3" title=
                   29895: "dom-command-ro-label"><code>label</code></dfn> attribute must
                   29896: return the command's <a href="#label2" title=
                   29897: "command-facet-Label">Label</a> , or null if the element does not
                   29898: define a command or does not specify a <a href="#label2" title=
                   29899: "command-facet-Label">Label</a> . This attribute will be shadowed
                   29900: by the <code title="">label</code> DOM attribute on
                   29901: <code>option</code> and <code><a href=
                   29902: "#command0">command</a></code> elements.</p>
                   29903: <p>The <dfn id="title7" title=
                   29904: "dom-command-ro-title"><code>title</code></dfn> attribute must
                   29905: return the command's <a href="#hint" title=
                   29906: "command-facet-Hint">Hint</a> , or null if the element does not
                   29907: define a command or does not specify a <a href="#hint" title=
                   29908: "command-facet-Hint">Hint</a> . This attribute will be shadowed by
                   29909: the <code title="dom-title"><a href="#title0">title</a></code> DOM
                   29910: attribute on the <code><a href=
                   29911: "#htmlelement">HTMLElement</a></code> interface.</p>
                   29912: <p>The <dfn id="icon2" title=
                   29913: "dom-command-ro-icon"><code>icon</code></dfn> attribute must return
                   29914: an absolute URI to the command's <a href="#icon1" title=
                   29915: "command-facet-Icon">Icon</a> . If the element does not specify an
                   29916: icon, or if the element does not define a command, then the
                   29917: attribute must return null. This attribute will be shadowed by the
                   29918: <code title="dom-command-icon"><a href="#icon0">icon</a></code> DOM
                   29919: attribute on <code><a href="#command0">command</a></code>
                   29920: elements.</p>
                   29921: <p>The <dfn id="hidden2" title=
                   29922: "dom-command-ro-hidden"><code>hidden</code></dfn> attribute must
                   29923: return true if the command's <a href="#hidden1" title=
                   29924: "command-facet-HiddenState">Hidden State</a> is that the command is
                   29925: hidden, and false if it is that the command is not hidden. If the
                   29926: element does not define a command, the attribute must return false.
                   29927: This attribute will be shadowed by the <code title=
                   29928: "dom-command-hidden"><a href="#hidden0">hidden</a></code> DOM
                   29929: attribute on <code><a href="#command0">command</a></code>
                   29930: elements.</p>
                   29931: <p>The <dfn id="disabled7" title=
                   29932: "dom-command-ro-disabled"><code>disabled</code></dfn> attribute
                   29933: must return true if the command's <a href="#disabled6" title=
                   29934: "command-facet-DisabledState">Disabled State</a> is that the
                   29935: command is disabled, and false if the command is not disabled. This
                   29936: attribute is not affected by the command's <a href="#hidden1"
                   29937: title="command-facet-HiddenState">Hidden State</a> . If the element
                   29938: does not define a command, the attribute must return false. This
                   29939: attribute will be shadowed by the <code title="">disabled</code>
                   29940: attribute on <code>button</code> , <code>input</code> ,
                   29941: <code>option</code> , and <code><a href=
                   29942: "#command0">command</a></code> elements.</p>
                   29943: <p>The <dfn id="checked3" title=
                   29944: "dom-command-ro-checked"><code>checked</code></dfn> attribute must
                   29945: return true if the command's <a href="#checked2" title=
                   29946: "command-facet-CheckedState">Checked State</a> is that the command
                   29947: is checked, and false if it is that the command is not checked. If
                   29948: the element does not define a command, the attribute must return
                   29949: false. This attribute will be shadowed by the <code title=
                   29950: "">checked</code> attribute on <code>input</code> and
                   29951: <code><a href="#command0">command</a></code> elements.</p>
                   29952: <p>The <dfn id="click1" title=
                   29953: "dom-command-ro-click"><code>click()</code></dfn> method must
                   29954: trigger the <a href="#action" title=
                   29955: "command-facet-Action">Action</a> for the command. If the element
                   29956: does not define a command, this method must do nothing. This method
                   29957: will be shadowed by the <code title="dom-click"><a href=
                   29958: "#click">click()</a></code> method on <a href="#html-elements">HTML
                   29959: elements</a> , and is included only for completeness.</p>
                   29960: <p>The <dfn id="triggers0" title=
                   29961: "dom-command-ro-triggers"><code>triggers</code></dfn> attribute
                   29962: must return a list containing the elements that can trigger the
                   29963: command (the command's <a href="#triggers" title=
                   29964: "command-facet-Triggers">Triggers</a> ). The list must be <a href=
                   29965: "#live">live</a> . While the element does not define a command, the
                   29966: list must be empty.</p>
                   29967: <p>The <dfn id="commands0" title=
                   29968: "dom-document-commands"><code>commands</code></dfn> attribute of
                   29969: the document's <code><a href=
                   29970: "#htmldocument">HTMLDocument</a></code> interface must return an
                   29971: <code><a href="#htmlcollection0">HTMLCollection</a></code> rooted
                   29972: at the <code>Document</code> node, whose filter matches only
                   29973: elements that define commands and have IDs.</p>
                   29974: <p>The following elements can define commands: <code title=
                   29975: "a-command"><a href="#using4">a</a></code> , <code title=
                   29976: "button-command"><a href="#using5">button</a></code> , <code title=
                   29977: "input-command"><a href="#using6">input</a></code> , <code title=
                   29978: "option-command"><a href="#using7">option</a></code> , <code title=
                   29979: "command-element"><a href="#command3">command</a></code> .</p>
                   29980: <h5 id="using"><span class="secno"><del class=
                   29981: "diff-old">3.18.5.1.</del> <ins class=
                   29982: "diff-chg">3.16.5.1.</ins></span> <dfn id="using4" title=
                   29983: "a-command">Using the <code>a</code> element to define a
                   29984: command</dfn></h5>
                   29985: <p>An <code><a href="#a">a</a></code> element with an <code title=
                   29986: "attr-hyperlink-href"><a href="#href6">href</a></code> attribute
                   29987: <a href="#command1" title="concept-command">defines a command</a>
                   29988: .</p>
                   29989: <p>The <a href="#type16" title="command-facet-Type">Type</a> of the
                   29990: command is "command".</p>
                   29991: <p>The <a href="#id1" title="command-facet-ID">ID</a> of the
                   29992: command is the value of the <code title="attr-id"><a href=
                   29993: "#id">id</a></code> attribute of the element, if the attribute is
                   29994: present and not empty. Otherwise the command is an <a href=
                   29995: "#anonymous">anonymous command</a> .</p>
                   29996: <p>The <a href="#label2" title="command-facet-Label">Label</a> of
                   29997: the command is the string given by the element's <code><a href=
                   29998: "#textcontent">textContent</a></code> DOM attribute.</p>
                   29999: <p>The <a href="#hint" title="command-facet-Hint">Hint</a> of the
                   30000: command is the value of the <code title="attr-title"><a href=
                   30001: "#title">title</a></code> attribute of the <code><a href=
                   30002: "#a">a</a></code> element. If the attribute is not present, the
                   30003: <a href="#hint" title="command-facet-Hint">Hint</a> is the empty
                   30004: string.</p>
                   30005: <p>The <a href="#icon1" title="command-facet-Icon">Icon</a> of the
                   30006: command is the absolute URI of the first image in the element.
                   30007: Specifically, in a depth-first search of the children of the
                   30008: element, the first element that is <code><a href=
                   30009: "#img">img</a></code> element with a <code>src</code> attribute is
                   30010: the one that is used as the image. The URI must be taken from the
                   30011: element's <code>src</code> attribute. Relative URIs must be
                   30012: resolved relative to the <a href="#elements2" title=
                   30013: "element's base URI">base URI</a> of the image element. If no image
                   30014: is found, then the Icon facet is left blank.</p>
                   30015: <p>The <a href="#hidden1" title="command-facet-HiddenState">Hidden
                   30016: State</a> and <a href="#disabled6" title=
                   30017: "command-facet-DisabledState">Disabled State</a> facets of the
                   30018: command are always false. (The command is always enabled.)</p>
                   30019: <p>The <a href="#checked2" title=
                   30020: "command-facet-CheckedState">Checked State</a> of the command is
                   30021: always false. (The command is never checked.)</p>
                   30022: <p>The <a href="#action" title="command-facet-Action">Action</a> of
                   30023: the command is to <a href="#firing" title="fire a click event">fire
                   30024: a <code title="">click</code> event</a> at the element.</p>
                   30025: <h5 id="using0"><span class="secno"><del class=
                   30026: "diff-old">3.18.5.2.</del> <ins class=
                   30027: "diff-chg">3.16.5.2.</ins></span> <dfn id="using5" title=
                   30028: "button-command">Using the <code>button</code> element to define a
                   30029: command</dfn></h5>
                   30030: <p>A <code>button</code> element always <a href="#command1" title=
                   30031: "concept-command">defines a command</a> .</p>
                   30032: <p>The <a href="#type16" title="command-facet-Type">Type</a> ,
                   30033: <a href="#id1" title="command-facet-ID">ID</a> , <a href="#label2"
                   30034: title="command-facet-Label">Label</a> , <a href="#hint" title=
                   30035: "command-facet-Hint">Hint</a> , <a href="#icon1" title=
                   30036: "command-facet-Icon">Icon</a> , <a href="#hidden1" title=
                   30037: "command-facet-HiddenState">Hidden State</a> , <a href="#checked2"
                   30038: title="command-facet-CheckedState">Checked State</a> , and <a href=
                   30039: "#action" title="command-facet-Action">Action</a> facets of the
                   30040: command are determined <a href="#using4" title="a-command">as for
                   30041: <code>a</code> elements</a> (see the previous section).</p>
                   30042: <p>The <a href="#disabled6" title=
                   30043: "command-facet-DisabledState">Disabled State</a> of the command
                   30044: mirrors the disabled state of the button. Typically this is given
                   30045: by the element's <code title="attr-button-disabled">disabled</code>
                   30046: attribute, but certain button types become disabled at other times
                   30047: too (for example, the <code>move-up</code> button type is disabled
                   30048: when it would have no effect).</p>
                   30049: <h5 id="using1"><span class="secno"><del class=
                   30050: "diff-old">3.18.5.3.</del> <ins class=
                   30051: "diff-chg">3.16.5.3.</ins></span> <dfn id="using6" title=
                   30052: "input-command">Using the <code>input</code> element to define a
                   30053: command</dfn></h5>
                   30054: <p>An <code>input</code> element whose <code title=
                   30055: "attr-input-type">type</code> attribute is one of
                   30056: <code>submit</code> , <code>reset</code> , <code>button</code> ,
                   30057: <code>radio</code> , <code>checkbox</code> , <code>move-up</code> ,
                   30058: <code>move-down</code> , <code>add</code> , and <code>remove</code>
                   30059: <a href="#command1" title="concept-command">defines a command</a>
                   30060: .</p>
                   30061: <p>The <a href="#type16" title="command-facet-Type">Type</a> of the
                   30062: command is "radio" if the <code title="attr-input-type">type</code>
                   30063: attribute has the value <code>radio</code> , "checkbox" if the
                   30064: <code>type</code> attribute has the value <code>checkbox</code> ,
                   30065: and "command" otherwise.</p>
                   30066: <p>The <a href="#id1" title="command-facet-ID">ID</a> of the
                   30067: command is the value of the <code title="attr-id"><a href=
                   30068: "#id">id</a></code> attribute of the element, if the attribute is
                   30069: present and not empty. Otherwise the command is an <a href=
                   30070: "#anonymous">anonymous command</a> .</p>
                   30071: <p>The <a href="#label2" title="command-facet-Label">Label</a> of
                   30072: the command depends on the Type of the command:</p>
                   30073: <p>If the <a href="#type16" title="command-facet-Type">Type</a> is
                   30074: "command", then it is the string given by the <code title=
                   30075: "attr-input-value">value</code> attribute, if any, and a
                   30076: <span>UA-dependent value</span> that the UA uses to label the
                   30077: button itself if the attribute is absent.</p>
                   30078: <p>Otherwise, the <a href="#type16" title=
                   30079: "command-facet-Type">Type</a> is "radio" or "checkbox". If the
                   30080: element has a <code>label</code> element associated with it, the
                   30081: <code><a href="#textcontent">textContent</a></code> of the first
                   30082: such element is the <a href="#label2" title=
                   30083: "command-facet-Label">Label</a> (in DOM terms, this the string
                   30084: given by <code><var title="">element</var>
                   30085: .labels[0].textContent</code> ). Otherwise, the value of the
                   30086: <code>value</code> attribute, if present, is the <a href="#label2"
                   30087: title="command-facet-Label">Label</a> . Otherwise, the <a href=
                   30088: "#label2" title="command-facet-Label">Label</a> is the empty
                   30089: string.</p>
                   30090: <p>The <a href="#hint" title="command-facet-Hint">Hint</a> of the
                   30091: command is the value of the <code title="attr-title"><a href=
                   30092: "#title">title</a></code> attribute of the <code>input</code>
                   30093: element. If the attribute is not present, the <a href="#hint"
                   30094: title="command-facet-Hint">Hint</a> is the empty string.</p>
                   30095: <p>There is no <a href="#icon1" title="command-facet-Icon">Icon</a>
                   30096: for the command.</p>
                   30097: <p>The <a href="#hidden1" title="command-facet-HiddenState">Hidden
                   30098: State</a> of the command is always false. (The command is never
                   30099: hidden.)</p>
                   30100: <p>The <a href="#disabled6" title=
                   30101: "command-facet-DisabledState">Disabled State</a> of the command
                   30102: mirrors the disabled state of the control. Typically this is given
                   30103: by the element's <code title="attr-input-disabled">disabled</code>
                   30104: attribute, but certain input types become disabled at other times
                   30105: too (for example, the <code>move-up</code> input type is disabled
                   30106: when it would have no effect).</p>
                   30107: <p>The <a href="#checked2" title=
                   30108: "command-facet-CheckedState">Checked State</a> of the command is
                   30109: true if the command is of <a href="#type16" title=
                   30110: "command-facet-Type">Type</a> "radio" or "checkbox" and the element
                   30111: has a <code title="attr-input-checked">checked</code> attribute,
                   30112: and false otherwise.</p>
                   30113: <p>The <a href="#action" title="command-facet-Action">Action</a> of
                   30114: the command is to <a href="#firing" title="fire a click event">fire
                   30115: a <code title="">click</code> event</a> at the element.</p>
                   30116: <h5 id="using2"><span class="secno"><del class=
                   30117: "diff-old">3.18.5.4.</del> <ins class=
                   30118: "diff-chg">3.16.5.4.</ins></span> <dfn id="using7" title=
                   30119: "option-command">Using the <code>option</code> element to define a
                   30120: command</dfn></h5>
                   30121: <p>An <code>option</code> element with an ancestor
                   30122: <code>select</code> element and either no <code title=
                   30123: "attr-option-value">value</code> attribute or a <code title=
                   30124: "attr-option-value">value</code> attribute that is not the empty
                   30125: string <a href="#command1" title="concept-command">defines a
                   30126: command</a> .</p>
                   30127: <p>The <a href="#type16" title="command-facet-Type">Type</a> of the
                   30128: command is "radio" if the <code>option</code> 's nearest ancestor
                   30129: <code>select</code> element has no <code title=
                   30130: "attr-select-multiple">multiple</code> attribute, and "checkbox" if
                   30131: it does.</p>
                   30132: <p>The <a href="#id1" title="command-facet-ID">ID</a> of the
                   30133: command is the value of the <code title="attr-id"><a href=
                   30134: "#id">id</a></code> attribute of the element, if the attribute is
                   30135: present and not empty. Otherwise the command is an <a href=
                   30136: "#anonymous">anonymous command</a> .</p>
                   30137: <p>The <a href="#label2" title="command-facet-Label">Label</a> of
                   30138: the command is the value of the <code>option</code> element's
                   30139: <code title="attr-option-label">label</code> attribute, if there is
                   30140: one, or the value of the <code>option</code> element's
                   30141: <code><a href="#textcontent">textContent</a></code> DOM attribute
                   30142: if it doesn't.</p>
                   30143: <p>The <a href="#hint" title="command-facet-Hint">Hint</a> of the
                   30144: command is the string given by the element's <code title=
                   30145: "attr-title"><a href="#title">title</a></code> attribute, if any,
                   30146: and the empty string if the attribute is absent.</p>
                   30147: <p>There is no <a href="#icon1" title="command-facet-Icon">Icon</a>
                   30148: for the command.</p>
                   30149: <p>The <a href="#hidden1" title="command-facet-HiddenState">Hidden
                   30150: State</a> of the command is always false. (The command is never
                   30151: hidden.)</p>
                   30152: <p>The <a href="#disabled6" title=
                   30153: "command-facet-DisabledState">Disabled State</a> of the command is
                   30154: true (disabled) if the element has a <code title=
                   30155: "attr-option-disabled">disabled</code> attribute, and false
                   30156: otherwise.</p>
                   30157: <p>The <a href="#checked2" title=
                   30158: "command-facet-CheckedState">Checked State</a> of the command is
                   30159: true (checked) if the element's <code title=
                   30160: "dom-option-selected">selected</code> DOM attribute is true, and
                   30161: false otherwise.</p>
                   30162: <p>The <a href="#action" title="command-facet-Action">Action</a> of
                   30163: the command depends on its <a href="#type16" title=
                   30164: "command-facet-Type">Type</a> . If the command is of <a href=
                   30165: "#type16" title="command-facet-Type">Type</a> "radio" then this
                   30166: must set the <code title="dom-option-selected">selected</code> DOM
                   30167: attribute of the <code>option</code> element to true, otherwise it
                   30168: must toggle the state of the <code title=
                   30169: "dom-option-selected">selected</code> DOM attribute (set it to true
                   30170: if it is false and vice versa). Then <a href="#firing0" title=
                   30171: "fire a change event">a <code title="">change</code> event must be
                   30172: fired</a> on the <code>option</code> element's nearest ancestor
                   30173: <code>select</code> element (if there is one), as if the selection
                   30174: had been changed directly.</p>
                   30175: <h5 id="using3"><span class="secno"><del class=
                   30176: "diff-old">3.18.5.5.</del> <ins class=
                   30177: "diff-chg">3.16.5.5.</ins></span> Using the <dfn id="command3"
                   30178: title="command-element"><code>command</code></dfn> element to
                   30179: define a command</h5>
                   30180: <p>A <code><a href="#command0">command</a></code> element <a href=
                   30181: "#command1" title="concept-command">defines a command</a> .</p>
                   30182: <p>The <a href="#type16" title="command-facet-Type">Type</a> of the
                   30183: command is "radio" if the <code><a href=
                   30184: "#command0">command</a></code> 's <code title=
                   30185: "attr-command-type"><a href="#type13">type</a></code> attribute is
                   30186: " <code>radio</code> ", "checkbox" if the attribute's value is "
                   30187: <code>checkbox</code> ", and "command" otherwise.</p>
                   30188: <p>The <a href="#id1" title="command-facet-ID">ID</a> of the
                   30189: command is the value of the <code title="attr-id"><a href=
                   30190: "#id">id</a></code> attribute of the element, if the attribute is
                   30191: present and not empty. Otherwise the command is an <a href=
                   30192: "#anonymous">anonymous command</a> .</p>
                   30193: <p>The <a href="#label2" title="command-facet-Label">Label</a> of
                   30194: the command is the value of the element's <code title=
                   30195: "attr-command-label"><a href="#label">label</a></code> attribute,
                   30196: if there is one, or the empty string if it doesn't.</p>
                   30197: <p>The <a href="#hint" title="command-facet-Hint">Hint</a> of the
                   30198: command is the string given by the element's <code title=
                   30199: "attr-command-title"><a href="#title6">title</a></code> attribute,
                   30200: if any, and the empty string if the attribute is absent.</p>
                   30201: <p>The <a href="#icon1" title="command-facet-Icon">Icon</a> for the
                   30202: command is the absolute URI resulting from resolving the value of
                   30203: the element's <code title="attr-command-icon"><a href=
                   30204: "#icon">icon</a></code> attribute as a URI relative to the <a href=
                   30205: "#elements2">element's base <del class="diff-old">URI.</del>
                   30206: <ins class="diff-chg">URI</ins></a> . If the element has no
                   30207: <code title="attr-command-icon"><a href="#icon">icon</a></code>
                   30208: attribute then the command has no <a href="#icon1" title=
                   30209: "command-facet-Icon">Icon</a> .</p>
                   30210: <p>The <a href="#hidden1" title="command-facet-HiddenState">Hidden
                   30211: State</a> of the command is true (hidden) if the element has a
                   30212: <code title="attr-command-hidden"><a href=
                   30213: "#hidden">hidden</a></code> attribute, and false otherwise.</p>
                   30214: <p>The <a href="#disabled6" title=
                   30215: "command-facet-DisabledState">Disabled State</a> of the command is
                   30216: true (disabled) if the element has either a <code title=
                   30217: "attr-command-disabled"><a href="#disabled4">disabled</a></code>
                   30218: attribute or a <code title="attr-command-hidden"><a href=
                   30219: "#hidden">hidden</a></code> attribute (or both), and false
                   30220: otherwise.</p>
                   30221: <p>The <a href="#checked2" title=
                   30222: "command-facet-CheckedState">Checked State</a> of the command is
                   30223: true (checked) if the element has a <code title=
                   30224: "attr-command-checked"><a href="#checked0">checked</a></code>
                   30225: attribute, and false otherwise.</p>
                   30226: <p>The <a href="#action" title="command-facet-Action">Action</a> of
                   30227: the command is to invoke the <del class="diff-old">behaviour</del>
                   30228: <ins class="diff-chg">behavior</ins> described in the definition of
                   30229: the <code title="dom-command-click"><a href=
                   30230: "#click0">click()</a></code> method of the <code><a href=
                   30231: "#htmlcommandelement">HTMLCommandElement</a></code> interface.</p>
                   30232: <h3 id="datatemplate"><span class="secno"><del class=
                   30233: "diff-old">3.19.</del> <ins class="diff-chg">3.17</ins></span> Data
                   30234: Templates</h3>
                   30235: <h4 id="introduction0"><span class="secno"><del class=
                   30236: "diff-old">3.19.1.</del> <ins class="diff-chg">3.17.1</ins></span>
                   30237: Introduction</h4>
                   30238: <p><em><ins class="diff-new">This section is
                   30239: non-normative.</ins></em></p>
                   30240: <p class="big-issue">...examples...</p>
                   30241: <h4 id="the-datatemplate"><span class="secno"><del class=
                   30242: "diff-old">3.19.2.</del> <ins class="diff-chg">3.17.2</ins></span>
                   30243: The <dfn id="datatemplate0"><code>datatemplate</code></dfn>
                   30244: element</h4>
                   30245: <dl class="element">
                   30246: <dt>Categories</dt>
                   30247: <dd><a href="#metadata0">Metadata content</a> .</dd>
                   30248: <dd><del class="diff-old">Prose</del> <a href=
                   30249: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   30250: .</dd>
                   30251: <dt>Contexts in which this element may be used:</dt>
                   30252: <dd>As the root element of an <a href="#xml-documents" title=
                   30253: "xml documents">XML document</a> .</dd>
                   30254: <dd>Where <a href="#metadata0">metadata content</a> is
                   30255: expected.</dd>
                   30256: <dd>Where <del class="diff-old">prose</del> <a href=
                   30257: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   30258: expected.</dd>
                   30259: <dt>Content model:</dt>
                   30260: <dd>Zero or more <code><a href="#rule">rule</a></code>
                   30261: elements.</dd>
                   30262: <dt>Element-specific attributes:</dt>
                   30263: <dd>None.</dd>
                   30264: <dt>DOM interface:</dt>
                   30265: <dd><del class="diff-old">No difference from</del> <ins class=
                   30266: "diff-chg">Uses</ins> <code><a href=
                   30267: "#htmlelement">HTMLElement</a></code> .</dd>
                   30268: </dl>
                   30269: <p>The <code><a href="#datatemplate0">datatemplate</a></code>
                   30270: element brings together the various rules that form a data
                   30271: template. The element doesn't itself do anything exciting.</p>
                   30272: <h4 id="the-rule"><span class="secno"><del class=
                   30273: "diff-old">3.19.3.</del> <ins class="diff-chg">3.17.3</ins></span>
                   30274: The <dfn id="rule"><code>rule</code></dfn> element</h4>
                   30275: <dl class="element">
                   30276: <dt>Categories</dt>
                   30277: <dd>None.</dd>
                   30278: <dt>Contexts in which this element may be used:</dt>
                   30279: <dd>As a child of a <code><a href=
                   30280: "#datatemplate0">datatemplate</a></code> element.</dd>
                   30281: <dt>Content model:</dt>
                   30282: <dd>Anything, regardless of the children's required contexts (but
                   30283: see prose).</dd>
                   30284: <dt>Element-specific attributes:</dt>
                   30285: <dd><code title="attr-rule-condition"><a href=
                   30286: "#condition">condition</a></code></dd>
                   30287: <dd><code title="attr-rule-mode"><a href=
                   30288: "#mode">mode</a></code></dd>
                   30289: <dt>DOM interface:</dt>
                   30290: <dd>
                   30291: <pre class="idl">
                   30292: interface <dfn id=
                   30293: "htmlruleelement">HTMLRuleElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
                   30294:            attribute DOMString <a href="#condition0" title=
                   30295: "dom-rule-condition">condition</a>;
                   30296:            attribute DOMString <a href="#mode0" title=
                   30297: "dom-rule-mode">mode</a>;
                   30298:   readonly attribute DOMTokenString <a href="#modelist" title=
                   30299: "dom-rule-modeList">modeList</a>;
                   30300: };
                   30301: </pre></dd>
                   30302: </dl>
                   30303: <p>The <code><a href="#rule">rule</a></code> element represents a
                   30304: template of content that is to be used for elements when <a href=
                   30305: "#update" title="datatemplate-regen">updating an element's
                   30306: generated content</a> .</p>
                   30307: <p>The <dfn id="condition" title=
                   30308: "attr-rule-condition"><code>condition</code></dfn> attribute, if
                   30309: specified, must contain a valid selector. It specifies which nodes
                   30310: in the data tree will have the condition's template applied.
                   30311: <a href="#references">[SELECTORS]</a></p>
                   30312: <p>If the <code title="attr-rule-condition"><a href=
                   30313: "#condition">condition</a></code> attribute is not specified, then
                   30314: the condition applies to all elements, text nodes, CDATA nodes, and
                   30315: processing instructions.</p>
                   30316: <p>The <dfn id="mode" title=
                   30317: "attr-rule-mode"><code>mode</code></dfn> attribute, if specified,
                   30318: must have a value that is an <a href="#unordered">unordered set of
                   30319: unique space-separated tokens</a> representing the various modes
                   30320: for which the rule applies. When, and only when, the <code title=
                   30321: "attr-rule-mode"><a href="#mode">mode</a></code> attribute is
                   30322: omitted, the rule applies if and only if the mode is the empty
                   30323: string. A mode is invoked by the <code><a href=
                   30324: "#nest">nest</a></code> element; for the first node (the root node)
                   30325: of the data tree, the mode is the empty string.</p>
                   30326: <p>The contents of <code><a href="#rule">rule</a></code> elements
                   30327: form a template, and may be anything that, when the parent
                   30328: <code><a href="#datatemplate0">datatemplate</a></code> is applied
                   30329: to some conforming data, results in a conforming DOM tree.</p>
                   30330: <p>The <dfn id="condition0" title=
                   30331: "dom-rule-condition"><code>condition</code></dfn> DOM attribute
                   30332: must <a href="#reflect">reflect</a> the <code title=
                   30333: "attr-rule-condition"><a href="#condition">condition</a></code>
                   30334: content attribute.</p>
                   30335: <p>The <dfn id="mode0" title=
                   30336: "dom-rule-mode"><code>mode</code></dfn> and <dfn id="modelist"
                   30337: title="dom-rule-modeList"><code>modeList</code></dfn> DOM
                   30338: attributes must <a href="#reflect">reflect</a> the <code title=
                   30339: "attr-rule-mode"><a href="#mode">mode</a></code> content
                   30340: attribute.</p>
                   30341: <h4 id="the-nest"><span class="secno"><del class=
                   30342: "diff-old">3.19.4.</del> <ins class="diff-chg">3.17.4</ins></span>
                   30343: The <dfn id="nest"><code>nest</code></dfn> element</h4>
                   30344: <dl class="element">
                   30345: <dt>Categories</dt>
                   30346: <dd>None.</dd>
                   30347: <dt>Contexts in which this element may be used:</dt>
                   30348: <dd>As a child of a descendant of a <code><a href=
                   30349: "#rule">rule</a></code> element, regardless of the element's
                   30350: content model.</dd>
                   30351: <dt>Content model:</dt>
                   30352: <dd>Empty.</dd>
                   30353: <dt>Element-specific attributes:</dt>
                   30354: <dd><code title="attr-nest-filter"><a href=
                   30355: "#filter">filter</a></code></dd>
                   30356: <dd><code title="attr-nest-mode"><a href=
                   30357: "#mode1">mode</a></code></dd>
                   30358: <dt>DOM interface:</dt>
                   30359: <dd>
                   30360: <pre class="idl">
                   30361: interface <dfn id=
                   30362: "htmlnestelement">HTMLNestElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
                   30363:            attribute DOMString <a href="#filter0" title=
                   30364: "dom-nest-filter">filter</a>;
                   30365:            attribute DOMString <a href="#mode2" title=
                   30366: "dom-nest-mode">mode</a>;
                   30367: };
                   30368: </pre></dd>
                   30369: </dl>
                   30370: <p>The <code><a href="#nest">nest</a></code> element represents a
                   30371: point in a template where the user agent should recurse and start
                   30372: inserting the children of the data node that matches the
                   30373: <code><a href="#rule">rule</a></code> in which the <code><a href=
                   30374: "#nest">nest</a></code> element finds itself.</p>
                   30375: <p>The <dfn id="filter" title=
                   30376: "attr-nest-filter"><code>filter</code></dfn> attribute, if
                   30377: specified, must contain a valid selector. It specifies which of the
                   30378: child nodes in the data tree will be examined for further
                   30379: processing at this point. <a href="#references">[SELECTORS]</a></p>
                   30380: <p>If the <code title="attr-nest-filter"><a href=
                   30381: "#filter">filter</a></code> attribute is not specified, then all
                   30382: elements, text nodes, CDATA nodes, and processing instructions are
                   30383: processed.</p>
                   30384: <p>The <dfn id="mode1" title=
                   30385: "attr-nest-mode"><code>mode</code></dfn> attribute, if specified,
                   30386: must have a value that is a word token consisting of one or more
                   30387: characters, none of which are <a href="#space" title=
                   30388: "space character">space characters</a> . It gives the mode which
                   30389: will be in effect when looking at the rules in the data
                   30390: template.</p>
                   30391: <p>The <dfn id="filter0" title=
                   30392: "dom-nest-filter"><code>filter</code></dfn> DOM attribute must
                   30393: <a href="#reflect">reflect</a> the <code title=
                   30394: "attr-nest-filter"><a href="#filter">filter</a></code> content
                   30395: attribute.</p>
                   30396: <p>The <dfn id="mode2" title=
                   30397: "dom-nest-mode"><code>mode</code></dfn> DOM attribute must <a href=
                   30398: "#reflect">reflect</a> the <code title="attr-nest-mode"><a href=
                   30399: "#mode1">mode</a></code> content attribute.</p>
                   30400: <h4 id="global0"><span class="secno"><del class=
                   30401: "diff-old">3.19.5.</del> <ins class="diff-chg">3.17.5</ins></span>
                   30402: Global attributes for data templates</h4>
                   30403: <p>The <dfn id="template" title=
                   30404: "attr-template"><code>template</code></dfn> attribute may be added
                   30405: to an element to indicate that the template processing model is to
                   30406: be applied to that element.</p>
                   30407: <p>The <code title="attr-template"><a href=
                   30408: "#template">template</a></code> attribute, when specified, must be
                   30409: a URI to an XML or HTML document, or a fragment identifier pointing
                   30410: at another part of the document. If there is a fragment identifier
                   30411: present, then the element with that ID in the target document must
                   30412: be a <code><a href="#datatemplate0">datatemplate</a></code>
                   30413: element, otherwise, the root element must be a <code><a href=
                   30414: "#datatemplate0">datatemplate</a></code> element.</p>
                   30415: <p>The <dfn id="template0" title=
                   30416: "dom-template"><code>template</code></dfn> DOM attribute must
                   30417: <a href="#reflect">reflect</a> the <code title=
                   30418: "attr-template"><a href="#template">template</a></code> content
                   30419: attribute.</p>
                   30420: <p>The <dfn id="ref" title="attr-ref"><code>ref</code></dfn>
                   30421: attribute may be specified on any element on which the <code title=
                   30422: "attr-template"><a href="#template">template</a></code> attribute
                   30423: is specified. If it is specified, it must be a URI to an XML or
                   30424: HTML document, or a fragment identifier pointing at another part of
                   30425: the document.</p>
                   30426: <p>When an element has a <code title="attr-template"><a href=
                   30427: "#template">template</a></code> attribute but no <code title=
                   30428: "attr-ref"><a href="#ref">ref</a></code> attribute, the element
                   30429: may, instead of its usual content model, have a single element of
                   30430: any kind. That element is then used as the root node of the data
                   30431: for the template.</p>
                   30432: <p>The <dfn id="ref0" title="dom-ref"><code>ref</code></dfn> DOM
                   30433: attribute must <a href="#reflect">reflect</a> the <code title=
                   30434: "attr-ref"><a href="#ref">ref</a></code> content attribute.</p>
                   30435: <p>The <dfn id="registrationmark" title=
                   30436: "attr-registrationmark"><code>registrationmark</code></dfn>
                   30437: attribute may be specified on any element that is a descendant of a
                   30438: <code><a href="#rule">rule</a></code> element, except
                   30439: <code><a href="#nest">nest</a></code> elements. Its value may be
                   30440: any string, including the empty string (which is the value that is
                   30441: assumed if the attribute is omitted). This attribute performs a
                   30442: role similar to registration marks in printing presses: when the
                   30443: generated content is regenerated, elements with the same
                   30444: <code title="attr-registrationmark"><a href=
                   30445: "#registrationmark">registrationmark</a></code> are lined up. This
                   30446: allows the author to disambiguate how elements should be moved
                   30447: around when generated content is regenerated in the face of changes
                   30448: to the data tree.</p>
                   30449: <p>The <dfn id="registrationmark0" title=
                   30450: "dom-registrationMark"><code>registrationMark</code></dfn> DOM
                   30451: attribute must <a href="#reflect">reflect</a> the <code title=
                   30452: "attr-registrationmark"><a href=
                   30453: "#registrationmark">registrationmark</a></code> content
                   30454: attribute.</p>
                   30455: <h4 id="processing1"><span class="secno"><del class=
                   30456: "diff-old">3.19.6.</del> <ins class="diff-chg">3.17.6</ins></span>
                   30457: Processing model</h4>
                   30458: <h5 id="the-originalcontent"><span class="secno"><del class=
                   30459: "diff-old">3.19.6.1.</del> <ins class=
                   30460: "diff-chg">3.17.6.1.</ins></span> The <code title=
                   30461: "dom-originalContent"><a href=
                   30462: "#originalcontent">originalContent</a></code> DOM attribute</h5>
                   30463: <p>The <dfn id="originalcontent" title=
                   30464: "dom-originalContent"><code>originalContent</code></dfn> is set to
                   30465: a <code>DocumentFragment</code> to hold the original children of an
                   30466: element that has been replaced by content generated for a data
                   30467: template. Initially, it must be null. Its value is set when the
                   30468: <code title="attr-template"><a href="#template">template</a></code>
                   30469: attribute is set to a usable value, and is unset when the attribute
                   30470: is removed.</p>
                   30471: <p class="note">The <code title="dom-originalContent"><a href=
                   30472: "#originalcontent">originalContent</a></code> DOM attribute can
                   30473: thus be used as an indicator of whether a template is currently
                   30474: being applied, just as the <code title=
                   30475: "dom-templateElement"><a href=
                   30476: "#templateelement">templateElement</a></code> DOM attribute
                   30477: can.</p>
                   30478: <h5 id="the-template"><span class="secno"><del class=
                   30479: "diff-old">3.19.6.2.</del> <ins class=
                   30480: "diff-chg">3.17.6.2.</ins></span> The <code title=
                   30481: "attr-template"><a href="#template">template</a></code>
                   30482: attribute</h5>
                   30483: <p><dfn id="setting" title=
                   30484: "datatemplate-template-set">Setting</dfn> : When an <a href=
                   30485: "#html-elements" title="HTML elements">HTML element</a> without a
                   30486: <code title="attr-template"><a href="#template">template</a></code>
                   30487: attribute has its <code title="attr-template"><a href=
                   30488: "#template">template</a></code> attribute set, the user agent must
                   30489: fetch the specified file and parse it (without a <a href=
                   30490: "#browsing1">browsing context <del class="diff-old">, and with
                   30491: scripting disabled</del></a> ) to obtain a DOM. If the URI is the
                   30492: same as the URI of the current document, then the current
                   30493: document's DOM must be assumed to be that parsed DOM. While this
                   30494: loading and parsing is in progress, the element is said to be
                   30495: <em>busy loading the template rules or data</em> .</p>
                   30496: <p>If the resource specified by the <code title=
                   30497: "attr-template"><a href="#template">template</a></code> attribute
                   30498: is not the current document and does not have an XML MIME type, or
                   30499: if an XML parse error is found while parsing the resource, then the
                   30500: resource cannot be successfully parsed, and the user agent must
                   30501: jump to the <a href="#failed" title=
                   30502: "datatemplate-template-failed">failed to parse</a> steps below.</p>
                   30503: <p>Once the DOM in question has been parsed, assuming that it
                   30504: indeed can be parsed and does so successfully, the user agent must
                   30505: wait for no scripts to be executing, and as soon as that
                   30506: opportunity arises, run the following algorithm:</p>
                   30507: <ol>
                   30508: <li>
                   30509: <p>If the <code title="attr-template"><a href=
                   30510: "#template">template</a></code> attribute's value has a fragment
                   30511: identifier, and, in the DOM in question, it identifies a
                   30512: <code><a href="#datatemplate0">datatemplate</a></code> element,
                   30513: then set the <code title="dom-templateElement"><a href=
                   30514: "#templateelement">templateElement</a></code> DOM attribute to that
                   30515: element.</p>
                   30516: <p>Otherwise, if the <code title="attr-template"><a href=
                   30517: "#template">template</a></code> attribute value does not have a
                   30518: fragment identifier, and the root element of the DOM in question is
                   30519: a <code><a href="#datatemplate0">datatemplate</a></code> element,
                   30520: then set the <code title="dom-templateElement"><a href=
                   30521: "#templateelement">templateElement</a></code> DOM attribute to that
                   30522: element.</p>
                   30523: <p>Otherwise, jump to the <a href="#failed" title=
                   30524: "datatemplate-template-failed">failed to parse</a> steps below.</p>
                   30525: </li>
                   30526: <li>
                   30527: <p>Create a new <code>DocumentFragment</code> and move all the
                   30528: nodes that are children of the element to that
                   30529: <code>DocumentFragment</code> object. Set the <code title=
                   30530: "dom-originalContent"><a href=
                   30531: "#originalcontent">originalContent</a></code> DOM attribute on the
                   30532: element to this new <code>DocumentFragment</code> object.</p>
                   30533: </li>
                   30534: <li>
                   30535: <p>Jump to the steps below for <a href="#update" title=
                   30536: "datatemplate-regen">updating the generated content</a> .</p>
                   30537: </li>
                   30538: </ol>
                   30539: <p>If the resource has <dfn id="failed" title=
                   30540: "datatemplate-template-failed">failed to parse</dfn> , the user
                   30541: agent must <a href="#firing2">fire a simple event</a> with the name
                   30542: <code title="event-error"><a href="#error1">error</a></code> at the
                   30543: element on which the <code title="attr-template"><a href=
                   30544: "#template">template</a></code> attribute was found.</p>
                   30545: <p><dfn id="unsetting" title=
                   30546: "datatemplate-template-unset">Unsetting</dfn> : When an <a href=
                   30547: "#html-elements" title="HTML elements">HTML element</a> with a
                   30548: <code title="attr-template"><a href="#template">template</a></code>
                   30549: attribute has its <code title="attr-template"><a href=
                   30550: "#template">template</a></code> attribute removed or dynamically
                   30551: changed from one value to another, the user agent must run the
                   30552: following algorithm:</p>
                   30553: <ol>
                   30554: <li>
                   30555: <p>Set the <code title="dom-templateElement"><a href=
                   30556: "#templateelement">templateElement</a></code> DOM attribute to
                   30557: null.</p>
                   30558: </li>
                   30559: <li>
                   30560: <p>If the <code title="dom-originalContent"><a href=
                   30561: "#originalcontent">originalContent</a></code> DOM attribute of the
                   30562: element is not null, run these substeps:</p>
                   30563: <ol>
                   30564: <li>
                   30565: <p>Remove all the nodes that are children of the element.</p>
                   30566: </li>
                   30567: <li>
                   30568: <p>Append the nodes in the <code title=
                   30569: "dom-originalContent"><a href=
                   30570: "#originalcontent">originalContent</a></code>
                   30571: <code>DocumentFragment</code> to the element.</p>
                   30572: </li>
                   30573: <li>
                   30574: <p>Set <code title="dom-originalContent"><a href=
                   30575: "#originalcontent">originalContent</a></code> to null.</p>
                   30576: </li>
                   30577: </ol>
                   30578: <p>(If the <code title="dom-originalContent"><a href=
                   30579: "#originalcontent">originalContent</a></code> DOM attribute of the
                   30580: element is null, then either there was an error loading or parsing
                   30581: the previous template, or the previous template never finished
                   30582: loading; in either case, there is nothing to undo.)</p>
                   30583: </li>
                   30584: <li>
                   30585: <p>If the <code title="attr-template"><a href=
                   30586: "#template">template</a></code> attribute was changed (as opposed
                   30587: to simply removed), then <a href="#setting" title=
                   30588: "datatemplate-template-set">act as if it was now set to its new
                   30589: value</a> (fetching the specified page, etc, as described
                   30590: above).</p>
                   30591: </li>
                   30592: </ol>
                   30593: <p>The <dfn id="templateelement" title=
                   30594: "dom-templateElement"><code>templateElement</code></dfn> DOM
                   30595: attribute is updated by the above algorithm to point to the
                   30596: currently active <code><a href=
                   30597: "#datatemplate0">datatemplate</a></code> element. Initially, the
                   30598: attribute must have the value null.</p>
                   30599: <h5 id="the-ref"><span class="secno"><del class=
                   30600: "diff-old">3.19.6.3.</del> <ins class=
                   30601: "diff-chg">3.17.6.3.</ins></span> The <code title=
                   30602: "attr-ref"><a href="#ref">ref</a></code> attribute</h5>
                   30603: <p><dfn id="setting0" title="datatemplate-ref-set">Setting</dfn> :
                   30604: When an <a href="#html-elements" title="HTML elements">HTML
                   30605: element</a> without a <code title="attr-ref"><a href=
                   30606: "#ref">ref</a></code> attribute has its <code title=
                   30607: "attr-ref"><a href="#ref">ref</a></code> attribute set, the user
                   30608: agent must fetch the specified file and parse it (without a
                   30609: <a href="#browsing1">browsing context <del class="diff-old">, and
                   30610: with scripting disabled</del></a> ) to obtain a DOM. If the URI is
                   30611: the same as the URI of the current <del class="diff-old">document
                   30612: ,</del> <ins class="diff-chg">document,</ins> then the current
                   30613: document's DOM is assumed to be that parsed DOM. While this loading
                   30614: and parsing is in progress, the element is said to be <em>busy
                   30615: loading the template rules or data</em> .</p>
                   30616: <p>If the resource specified by the <code title="attr-ref"><a href=
                   30617: "#ref">ref</a></code> attribute is not the current document and
                   30618: does not have an XML MIME type, or if an XML parse error is found
                   30619: while parsing the resource, then the resource cannot be
                   30620: successfully parsed, and the user agent must jump to the <a href=
                   30621: "#failed0" title="datatemplate-ref-failed">failed to parse</a>
                   30622: steps below.</p>
                   30623: <p>Once the DOM in question has been parsed, assuming that it
                   30624: indeed can be parsed and does so successfully, the user agent must
                   30625: wait for no scripts to be executing, and as soon as that
                   30626: opportunity arises, run the following algorithm:</p>
                   30627: <ol>
                   30628: <li>
                   30629: <p>If the <code title="attr-ref"><a href="#ref">ref</a></code>
                   30630: attribute value does not have a fragment identifier, then set the
                   30631: <code title="dom-refNode"><a href="#refnode">refNode</a></code> DOM
                   30632: attribute to the <code>Document</code> node of that DOM.</p>
                   30633: <p>Otherwise, if the <code title="attr-ref"><a href=
                   30634: "#ref">ref</a></code> attribute's value has a fragment identifier,
                   30635: and, in the DOM in question, that fragment identifier identifies an
                   30636: element, then set the <code title="dom-refNode"><a href=
                   30637: "#refnode">refNode</a></code> DOM attribute to that element.</p>
                   30638: <p>Otherwise, jump to the <a href="#failed0" title=
                   30639: "datatemplate-ref-failed">failed to parse</a> steps below.</p>
                   30640: </li>
                   30641: <li>
                   30642: <p>Jump to the steps below for <a href="#update" title=
                   30643: "datatemplate-regen">updating the generated content</a> .</p>
                   30644: </li>
                   30645: </ol>
                   30646: <p>If the resource has <dfn id="failed0" title=
                   30647: "datatemplate-ref-failed">failed to parse</dfn> , the user agent
                   30648: must <a href="#firing2">fire a simple event</a> with the name
                   30649: <code title="event-error"><a href="#error1">error</a></code> at the
                   30650: element on which the <code title="attr-ref"><a href=
                   30651: "#ref">ref</a></code> attribute was found, and must then jump to
                   30652: the steps below for <a href="#update" title=
                   30653: "datatemplate-regen">updating the generated content</a> (the
                   30654: contents of the element will be used instead of the specified
                   30655: resource).</p>
                   30656: <p><dfn id="unsetting0" title=
                   30657: "datatemplate-ref-unset">Unsetting</dfn> : When an <a href=
                   30658: "#html-elements" title="HTML elements">HTML element</a> with a
                   30659: <code title="attr-ref"><a href="#ref">ref</a></code> attribute has
                   30660: its <code title="attr-ref"><a href="#ref">ref</a></code> attribute
                   30661: removed or dynamically changed from one value to another, the user
                   30662: agent must run the following algorithm:</p>
                   30663: <ol>
                   30664: <li>
                   30665: <p>Set the <code title="dom-refNode"><a href=
                   30666: "#refnode">refNode</a></code> DOM attribute to null.</p>
                   30667: </li>
                   30668: <li>
                   30669: <p>If the <code title="attr-ref"><a href="#ref">ref</a></code>
                   30670: attribute was changed (as opposed to simply removed), then <a href=
                   30671: "#setting0" title="datatemplate-ref-set">act as if it was now set
                   30672: to its new value</a> (fetching the specified page, etc, as
                   30673: described above). Otherwise, jump to the steps below for <a href=
                   30674: "#update" title="datatemplate-regen">updating the generated
                   30675: content</a> .</p>
                   30676: </li>
                   30677: </ol>
                   30678: <p>The <dfn id="refnode" title=
                   30679: "dom-refNode"><code>refNode</code></dfn> DOM attribute is updated
                   30680: by the above algorithm to point to the current data tree, if one is
                   30681: specified explicitly. If it is null, then the data tree is given by
                   30682: the <code title="dom-originalContent"><a href=
                   30683: "#originalcontent">originalContent</a></code> DOM attribute, unless
                   30684: that is also null, in which case no template is currently being
                   30685: applied. Initially, the attribute must have the value null.</p>
                   30686: <h5 id="the-nodedatatemplate"><span class="secno"><del class=
                   30687: "diff-old">3.19.6.4.</del> <ins class=
                   30688: "diff-chg">3.17.6.4.</ins></span> The <code><a href=
                   30689: "#nodedatatemplate">NodeDataTemplate</a></code> interface</h5>
                   30690: <p>All objects that implement the <code>Node</code> interface must
                   30691: also implement the <code><a href=
                   30692: "#nodedatatemplate">NodeDataTemplate</a></code> interface, whose
                   30693: members must be accessible using binding-specific casting
                   30694: mechanisms.</p>
                   30695: <pre class="idl">
                   30696: interface <dfn id="nodedatatemplate">NodeDataTemplate</dfn> {
                   30697:   readonly attribute Node <a href="#datanode" title=
                   30698: "dom-dataNode">dataNode</a>;
                   30699: };
                   30700: </pre>
                   30701: <p>The <dfn id="datanode" title=
                   30702: "dom-dataNode"><code>dataNode</code></dfn> DOM attribute returns
                   30703: the node for which <em>this</em> node was generated. It must
                   30704: initially be null. It is set on the nodes that form the content
                   30705: generated during the <a href="#update" title=
                   30706: "datatemplate-regen">algorithm for updating the generated
                   30707: content</a> of elements that are using the data template
                   30708: feature.</p>
                   30709: <h5 id="mutations"><span class="secno"><del class=
                   30710: "diff-old">3.19.6.5.</del> <ins class=
                   30711: "diff-chg">3.17.6.5.</ins></span> Mutations</h5>
                   30712: <p>An element with a non-null <code title=
                   30713: "dom-templateElement"><a href=
                   30714: "#templateelement">templateElement</a></code> is said to be a
                   30715: <dfn id="data-tree">data tree user</dfn> of the node identified by
                   30716: the element's <code title="dom-refNode"><a href=
                   30717: "#refnode">refNode</a></code> attribute, as well as all of that
                   30718: node's children, or, if that attribute is null, of the node
                   30719: identified by the element's <code title=
                   30720: "dom-originalContent"><a href=
                   30721: "#originalcontent">originalContent</a></code> , as well as all
                   30722: <em>that</em> node's children.</p>
                   30723: <p>Nodes that have one or more <a href="#data-tree" title=
                   30724: "data tree user">data tree users</a> associated with them (as per
                   30725: the previous paragraph) are themselves termed <dfn id="data-tree0"
                   30726: title="data tree component node">data tree component nodes</dfn>
                   30727: .</p>
                   30728: <p>Whenever a <a href="#data-tree0">data tree component node</a>
                   30729: changes its name or value, or has one of its attributes change name
                   30730: or value, or has an attribute added or removed, or has a child
                   30731: added or removed, the user agent must <span>update the generated
                   30732: content</span> of all of that node's <a href="#data-tree" title=
                   30733: "data tree user">data tree users</a> .</p>
                   30734: <p>An element with a non-null <code title=
                   30735: "dom-templateElement"><a href=
                   30736: "#templateelement">templateElement</a></code> is also said to be a
                   30737: <dfn id="template1">template tree user</dfn> of the node identified
                   30738: by the element's <code title="dom-templateElement"><a href=
                   30739: "#templateelement">templateElement</a></code> attribute, as well as
                   30740: all of that node's children.</p>
                   30741: <p>Nodes that have one or more <a href="#template1" title=
                   30742: "template tree user">template tree users</a> associated with them
                   30743: (as per the previous paragraph) are themselves termed <dfn id=
                   30744: "template2" title="template tree component node">template tree
                   30745: component nodes</dfn> .</p>
                   30746: <p>Whenever a <a href="#template2">template tree component node</a>
                   30747: changes its name or value, or has one of its attributes change name
                   30748: or value, or has an attribute added or removed, or has a child
                   30749: added or removed, the user agent must <span>update the generated
                   30750: content</span> of all of that node's <a href="#template1" title=
                   30751: "template tree user">template tree users</a> .</p>
                   30752: <p class="note">In other words, user agents update the content
                   30753: generated from a template whenever either the backing data changes
                   30754: or the template itself changes.</p>
                   30755: <h5 id="updating0"><span class="secno"><del class=
                   30756: "diff-old">3.19.6.6.</del> <ins class=
                   30757: "diff-chg">3.17.6.6.</ins></span> Updating the generated
                   30758: content</h5>
                   30759: <p>When the user agent is to <dfn id="update" title=
                   30760: "datatemplate-regen">update the generated content</dfn> of an
                   30761: element that uses a template, the user agent must run the following
                   30762: steps:</p>
                   30763: <ol>
                   30764: <li>
                   30765: <p>Let <var title="">destination</var> be the element whose
                   30766: generated content is being updated.</p>
                   30767: </li>
                   30768: <li>
                   30769: <p>If the <var title="">destination</var> element is <em>busy
                   30770: loading the template rules or data</em> , then abort these steps.
                   30771: Either the steps will be invoked again once the loading has
                   30772: completed, or the loading will fail and the generated content will
                   30773: be removed at that point.</p>
                   30774: </li>
                   30775: <li>
                   30776: <p>Let <var title="">template tree</var> be the element given by
                   30777: <var title="">destination</var> 's <code title=
                   30778: "dom-templateElement"><a href=
                   30779: "#templateelement">templateElement</a></code> DOM attribute. If it
                   30780: is null, then abort these steps. There are no rules to apply.</p>
                   30781: </li>
                   30782: <li>
                   30783: <p>Let <var title="">data tree</var> be the node given by
                   30784: <var title="">destination</var> 's <code title=
                   30785: "dom-refNode"><a href="#refnode">refNode</a></code> DOM attribute.
                   30786: If it is null, then let <var title="">data tree</var> be the node
                   30787: given by the <code title="dom-originalContent"><a href=
                   30788: "#originalcontent">originalContent</a></code> DOM node.</p>
                   30789: </li>
                   30790: <li>
                   30791: <p>Let <var title="">existing nodes</var> be a set of ordered lists
                   30792: of nodes, each list being identified by a tuple consisting of a
                   30793: node, a node type and name, and a <a href="#registrationmark"
                   30794: title="attr-registrationmark">registration mark</a> (a string).</p>
                   30795: </li>
                   30796: <li>
                   30797: <p>For each node <var title="">node</var> that is a descendant of
                   30798: <var title="">destination</var> , if any, add <var title=
                   30799: "">node</var> to the list identified by the tuple given by:
                   30800: <var title="">node</var> 's <code title="dom-dataNode"><a href=
                   30801: "#datanode">dataNode</a></code> DOM attribute; the <var title=
                   30802: "">node</var> 's node type and, if it's an element, its qualified
                   30803: name (that is, its namespace and local name), or, if it's a
                   30804: processing instruction, its target name , and the value of the
                   30805: <var title="">node</var> 's <code title=
                   30806: "attr-registrationmark"><a href=
                   30807: "#registrationmark">registrationmark</a></code> attribute, if it
                   30808: has one, or the empty string otherwise.</p>
                   30809: </li>
                   30810: <li>
                   30811: <p>Remove all the child nodes of <var title="">destination</var> ,
                   30812: so that its child node list is empty.</p>
                   30813: </li>
                   30814: <li>
                   30815: <p>Run the <a href="#levenberg">Levenberg data node algorithm</a>
                   30816: (described below) using <var title="">destination</var> as the
                   30817: destination node, <var title="">data tree</var> as the source node,
                   30818: <var title="">template tree</var> as the rule container, the empty
                   30819: string as the mode, and the <var title="">existing nodes</var>
                   30820: lists as the lists of existing nodes.</p>
                   30821: </li>
                   30822: </ol>
                   30823: <p>The Levenberg algorithm consists of two algorithms that invoke
                   30824: each other recursively, the <a href="#levenberg">Levenberg data
                   30825: node algorithm</a> and the <a href="#levenberg0">Levenberg template
                   30826: node algorithm</a> . These algorithms use the data structures
                   30827: <del class="diff-old">initialised</del> <ins class=
                   30828: "diff-chg">initialized</ins> by the set of steps described
                   30829: above.</p>
                   30830: <p>The <dfn id="levenberg">Levenberg data node algorithm</dfn> is
                   30831: as follows. It is always invoked with three DOM nodes, one string,
                   30832: and a set of lists as arguments: the <var title="">destination
                   30833: node</var> , the <var title="">source node</var> , the <var title=
                   30834: "">rule container</var> , the <var title="">mode string</var> , and
                   30835: the <var title="">existing nodes lists</var> respectively.</p>
                   30836: <ol>
                   30837: <li>
                   30838: <p>Let <var title="">condition</var> be the first <code><a href=
                   30839: "#rule">rule</a></code> element child of the <var title="">rule
                   30840: container</var> element, or null if there aren't any.</p>
                   30841: </li>
                   30842: <li>
                   30843: <p>If <var title="">condition</var> is null, follow these
                   30844: substeps:</p>
                   30845: <ol>
                   30846: <li>
                   30847: <p>If the <var title="">source node</var> is an element, then, for
                   30848: each child <var title="">child node</var> of the <var title=
                   30849: "">source node</var> element, in tree order, invoke the <a href=
                   30850: "#levenberg">Levenberg data node algorithm</a> recursively, with
                   30851: <var title="">destination node</var> , <var title="">child
                   30852: node</var> , <var title="">rule container</var> , the empty string,
                   30853: and <var title="">existing nodes lists</var> as the five arguments
                   30854: respectively.</p>
                   30855: </li>
                   30856: <li>
                   30857: <p>Abort the current instance of the <a href="#levenberg">Levenberg
                   30858: data node algorithm</a> , returning to whatever algorithm invoked
                   30859: it.</p>
                   30860: </li>
                   30861: </ol>
                   30862: </li>
                   30863: <li>
                   30864: <p>Let <var title="">matches</var> be a boolean with the value
                   30865: true.</p>
                   30866: </li>
                   30867: <li>
                   30868: <p>If the <var title="">condition</var> element has a <code title=
                   30869: "attr-rule-mode"><a href="#mode">mode</a></code> attribute, but the
                   30870: value of that attribute is not a <span>mode match</span> for the
                   30871: current <span>mode string</span> , then let <var title=
                   30872: "">matches</var> be false.</p>
                   30873: </li>
                   30874: <li>
                   30875: <p>If the <var title="">condition</var> element has a <code title=
                   30876: "attr-rule-condition"><a href="#condition">condition</a></code>
                   30877: attribute, and the attribute's value, when <a href=
                   30878: "#evaluated">evaluated as a selector</a> , does not match the
                   30879: current <var title="">source node</var> , then let <var title=
                   30880: "">matches</var> be false.</p>
                   30881: </li>
                   30882: <li>
                   30883: <p>If <var title="">matches</var> is true, then follow these
                   30884: substeps:</p>
                   30885: <ol>
                   30886: <li>
                   30887: <p>For each child <var title="">child node</var> of the <var title=
                   30888: "">condition</var> element, in tree order, invoke the <a href=
                   30889: "#levenberg0">Levenberg template node algorithm</a> recursively,
                   30890: with the five arguments being <var title="">destination node</var>
                   30891: , <var title="">source node</var> , <var title="">rule
                   30892: container</var> , <var title="">child node</var> , and <var title=
                   30893: "">existing nodes lists</var> respectively.</p>
                   30894: </li>
                   30895: <li>
                   30896: <p>Abort the current instance of the <a href="#levenberg">Levenberg
                   30897: data node algorithm</a> , returning to whatever algorithm invoked
                   30898: it.</p>
                   30899: </li>
                   30900: </ol>
                   30901: </li>
                   30902: <li>
                   30903: <p>Let <var title="">condition</var> be the next <code><a href=
                   30904: "#rule">rule</a></code> element that is a child of the <var title=
                   30905: "">rule container</var> element, after the <var title=
                   30906: "">condition</var> element itself, or null if there are no more
                   30907: <code><a href="#rule">rule</a></code> elements.</p>
                   30908: </li>
                   30909: <li>
                   30910: <p>Jump to step 2 in this set of steps.</p>
                   30911: </li>
                   30912: </ol>
                   30913: <p>The <dfn id="levenberg0">Levenberg template node algorithm</dfn>
                   30914: is as follows. It is always invoked with four DOM nodes and a set
                   30915: of lists as arguments: the <var title="">destination node</var> ,
                   30916: the <var title="">source node</var> , the <var title="">rule
                   30917: container</var> , the <var title="">template node</var> , and the
                   30918: <var title="">existing nodes lists</var> respectively.</p>
                   30919: <ol>
                   30920: <li>
                   30921: <p>If <var title="">template node</var> is a comment node, abort
                   30922: the current instance of the <a href="#levenberg0">Levenberg
                   30923: template node algorithm</a> , returning to whatever algorithm
                   30924: invoked it.</p>
                   30925: </li>
                   30926: <li>
                   30927: <p>If <var title="">template node</var> is a <code><a href=
                   30928: "#nest">nest</a></code> element, then run these substeps:</p>
                   30929: <ol>
                   30930: <li>
                   30931: <p>If <var title="">source node</var> is not an element, then abort
                   30932: the current instance of the <a href="#levenberg0">Levenberg
                   30933: template node algorithm</a> , returning to whatever algorithm
                   30934: invoked it.</p>
                   30935: </li>
                   30936: <li>
                   30937: <p>If the <var title="">template node</var> has a <code title=
                   30938: "attr-nest-mode"><a href="#mode1">mode</a></code> attribute, then
                   30939: let <var title="">mode</var> be the value of that attribute;
                   30940: otherwise, let <var title="">mode</var> be the empty string.</p>
                   30941: </li>
                   30942: <li>
                   30943: <p>Let <var title="">child node</var> be the first child of the
                   30944: <var title="">source node</var> element, or null if <var title=
                   30945: "">source node</var> has no children.</p>
                   30946: </li>
                   30947: <li>
                   30948: <p>If <var title="">child node</var> is null, abort the current
                   30949: instance of the <a href="#levenberg0">Levenberg template node
                   30950: algorithm</a> , returning to whatever algorithm invoked it.</p>
                   30951: </li>
                   30952: <li>
                   30953: <p>If the <var title="">template node</var> element has a
                   30954: <code title="attr-nest-filter"><a href="#filter">filter</a></code>
                   30955: attribute, and the attribute's value, when <a href=
                   30956: "#evaluated">evaluated as a selector</a> , matches <var title=
                   30957: "">child node</var> , then invoke the <a href=
                   30958: "#levenberg">Levenberg data node algorithm</a> recursively, with
                   30959: <var title="">destination node</var> , <var title="">child
                   30960: node</var> , <var title="">rule container</var> , <var title=
                   30961: "">mode</var> , and <var title="">existing nodes lists</var> as the
                   30962: five arguments respectively.</p>
                   30963: </li>
                   30964: <li>
                   30965: <p>Let <var title="">child node</var> be <var title="">child
                   30966: node</var> 's next sibling, or null if <var title="">child
                   30967: node</var> was the last node of <var title="">source node</var>
                   30968: .</p>
                   30969: </li>
                   30970: <li>
                   30971: <p>Return to step 4 in this set of substeps.</p>
                   30972: </li>
                   30973: </ol>
                   30974: </li>
                   30975: <li>
                   30976: <p>If <var title="">template node</var> is an element, and that
                   30977: element has a <code title="attr-registrationmark"><a href=
                   30978: "#registrationmark">registrationmark</a></code> attribute, then let
                   30979: <var title="">registration mark</var> have the value of that
                   30980: attribute. Otherwise, let <var title="">registration mark</var> be
                   30981: the empty string.</p>
                   30982: </li>
                   30983: <li>
                   30984: <p>If there is a list in the <var title="">existing nodes
                   30985: lists</var> corresponding to the tuple ( <var title="">source
                   30986: node</var> , the node type and name of <var title="">template
                   30987: node</var> , <var title="">registration mark</var> ), and that list
                   30988: is not empty, then run the following substeps. (For an element
                   30989: node, the name of the node is its qualified tag name, i.e. its
                   30990: namespace and local name. For a processing instruction, its name is
                   30991: the target. For other types of nodes, there is no name.)</p>
                   30992: <ol>
                   30993: <li>
                   30994: <p>Let <var title="">new node</var> be the first node in that
                   30995: list.</p>
                   30996: </li>
                   30997: <li>
                   30998: <p>Remove <var title="">new node</var> from that list.</p>
                   30999: </li>
                   31000: <li>
                   31001: <p>If <var title="">new node</var> is an element, remove all the
                   31002: child nodes of <var title="">new node</var> , so that its child
                   31003: node list is empty.</p>
                   31004: </li>
                   31005: </ol>
                   31006: <p>Otherwise, if there is no matching list, or there was, but it is
                   31007: now empty, then run these steps instead:</p>
                   31008: <ol>
                   31009: <li>
                   31010: <p>Let <var title="">new node</var> be a shallow clone of
                   31011: <var title="">template node</var> .</p>
                   31012: </li>
                   31013: <li>
                   31014: <p>Let <var title="">new node</var> 's <code title=
                   31015: "dom-dataNode"><a href="#datanode">dataNode</a></code> DOM
                   31016: attribute be <var title="">source node</var> .</p>
                   31017: </li>
                   31018: </ol>
                   31019: </li>
                   31020: <li>
                   31021: <p>If <var title="">new node</var> is an element, run these
                   31022: substeps:</p>
                   31023: <ol>
                   31024: <li>
                   31025: <p>For each attribute on <var title="">new node</var> , if an
                   31026: attribute with the same qualified name is not present on
                   31027: <var title="">template node</var> , remove that attribute.</p>
                   31028: </li>
                   31029: <li>
                   31030: <p>For each attribute <var title="">attribute</var> on <var title=
                   31031: "">template node</var> , run these substeps:</p>
                   31032: <ol>
                   31033: <li>
                   31034: <p>Let <var title="">expanded</var> be the result of passing the
                   31035: value of <var title="">attribute</var> to the <a href=
                   31036: "#text-expansion">text expansion algorithm for templates</a> along
                   31037: with <var title="">source node</var> .</p>
                   31038: </li>
                   31039: <li>
                   31040: <p>If an attribute with the same qualified name as <var title=
                   31041: "">attribute</var> is already present on <var title="">new
                   31042: node</var> , then: if its value is different from <var title=
                   31043: "">expanded</var> , replace its value with <var title=
                   31044: "">expanded</var> .</p>
                   31045: </li>
                   31046: <li>
                   31047: <p>Otherwise, if there is no attribute with the same qualified name
                   31048: as <var title="">attribute</var> on <var title="">new node</var> ,
                   31049: then add an attribute with the same namespace, prefix, and local
                   31050: name as <var title="">attribute</var> , with its value set to
                   31051: <var title="">expanded</var> 's.</p>
                   31052: </li>
                   31053: </ol>
                   31054: </li>
                   31055: </ol>
                   31056: <p>Otherwise, the <var title="">new node</var> is a text node,
                   31057: CDATA block, or PI. Run these substeps instead:</p>
                   31058: <ol>
                   31059: <li>
                   31060: <p>Let <var title="">expanded</var> be the result of passing the
                   31061: node value of <var title="">template node</var> (the content of the
                   31062: text node, CDATA block, or PI) to the <a href=
                   31063: "#text-expansion">text expansion algorithm for templates</a> along
                   31064: with <var title="">source node</var> .</p>
                   31065: </li>
                   31066: <li>
                   31067: <p>If the value of the <var title="">new node</var> is different
                   31068: from <var title="">expanded</var> , then set the value of
                   31069: <var title="">new node</var> to <var title="">expanded</var> .</p>
                   31070: </li>
                   31071: </ol>
                   31072: </li>
                   31073: <li>
                   31074: <p>Append <var title="">new node</var> to <var title=
                   31075: "">destination</var> .</p>
                   31076: </li>
                   31077: <li>
                   31078: <p>If <var title="">template node</var> is an element, then, for
                   31079: each child <var title="">child node</var> of the <var title=
                   31080: "">template node</var> element, in tree order, invoke the <a href=
                   31081: "#levenberg0">Levenberg template node algorithm</a> recursively,
                   31082: with the five arguments being <var title="">new child</var> ,
                   31083: <var title="">source node</var> , <var title="">rule
                   31084: container</var> , <var title="">child node</var> , and <var title=
                   31085: "">existing nodes lists</var> respectively.</p>
                   31086: </li>
                   31087: </ol>
                   31088: <p class="big-issue">Define: <dfn id="evaluated">evaluated as a
                   31089: selector</dfn></p>
                   31090: <p class="big-issue">Define: <dfn id="text-expansion">text
                   31091: expansion algorithm for templates</dfn></p>
                   31092: <h3 id="miscellaneous"><span class="secno"><del class=
                   31093: "diff-old">3.20.</del> <ins class="diff-chg">3.18</ins></span>
                   31094: Miscellaneous elements</h3>
                   31095: <h4 id="the-legend"><span class="secno"><del class=
                   31096: "diff-old">3.20.1.</del> <ins class="diff-chg">3.18.1</ins></span>
                   31097: The <dfn id="legend"><code>legend</code></dfn> element</h4>
                   31098: <dl class="element">
                   31099: <dt>Categories</dt>
                   31100: <dd>None.</dd>
                   31101: <dt>Contexts in which this element may be used:</dt>
                   31102: <dd>As the first child of a <code>fieldset</code> element.</dd>
                   31103: <dd>As the first child of a <code><a href=
                   31104: "#details">details</a></code> element.</dd>
                   31105: <dd>As a child of a <code><a href="#figure">figure</a></code>
                   31106: element, if there are no other <code><a href=
                   31107: "#legend">legend</a></code> element children of that element.</dd>
                   31108: <dt>Content model:</dt>
                   31109: <dd><a href="#phrasing0">Phrasing content</a> .</dd>
                   31110: <dt>Element-specific attributes:</dt>
                   31111: <dd>None.</dd>
                   31112: <dt>DOM interface:</dt>
                   31113: <dd><del class="diff-old">No difference from</del> <ins class=
                   31114: "diff-chg">Uses</ins> <code><a href=
                   31115: "#htmlelement">HTMLElement</a></code> .</dd>
                   31116: </dl>
                   31117: <p>The <code><a href="#legend">legend</a></code> element represents
                   31118: a title or explanatory caption for the rest of the contents of the
                   31119: <code><a href="#legend">legend</a></code> element's parent
                   31120: element.</p>
                   31121: <h4 id="the-div"><span class="secno"><del class=
                   31122: "diff-old">3.20.2.</del> <ins class="diff-chg">3.18.2</ins></span>
                   31123: The <dfn id="div"><code>div</code></dfn> element</h4>
                   31124: <dl class="element">
                   31125: <dt>Categories</dt>
                   31126: <dd>None.</dd>
                   31127: <dt>Contexts in which this element may be used:</dt>
                   31128: <dd>Where <del class="diff-old">prose</del> <a href=
                   31129: "#flow-content0"><ins class="diff-chg">flow</ins> content</a> is
                   31130: expected.</dd>
                   31131: <dt>Content model:</dt>
                   31132: <dd><del class="diff-old">Prose</del> <a href=
                   31133: "#flow-content0"><ins class="diff-chg">Flow</ins> content</a>
                   31134: .</dd>
                   31135: <dt>Element-specific attributes:</dt>
                   31136: <dd>None.</dd>
                   31137: <dt>DOM interface:</dt>
                   31138: <dd><del class="diff-old">No difference from</del> <ins class=
                   31139: "diff-chg">Uses</ins> <code><a href=
                   31140: "#htmlelement">HTMLElement</a></code> .</dd>
                   31141: </dl>
                   31142: <p>The <code><a href="#div">div</a></code> element represents
                   31143: nothing at all. It can be used with the <code title=
                   31144: "attr-class"><a href="#class">class</a></code> , <code title=
                   31145: "attr-lang"><a href="#lang">lang</a></code> / <code title=
                   31146: "attr-xml-lang"><a href="#xmllang">xml:lang</a></code> , and
                   31147: <code title="attr-title"><a href="#title">title</a></code>
                   31148: attributes to mark up semantics common to a group of consecutive
                   31149: elements.</p>
                   31150: <p class="big-issue">Allowing <code><a href="#div">div</a></code>
                   31151: elements to contain phrasing content makes it easy for authors to
                   31152: abuse <code><a href="#div">div</a></code> , using it with the
                   31153: <code>class=""</code> attribute to the point of not having any
                   31154: other elements in the markup. This is a disaster from an
                   31155: accessibility point of view, and it would be nice if we could
                   31156: somehow make such pages non-compliant without preventing people
                   31157: from using <code><a href="#div">div</a></code> s as the extension
                   31158: mechanism that they are, to handle things the spec can't otherwise
                   31159: do (like making new widgets).</p>
                   31160: <h2 id="web-browsers"><span class="secno">4.</span> Web
                   31161: browsers</h2>
                   31162: <p>This section describes features that apply most directly to Web
                   31163: browsers. Having said that, unless specified elsewhere, the
                   31164: requirements defined in this section <em>do</em> apply to all user
                   31165: agents, whether they are Web browsers or not.</p>
                   31166: <h3 id="windows"><span class="secno"><del class=
                   31167: "diff-old">4.1.</del> <ins class="diff-chg">4.1</ins></span>
                   31168: Browsing contexts</h3>
                   31169: <p>A <dfn id="browsing1">browsing context</dfn> is a collection of
                   31170: one or more <code>Document</code> objects, and one or more <a href=
                   31171: "#view" title="view">views</a> .</p>
                   31172: <p>At any one time, one of the <code>Document</code> s in a
                   31173: <a href="#browsing1">browsing context</a> is the <dfn id=
                   31174: "active">active document</dfn> . The collection of
                   31175: <code>Document</code> s is the <a href="#browsing1">browsing
                   31176: context</a> 's <a href="#session">session history</a> .</p>
                   31177: <p>A <dfn id="view">view</dfn> is a user agent interface tied to a
                   31178: particular media used for the presentation of <code>Document</code>
                   31179: objects in some media. A view may be interactive. Each view is
                   31180: represented by an <code>AbstractView</code> object. Each view
                   31181: belongs to a <a href="#browsing1">browsing context</a> . <a href=
                   31182: "#references">[DOM2VIEWS]</a></p>
                   31183: <p class="note">The <code title="">document</code> attribute of an
                   31184: <code>AbstractView</code> object representing a <a href=
                   31185: "#view">view</a> gives the <code>Document</code> object of the
                   31186: view's <a href="#browsing1">browsing context</a> 's <a href=
                   31187: "#active">active document</a> . <a href=
                   31188: "#references">[DOM2VIEWS]</a></p>
                   31189: <p class="note">Events that use the <code>UIEvent</code> interface
                   31190: are related to a specific <a href="#view">view</a> (the view in
                   31191: which the event happened); the <code>AbstractView</code> of that
                   31192: view is given in the event object's <code title="">view</code>
                   31193: attribute. <a href="#references">[DOM3EVENTS]</a></p>
                   31194: <p class="note">A typical Web browser has one obvious <a href=
                   31195: "#view">view</a> per <a href="#browsing1">browsing context</a> :
                   31196: the browser's window (screen media). If a page is printed, however,
                   31197: a second view becomes evident, that of the print media. The two
                   31198: views always share the same underlying <code>Document</code> , but
                   31199: they have a different presentation of that document. A speech
                   31200: browser also establishes a browsing context, one with a view in the
                   31201: speech media.</p>
                   31202: <p class="note">A <code>Document</code> does not necessarily have a
                   31203: <a href="#browsing1">browsing context</a> associated with it. In
                   31204: particular, data mining tools are likely to never instantiate
                   31205: browsing contexts.</p>
                   31206: <p>The main <a href="#view">view</a> through which a user primarily
                   31207: interacts with a user agent is the <dfn id="default3">default
                   31208: view</dfn> .</p>
                   31209: <p class="note">The <a href="#default3">default view</a> of a
                   31210: <code>Document</code> is given by the <code title=
                   31211: "">defaultView</code> attribute on the <code>Document</code>
                   31212: object's <code>DocumentView</code> interface. <a href=
                   31213: "#references">[DOM3VIEWS]</a></p>
                   31214: <p>When a <a href="#browsing1">browsing context</a> is first
                   31215: created, it must be created with a single <code>Document</code> in
                   31216: its session history, whose <span title=
                   31217: "the document's address">address</span> is <code>about:blank</code>
                   31218: , which is marked as being an <a href="#html-" title=
                   31219: "HTML documents">HTML <del class="diff-old">documents .</del>
                   31220: <ins class="diff-chg">document</ins></a> ,<ins class="diff-chg">and
                   31221: whose</ins> <a href="#character1" title=
                   31222: "document's character encoding"><ins class="diff-chg">character
                   31223: encoding</ins></a> <ins class="diff-chg">is UTF-8.</ins> The
                   31224: <code>Document</code> must have a single child <code><a href=
                   31225: "#html">html</a></code> node, which itself has a single child
                   31226: <code><a href="#body0">body</a></code> node. If the <a href=
                   31227: "#browsing1">browsing context</a> is created specifically to be
                   31228: immediately navigated, then that initial navigation will have
                   31229: <a href="#replacement">replacement enabled</a> .</p>
                   31230: <p id="about-blank-origin"><ins class="diff-new">The</ins> <a href=
                   31231: "#origin0"><ins class="diff-new">origin</ins></a> <ins class=
                   31232: "diff-new">of the</ins> <code><ins class=
                   31233: "diff-new">about:blank</ins></code> <code><ins class=
                   31234: "diff-new">Document</ins></code> <ins class="diff-new">is set when
                   31235: the</ins> <code><ins class="diff-new">Document</ins></code>
                   31236: <ins class="diff-new">is created, in a manner dependent on whether
                   31237: the</ins> <a href="#browsing1"><ins class="diff-new">browsing
                   31238: context</ins></a> <ins class="diff-new">created is a</ins> <a href=
                   31239: "#nested0"><ins class="diff-new">nested browsing context</ins></a>
                   31240: ,<ins class="diff-new">as follows:</ins></p>
                   31241: <dl class="switch">
                   31242: <dt><ins class="diff-new">If the new</ins> <a href=
                   31243: "#browsing1"><ins class="diff-new">browsing context</ins></a>
                   31244: <ins class="diff-new">is a</ins> <a href="#nested0"><ins class=
                   31245: "diff-new">nested browsing context</ins></a></dt>
                   31246: <dd><ins class="diff-new">The</ins> <a href="#origin0"><ins class=
                   31247: "diff-new">origin</ins></a> <ins class="diff-new">of the</ins>
                   31248: <code><ins class="diff-new">about:blank</ins></code>
                   31249: <code><ins class="diff-new">Document</ins></code> <ins class=
                   31250: "diff-new">is the</ins> <a href="#origin0"><ins class=
                   31251: "diff-new">origin</ins></a> <ins class="diff-new">of the</ins>
                   31252: <a href="#active"><ins class="diff-new">active document</ins></a>
                   31253: <ins class="diff-new">of the new</ins> <a href=
                   31254: "#browsing1"><ins class="diff-new">browsing context</ins></a>
                   31255: <ins class="diff-new">'s</ins> <a href="#parent"><ins class=
                   31256: "diff-new">parent browsing context</ins></a> <ins class=
                   31257: "diff-new">at the time of its creation.</ins></dd>
                   31258: <dt><ins class="diff-new">If the new</ins> <a href=
                   31259: "#browsing1"><ins class="diff-new">browsing context</ins></a>
                   31260: <ins class="diff-new">is an</ins> <a href="#auxiliary0"><ins class=
                   31261: "diff-new">auxiliary browsing context</ins></a></dt>
                   31262: <dd><ins class="diff-new">The</ins> <a href="#origin0"><ins class=
                   31263: "diff-new">origin</ins></a> <ins class="diff-new">of the</ins>
                   31264: <code><ins class="diff-new">about:blank</ins></code>
                   31265: <code><ins class="diff-new">Document</ins></code> <ins class=
                   31266: "diff-new">is the</ins> <a href="#origin0"><ins class=
                   31267: "diff-new">origin</ins></a> <ins class="diff-new">of the</ins>
                   31268: <a href="#active"><ins class="diff-new">active document</ins></a>
                   31269: <ins class="diff-new">of the new</ins> <a href=
                   31270: "#browsing1"><ins class="diff-new">browsing context</ins></a>
                   31271: <ins class="diff-new">'s</ins> <a href="#opener"><ins class=
                   31272: "diff-new">opener browsing context</ins></a> <ins class=
                   31273: "diff-new">at the time of the new browsing context's
                   31274: creation.</ins></dd>
                   31275: <dt><ins class="diff-new">Otherwise</ins></dt>
                   31276: <dd><ins class="diff-new">The</ins> <a href="#origin0"><ins class=
                   31277: "diff-new">origin</ins></a> <ins class="diff-new">of the</ins>
                   31278: <code><ins class="diff-new">about:blank</ins></code>
                   31279: <code><ins class="diff-new">Document</ins></code> <ins class=
                   31280: "diff-new">is a globally unique identifier assigned when the
                   31281: new</ins> <a href="#browsing1"><ins class="diff-new">browsing
                   31282: context</ins></a> <ins class="diff-new">is created.</ins></dd>
                   31283: </dl>
                   31284: <h4 id="nested"><span class="secno"><del class=
                   31285: "diff-old">4.1.1.</del> <ins class="diff-chg">4.1.1</ins></span>
                   31286: Nested browsing contexts</h4>
                   31287: <p>Certain elements (for example, <code><a href=
                   31288: "#iframe">iframe</a></code> elements) can instantiate further
                   31289: <a href="#browsing1" title="browsing context">browsing contexts</a>
                   31290: . These are called <dfn id="nested0" title=
                   31291: "nested browsing context">nested browsing contexts</dfn> . If a
                   31292: browsing context <var title="">P</var> has an element in one of its
                   31293: <code>Document</code> s <var title="">D</var> that nests another
                   31294: browsing context <var title="">C</var> inside it, then <var title=
                   31295: "">P</var> is said to be the <dfn id="parent">parent browsing
                   31296: context</dfn> of <var title="">C</var> , <var title="">C</var> is
                   31297: said to be a <dfn id="child">child browsing context</dfn> of
                   31298: <var title="">P</var> , and <var title="">C</var> is said to be
                   31299: <dfn id="nested1" title="browsing context nested through">nested
                   31300: through</dfn> <var title="">D</var> .</p>
                   31301: <p><ins class="diff-new">A browsing context</ins> <var title=
                   31302: ""><ins class="diff-new">A</ins></var> <ins class="diff-new">is
                   31303: said to be an ancestor of a browsing context</ins> <var title=
                   31304: ""><ins class="diff-new">B</ins></var> <ins class="diff-new">if
                   31305: there exists a browsing context</ins> <var title=""><ins class=
                   31306: "diff-new">A'</ins></var> <ins class="diff-new">that is a</ins>
                   31307: <a href="#child"><ins class="diff-new">child browsing
                   31308: context</ins></a> <ins class="diff-new">of</ins> <var title=
                   31309: ""><ins class="diff-new">A</ins></var> <ins class="diff-new">and
                   31310: that is itself an ancestor of</ins> <var title=""><ins class=
                   31311: "diff-new">B</ins></var> ,<ins class="diff-new">or if there is a
                   31312: browsing context</ins> <var title=""><ins class=
                   31313: "diff-new">P</ins></var> <ins class="diff-new">that is a</ins>
                   31314: <a href="#child"><ins class="diff-new">child browsing
                   31315: context</ins></a> <ins class="diff-new">of</ins> <var title=
                   31316: ""><ins class="diff-new">A</ins></var> <ins class="diff-new">and
                   31317: that is the</ins> <a href="#parent"><ins class="diff-new">parent
                   31318: browsing context</ins></a> <ins class="diff-new">of</ins>
                   31319: <var title=""><ins class="diff-new">B</ins></var> .</p>
                   31320: <p>The browsing context with no <a href="#parent">parent browsing
                   31321: context</a> is the <dfn id="top-level">top-level browsing
                   31322: context</dfn> of all the browsing contexts <a href="#nested0"
                   31323: title="nested browsing context">nested</a> within it (either
                   31324: directly or indirectly through other nested browsing contexts).</p>
                   31325: <p><ins class="diff-new">The transitive closure of</ins> <a href=
                   31326: "#parent" title="parent browsing context"><ins class=
                   31327: "diff-new">parent browsing contexts</ins></a> <ins class=
                   31328: "diff-new">for a</ins> <a href="#nested0"><ins class=
                   31329: "diff-new">nested browsing context</ins></a> <ins class=
                   31330: "diff-new">gives the list of</ins> <dfn id="ancestor" title=
                   31331: "ancestor browsing context"><ins class="diff-new">ancestor browsing
                   31332: contexts</ins></dfn> .</p>
                   31333: <p>A <code>Document</code> is said to be <dfn id="fully">fully
                   31334: active</dfn> when it is the <a href="#active">active document</a>
                   31335: of its <a href="#browsing1">browsing context</a> , and either its
                   31336: browsing context is a <a href="#top-level">top-level browsing
                   31337: context</a> , or the <code>Document</code> <a href="#nested1"
                   31338: title="browsing context nested through">through which</a> that
                   31339: browsing context is <a href="#nested0" title=
                   31340: "nested browsing context">nested</a> is itself <a href=
                   31341: "#fully">fully active</a> .</p>
                   31342: <p>Because they are nested through an element, <a href="#child"
                   31343: title="child browsing context">child browsing contexts</a> are
                   31344: always tied to a specific <code>Document</code> in their <a href=
                   31345: "#parent">parent browsing context</a> . User agents must not allow
                   31346: the user to interact with <a href="#child" title=
                   31347: "child browsing context">child browsing contexts</a> of elements
                   31348: that are in <code>Document</code> s that are not themselves
                   31349: <a href="#fully">fully active</a> .</p>
                   31350: <p><ins class="diff-new">A</ins> <a href="#nested0"><ins class=
                   31351: "diff-new">nested browsing context</ins></a> <ins class=
                   31352: "diff-new">can have a</ins> <a href="#seamless0"><ins class=
                   31353: "diff-new">seamless browsing context flag</ins></a> <ins class=
                   31354: "diff-new">set, if it is embedded through an</ins> <code><a href=
                   31355: "#iframe"><ins class="diff-new">iframe</ins></a></code> <ins class=
                   31356: "diff-new">element with a</ins> <code title=
                   31357: "attr-iframe-seamless"><a href="#seamless"><ins class=
                   31358: "diff-new">seamless</ins></a></code> <ins class=
                   31359: "diff-new">attribute.</ins></p>
                   31360: <h4 id="auxiliary"><span class="secno"><del class=
                   31361: "diff-old">4.1.2.</del> <ins class="diff-chg">4.1.2</ins></span>
                   31362: Auxiliary browsing contexts</h4>
                   31363: <p>It is possible to create new browsing contexts that are related
                   31364: to a <span>top level browsing context</span> without being nested
                   31365: through an element. Such browsing contexts are called <dfn id=
                   31366: "auxiliary0" title="auxiliary browsing context">auxiliary browsing
                   31367: contexts</dfn> . Auxiliary browsing contexts are always <a href=
                   31368: "#top-level" title="top-level browsing context">top-level browsing
                   31369: contexts</a> .</p>
                   31370: <p>An <a href="#auxiliary0">auxiliary browsing context</a> has an
                   31371: <dfn id="opener">opener browsing context</dfn> , which is the
                   31372: <a href="#browsing1">browsing context</a> from which the <a href=
                   31373: "#auxiliary0">auxiliary browsing context</a> was created, and it
                   31374: has a <dfn id="furthest">furthest ancestor browsing context</dfn> ,
                   31375: which is the <a href="#top-level">top-level browsing context</a> of
                   31376: the <a href="#opener">opener browsing context</a> when the <a href=
                   31377: "#auxiliary0">auxiliary browsing context</a> was created.</p>
                   31378: <p>The <dfn id="opener0" title=
                   31379: "dom-opener"><code>opener</code></dfn> DOM attribute on the
                   31380: <code><a href="#window">Window</a></code> object must return the
                   31381: <code><a href="#window">Window</a></code> object of the <a href=
                   31382: "#browsing1">browsing context</a> from which the current browsing
                   31383: context was created (its <a href="#opener">opener browsing
                   31384: context</a> ), if there is one and it is still available.</p>
                   31385: <h4 id="secondary"><span class="secno"><del class=
                   31386: "diff-old">4.1.3.</del> <ins class="diff-chg">4.1.3</ins></span>
                   31387: Secondary browsing contexts</h4>
                   31388: <p>User agents may support <dfn id="secondary0" title=
                   31389: "secondary browsing context">secondary browsing contexts</dfn> ,
                   31390: which are <a href="#browsing1" title="browsing context">browsing
                   31391: contexts</a> that form part of the user agent's interface, apart
                   31392: from the main content area.</p>
                   31393: <h4 id="security2"><span class="secno"><ins class=
                   31394: "diff-new">4.1.4</ins></span> <ins class=
                   31395: "diff-new">Security</ins></h4>
                   31396: <p><ins class="diff-new">A</ins> <a href="#browsing1"><ins class=
                   31397: "diff-new">browsing context</ins></a> <var title=""><ins class=
                   31398: "diff-new">A</ins></var> <ins class="diff-new">is</ins> <dfn id=
                   31399: "allowed"><ins class="diff-new">allowed to navigate</ins></dfn>
                   31400: <ins class="diff-new">a second</ins> <a href=
                   31401: "#browsing1"><ins class="diff-new">browsing context</ins></a>
                   31402: <var title=""><ins class="diff-new">B</ins></var> <ins class=
                   31403: "diff-new">if one of the following conditions is true:</ins></p>
                   31404: <ul>
                   31405: <li><ins class="diff-new">Either the</ins> <a href=
                   31406: "#origin0"><ins class="diff-new">origin</ins></a> <ins class=
                   31407: "diff-new">of the</ins> <a href="#active"><ins class=
                   31408: "diff-new">active document</ins></a> <ins class="diff-new">of</ins>
                   31409: <var title=""><ins class="diff-new">A</ins></var> <ins class=
                   31410: "diff-new">is the</ins> <a href="#same-origin" title=
                   31411: "same origin"><ins class="diff-new">same</ins></a> <ins class=
                   31412: "diff-new">as the</ins> <a href="#origin0"><ins class=
                   31413: "diff-new">origin</ins></a> <ins class="diff-new">of the</ins>
                   31414: <a href="#active"><ins class="diff-new">active document</ins></a>
                   31415: <ins class="diff-new">of</ins> <var title=""><ins class=
                   31416: "diff-new">B</ins></var> ,<ins class="diff-new">or</ins></li>
                   31417: <li><ins class="diff-new">The browsing context</ins> <var title=
                   31418: ""><ins class="diff-new">B</ins></var> <ins class=
                   31419: "diff-new">an</ins> <a href="#auxiliary0"><ins class=
                   31420: "diff-new">auxiliary browsing context</ins></a> <ins class=
                   31421: "diff-new">and either its</ins> <a href="#opener"><ins class=
                   31422: "diff-new">opener browsing context</ins></a> <ins class=
                   31423: "diff-new">is</ins> <var title=""><ins class=
                   31424: "diff-new">A</ins></var> <ins class="diff-new">or</ins> <var title=
                   31425: ""><ins class="diff-new">A</ins></var> <ins class=
                   31426: "diff-new">is</ins> <a href="#allowed"><ins class=
                   31427: "diff-new">allowed to navigate</ins></a> <var title=""><ins class=
                   31428: "diff-new">B</ins></var> <ins class="diff-new">'s</ins> <a href=
                   31429: "#opener"><ins class="diff-new">opener browsing context</ins></a>
                   31430: ,<ins class="diff-new">or</ins></li>
                   31431: <li><ins class="diff-new">The browsing context</ins> <var title=
                   31432: ""><ins class="diff-new">B</ins></var> <ins class="diff-new">is not
                   31433: a</ins> <a href="#top-level"><ins class="diff-new">top-level
                   31434: browsing context</ins></a> ,<ins class="diff-new">but there exists
                   31435: an</ins> <a href="#ancestor"><ins class="diff-new">ancestor
                   31436: browsing context</ins></a> <ins class="diff-new">of</ins>
                   31437: <var title=""><ins class="diff-new">B</ins></var> <ins class=
                   31438: "diff-new">whose</ins> <a href="#active"><ins class=
                   31439: "diff-new">active document</ins></a> <ins class="diff-new">has
                   31440: the</ins> <a href="#same-origin" title="same origin"><ins class=
                   31441: "diff-new">same</ins></a> <a href="#origin0"><ins class=
                   31442: "diff-new">origin</ins></a> <ins class="diff-new">as the</ins>
                   31443: <a href="#active"><ins class="diff-new">active document</ins></a>
                   31444: <ins class="diff-new">of</ins> <var title=""><ins class=
                   31445: "diff-new">A</ins></var> <ins class="diff-new">(possibly in fact
                   31446: being</ins> <var title=""><ins class="diff-new">A</ins></var>
                   31447: <ins class="diff-new">itself).</ins></li>
                   31448: </ul>
                   31449: <h4 id="threads"><span class="secno"><del class=
                   31450: "diff-old">4.1.4.</del> <ins class="diff-chg">4.1.5</ins></span>
                   31451: Threads</h4>
                   31452: <p>Each <a href="#browsing1">browsing context</a> is defined as
                   31453: having a list of zero or more <dfn id="directly">directly reachable
                   31454: browsing contexts</dfn> . These are:</p>
                   31455: <ul>
                   31456: <li>All the <a href="#browsing1">browsing context</a> 's <a href=
                   31457: "#child" title="child browsing context">child browsing contexts</a>
                   31458: .</li>
                   31459: <li>The <a href="#browsing1">browsing context</a> 's <a href=
                   31460: "#parent">parent browsing context</a> .</li>
                   31461: <li>All the <a href="#browsing1" title="browsing context">browsing
                   31462: contexts</a> that have the <a href="#browsing1">browsing
                   31463: context</a> as their <a href="#opener">opener browsing context</a>
                   31464: .</li>
                   31465: <li>The <a href="#browsing1">browsing context</a> 's <a href=
                   31466: "#opener">opener browsing context</a> .</li>
                   31467: </ul>
                   31468: <p>The transitive closure of all the <a href="#browsing1" title=
                   31469: "browsing context">browsing contexts</a> that are <a href=
                   31470: "#directly">directly reachable browsing contexts</a> <del class=
                   31471: "diff-old">consists of</del> <ins class="diff-chg">forms</ins> a
                   31472: <dfn id="unit-of">unit of related browsing contexts</dfn> .</p>
                   31473: <p>All the executable code in a <a href="#unit-of">unit of related
                   31474: browsing contexts</a> must execute on a single conceptual thread.
                   31475: The dispatch of events fired by the user agent (e.g. in response to
                   31476: user actions or network activity) and the execution of any scripts
                   31477: associated with timers must be <del class=
                   31478: "diff-old">serialised</del> <ins class="diff-chg">serialized</ins>
                   31479: so that for each <a href="#unit-of">unit of related browsing
                   31480: contexts</a> there is only one script being executed at a time.</p>
                   31481: <h4 id="browsing"><span class="secno"><del class=
                   31482: "diff-old">4.1.5.</del> <ins class="diff-chg">4.1.6</ins></span>
                   31483: Browsing context names</h4>
                   31484: <p>Browsing contexts can have a <dfn id="browsing2">browsing
                   31485: context name</dfn> . By default, a browsing context has no name
                   31486: (its name is not set).</p>
                   31487: <p>A <dfn id="valid8">valid browsing context name</dfn> is any
                   31488: string <ins class="diff-new">with at least one character</ins> that
                   31489: does not start with a U+005F LOW LINE <del class=
                   31490: "diff-old">character, or, a</del> <ins class="diff-chg">character.
                   31491: (Names starting with an underscore are reserved for special
                   31492: keywords.)</ins></p>
                   31493: <p><ins class="diff-chg">A</ins> <dfn id="valid9"><ins class=
                   31494: "diff-chg">valid browsing context name or keyword</ins></dfn>
                   31495: <ins class="diff-chg">is any</ins> string that <ins class=
                   31496: "diff-new">is either a</ins> <a href="#valid8"><ins class=
                   31497: "diff-new">valid browsing context name</ins></a> <ins class=
                   31498: "diff-new">or that</ins> case-insensitively matches one of:
                   31499: <code title=""><ins class="diff-new">_blank</ins></code>
                   31500: ,<code title="">_self</code> , <code title="">_parent</code> , or
                   31501: <code title="">_top</code> . <del class="diff-old">(Names starting
                   31502: with an underscore are reserved for special keywords.)</del></p>
                   31503: <p><dfn id="the-rules">The rules for <del class=
                   31504: "diff-old">chosing</del> <ins class="diff-chg">choosing</ins> a
                   31505: browsing context given a browsing context name</dfn> are as
                   31506: follows. The rules assume that they are being applied in the
                   31507: context of a <a href="#browsing1">browsing context</a> .</p>
                   31508: <ol>
                   31509: <li>
                   31510: <p>If the given browsing context name is the empty string or
                   31511: <code title="">_self</code> , then the chosen browsing context must
                   31512: be the current one.</p>
                   31513: </li>
                   31514: <li>
                   31515: <p>If the given browsing context name is <code title=
                   31516: "">_parent</code> , then the chosen browsing context must be the
                   31517: <a href="#parent"><em>parent</em> browsing context</a> of the
                   31518: current one, unless there isn't one, in which case the chosen
                   31519: browsing context must be the current browsing context.</p>
                   31520: </li>
                   31521: <li>
                   31522: <p>If the given browsing context name is <code title="">_top</code>
                   31523: , then the chosen browsing context must be the most <a href=
                   31524: "#top-level">top-level browsing context</a> of the current one.</p>
                   31525: </li>
                   31526: <li>
                   31527: <p>If the given browsing context name is not <code title=
                   31528: "">_blank</code> and there exists a browsing context whose <a href=
                   31529: "#browsing2" title="browsing context name">name</a> is the same as
                   31530: the given browsing context name, and <del class="diff-old">one of
                   31531: the following is true: Either the origin of that browsing context's
                   31532: active document is the same as the origin of</del> the current
                   31533: browsing <del class="diff-old">context's active document , Or that
                   31534: browsing</del> context is <del class="diff-old">an auxiliary
                   31535: browsing context and its opener browsing context</del> <a href=
                   31536: "#allowed"><ins class="diff-chg">allowed to navigate</ins></a>
                   31537: <del class="diff-old">is either the current browsing context or a
                   31538: browsing context</del> that <del class="diff-old">the user agent
                   31539: considers is closely enough related to the current</del> browsing
                   31540: context, <del class="diff-old">Or that browsing context is not a
                   31541: top-level browsing context ,</del> and the <del class=
                   31542: "diff-old">origin of the active document of the parent browsing
                   31543: context of that browsing context is the same as the origin of the
                   31544: current browsing context's active document , ...and the</del> user
                   31545: agent determines that the two browsing contexts are related enough
                   31546: that it is ok if they reach each other, then that browsing context
                   31547: must be the chosen one. If there are multiple matching browsing
                   31548: contexts, the user agent should select one in some arbitrary
                   31549: consistent manner, such as the most recently opened, most recently
                   31550: focused, or more closely related.</p>
                   31551: </li>
                   31552: <li>
                   31553: <p>Otherwise, a new browsing context is being requested, and what
                   31554: happens depends on the user agent's configuration and/or
                   31555: abilities:</p>
                   31556: <dl>
                   31557: <dt id="sandboxWindowOpen"><ins class="diff-new">If the current
                   31558: browsing context has the</ins> <a href="#sandboxed"><ins class=
                   31559: "diff-new">sandboxed navigation browsing context flag</ins></a>
                   31560: <ins class="diff-new">set.</ins></dt>
                   31561: <dd><ins class="diff-new">The user agent may offer to create a
                   31562: new</ins> <a href="#top-level"><ins class="diff-new">top-level
                   31563: browsing context</ins></a> <ins class="diff-new">or reuse an
                   31564: existing</ins> <a href="#top-level"><ins class="diff-new">top-level
                   31565: browsing context</ins></a> .<ins class="diff-new">If the user picks
                   31566: one of those options, then the designated browsing context must be
                   31567: the chosen one (the browsing context's name isn't set to the given
                   31568: browsing context name). Otherwise (if the user agent doesn't offer
                   31569: the option to the user, or if the user declines to allow a browsing
                   31570: context to be used) there must not be a chosen browsing
                   31571: context.</ins></dd>
                   31572: <dt>If the user agent has been configured such that in this
                   31573: instance it will create a new browsing context</dt>
                   31574: <dd>A new <a href="#auxiliary0">auxiliary browsing context</a> must
                   31575: be created, with the <a href="#opener">opener browsing context</a>
                   31576: being the current one. If the given browsing context name is not
                   31577: <code title="">_blank</code> , then the new auxiliary browsing
                   31578: context's name must be the given browsing context name (otherwise,
                   31579: it has no name). The chosen browsing context must be this new
                   31580: browsing context. If it is immediately <a href="#navigate" title=
                   31581: "navigate">navigated</a> , then the navigation will be done with
                   31582: <a href="#replacement">replacement enabled</a> .</dd>
                   31583: <dt>If the user agent has been configured such that in this
                   31584: instance it will reuse the current browsing context</dt>
                   31585: <dd>The chosen browsing context is the current browsing
                   31586: context.</dd>
                   31587: <dt>If the user agent has been configured such that in this
                   31588: instance it will not find a browsing context</dt>
                   31589: <dd>There must not be a chosen browsing context.</dd>
                   31590: </dl>
                   31591: <p><ins class="diff-new">User agent implementors are encouraged to
                   31592: provide a way for users to configure the user agent to always reuse
                   31593: the current browsing context.</ins></p>
                   31594: </li>
                   31595: </ol>
                   31596: <h3 id="the-default0"><span class="secno"><del class=
                   31597: "diff-old">4.2.</del> <ins class="diff-chg">4.2</ins></span> The
                   31598: default view</h3>
                   31599: <p>The <code>AbstractView</code> object of <a href="#default3"
                   31600: title="default view">default views</a> must also implement the
                   31601: <code><a href="#window">Window</a></code> object. <del class=
                   31602: "diff-old">{</del></p>
                   31603: <pre class="idl">
                   31604: [NoInterfaceObject] interface <dfn id="window">Window</dfn> {
                   31605:   // the current browsing context
                   31606:   readonly attribute <a href="#window">Window</a> <a href=
                   31607: "#window0" title="dom-window">window</a>;
                   31608:   readonly attribute <a href="#window">Window</a> <a href="#self"
                   31609: title="dom-self">self</a>;
                   31610: <del class="diff-old">           attribute DOMString ;
                   31611:   readonly attribute ;
                   31612:   readonly attribute ;
                   31613: </del>
                   31614: <ins class="diff-chg">           attribute DOMString <a href=
                   31615: "#name9" title="dom-name">name</a>;
                   31616:   [PutForwards=href] readonly attribute <a href=
                   31617: "#location2">Location</a> <a href="#location0" title=
                   31618: "dom-document-location">location</a>;
                   31619:   readonly attribute <a href="#history2">History</a> <a href=
                   31620: "#history1" title="dom-history">history</a>;
                   31621: </ins>
                   31622:   readonly attribute <a href=
                   31623: "#undomanager">UndoManager</a> <a href="#undomanager0" title=
                   31624: "dom-undoManager">undoManager</a>;
                   31625:   <a href="#selection1">Selection</a> <a href="#getselection"
                   31626: title="dom-getSelection">getSelection</a>();
                   31627:   // the user agent
                   31628:   readonly attribute <a href=
                   31629: "#clientinformation">ClientInformation</a> <a href="#navigator"
                   31630: title="dom-navigator">navigator</a>; 
                   31631:   readonly attribute <a href="#storage0">Storage</a> <a href=
                   31632: "#sessionstorage" title="dom-sessionStorage">sessionStorage</a>;
                   31633: <del class="diff-old">  readonly attribute ;
                   31634: </del>
                   31635: <ins class="diff-chg">  readonly attribute <a href=
                   31636: "#storage0">Storage</a> <a href="#localstorage" title=
                   31637: "dom-localStorage">localStorage</a>;
                   31638: </ins>
                   31639:   <a href="#database0">Database</a> <a href="#opendatabase" title=
                   31640: "dom-opendatabase">openDatabase</a>(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize);
                   31641: <del class="diff-old">  // modal user prompts
                   31642: </del>
                   31643: <ins class="diff-chg">  // user prompts
                   31644: </ins>
                   31645:   void <a href="#alert" title=
                   31646: "dom-alert">alert</a>(in DOMString message);
                   31647:   boolean <a href="#confirm" title=
                   31648: "dom-confirm">confirm</a>(in DOMString message);
                   31649:   DOMString <a href="#prompt" title=
                   31650: "dom-prompt">prompt</a>(in DOMString message);
                   31651:   DOMString <a href="#prompt" title=
                   31652: "dom-prompt">prompt</a>(in DOMString message, in DOMString default);
                   31653:   void <a href="#print" title="dom-print">print</a>();
                   31654: <ins class="diff-new">  any <a href="#showmodaldialog" title=
                   31655: "dom-showModalDialog">showModalDialog</a>(in DOMString url);
                   31656:   any <a href="#showmodaldialog" title=
                   31657: "dom-showModalDialog">showModalDialog</a>(in DOMString url, in any arguments);
                   31658:   void <a href="#shownotification" title=
                   31659: "dom-showNotification">showNotification</a>(in DOMString title, in DOMString subtitle, in DOMString description);
                   31660:   void <a href="#shownotification" title=
                   31661: "dom-showNotification">showNotification</a>(in DOMString title, in DOMString subtitle, in DOMString description, in VoidCallback onclick);
                   31662: </ins>
                   31663:   // other browsing contexts
                   31664:   readonly attribute <a href="#window">Window</a> <a href="#frames"
                   31665: title="dom-frames">frames</a>;
                   31666: <del class="diff-old">  readonly attribute unsigned long ;
                   31667: </del>
                   31668: <ins class="diff-chg">  readonly attribute unsigned long <a href=
                   31669: "#length6" title="dom-length">length</a>;
                   31670:   [IndexGetter] <a href="#window">Window</a> <a href="#xxx4index"
                   31671: title="dom-XXX4">XXX4</a>(in unsigned long index); 
                   31672: </ins>
                   31673:   readonly attribute <a href="#window">Window</a> <a href=
                   31674: "#opener0" title="dom-opener">opener</a>;
                   31675:   <a href="#window">Window</a> <a href="#open2" title=
                   31676: "dom-open">open</a>();
                   31677:   <a href="#window">Window</a> <a href="#open2" title=
                   31678: "dom-open">open</a>(in DOMString url);
                   31679:   <a href="#window">Window</a> <a href="#open2" title=
                   31680: "dom-open">open</a>(in DOMString url, in DOMString target);
                   31681:   <a href="#window">Window</a> <a href="#open2" title=
                   31682: "dom-open">open</a>(in DOMString url, in DOMString target, in DOMString features);
                   31683:   <a href="#window">Window</a> <a href="#open2" title=
                   31684: "dom-open">open</a>(in DOMString url, in DOMString target, in DOMString features, in DOMString replace);
                   31685:   // <a href="#cross-document">cross-document messaging</a>
                   31686: <del class="diff-old">  void (in DOMString message);
                   31687: </del>
                   31688: <ins class="diff-chg">  void <a href="#postmessage" title=
                   31689: "dom-window-postMessage">postMessage</a>(in DOMString message, in DOMString targetOrigin);
                   31690: </ins>
                   31691: <del class="diff-old">  // 
                   31692: </del>
                   31693: <ins class="diff-chg">  // <a href=
                   31694: "#event4">event handler DOM attributes</a>
                   31695: </ins>
                   31696:            attribute <span>EventListener</span> <a href="#onabort"
                   31697: title="handler-onabort">onabort</a>;
                   31698:            attribute <span>EventListener</span> <a href=
                   31699: "#onbeforeunload" title=
                   31700: "handler-onbeforeunload">onbeforeunload</a>;
                   31701:            attribute <span>EventListener</span> <a href="#onblur"
                   31702: title="handler-onblur">onblur</a>;
                   31703:            attribute <span>EventListener</span> <a href="#onchange"
                   31704: title="handler-onchange">onchange</a>;
                   31705:            attribute <span>EventListener</span> <a href="#onclick"
                   31706: title="handler-onclick">onclick</a>;
                   31707:            attribute <span>EventListener</span> <a href=
                   31708: "#oncontextmenu" title="handler-oncontextmenu">oncontextmenu</a>;
                   31709:            attribute <span>EventListener</span> <a href=
                   31710: "#ondblclick" title="handler-ondblclick">ondblclick</a>;
                   31711:            attribute <span>EventListener</span> <a href="#ondrag"
                   31712: title="handler-ondrag">ondrag</a>;
                   31713:            attribute <span>EventListener</span> <a href=
                   31714: "#ondragend" title="handler-ondragend">ondragend</a>;
                   31715:            attribute <span>EventListener</span> <a href=
                   31716: "#ondragenter" title="handler-ondragenter">ondragenter</a>;
                   31717:            attribute <span>EventListener</span> <a href=
                   31718: "#ondragleave" title="handler-ondragleave">ondragleave</a>;
                   31719:            attribute <span>EventListener</span> <a href=
                   31720: "#ondragover" title="handler-ondragover">ondragover</a>;
                   31721:            attribute <span>EventListener</span> <a href=
                   31722: "#ondragstart" title="handler-ondragstart">ondragstart</a>;
                   31723:            attribute <span>EventListener</span> <a href="#ondrop"
                   31724: title="handler-ondrop">ondrop</a>;
                   31725:            attribute <span>EventListener</span> <a href="#onerror"
                   31726: title="handler-onerror">onerror</a>;
                   31727:            attribute <span>EventListener</span> <a href="#onfocus"
                   31728: title="handler-onfocus">onfocus</a>;
                   31729:            attribute <span>EventListener</span> <a href=
                   31730: "#onkeydown" title="handler-onkeydown">onkeydown</a>;
                   31731:            attribute <span>EventListener</span> <a href=
                   31732: "#onkeypress" title="handler-onkeypress">onkeypress</a>;
                   31733:            attribute <span>EventListener</span> <a href="#onkeyup"
                   31734: title="handler-onkeyup">onkeyup</a>;
                   31735:            attribute <span>EventListener</span> <a href="#onload"
                   31736: title="handler-onload">onload</a>;
                   31737:            attribute <span>EventListener</span> <a href=
                   31738: "#onmessage" title="handler-onmessage">onmessage</a>;
                   31739:            attribute <span>EventListener</span> <a href=
                   31740: "#onmousedown" title="handler-onmousedown">onmousedown</a>;
                   31741:            attribute <span>EventListener</span> <a href=
                   31742: "#onmousemove" title="handler-onmousemove">onmousemove</a>;
                   31743:            attribute <span>EventListener</span> <a href=
                   31744: "#onmouseout" title="handler-onmouseout">onmouseout</a>;
                   31745:            attribute <span>EventListener</span> <a href=
                   31746: "#onmouseover" title="handler-onmouseover">onmouseover</a>;
                   31747:            attribute <span>EventListener</span> <a href=
                   31748: "#onmouseup" title="handler-onmouseup">onmouseup</a>;
                   31749:            attribute <span>EventListener</span> <a href=
                   31750: "#onmousewheel" title="handler-onmousewheel">onmousewheel</a>;
                   31751:            attribute <span>EventListener</span> <a href="#onresize"
                   31752: title="handler-onresize">onresize</a>;
                   31753:            attribute <span>EventListener</span> <a href="#onscroll"
                   31754: title="handler-onscroll">onscroll</a>;
                   31755:            attribute <span>EventListener</span> <a href="#onselect"
                   31756: title="handler-onselect">onselect</a>;
                   31757: <ins class=
                   31758: "diff-new">           attribute <span>EventListener</span> <a href=
                   31759: "#onstorage" title="handler-onstorage">onstorage</a>;
                   31760: </ins>
                   31761:            attribute <span>EventListener</span> <a href="#onsubmit"
                   31762: title="handler-onsubmit">onsubmit</a>;
                   31763:            attribute <span>EventListener</span> <a href="#onunload"
                   31764: title="handler-onunload">onunload</a>;
                   31765: };
                   31766: </pre>
                   31767: <p>The <dfn id="window0" title=
                   31768: "dom-window"><code>window</code></dfn> , <dfn id="frames" title=
                   31769: "dom-frames"><code>frames</code></dfn> , and <dfn id="self" title=
                   31770: "dom-self"><code>self</code></dfn> DOM attributes must all return
                   31771: the <code><a href="#window">Window</a></code> object itself.</p>
                   31772: <p>The <code><a href="#window">Window</a></code> object also
                   31773: provides the scope for script execution. Each <code>Document</code>
                   31774: in a <a href="#browsing1">browsing context</a> has an associated
                   31775: <dfn id="list-of2">list of added properties</dfn> which, when a
                   31776: document is <a href="#active" title="active document">active</a> ,
                   31777: are available on the <code>Document</code> 's <a href=
                   31778: "#default3">default view</a> <code><a href=
                   31779: "#window">Window</a></code> object. A <code>Document</code>
                   31780: object's <a href="#list-of2">list of added properties</a> must be
                   31781: empty when the <code>Document</code> object is created.</p>
                   31782: <p>Objects implementing the <code><a href=
                   31783: "#window">Window</a></code> interface must also implement the
                   31784: <code>EventTarget</code> interface.</p>
                   31785: <p class="note"><code><a href="#window">Window</a></code> objects
                   31786: also <span title="dom-item">have an implicit [[Get]] method</span>
                   31787: which returns <span>nested browsing contexts</span> .</p>
                   31788: <h4 id="security3"><span class="secno"><del class=
                   31789: "diff-old">4.2.1.</del> <ins class="diff-chg">4.2.1</ins></span>
                   31790: Security</h4>
                   31791: <p>User agents must raise a <a href="#security9">security
                   31792: exception</a> whenever any of the members of a <code><a href=
                   31793: "#window">Window</a></code> object are accessed by scripts whose
                   31794: <a href="#effective3"><ins class="diff-chg">effective script</ins>
                   31795: origin</a> is not the same as the <code><a href=
                   31796: "#window">Window</a></code> object's <a href="#browsing1">browsing
                   31797: context</a> 's <a href="#active">active document</a> 's <del class=
                   31798: "diff-old">origin,</del> <a href="#effective3"><ins class=
                   31799: "diff-chg">effective script origin</ins></a> , with the following
                   31800: exceptions:</p>
                   31801: <ul>
                   31802: <li>The <code title="dom-location"><a href=
                   31803: "#location1">location</a></code> object</li>
                   31804: <li>The <code title="dom-window-postMessage"><a href=
                   31805: "#postmessage">postMessage()</a></code> method</li>
                   31806: <li><ins class="diff-new">The</ins> <code title=
                   31807: "dom-window-frames"><ins class="diff-new">frames</ins></code>
                   31808: <ins class="diff-new">attribute</ins></li>
                   31809: <li><ins class="diff-new">The</ins> <code title="dom-XXX4"><a href=
                   31810: "#xxx4index"><ins class="diff-new">XXX4</ins></a></code>
                   31811: <ins class="diff-new">method</ins></li>
                   31812: </ul>
                   31813: <p>User agents must not allow scripts to override the <code title=
                   31814: "dom-location"><a href="#location1">location</a></code> object's
                   31815: setter.</p>
                   31816: <h4 id="constructors"><span class="secno"><del class=
                   31817: "diff-old">4.2.2.</del> <ins class="diff-chg">4.2.2</ins></span>
                   31818: Constructors</h4>
                   31819: <p>All <code><a href="#window">Window</a></code> objects must
                   31820: provide the following constructors:</p>
                   31821: <dl>
                   31822: <dt><dfn id="audio2" title=
                   31823: "dom-audio"><code>Audio()</code></dfn></dt>
                   31824: <dt><dfn id="audio3" title="dom-audio-s"><code>Audio( <var title=
                   31825: "">src</var> )</code></dfn></dt>
                   31826: <dd>
                   31827: <p>When invoked as constructors, these must return a new
                   31828: <code><a href="#htmlaudioelement">HTMLAudioElement</a></code>
                   31829: object (a new <code><a href="#audio1">audio</a></code> element). If
                   31830: the <var title="src">src</var> argument is present, the object
                   31831: created must have its <code title="dom-media-src"><a href=
                   31832: "#src8">src</a></code> content attribute set to the provided value,
                   31833: and the user agent must invoke the <code title=
                   31834: "dom-media-load"><a href="#load">load()</a></code> method on the
                   31835: object before returning.</p>
                   31836: </dd>
                   31837: <dt><dfn id="image0" title=
                   31838: "dom-image"><code>Image()</code></dfn></dt>
                   31839: <dt><dfn id="imagein" title="dom-image-w"><code>Image(in unsigned
                   31840: long <var title="">w</var> )</code></dfn></dt>
                   31841: <dt><dfn id="imagein0" title="dom-image-wh"><code>Image(in unsigned
                   31842: long <var title="">w</var> , in unsigned long <var title="">h</var>
                   31843: )</code></dfn></dt>
                   31844: <dd>
                   31845: <p>When invoked as <del class="diff-old">corstructors,</del>
                   31846: <ins class="diff-chg">constructors,</ins> these must return a new
                   31847: <code><a href="#htmlimageelement">HTMLImageElement</a></code>
                   31848: object (a new <code><a href="#img">img</a></code> element). If the
                   31849: <var title="">h</var> argument is present, the new object's
                   31850: <code title="attr-img-height">height</code> content attribute must
                   31851: be set to <var title="">h</var> . If the <var title="">w</var>
                   31852: argument is present, the new object's <code title=
                   31853: "attr-img-width">width</code> content attribute must be set to
                   31854: <var title="">w</var> .</p>
                   31855: </dd>
                   31856: <dt><dfn id="option" title=
                   31857: "dom-option"><code>Option()</code></dfn></dt>
                   31858: <dt><dfn id="optionin" title="dom-option-n"><code>Option(in
                   31859: DOMString <var title="">name</var> )</code></dfn></dt>
                   31860: <dt><dfn id="optionin0" title="dom-option-nv"><code>Option(in
                   31861: DOMString <var title="">name</var> , in DOMString <var title=
                   31862: "">value</var> )</code></dfn></dt>
                   31863: <dd>
                   31864: <p>When invoked as constructors, these must return a new
                   31865: <code>HTMLOptionElement</code> object (a new <code>option</code>
                   31866: element). <span class="big-issue">need to define argument
                   31867: processing</span></p>
                   31868: </dd>
                   31869: </dl>
                   31870: <p class="big-issue">And when constructors are invoked but without
                   31871: using the constructor syntax...?</p>
                   31872: <h4 id="apis-for"><span class="secno"><del class=
                   31873: "diff-old">4.2.3.</del> <ins class="diff-chg">4.2.3</ins></span>
                   31874: APIs for creating and navigating browsing contexts by name</h4>
                   31875: <p>The <dfn id="open2" title="dom-open"><code>open()</code></dfn>
                   31876: method on <code><a href="#window">Window</a></code> objects
                   31877: provides a mechanism for <a href="#navigate" title=
                   31878: "navigate">navigating</a> an existing <a href="#browsing1">browsing
                   31879: context</a> or opening and navigating an <a href=
                   31880: "#auxiliary0">auxiliary browsing context</a> .</p>
                   31881: <p>The method has four arguments, though they are all optional.</p>
                   31882: <p>The first argument, <var title="">url</var> , gives a URI (or
                   31883: IRI) for a page to load in the browsing context. If no arguments
                   31884: are provided, then the <var title="">url</var> argument defaults to
                   31885: " <code>about:blank</code> ". The argument must be resolved to an
                   31886: absolute URI by <span class="big-issue">...</span></p>
                   31887: <p>The second argument, <var title="">target</var> , specifies the
                   31888: <a href="#browsing2" title="browsing context name">name</a> of the
                   31889: browsing context that is to be navigated. It must be a <a href=
                   31890: "#valid9">valid browsing context name <ins class="diff-new">or
                   31891: keyword</ins></a> . If fewer than two arguments are provided, then
                   31892: the <var title="">name</var> argument defaults to the value "
                   31893: <code>_blank</code> ".</p>
                   31894: <p>The third argument, <var title="">features</var> , has no effect
                   31895: and is supported for historical reasons only.</p>
                   31896: <p>The fourth argument, <var title="">replace</var> , specifies
                   31897: whether or not the new page will <a href="#replacement" title=
                   31898: "replacement enabled">replace</a> the page currently loaded in the
                   31899: browsing context, when <var title="">target</var> identifies an
                   31900: existing browsing context (as opposed to leaving the current page
                   31901: in the browsing context's <a href="#session">session history</a> ).
                   31902: When three or fewer arguments are provided, <var title=
                   31903: "">replace</var> defaults to false.</p>
                   31904: <p>When the method is invoked, the user agent must first select a
                   31905: <a href="#browsing1">browsing context</a> to navigate by applying
                   31906: <a href="#the-rules">the rules for <del class=
                   31907: "diff-old">chosing</del> <ins class="diff-chg">choosing</ins> a
                   31908: browsing context given a browsing context name</a> using the
                   31909: <var title="">target</var> argument as the name and the <a href=
                   31910: "#browsing1">browsing context</a> of the script as the context in
                   31911: which the algorithm is executed, unless the user has indicated a
                   31912: preference, in which case the browsing context to navigate may
                   31913: instead be the one indicated by the user.</p>
                   31914: <p class="example">For example, suppose there is a user agent that
                   31915: supports control-clicking a link to open it in a new tab. If a user
                   31916: clicks in that user agent on an element whose <code title=
                   31917: "handler-onclick"><a href="#onclick">onclick</a></code> handler
                   31918: uses the <code title="dom-open"><a href=
                   31919: "#open2">window.open()</a></code> API to open a page in an iframe,
                   31920: but, while doing so, holds the control key down, the user agent
                   31921: could override the selection of the target browsing context to
                   31922: instead target a new tab.</p>
                   31923: <p>Then, the user agent must <a href="#navigate">navigate</a> the
                   31924: selected <a href="#browsing1">browsing context</a> to the URI given
                   31925: in <var title="">url</var> . If the <var title="">replace</var> is
                   31926: true, then <a href="#replacement" title=
                   31927: "replacement enabled">replacement must be enabled</a> ; otherwise,
                   31928: it must not be enabled unless the <a href="#browsing1">browsing
                   31929: context</a> was just created as part of the <a href=
                   31930: "#the-rules">the rules for <del class="diff-old">chosing</del>
                   31931: <ins class="diff-chg">choosing</ins> a browsing context given a
                   31932: browsing context name</a> . <ins class="diff-new">The navigation
                   31933: must be done with the</ins> <a href="#browsing1"><ins class=
                   31934: "diff-new">browsing context</ins></a> <ins class=
                   31935: "diff-new">corresponding to the</ins> <code><a href=
                   31936: "#window"><ins class="diff-new">Window</ins></a></code> <ins class=
                   31937: "diff-new">object that is the</ins> <a href="#script2"><ins class=
                   31938: "diff-new">script execution context</ins></a> <ins class=
                   31939: "diff-new">of the script that invoked the method as the</ins>
                   31940: <a href="#source0"><ins class="diff-new">source browsing
                   31941: context</ins></a> .</p>
                   31942: <p class="note"><ins class="diff-new">If the</ins> <a href=
                   31943: "#script2"><ins class="diff-new">script execution context</ins></a>
                   31944: <ins class="diff-new">of a script isn't a</ins> <code><a href=
                   31945: "#window"><ins class="diff-new">Window</ins></a></code> <ins class=
                   31946: "diff-new">object, then it can't ever get to a</ins> <code><a href=
                   31947: "#window"><ins class="diff-new">Window</ins></a></code> <ins class=
                   31948: "diff-new">object to call this method.</ins></p>
                   31949: <p>The method must return the <code><a href=
                   31950: "#window">Window</a></code> object of the default view of the
                   31951: <a href="#browsing1">browsing context</a> that was navigated, or
                   31952: null if no browsing context was navigated.</p>
                   31953: <p>The <dfn id="name9" title="dom-name"><code>name</code></dfn>
                   31954: attribute of the <code><a href="#window">Window</a></code> object
                   31955: must, on getting, return the current name of the <a href=
                   31956: "#browsing1">browsing context</a> , and, on setting, set the name
                   31957: of the <a href="#browsing1">browsing context</a> to the new
                   31958: value.</p>
                   31959: <p class="note">The name <a href="#resetBCName">gets reset</a> when
                   31960: the browsing context is navigated to another domain.</p>
                   31961: <h4 id="accessing"><span class="secno"><del class=
                   31962: "diff-old">4.2.4.</del> <ins class="diff-chg">4.2.4</ins></span>
                   31963: Accessing other browsing contexts</h4>
                   31964: <p><del class="diff-old">In ECMAScript implementations, objects
                   31965: that implement</del> <ins class="diff-chg">The</ins> <dfn id=
                   31966: "length6" title="dom-length"><code><ins class=
                   31967: "diff-chg">length</ins></code></dfn> <ins class="diff-chg">DOM
                   31968: attribute on</ins> the <code><a href="#window">Window</a></code>
                   31969: interface must <del class="diff-old">have a [[Get]] method that,
                   31970: when invoked with a property name that is a number i ,
                   31971: returns</del> <ins class="diff-chg">return</ins> the <del class=
                   31972: "diff-old">i th</del> <ins class="diff-chg">number of</ins>
                   31973: <a href="#child" title="child browsing context">child browsing
                   31974: <del class="diff-old">context</del> <ins class=
                   31975: "diff-chg">contexts</ins></a> of the <a href="#active" title=
                   31976: "active document">active</a> <code>Document <del class="diff-old">,
                   31977: sorted in document order of the elements nesting those browsing
                   31978: contexts.</del></code> .</p>
                   31979: <p>The <dfn id="xxx4index" title="dom-XXX4"><code><del class=
                   31980: "diff-old">length</del> <ins class="diff-chg">XXX4(</ins>
                   31981: <var title=""><ins class="diff-chg">index</ins></var> <ins class=
                   31982: "diff-chg">)</ins></code></dfn> <del class="diff-old">DOM attribute
                   31983: on the Window interface</del> <ins class="diff-chg">method</ins>
                   31984: must return the <del class="diff-old">number of</del> <var title=
                   31985: ""><ins class="diff-chg">index</ins></var> <ins class=
                   31986: "diff-chg">th</ins> <a href="#child">child browsing <del class=
                   31987: "diff-old">contexts</del> <ins class="diff-chg">context</ins></a>
                   31988: of the <a href="#active" title="active document">active</a>
                   31989: <code>Document <del class="diff-old">.</del></code> , <ins class=
                   31990: "diff-chg">sorted in document order of the elements nesting those
                   31991: browsing contexts.</ins></p>
                   31992: <h3 id="origin"><span class="secno"><del class=
                   31993: "diff-old">4.3.</del> <ins class="diff-chg">4.3</ins></span>
                   31994: <del class="diff-old">Scripting</del> <ins class=
                   31995: "diff-chg">Origin</ins></h3>
                   31996: <del class="diff-old">4.3.1. Running executable code</del>
                   31997: <p><del class="diff-old">Various mechanisms can cause
                   31998: author-provided executable code to run in</del> <ins class=
                   31999: "diff-chg">The</ins> <dfn id="origin0"><ins class=
                   32000: "diff-chg">origin</ins></dfn> <ins class="diff-chg">of a resource
                   32001: and</ins> the <del class="diff-old">context</del> <dfn id=
                   32002: "effective3"><ins class="diff-chg">effective script
                   32003: origin</ins></dfn> of a <del class="diff-old">document. These
                   32004: mechanisms include, but</del> <ins class="diff-chg">resource</ins>
                   32005: are <del class="diff-old">probably not limited to: Processing</del>
                   32006: <ins class="diff-chg">both either opaque identifiers or tuples
                   32007: consisting</ins> of <ins class="diff-chg">a scheme component, a
                   32008: host component, and a port component.</ins></p>
                   32009: <p><ins class="diff-chg">These characteristics are defined as
                   32010: follows:</ins></p>
                   32011: <dl>
                   32012: <dt><ins class="diff-chg">For URIs</ins></dt>
                   32013: <dd>
                   32014: <p><ins class="diff-chg">The</ins> <a href="#origin0"><ins class=
                   32015: "diff-chg">origin</ins></a> <ins class="diff-chg">and</ins>
                   32016: <a href="#effective3"><ins class="diff-chg">effective</ins> script
                   32017: <ins class="diff-new">origin</ins></a> <del class=
                   32018: "diff-old">elements. Processing</del> of <del class=
                   32019: "diff-old">inline javascript:</del> <ins class="diff-chg">the URI
                   32020: is whatever is returned by the following algorithm:</ins></p>
                   32021: <ol>
                   32022: <li>
                   32023: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   32024: "diff-chg">uri</ins></var> <ins class="diff-chg">be the URI for
                   32025: which the</ins> <a href="#origin0"><ins class=
                   32026: "diff-chg">origin</ins></a> <del class="diff-old">URIs (e.g.</del>
                   32027: <ins class="diff-chg">is being determined.</ins></p>
                   32028: </li>
                   32029: <li>
                   32030: <p><ins class="diff-chg">Parse</ins> <var title=""><ins class=
                   32031: "diff-chg">uri</ins></var> <ins class="diff-chg">according to</ins>
                   32032: the <del class="diff-old">src</del> <ins class="diff-chg">rules
                   32033: described in RFC 3986 and RFC 3987.</ins> <a href=
                   32034: "#references"><ins class="diff-chg">[RFC3986]</ins></a> <del class=
                   32035: "diff-old">attribute of img</del> <a href="#references"><ins class=
                   32036: "diff-chg">[RFC3987]</ins></a> <del class="diff-old">elements, or
                   32037: an</del></p>
                   32038: </li>
                   32039: <li>
                   32040: <p><ins class="diff-chg">If</ins> <var title=""><ins class=
                   32041: "diff-chg">uri</ins></var> <ins class="diff-chg">does not use a
                   32042: server-based naming authority, then return a new globally unique
                   32043: identifier.</ins></p>
                   32044: </li>
                   32045: <li>
                   32046: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   32047: "diff-chg">scheme</ins></var> <ins class="diff-chg">be the
                   32048: &lt;scheme&gt; component of the URI, converted to lowercase. If the
                   32049: UA doesn't support the given protocol, then return a new globally
                   32050: unique identifier.</ins></p>
                   32051: </li>
                   32052: <li>
                   32053: <p><ins class="diff-chg">If the scheme is "</ins> <code title=
                   32054: ""><del class="diff-old">@import</del> <ins class=
                   32055: "diff-chg">file</ins></code> <del class="diff-old">rule in</del>
                   32056: <ins class="diff-chg">", then the user agent may return</ins> a
                   32057: <del class="diff-old">CSS style element block).</del> <ins class=
                   32058: "diff-chg">UA-specific value.</ins></p>
                   32059: </li>
                   32060: <li><del class="diff-old">Event handlers, whether registered
                   32061: through</del>
                   32062: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   32063: "diff-chg">host</ins></var> <ins class="diff-chg">be</ins> the
                   32064: <del class="diff-old">DOM using addEventListener() , by explicit
                   32065: event handler content attributes , by event handler DOM attributes
                   32066: , or otherwise.</del> <ins class=
                   32067: "diff-chg">&lt;host&gt;/&lt;ihost&gt; component of the
                   32068: URI.</ins></p>
                   32069: </li>
                   32070: <li><del class="diff-old">Processing</del>
                   32071: <p><ins class="diff-chg">Apply the IDNA ToASCII algorithm to</ins>
                   32072: <var title=""><ins class="diff-chg">host</ins></var> ,<ins class=
                   32073: "diff-chg">with both the AllowUnassigned and UseSTD3ASCIIRules
                   32074: flags set. Let</ins> <var title=""><ins class=
                   32075: "diff-chg">host</ins></var> <ins class="diff-chg">be the
                   32076: result</ins> of <del class="diff-old">technologies like XBL or SVG
                   32077: that have their own scripting features.</del> <ins class=
                   32078: "diff-chg">the ToASCII algorithm.</ins></p>
                   32079: <p><del class="diff-old">User agents may provide a mechanism</del>
                   32080: <ins class="diff-chg">If ToASCII fails</ins> to <del class=
                   32081: "diff-old">enable or disable</del> <ins class="diff-chg">convert
                   32082: one of</ins> the <del class="diff-old">execution</del> <ins class=
                   32083: "diff-chg">components</ins> of <del class=
                   32084: "diff-old">author-provided code. When</del> the <del class=
                   32085: "diff-old">user agent</del> <ins class="diff-chg">string, e.g.
                   32086: because it</ins> is <del class="diff-old">configured such that
                   32087: author-provided code does not execute,</del> <ins class=
                   32088: "diff-chg">too long</ins> or <del class="diff-old">if the user
                   32089: agent is implemented so as to never execute author-provided
                   32090: code,</del> <ins class="diff-chg">because</ins> it <del class=
                   32091: "diff-old">is said that scripting is disabled . When
                   32092: author-provided code does execute, scripting is enabled . A user
                   32093: agent with scripting disabled is</del> <ins class=
                   32094: "diff-chg">contains invalid characters, then return</ins> a
                   32095: <del class="diff-old">user agent with no scripting support</del>
                   32096: <ins class="diff-chg">new globally unique identifier.</ins>
                   32097: <a href="#references"><ins class="diff-chg">[RFC3490]</ins></a>
                   32098: <del class="diff-old">for the purposes of conformance.</del>
                   32099: <del class="diff-old">4.3.2. Origin</del></p>
                   32100: </li>
                   32101: <li>
                   32102: <p><del class="diff-old">Access</del> <ins class=
                   32103: "diff-chg">Let</ins> <var title=""><ins class=
                   32104: "diff-chg">host</ins></var> <ins class="diff-chg">be the result of
                   32105: converting</ins> <var title=""><ins class=
                   32106: "diff-chg">host</ins></var> to <del class="diff-old">certain
                   32107: APIs</del> <ins class="diff-chg">lowercase.</ins></p>
                   32108: </li>
                   32109: <li>
                   32110: <p><ins class="diff-chg">If no port</ins> is <del class=
                   32111: "diff-old">granted or denied to scripts based on</del> <ins class=
                   32112: "diff-chg">explicitly listed, then let</ins> <var title=
                   32113: ""><ins class="diff-chg">port</ins></var> <ins class=
                   32114: "diff-chg">be</ins> the <del class="diff-old">origin</del>
                   32115: <ins class="diff-chg">default port for the protocol given by</ins>
                   32116: <var title=""><ins class="diff-chg">scheme</ins></var> .<ins class=
                   32117: "diff-chg">Otherwise, let</ins> <var title=""><ins class=
                   32118: "diff-chg">port</ins></var> <ins class="diff-chg">be the
                   32119: &lt;port&gt; component</ins> of the <del class="diff-old">script
                   32120: and</del> <ins class="diff-chg">URI.</ins></p>
                   32121: </li>
                   32122: <li>
                   32123: <p><ins class="diff-chg">Return</ins> the <del class="diff-old">API
                   32124: being accessed.</del> <ins class="diff-chg">tuple (</ins>
                   32125: <var title=""><ins class="diff-chg">scheme</ins></var> ,<var title=
                   32126: ""><ins class="diff-chg">host</ins></var> ,<var title=
                   32127: ""><ins class="diff-chg">port</ins></var> <ins class=
                   32128: "diff-chg">).</ins></p>
                   32129: </li>
                   32130: </ol>
                   32131: </dd>
                   32132: <dt><ins class="diff-chg">For scripts</ins></dt>
                   32133: <dd>
                   32134: <p>The <a href="#origin0"><ins class="diff-new">origin</ins></a>
                   32135: <ins class="diff-new">and</ins> <a href="#effective3"><ins class=
                   32136: "diff-new">effective script</ins> origin</a> of a script
                   32137: <del class="diff-old">depends on</del> <ins class="diff-chg">are
                   32138: determined from another resource, called</ins> the <del class=
                   32139: "diff-old">context of that script:</del> <i><ins class=
                   32140: "diff-chg">owner</ins></i> :</p>
                   32141: <dl class="switch">
                   32142: <dt>If a script is in a <code><a href="#script1">script</a></code>
                   32143: element</dt>
                   32144: <dd>The <del class="diff-old">origin of the script</del>
                   32145: <ins class="diff-chg">owner</ins> is the <del class=
                   32146: "diff-old">origin of the</del> <code>Document</code> to which the
                   32147: <code><a href="#script1">script</a></code> element belongs.</dd>
                   32148: <dt>If a script is a function or other code reference created by
                   32149: another script</dt>
                   32150: <dd>The <del class="diff-old">origin of</del> <ins class=
                   32151: "diff-chg">owner is</ins> the script <ins class="diff-new">that
                   32152: created it.</ins></dd>
                   32153: <dt><ins class="diff-new">If a script</ins> is <ins class=
                   32154: "diff-new">a</ins> <a href="#the-javascript" title=
                   32155: "javascript protocol"><code title=""><ins class=
                   32156: "diff-new">javascript:</ins></code> <ins class=
                   32157: "diff-new">URI</ins></a> <ins class="diff-new">that was returned
                   32158: as</ins> the <del class="diff-old">origin</del> <ins class=
                   32159: "diff-chg">location</ins> of <ins class="diff-new">an HTTP redirect
                   32160: (or equivalent in other protocols)</ins></dt>
                   32161: <dd><ins class="diff-new">The owner is</ins> the <del class=
                   32162: "diff-old">script</del> <ins class="diff-chg">URI</ins> that
                   32163: <del class="diff-old">created it.</del> <ins class=
                   32164: "diff-chg">redirected to the</ins> <a href="#the-javascript" title=
                   32165: "javascript protocol"><code title=""><ins class=
                   32166: "diff-chg">javascript:</ins></code> <ins class=
                   32167: "diff-chg">URI</ins></a> .</dd>
                   32168: <dt>If a script is a <a href="#the-javascript" title=
                   32169: "javascript protocol"><code title="">javascript:</code> URI</a> in
                   32170: an attribute</dt>
                   32171: <dd>The <del class="diff-old">origin</del> <ins class=
                   32172: "diff-chg">owner</ins> is the <del class="diff-old">origin of
                   32173: the</del> <code>Document</code> of the element on which the
                   32174: attribute is found.</dd>
                   32175: <dt>If a script is a <a href="#the-javascript" title=
                   32176: "javascript protocol"><code title="">javascript:</code> URI</a> in
                   32177: a style sheet</dt>
                   32178: <dd>The <del class="diff-old">origin</del> <ins class=
                   32179: "diff-chg">owner</ins> is the <del class="diff-old">origin</del>
                   32180: <ins class="diff-chg">URI</ins> of the <del class=
                   32181: "diff-old">Document to which the</del> style <del class=
                   32182: "diff-old">sheet applies.</del> <ins class=
                   32183: "diff-chg">sheet.</ins></dd>
                   32184: <dt>If a script is a <a href="#the-javascript" title=
                   32185: "javascript protocol"><code title="">javascript:</code> URI</a> to
                   32186: which a <a href="#browsing1">browsing context</a> is being <a href=
                   32187: "#navigate" title="navigate">navigated</a> , the URI having been
                   32188: provided by the user (e.g. by using a <i>bookmarklet</i> )</dt>
                   32189: <dd>The <del class="diff-old">origin</del> <ins class=
                   32190: "diff-chg">owner</ins> is the <del class="diff-old">origin of
                   32191: the</del> <code>Document</code> of the <a href=
                   32192: "#browsing1">browsing context</a> 's <a href="#active">active
                   32193: document</a> .</dd>
                   32194: <dt>If a script is a <a href="#the-javascript" title=
                   32195: "javascript protocol"><code title="">javascript:</code> URI</a> to
                   32196: which a <a href="#browsing1">browsing context</a> is being <a href=
                   32197: "#navigate" title="navigate">navigated</a> , the URI having been
                   32198: declared in markup</dt>
                   32199: <dd>The <del class="diff-old">origin</del> <ins class=
                   32200: "diff-chg">owner</ins> is the <del class="diff-old">origin of
                   32201: the</del> <code>Document</code> of the element (e.g. an
                   32202: <code><a href="#a">a</a></code> or <code><a href=
                   32203: "#area">area</a></code> element) that declared the URI.</dd>
                   32204: <dt>If a script is a <a href="#the-javascript" title=
                   32205: "javascript protocol"><code title="">javascript:</code> URI</a> to
                   32206: which a <a href="#browsing1">browsing context</a> is being <a href=
                   32207: "#navigate" title="navigate">navigated</a> , the URI having been
                   32208: provided by script</dt>
                   32209: <dd>The <del class="diff-old">origin</del> <ins class=
                   32210: "diff-chg">owner</ins> is the <del class="diff-old">origin of
                   32211: the</del> script that provided the URI.</dd>
                   32212: </dl>
                   32213: <p>The <a href="#origin0">origin</a> of <del class=
                   32214: "diff-old">scripts thus comes down</del> <ins class="diff-chg">the
                   32215: script is then equal</ins> to <del class="diff-old">finding</del>
                   32216: the <a href="#origin0"><ins class="diff-new">origin</ins></a>
                   32217: <ins class="diff-new">of the owner, and the</ins> <a href=
                   32218: "#effective3"><ins class="diff-new">effective script
                   32219: origin</ins></a> <ins class="diff-new">of the script is equal to
                   32220: the</ins> <a href="#effective3"><ins class="diff-new">effective
                   32221: script</ins> origin</a> of <ins class="diff-new">the
                   32222: owner.</ins></p>
                   32223: </dd>
                   32224: <dt><ins class="diff-new">For</ins> <code>Document</code>
                   32225: <del class="diff-old">objects.</del> <ins class="diff-chg">objects
                   32226: and images</ins></dt>
                   32227: <dd>
                   32228: <dl class="switch">
                   32229: <dt id="sandboxOrigin"><ins class="diff-chg">If a</ins>
                   32230: <code><ins class="diff-chg">Document</ins></code> <ins class=
                   32231: "diff-chg">is in a</ins> <a href="#browsing1"><ins class=
                   32232: "diff-chg">browsing context</ins></a> <ins class=
                   32233: "diff-chg">whose</ins> <a href="#sandboxed2"><ins class=
                   32234: "diff-chg">sandboxed origin browsing context flag</ins></a>
                   32235: <ins class="diff-chg">is set</ins></dt>
                   32236: <dd>The <a href="#origin0">origin</a> <ins class="diff-new">is a
                   32237: globally unique identifier assigned when the</ins>
                   32238: <code><ins class="diff-new">Document</ins></code> <ins class=
                   32239: "diff-new">is created.</ins></dd>
                   32240: <dt><ins class="diff-new">If a</ins> <code><ins class=
                   32241: "diff-new">Document</ins></code> <ins class="diff-new">or image was
                   32242: returned by the</ins> <code><ins class=
                   32243: "diff-new">XMLHttpRequest</ins></code> <ins class=
                   32244: "diff-new">API</ins></dt>
                   32245: <dd><ins class="diff-new">The</ins> <a href="#origin0"><ins class=
                   32246: "diff-new">origin</ins></a> <ins class="diff-new">and</ins>
                   32247: <a href="#effective3"><ins class="diff-new">effective script
                   32248: origin</ins></a> <ins class="diff-new">are equal to the</ins>
                   32249: <a href="#origin0"><ins class="diff-new">origin</ins></a>
                   32250: <ins class="diff-new">and</ins> <a href="#effective3"><ins class=
                   32251: "diff-new">effective script origin</ins></a> <ins class=
                   32252: "diff-new">of the</ins> <code><ins class=
                   32253: "diff-new">Document</ins></code> <ins class="diff-new">object that
                   32254: was the</ins> <a href="#active"><ins class="diff-new">active
                   32255: document</ins></a> of <ins class="diff-new">the</ins>
                   32256: <code><a href="#window"><ins class=
                   32257: "diff-new">Window</ins></a></code> <ins class="diff-new">object of
                   32258: the browsing context from which the</ins> <code><ins class=
                   32259: "diff-new">XMLHttpRequest</ins></code> <ins class=
                   32260: "diff-new">constructor was invoked. (That is, they track the</ins>
                   32261: <code><ins class="diff-new">Document</ins></code> <ins class=
                   32262: "diff-new">to which the</ins> <code><ins class=
                   32263: "diff-new">XMLHttpRequest</ins></code> <ins class=
                   32264: "diff-new">object's</ins> <a href=
                   32265: "http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#document-pointer">
                   32266: <code><ins class="diff-new">Document</ins></code> <ins class=
                   32267: "diff-new">pointer</ins></a> <ins class="diff-new">pointed when it
                   32268: was created.)</ins> <a href="#references"><ins class=
                   32269: "diff-new">[XHR]</ins></a></dd>
                   32270: <dt><ins class="diff-new">If</ins> a <code>Document</code> or image
                   32271: <ins class="diff-new">was generated from a</ins> <a href=
                   32272: "#the-javascript" title="javascript protocol"><code><ins class=
                   32273: "diff-new">javascript:</ins></code> <ins class=
                   32274: "diff-new">URI</ins></a></dt>
                   32275: <dd><ins class="diff-new">The</ins> <a href="#origin0"><ins class=
                   32276: "diff-new">origin</ins></a> <ins class="diff-new">is equal to
                   32277: the</ins> <a href="#origin0"><ins class="diff-new">origin</ins></a>
                   32278: <ins class="diff-new">of the script of</ins> that <a href=
                   32279: "#the-javascript" title="javascript protocol"><code><ins class=
                   32280: "diff-new">javascript:</ins></code> <ins class=
                   32281: "diff-new">URI</ins></a> .</dd>
                   32282: <dt><ins class="diff-new">If a</ins> <code><ins class=
                   32283: "diff-new">Document</ins></code> <ins class="diff-new">or
                   32284: image</ins> was served over the network and <del class=
                   32285: "diff-old">whose</del> <ins class="diff-chg">has an</ins> address
                   32286: <ins class="diff-new">that</ins> uses a URI scheme with a
                   32287: server-based naming authority</dt>
                   32288: <dd><ins class="diff-new">The</ins> <a href="#origin0"><ins class=
                   32289: "diff-new">origin</ins></a> is the <del class="diff-old">tuple
                   32290: consisting</del> <a href="#origin0"><ins class=
                   32291: "diff-chg">origin</ins></a> of the <del class=
                   32292: "diff-old">&lt;scheme&gt;, &lt;host&gt;/&lt;ihost&gt;, and
                   32293: &lt;port&gt; parts</del> <ins class="diff-chg">full URI</ins> of
                   32294: the <code>Document</code> <del class="diff-old">'s full URI.
                   32295: [RFC3986] [RFC3987]</del> <ins class="diff-chg">or
                   32296: image.</ins></dd>
                   32297: <dt><ins class="diff-chg">If a</ins> <code><ins class=
                   32298: "diff-chg">Document</ins></code> <ins class="diff-chg">or image was
                   32299: generated from a</ins> <code title=""><ins class=
                   32300: "diff-chg">data:</ins></code> <ins class="diff-chg">URI that was
                   32301: returned as the location of an HTTP redirect (or equivalent in
                   32302: other protocols)</ins></dt>
                   32303: <dd>The <a href="#origin0">origin</a> <ins class="diff-new">is
                   32304: the</ins> <a href="#origin0"><ins class="diff-new">origin</ins></a>
                   32305: of <ins class="diff-new">the URI that redirected to the</ins>
                   32306: <code title=""><ins class="diff-new">data:</ins></code> <ins class=
                   32307: "diff-new">URI.</ins></dd>
                   32308: <dt><ins class="diff-new">If</ins> a <code>Document</code> or image
                   32309: <del class="diff-old">that</del> was generated from a <code title=
                   32310: "">data:</code> URI found in another <code>Document</code> or in a
                   32311: script</dt>
                   32312: <dd><ins class="diff-new">The</ins> <a href="#origin0"><ins class=
                   32313: "diff-new">origin</ins></a> is the <a href="#origin0">origin</a> of
                   32314: the <code>Document</code> or <del class="diff-old">script.</del>
                   32315: <ins class="diff-chg">script in which the</ins> <code title=
                   32316: ""><ins class="diff-chg">data:</ins></code> <ins class=
                   32317: "diff-chg">URI was found.</ins></dd>
                   32318: <dt><ins class="diff-chg">If a</ins> <code><ins class=
                   32319: "diff-chg">Document</ins></code> <ins class="diff-chg">has the URI
                   32320: "</ins> <code><ins class="diff-chg">about:blank</ins></code>
                   32321: <ins class="diff-chg">"</ins></dt>
                   32322: <dd>The <a href="#origin0">origin</a> of <ins class=
                   32323: "diff-new">the</ins> <code><ins class=
                   32324: "diff-new">Document</ins></code> <ins class="diff-new">is</ins>
                   32325: <a href="#about-blank-origin"><ins class="diff-new">the</ins>
                   32326: <span><ins class="diff-new">origin</ins></span> <ins class=
                   32327: "diff-new">it was assigned when its browsing context was
                   32328: created</ins></a> .</dd>
                   32329: <dt><ins class="diff-new">If</ins> a <code>Document</code> or image
                   32330: <del class="diff-old">that</del> was <del class=
                   32331: "diff-old">generated from</del> <ins class="diff-chg">obtained in
                   32332: some other manner (e.g. a</ins> <code title=""><ins class=
                   32333: "diff-chg">data:</ins></code> <ins class="diff-chg">URI typed in by
                   32334: the user,</ins> a <code><ins class="diff-new">Document</ins></code>
                   32335: <ins class="diff-new">created using the</ins> <code title=
                   32336: ""><ins class="diff-new">createDocument()</ins></code> <ins class=
                   32337: "diff-new">API, a</ins> <code title="">data:</code> URI <del class=
                   32338: "diff-old">from another source</del> <ins class="diff-chg">returned
                   32339: as the location of an HTTP redirect, etc)</ins></dt>
                   32340: <dd><ins class="diff-chg">The</ins> <a href="#origin0"><ins class=
                   32341: "diff-chg">origin</ins></a> is a globally unique identifier
                   32342: assigned when the <del class="diff-old">document is created. The
                   32343: origin of a</del> <code>Document</code> or image <del class=
                   32344: "diff-old">that was generated from</del> <ins class="diff-chg">is
                   32345: created.</ins></dd>
                   32346: </dl>
                   32347: <p><ins class="diff-chg">When</ins> a <code><del class=
                   32348: "diff-old">javascript:</del> <ins class=
                   32349: "diff-chg">Document</ins></code> <del class="diff-old">URI</del>
                   32350: <ins class="diff-chg">is created, unless stated otherwise above,
                   32351: its</ins> <a href="#effective3"><ins class="diff-chg">effective
                   32352: script origin</ins></a> is <ins class="diff-new">initialized
                   32353: to</ins> the <del class="diff-old">same as the</del> <a href=
                   32354: "#origin0">origin</a> of <del class="diff-old">that</del>
                   32355: <ins class="diff-chg">the</ins> <code><del class=
                   32356: "diff-old">javascript:</del> <ins class=
                   32357: "diff-chg">Document</ins></code> .<ins class="diff-chg">However,
                   32358: the</ins> <code title="dom-document-domain"><a href=
                   32359: "#domain"><ins class="diff-chg">document.domain</ins></a></code>
                   32360: <del class="diff-old">URI.</del> <ins class="diff-chg">attribute
                   32361: can be used to change it.</ins></p>
                   32362: </dd>
                   32363: </dl>
                   32364: <p>The <dfn id="serialization0"><ins class="diff-new">serialization
                   32365: of an origin</ins></dfn> <ins class="diff-new">is the</ins> string
                   32366: <del class="diff-old">representing</del> <ins class=
                   32367: "diff-chg">obtained by applying</ins> the <del class=
                   32368: "diff-old">script's domain</del> <ins class="diff-chg">following
                   32369: algorithm to the given</ins> <a href="#origin0"><ins class=
                   32370: "diff-chg">origin</ins></a> :</p>
                   32371: <ol>
                   32372: <li><ins class="diff-chg">If the</ins> <a href=
                   32373: "#origin0"><ins class="diff-chg">origin</ins></a> in <del class=
                   32374: "diff-old">IDNA format</del> <ins class="diff-chg">question</ins>
                   32375: is <del class="diff-old">obtained as follows: take</del>
                   32376: <ins class="diff-chg">not a scheme/host/port tuple, then
                   32377: return</ins> the <del class="diff-old">domain</del> <ins class=
                   32378: "diff-chg">empty string.</ins></li>
                   32379: <li><ins class="diff-chg">Otherwise, let</ins> <var title=
                   32380: ""><ins class="diff-chg">result</ins></var> <ins class=
                   32381: "diff-chg">be the scheme</ins> part of the <del class=
                   32382: "diff-old">script's</del> <a href="#origin0">origin</a> <del class=
                   32383: "diff-old">tuple and apply</del> <ins class=
                   32384: "diff-chg">tuple.</ins></li>
                   32385: <li><ins class="diff-chg">Append</ins> the <del class=
                   32386: "diff-old">IDNA ToASCII algorithm and then</del> <ins class=
                   32387: "diff-chg">string "</ins> <code title="">://</code><ins class=
                   32388: "diff-chg">" to</ins> <var title=""><ins class=
                   32389: "diff-chg">result</ins></var> .</li>
                   32390: <li><ins class="diff-chg">Apply</ins> the IDNA ToUnicode algorithm
                   32391: to each component of the <del class="diff-old">domain name (with
                   32392: both</del> <ins class="diff-chg">host part of</ins> the <del class=
                   32393: "diff-old">AllowUnassigned and UseSTD3ASCIIRules flags set both
                   32394: times). [RFC3490]</del> <a href="#origin0"><ins class=
                   32395: "diff-chg">origin</ins></a> <del class="diff-old">If ToASCII
                   32396: fails</del> <ins class="diff-chg">tuple, and append the results —
                   32397: each component, in the same order, separated by U+002E FULL STOP
                   32398: characters (".") —</ins> to <del class="diff-old">convert one
                   32399: of</del> <var title=""><ins class="diff-chg">result</ins></var>
                   32400: .</li>
                   32401: <li><ins class="diff-chg">If</ins> the <del class=
                   32402: "diff-old">components</del> <ins class="diff-chg">port part</ins>
                   32403: of the <del class="diff-old">string, e.g. because it is too long or
                   32404: because it contains invalid characters, or if the</del> <a href=
                   32405: "#origin0">origin <del class="diff-old">of</del></a> <ins class=
                   32406: "diff-chg">tuple gives a port that is different from</ins> the
                   32407: <del class="diff-old">script has no domain part, then</del>
                   32408: <ins class="diff-chg">default port for</ins> the <del class=
                   32409: "diff-old">string representing</del> <ins class="diff-chg">protocol
                   32410: given by</ins> the <del class="diff-old">script's domain in IDNA
                   32411: format cannot be obtained. (ToUnicode is defined to never fail.)
                   32412: It's been suggested that we should put IP addresses into</del>
                   32413: <ins class="diff-chg">scheme part of</ins> the <a href=
                   32414: "#origin0">origin</a> tuple, <del class="diff-old">to mitigate DNS
                   32415: rebinding attacks. However that would kill multi-homed systems like
                   32416: GMail. Should we do something like have</del> <ins class=
                   32417: "diff-chg">then append</ins> a <del class="diff-old">DNS record say
                   32418: whether or not to include</del> <ins class="diff-chg">U+003A COLON
                   32419: character (":") and</ins> the <del class="diff-old">IP</del>
                   32420: <ins class="diff-chg">given port,</ins> in <del class=
                   32421: "diff-old">the origin for a host? 4.3.3. Unscripted same-origin
                   32422: checks</del> <ins class="diff-chg">base ten, to</ins> <var title=
                   32423: ""><ins class="diff-chg">result</ins></var> .</li>
                   32424: <li><ins class="diff-chg">Return</ins> <var title=""><ins class=
                   32425: "diff-chg">result</ins></var> .</li>
                   32426: </ol>
                   32427: <p><del class="diff-old">When two URIs</del> <ins class=
                   32428: "diff-chg">Two</ins> <a href="#origin0" title="origin"><ins class=
                   32429: "diff-chg">origins</ins></a> are <ins class="diff-new">said</ins>
                   32430: to be <del class="diff-old">compared to determine if they
                   32431: have</del> the <dfn id="same-origin">same <del class=
                   32432: "diff-old">scheme/host/port , it means that</del> <ins class=
                   32433: "diff-chg">origin</ins></dfn> <ins class="diff-chg">if</ins> the
                   32434: following algorithm <del class="diff-old">must be invoked, where
                   32435: uri 1 and uri 2 are the two URIs.</del> <ins class=
                   32436: "diff-chg">returns true:</ins></p>
                   32437: <ol>
                   32438: <li>
                   32439: <p><del class="diff-old">First, both</del> <ins class=
                   32440: "diff-chg">Let</ins> <var title=""><del class="diff-old">uri
                   32441: 1</del> <ins class="diff-chg">A</ins></var> <ins class=
                   32442: "diff-new">be the first</ins> <a href="#origin0"><ins class=
                   32443: "diff-new">origin</ins></a> <ins class="diff-new">being
                   32444: compared,</ins> and <var title=""><del class="diff-old">uri 2</del>
                   32445: <ins class="diff-chg">B</ins></var> <del class=
                   32446: "diff-old">must</del> be <del class="diff-old">normalized to
                   32447: obtain</del> the <del class="diff-old">two tuples ( scheme 1 , host
                   32448: 1 ,</del> <ins class="diff-chg">second</ins> <a href=
                   32449: "#origin0"><ins class="diff-chg">origin</ins></a> <ins class=
                   32450: "diff-chg">being compared.</ins></p>
                   32451: </li>
                   32452: <li>
                   32453: <p><ins class="diff-chg">If</ins> <var title=""><del class=
                   32454: "diff-old">port 1</del> <ins class="diff-chg">A</ins></var>
1.2     ! mike     32455: <del class="diff-old">)</del> and <del class="diff-old">( scheme 2
        !          32456: ,</del> <var title=""><del class="diff-old">host 2 , port 2</del>
        !          32457: <ins class="diff-chg">B</ins></var> <del class="diff-old">), by
        !          32458: applying the following subalgorithm to each URI:</del> <ins class=
        !          32459: "diff-chg">are both opaque identifiers, and their value is equal,
        !          32460: then return true.</ins></p>
1.1       mike     32461: </li>
                   32462: <li>
                   32463: <p><del class="diff-old">Let</del> <ins class="diff-chg">Otherwise,
                   32464: if either</ins> <var title=""><del class="diff-old">uri</del>
                   32465: <ins class="diff-chg">A</ins></var> <del class="diff-old">be the
                   32466: URI being normalized.</del> <ins class="diff-chg">or</ins>
                   32467: <var title=""><ins class="diff-chg">B</ins></var> <ins class=
                   32468: "diff-chg">or both are opaque identifiers, return false.</ins></p>
                   32469: </li>
                   32470: <li>
                   32471: <p><del class="diff-old">Parse</del> <ins class="diff-chg">If</ins>
                   32472: <var title=""><del class="diff-old">uri</del> <ins class=
                   32473: "diff-chg">A</ins></var> <del class="diff-old">according to the
                   32474: rules described in RFC 3986</del> and <del class="diff-old">RFC
                   32475: 3987. [RFC3986] [RFC3987]</del> <var title=""><ins class=
                   32476: "diff-chg">B</ins></var> <ins class="diff-chg">have scheme
                   32477: components that are not identical, return false.</ins></p>
                   32478: </li>
                   32479: <li>
                   32480: <p>If <var title=""><del class="diff-old">uri</del> <ins class=
                   32481: "diff-chg">A</ins></var> <ins class="diff-chg">and</ins>
                   32482: <var title=""><ins class="diff-chg">B</ins></var> <del class=
                   32483: "diff-old">does not use a server-based naming authority, then fail
                   32484: the overall algorithm — the two URIs do not</del> have <del class=
                   32485: "diff-old">the same scheme/host/port.</del> <ins class=
                   32486: "diff-chg">host components that are not identical, return
                   32487: false.</ins></p>
                   32488: </li>
                   32489: <li>
                   32490: <p><del class="diff-old">Let</del> <ins class="diff-chg">If</ins>
                   32491: <var title=""><del class="diff-old">scheme</del> <ins class=
                   32492: "diff-chg">A</ins></var> <del class="diff-old">be</del> <ins class=
                   32493: "diff-chg">and</ins> <var title=""><ins class=
                   32494: "diff-chg">B</ins></var> <ins class="diff-chg">have port components
                   32495: that are not identical, return false.</ins></p>
                   32496: </li>
                   32497: <li>
                   32498: <p><ins class="diff-chg">Return true.</ins></p>
                   32499: </li>
                   32500: </ol>
                   32501: <h4 id="relaxing"><span class="secno"><ins class=
                   32502: "diff-chg">4.3.1</ins></span> <ins class="diff-chg">Relaxing</ins>
                   32503: the <del class="diff-old">&lt;scheme&gt; component of</del>
                   32504: <ins class="diff-chg">same-origin restriction</ins></h4>
                   32505: <p><ins class="diff-chg">The</ins> <dfn id="domain" title=
                   32506: "dom-document-domain"><code><ins class=
                   32507: "diff-chg">domain</ins></code></dfn> <ins class=
                   32508: "diff-chg">attribute on</ins> <code><ins class=
                   32509: "diff-chg">Document</ins></code> <ins class="diff-chg">objects must
                   32510: be initialized to</ins> <a href="#domain0">the <del class=
                   32511: "diff-old">URI. If</del> <ins class="diff-chg">document's
                   32512: domain</ins></a> ,<ins class="diff-chg">if it has one, and</ins>
                   32513: the <del class="diff-old">UA doesn't support</del> <ins class=
                   32514: "diff-chg">empty string otherwise. On getting,</ins> the
                   32515: <del class="diff-old">given protocol, then fail</del> <ins class=
                   32516: "diff-chg">attribute must return its current value, unless</ins>
                   32517: the <del class="diff-old">overall algorithm —</del> <ins class=
                   32518: "diff-chg">document was created by</ins> <code><ins class=
                   32519: "diff-chg">XMLHttpRequest</ins></code> ,<ins class="diff-chg">in
                   32520: which case it must throw an</ins> <code><ins class=
                   32521: "diff-chg">INVALID_ACCESS_ERR</ins></code> <ins class=
                   32522: "diff-chg">exception. On setting,</ins> the <del class=
                   32523: "diff-old">two URIs do not have</del> <ins class="diff-chg">user
                   32524: agent must run</ins> the <del class="diff-old">same
                   32525: scheme/host/port .</del> <ins class="diff-chg">following
                   32526: algorithm:</ins></p>
                   32527: <ol>
                   32528: <li>
                   32529: <p><del class="diff-old">Let host be the &lt;host&gt;/&lt;ihost&gt;
                   32530: component of</del> <ins class="diff-chg">If</ins> the <del class=
                   32531: "diff-old">URI.</del> <ins class="diff-chg">document was created
                   32532: by</ins> <code><ins class="diff-chg">XMLHttpRequest</ins></code>
                   32533: ,<ins class="diff-chg">throw an</ins> <code><ins class=
                   32534: "diff-chg">INVALID_ACCESS_ERR</ins></code> <ins class=
                   32535: "diff-chg">exception and abort these steps.</ins></p>
                   32536: </li>
                   32537: <li>
                   32538: <p>Apply the IDNA ToASCII algorithm to <del class="diff-old">host
                   32539: ,</del> <ins class="diff-chg">the new value,</ins> with both the
                   32540: AllowUnassigned and UseSTD3ASCIIRules flags set. Let <var title=
                   32541: ""><del class="diff-old">host</del> <ins class="diff-chg">new
                   32542: value</ins></var> be the result of the ToASCII algorithm.</p>
                   32543: <p>If ToASCII fails to convert one of the components of the string,
                   32544: e.g. because it is too long or because it contains invalid
                   32545: characters, then <del class="diff-old">fail the overall algorithm —
                   32546: the two URIs do not have the same scheme/host/port.</del>
                   32547: <ins class="diff-chg">throw a</ins> <a href=
                   32548: "#security9"><ins class="diff-chg">security exception</ins></a>
                   32549: <ins class="diff-chg">and abort these steps.</ins> <a href=
                   32550: "#references">[RFC3490]</a></p>
                   32551: </li>
                   32552: <li>
                   32553: <p>If <del class="diff-old">no port is explicitly listed, then
                   32554: let</del> <var title=""><del class="diff-old">port</del>
                   32555: <ins class="diff-chg">new value</ins></var> <del class=
                   32556: "diff-old">be</del> <ins class="diff-chg">is not exactly equal
                   32557: to</ins> the <del class="diff-old">default port for</del>
                   32558: <ins class="diff-chg">current value of</ins> the <del class=
                   32559: "diff-old">protocol given by scheme . Otherwise, let</del>
                   32560: <code title="dom-document-domain"><a href="#domain"><ins class=
                   32561: "diff-chg">document.domain</ins></a></code> <ins class=
                   32562: "diff-chg">attribute, then run these substeps:</ins></p>
                   32563: <ol>
                   32564: <li>
                   32565: <p><ins class="diff-chg">If the current value is an IP address,
                   32566: throw a</ins> <a href="#security9"><ins class="diff-chg">security
                   32567: exception</ins></a> <ins class="diff-chg">and abort these
                   32568: steps.</ins></p>
                   32569: </li>
                   32570: <li>
                   32571: <p><ins class="diff-chg">If</ins> <var title=""><del class=
                   32572: "diff-old">port be</del> <ins class="diff-chg">new
                   32573: value</ins></var> ,<ins class="diff-chg">prefixed by a U+002E FULL
                   32574: STOP ("."), does not exactly match</ins> the <del class=
                   32575: "diff-old">&lt;port&gt; component</del> <ins class=
                   32576: "diff-chg">end</ins> of the <del class="diff-old">URI.</del>
                   32577: <ins class="diff-chg">current value, throw a</ins> <a href=
                   32578: "#security9"><ins class="diff-chg">security exception</ins></a>
                   32579: <ins class="diff-chg">and abort these steps.</ins></p>
                   32580: </li>
                   32581: </ol>
                   32582: </li>
                   32583: <li>
                   32584: <p><del class="diff-old">Return</del> <ins class=
                   32585: "diff-chg">Set</ins> the <del class="diff-old">tuple ( scheme
                   32586: ,</del> <ins class="diff-chg">attribute's value to</ins>
                   32587: <var title=""><ins class="diff-new">new value</ins></var> .</p>
                   32588: </li>
                   32589: <li>
                   32590: <p><ins class="diff-new">Set the</ins> host <del class=
                   32591: "diff-old">,</del> <ins class="diff-chg">part of the</ins> <a href=
                   32592: "#effective3"><ins class="diff-chg">effective script
                   32593: origin</ins></a> <ins class="diff-chg">tuple of the</ins>
                   32594: <code><ins class="diff-chg">Document</ins></code> <ins class=
                   32595: "diff-chg">to</ins> <var title=""><ins class="diff-new">new
                   32596: value</ins></var> .</p>
                   32597: </li>
                   32598: <li>
                   32599: <p><ins class="diff-new">Set the</ins> port <del class=
                   32600: "diff-old">).</del> <ins class="diff-chg">part of the</ins>
                   32601: <a href="#effective3"><ins class="diff-chg">effective script
                   32602: origin</ins></a> <ins class="diff-chg">tuple of the</ins>
                   32603: <code><ins class="diff-chg">Document</ins></code> <ins class=
                   32604: "diff-chg">to "manual override" (a value that, for the purposes
                   32605: of</ins> <a href="#same-origin" title="same origin"><ins class=
                   32606: "diff-chg">comparing origins</ins></a> ,<ins class="diff-chg">is
                   32607: identical to "manual override" but not identical to any other
                   32608: value).</ins></p>
                   32609: </li>
                   32610: </ol>
                   32611: <p><ins class="diff-new">The</ins> <dfn id="domain0" title=
                   32612: "the document's domain"><ins class="diff-new">domain</ins></dfn>
                   32613: <ins class="diff-new">of a</ins> <code><ins class=
                   32614: "diff-new">Document</ins></code> <ins class="diff-new">is the host
                   32615: part of the document's</ins> <a href="#origin0"><ins class=
                   32616: "diff-new">origin</ins></a> ,<ins class="diff-new">if that is a
                   32617: scheme/host/port tuple.</ins> If <del class="diff-old">scheme
                   32618: 1</del> <ins class="diff-chg">it isn't, then the document does not
                   32619: have a domain.</ins></p>
                   32620: <p class="note"><ins class="diff-chg">The</ins> <code title=
                   32621: "dom-document-domain"><a href="#domain"><ins class=
                   32622: "diff-chg">domain</ins></a></code> <ins class=
                   32623: "diff-chg">attribute</ins> is <del class="diff-old">not
                   32624: case-insensitively identical</del> <ins class="diff-chg">used</ins>
                   32625: to <del class="diff-old">scheme 2</del> <ins class=
                   32626: "diff-chg">enable pages on different hosts of a domain to access
                   32627: each others' DOMs.</ins></p>
                   32628: <h4 id="the-string"><del class="diff-old">,</del> <span class=
                   32629: "secno"><ins class="diff-chg">4.3.2</ins></span> <ins class=
                   32630: "diff-chg">The string representing the script's domain in IDNA
                   32631: format</ins></h4>
                   32632: <p><dfn id="the-string0"><ins class="diff-chg">The string
                   32633: representing the script's domain in IDNA format</ins></dfn>
                   32634: <ins class="diff-chg">is obtained as follows: take the host part of
                   32635: the script's</ins> <a href="#origin0"><ins class=
                   32636: "diff-chg">origin</ins></a> <ins class="diff-chg">tuple and apply
                   32637: the IDNA ToASCII algorithm and then the IDNA ToUnicode algorithm to
                   32638: each component of the domain name (with both the AllowUnassigned
                   32639: and UseSTD3ASCIIRules flags set both times).</ins> <a href=
                   32640: "#references"><ins class="diff-chg">[RFC3490]</ins></a></p>
                   32641: <p><ins class="diff-chg">If ToASCII fails to convert one of the
                   32642: components of the string, e.g. because it is too long or because it
                   32643: contains invalid characters,</ins> or if <del class="diff-old">host
                   32644: 1</del> <ins class="diff-chg">the</ins> <a href=
                   32645: "#origin0"><ins class="diff-chg">origin</ins></a> <ins class=
                   32646: "diff-chg">of the script</ins> is not <del class=
                   32647: "diff-old">case-insensitively identical</del> <ins class=
                   32648: "diff-chg">a scheme/host/port tuple, then the string representing
                   32649: the script's domain in IDNA format cannot be obtained. (ToUnicode
                   32650: is defined</ins> to <del class="diff-old">host 2</del> <ins class=
                   32651: "diff-chg">never fail.)</ins></p>
                   32652: <h3 id="scripting"><del class="diff-old">,</del> <span class=
                   32653: "secno"><ins class="diff-chg">4.4</ins></span> <ins class=
                   32654: "diff-chg">Scripting</ins></h3>
                   32655: <p><ins class="diff-chg">Various mechanisms can cause
                   32656: author-provided executable code to run in the context of a
                   32657: document. These mechanisms include, but are probably not limited
                   32658: to:</ins></p>
                   32659: <ul>
                   32660: <li><ins class="diff-chg">Processing of</ins> <code><a href=
                   32661: "#script1"><ins class="diff-chg">script</ins></a></code>
                   32662: <ins class="diff-chg">elements.</ins></li>
                   32663: <li><ins class="diff-chg">Processing of inline</ins> <code title=
                   32664: "javascript protocol"><a href="#the-javascript"><ins class=
                   32665: "diff-chg">javascript:</ins></a></code> <ins class="diff-chg">URIs
                   32666: (e.g. the</ins> <code title="attr-img-src"><a href=
                   32667: "#src"><ins class="diff-chg">src</ins></a></code> <ins class=
                   32668: "diff-chg">attribute of</ins> <code><a href="#img"><ins class=
                   32669: "diff-chg">img</ins></a></code> <ins class=
                   32670: "diff-chg">elements,</ins> or <del class="diff-old">if port 1</del>
                   32671: <ins class="diff-chg">an</ins> <code title=""><ins class=
                   32672: "diff-chg">@import</ins></code> <ins class="diff-chg">rule in a
                   32673: CSS</ins> <code><a href="#style1"><ins class=
                   32674: "diff-chg">style</ins></a></code> <ins class="diff-chg">element
                   32675: block).</ins></li>
                   32676: <li><ins class="diff-chg">Event handlers, whether registered
                   32677: through the DOM using</ins> <code title=""><ins class=
                   32678: "diff-chg">addEventListener()</ins></code> ,<ins class=
                   32679: "diff-chg">by explicit</ins> <a href="#event3"><ins class=
                   32680: "diff-chg">event handler content attributes</ins></a> ,<ins class=
                   32681: "diff-chg">by</ins> <a href="#event4"><ins class="diff-chg">event
                   32682: handler DOM attributes</ins></a> ,<ins class="diff-chg">or
                   32683: otherwise.</ins></li>
                   32684: <li><ins class="diff-chg">Processing of technologies like XBL or
                   32685: SVG that have their own scripting features.</ins></li>
                   32686: </ul>
                   32687: <h4 id="script0"><span class="secno"><ins class=
                   32688: "diff-chg">4.4.1</ins></span> <ins class="diff-chg">Script
                   32689: execution contexts</ins></h4>
                   32690: <p><ins class="diff-chg">The</ins> <dfn id="script2"><ins class=
                   32691: "diff-chg">script execution context</ins></dfn> <ins class=
                   32692: "diff-chg">of a script</ins> is <ins class="diff-new">defined when
                   32693: that script is created. It is typically a</ins> <code><a href=
                   32694: "#window"><ins class="diff-new">Window</ins></a></code> <ins class=
                   32695: "diff-new">object.</ins></p>
                   32696: <p><ins class="diff-new">A</ins> <a href="#script2"><ins class=
                   32697: "diff-new">script execution context</ins></a> <ins class=
                   32698: "diff-new">always has an associated</ins> <a href=
                   32699: "#browsing1"><ins class="diff-new">browsing context</ins></a>
                   32700: .<ins class="diff-new">If the</ins> <a href="#script2"><ins class=
                   32701: "diff-new">script execution context</ins></a> <ins class=
                   32702: "diff-new">is a</ins> <code><a href="#window"><ins class=
                   32703: "diff-new">Window</ins></a></code> <ins class="diff-new">object,
                   32704: then that object's</ins> <a href="#browsing1"><ins class=
                   32705: "diff-new">browsing context</ins></a> <ins class="diff-new">is it.
                   32706: Otherwise, the</ins> <a href="#script2"><ins class=
                   32707: "diff-new">script execution context</ins></a> <ins class=
                   32708: "diff-new">is associated explicitly with a</ins> <a href=
                   32709: "#browsing1"><ins class="diff-new">browsing context</ins></a>
                   32710: <ins class="diff-new">when it is created.</ins></p>
                   32711: <p><ins class="diff-new">It is said that</ins> <dfn id=
                   32712: "scripting1"><ins class="diff-new">scripting is
                   32713: disabled</ins></dfn> <ins class="diff-new">in a</ins> <a href=
                   32714: "#script2"><ins class="diff-new">script execution context</ins></a>
                   32715: <ins class="diff-new">when any of the following conditions are
                   32716: true:</ins></p>
                   32717: <ul>
                   32718: <li><ins class="diff-new">The user agent does</ins> not <del class=
                   32719: "diff-old">identical</del> <ins class="diff-chg">support
                   32720: scripting.</ins></li>
                   32721: <li><ins class="diff-chg">The user has disabled scripting for
                   32722: this</ins> <a href="#script2"><ins class="diff-chg">script
                   32723: execution context</ins></a> .<ins class="diff-chg">(User agents may
                   32724: provide users with the option</ins> to <del class="diff-old">port
                   32725: 2</del> <ins class="diff-chg">disable scripting globally, on a
                   32726: per-origin basis, or in other ways down to the granularity of
                   32727: individual</ins> <a href="#script2" title=
                   32728: "script execution context"><ins class="diff-chg">script execution
                   32729: contexts</ins></a> .)</li>
                   32730: <li id="designModeScriptBlocked"><ins class="diff-chg">The</ins>
                   32731: <a href="#script2"><ins class="diff-chg">script execution
                   32732: context</ins></a> <ins class="diff-chg">'s associated</ins>
                   32733: <a href="#browsing1"><ins class="diff-chg">browsing
                   32734: context</ins></a> <ins class="diff-chg">'s</ins> <a href=
                   32735: "#active"><ins class="diff-chg">active document</ins></a>
                   32736: <ins class="diff-chg">has</ins> <code title=
                   32737: "dom-document-designMode"><del class="diff-old">, then fail</del>
                   32738: <a href="#designMode"><ins class=
                   32739: "diff-chg">designMode</ins></a></code> <ins class=
                   32740: "diff-chg">enabled.</ins></li>
                   32741: <li id="sandboxScriptBlocked"><ins class="diff-chg">The</ins>
                   32742: <a href="#script2"><ins class="diff-chg">script execution
                   32743: context</ins></a> <ins class="diff-chg">'s associated</ins>
                   32744: <a href="#browsing1"><ins class="diff-chg">browsing
                   32745: context</ins></a> <ins class="diff-chg">has</ins> the <del class=
                   32746: "diff-old">overall algorithm —</del> <a href=
                   32747: "#sandboxed4"><ins class="diff-chg">sandboxed scripts browsing
                   32748: context flag</ins></a> <ins class="diff-chg">set.</ins></li>
                   32749: </ul>
                   32750: <p><ins class="diff-chg">A node is said to be</ins> <dfn id=
                   32751: "without"><ins class="diff-chg">without script</ins></dfn>
                   32752: <ins class="diff-chg">if either</ins> the <del class="diff-old">two
                   32753: URIs do</del> <code><ins class="diff-chg">Document</ins></code>
                   32754: <ins class="diff-chg">object of the node (the node itself, it is
                   32755: itself a</ins> <code><ins class="diff-chg">Document</ins></code>
                   32756: <ins class="diff-chg">object) does</ins> not have <del class=
                   32757: "diff-old">the same scheme/host/port.</del> <ins class=
                   32758: "diff-chg">an associated</ins> <a href="#browsing1"><ins class=
                   32759: "diff-chg">browsing context</ins></a> ,<ins class=
                   32760: "diff-chg">or</ins> <a href="#scripting1"><ins class=
                   32761: "diff-chg">scripting is disabled</ins></a> <ins class="diff-chg">in
                   32762: that</ins> <a href="#browsing1"><ins class="diff-chg">browsing
                   32763: context</ins></a> .</p>
                   32764: <p><del class="diff-old">Otherwise,</del> <ins class="diff-chg">A
                   32765: node is said to be</ins> <dfn id="with-script"><ins class=
                   32766: "diff-chg">with script</ins></dfn> <ins class="diff-chg">if it is
                   32767: not</ins> <a href="#without"><ins class="diff-chg">without
                   32768: script</ins></a> .</p>
                   32769: <p class="big-issue"><ins class="diff-chg">If you can find a better
                   32770: pair of terms than "with script" and "without script" let me know.
                   32771: The only things I can find that are less confusing are also way,
                   32772: way longer.</ins></p>
                   32773: <p><ins class="diff-chg">When a script is to be executed in a</ins>
                   32774: <a href="#script2"><ins class="diff-chg">script execution
                   32775: context</ins></a> <ins class="diff-chg">in which</ins> <a href=
                   32776: "#scripting1"><ins class="diff-chg">scripting is disabled</ins></a>
                   32777: , the <del class="diff-old">two URIs</del> <ins class=
                   32778: "diff-chg">script must</ins> do <del class="diff-old">have</del>
                   32779: <ins class="diff-chg">nothing and return nothing (a void return
                   32780: value).</ins></p>
                   32781: <p class="note"><ins class="diff-chg">Thus, for instance,
                   32782: enabling</ins> <code title="dom-document-designMode"><a href=
                   32783: "#designMode"><ins class="diff-chg">designMode</ins></a></code>
                   32784: <ins class="diff-chg">will disable any event handler attributes,
                   32785: event listeners, timeouts, etc, that were set by scripts in</ins>
                   32786: the <del class="diff-old">same scheme/host/port.</del> <ins class=
                   32787: "diff-chg">document.</ins></p>
                   32788: <h4 id="security4"><span class="secno"><del class=
                   32789: "diff-old">4.3.4.</del> <ins class="diff-chg">4.4.2</ins></span>
                   32790: Security exceptions</h4>
                   32791: <p class="big-issue">Define <dfn id="security9">security
                   32792: exception</dfn> .</p>
                   32793: <h4 id="javascript-protocol"><span class="secno"><del class=
                   32794: "diff-old">4.3.5.</del> <ins class="diff-chg">4.4.3</ins></span>
                   32795: <dfn id="the-javascript" title="javascript protocol">The
                   32796: <code title="">javascript:</code> protocol</dfn></h4>
                   32797: <p>A URI using the <code title="">javascript:</code> protocol must,
                   32798: if <del class="diff-old">evaluated,</del> <ins class="diff-chg">and
                   32799: when dereferenced,</ins> be evaluated <ins class="diff-new">by
                   32800: executing the script obtained</ins> using the <del class=
                   32801: "diff-old">in-context evaluation</del> <ins class=
                   32802: "diff-chg">content retrieval</ins> operation defined for
                   32803: <code title="">javascript:</code> URIs. <a href=
                   32804: "#references">[JSURI]</a></p>
                   32805: <p>When a <a href="#browsing1">browsing context</a> is <a href=
                   32806: "#navigate" title="navigate">navigated</a> to a
                   32807: <code>javascript:</code> URI, and the <a href="#active">active
                   32808: document</a> of that browsing context has the <a href=
                   32809: "#same-origin">same origin</a> as the <ins class="diff-new">script
                   32810: given by that</ins> URI, the <del class=
                   32811: "diff-old">dereference</del> <a href="#script2"><ins class=
                   32812: "diff-chg">script execution</ins> context</a> must be the
                   32813: <code><a href="#window"><ins class=
                   32814: "diff-chg">Window</ins></a></code> <ins class="diff-chg">object of
                   32815: the</ins> <a href="#browsing1">browsing context</a> being
                   32816: navigated.</p>
                   32817: <p>When a browsing context is <a href="#navigate" title=
                   32818: "navigate">navigated</a> to a <code>javascript:</code> URI, and the
                   32819: <a href="#active">active document</a> of that browsing context has
                   32820: <del class="diff-old">a different</del> <ins class=
                   32821: "diff-chg">an</ins> <a href="#origin0">origin</a> <del class=
                   32822: "diff-old">than</del> <ins class="diff-chg">that is</ins>
                   32823: <em><ins class="diff-chg">not</ins></em> <ins class=
                   32824: "diff-chg">the</ins> <a href="#same-origin" title=
                   32825: "same origin"><ins class="diff-chg">same</ins></a> <ins class=
                   32826: "diff-chg">as that of the script given by</ins> the URI, the
                   32827: <del class="diff-old">dereference</del> <a href=
                   32828: "#script2"><ins class="diff-chg">script execution</ins> context</a>
                   32829: must be an empty <del class="diff-old">object.</del> <ins class=
                   32830: "diff-chg">object, and the</ins> <a href="#script2"><ins class=
                   32831: "diff-chg">script execution context</ins></a> <ins class=
                   32832: "diff-chg">'s associated</ins> <a href="#browsing1"><ins class=
                   32833: "diff-chg">browsing context</ins></a> <ins class="diff-chg">must be
                   32834: the</ins> <a href="#browsing1"><ins class="diff-chg">browsing
                   32835: context</ins></a> <ins class="diff-chg">being</ins> <a href=
                   32836: "#navigate" title="navigate"><ins class=
                   32837: "diff-chg">navigated</ins></a> .</p>
                   32838: <p>Otherwise, the <del class="diff-old">dereference</del> <a href=
                   32839: "#script2"><ins class="diff-chg">script execution</ins> context</a>
                   32840: must <ins class="diff-new">be an empty object, and</ins> the
                   32841: <a href="#script2"><ins class="diff-chg">script execution
                   32842: context</ins></a> <ins class="diff-chg">'s associated</ins>
                   32843: <a href="#browsing1"><ins class="diff-chg">browsing
                   32844: context</ins></a> <ins class="diff-chg">must be the</ins> <a href=
                   32845: "#browsing1">browsing context</a> of the <code>Document</code>
                   32846: <del class="diff-old">to which belongs the element for which</del>
                   32847: <ins class="diff-chg">object of</ins> the <del class="diff-old">URI
                   32848: is being dereferenced,</del> <ins class="diff-chg">element,
                   32849: attribute,</ins> or <del class="diff-old">to which the</del> style
                   32850: sheet <del class="diff-old">for</del> <ins class=
                   32851: "diff-chg">from</ins> which the <del class="diff-old">URI is being
                   32852: dereferenced applies, whichever is appropriate. URIs using
                   32853: the</del> <code>javascript:</code> <del class="diff-old">protocol
                   32854: should be evaluated when the resource for that</del> URI
                   32855: <del class="diff-old">is needed, unless scripting is disabled or
                   32856: the Document corresponding to the dereference context (as defined
                   32857: above), if any, has designMode enabled.</del> <ins class=
                   32858: "diff-chg">was reached.</ins></p>
                   32859: <p>If the <del class="diff-old">dereference by-product</del>
                   32860: <ins class="diff-chg">result of executing the script</ins> is void
                   32861: (there is no return value), then the URI must be treated in a
                   32862: manner equivalent to an HTTP resource with an HTTP 204 No Content
                   32863: response.</p>
                   32864: <p>Otherwise, the URI must be treated in a manner equivalent to an
                   32865: HTTP resource with a 200 OK response whose <a href="#content-type8"
                   32866: title="Content-Type">Content-Type metadata</a> is <code title=
                   32867: "">text/html</code> and whose response body is the <del class=
                   32868: "diff-old">dereference by-product,</del> <ins class=
                   32869: "diff-chg">return value</ins> converted to a string value.</p>
                   32870: <p class="note">Certain contexts, in particular <code><a href=
                   32871: "#img">img</a></code> elements, ignore the <a href="#content-type8"
                   32872: title="Content-Type">Content-Type metadata</a> .</p>
                   32873: <div class="example">
                   32874: <p>So for example a <code title="">javascript:</code> URI for a
                   32875: <code title="attr-img-src"><a href="#src">src</a></code> attribute
                   32876: of an <code><a href="#img">img</a></code> element would be
                   32877: evaluated in the context of <del class="diff-old">the page</del>
                   32878: <ins class="diff-chg">an empty object</ins> as soon as the
                   32879: attribute is set; it would then be sniffed to determine the image
                   32880: type and decoded as an image.</p>
                   32881: <p>A <code title="">javascript:</code> URI in an <code title=
                   32882: "attr-a-href">href</code> attribute of an <code><a href=
                   32883: "#a">a</a></code> element would only be evaluated when the link was
                   32884: <a href="#following0" title="following hyperlinks">followed</a>
                   32885: .</p>
                   32886: <p>The <code title="attr-iframe-src"><a href="#src1">src</a></code>
                   32887: attribute of an <code><a href="#iframe">iframe</a></code> element
                   32888: would be evaluated in the context of the <code><a href=
                   32889: "#iframe">iframe</a></code> 's own <a href="#browsing1">browsing
                   32890: context</a> ; once evaluated, its return value (if it was not void)
                   32891: would replace that <a href="#browsing1">browsing context</a> 's
                   32892: document, thus changing the variables visible in that <a href=
                   32893: "#browsing1">browsing context</a> .</p>
                   32894: </div>
                   32895: <p class="note"><ins class="diff-new">The rules for handling script
                   32896: execution in a</ins> <a href="#script2"><ins class=
                   32897: "diff-new">script execution context</ins></a> <ins class=
                   32898: "diff-new">include making the script not execute (and just return
                   32899: void) in certain cases, e.g. in a sandbox or when the user has
                   32900: disabled scripting altogether.</ins></p>
                   32901: <h4 id="events"><span class="secno"><del class=
                   32902: "diff-old">4.3.6.</del> <ins class="diff-chg">4.4.4</ins></span>
                   32903: Events</h4>
                   32904: <p class="big-issue">We need to define how to handle events that
                   32905: are to be fired on a Document that is no longer the active document
                   32906: of its browsing context, and for Documents that have no browsing
                   32907: context. Do the events fire? Do the handlers in that document not
                   32908: fire? Do we just define scripting to be disabled when the document
                   32909: isn't active, with events still running as is? See also the
                   32910: <code><a href="#script1">script</a></code> element section, which
                   32911: says scripts don't run when the document isn't active.</p>
                   32912: <h5 id="event-handler-attributes"><span class="secno"><del class=
                   32913: "diff-old">4.3.6.1.</del> <ins class=
                   32914: "diff-chg">4.4.4.1.</ins></span> Event handler attributes</h5>
                   32915: <p><a href="#html-elements">HTML elements</a> can have <dfn id=
                   32916: "event2">event handler attributes</dfn> specified. These act as
                   32917: bubbling event listeners for the element on which they are
                   32918: specified.</p>
                   32919: <p>Each event handler attribute has two parts, an <a href="#event3"
                   32920: title="event handler content attributes">event handler content
                   32921: attribute</a> and an <a href="#event4" title=
                   32922: "event handler DOM attributes">event handler DOM attribute</a> .
                   32923: Event handler attributes must initially be set to null. When their
                   32924: value changes (through the changing of their event handler content
                   32925: attribute or their event handler DOM attribute), they will either
                   32926: be null, or have an <code>EventListener</code> object assigned to
                   32927: them.</p>
                   32928: <p>Objects other than <code>Element</code> objects, in particular
                   32929: <code><a href="#window">Window</a></code> , only have <a href=
                   32930: "#event4" title="event handler DOM attributes">event handler DOM
                   32931: attribute</a> (since they have no content attributes).</p>
                   32932: <p><dfn id="event3">Event handler content attributes</dfn> , when
                   32933: specified, must contain valid ECMAScript code matching the
                   32934: ECMAScript <code title="">FunctionBody</code> production. <a href=
                   32935: "#references">[ECMA262]</a></p>
                   32936: <p>When an event handler content attribute is set, its new value
                   32937: must be interpreted as the body of an anonymous function with a
                   32938: single argument called <code>event</code> , with the new function's
                   32939: scope chain being linked from the activation object of the handler,
                   32940: to the element, to the element's <code>form</code> element if it is
                   32941: a form control, to the <code>Document</code> object, to the
                   32942: <code><a href="#window"><ins class=
                   32943: "diff-chg">Window</ins></a></code> <ins class="diff-chg">object of
                   32944: the</ins> <a href="#browsing1">browsing context</a> of that
                   32945: <code>Document</code> . The function's <code>this</code> parameter
                   32946: must be the <code>Element</code> object representing the element.
                   32947: The resulting function must then be set as the value of the
                   32948: corresponding event handler attribute, and the new value must be
                   32949: set as the value of the content attribute. If the given function
                   32950: body fails to compile, then the corresponding event handler
                   32951: attribute must be set to null instead (the content attribute must
                   32952: still be updated to the new value, though).</p>
                   32953: <p class="note">See ECMA262 Edition 3, sections 10.1.6 and 10.2.3,
                   32954: for more details on activation objects. <a href=
                   32955: "#references">[ECMA262]</a></p>
                   32956: <p><ins class="diff-chg">The</ins> <a href="#script2"><ins class=
                   32957: "diff-chg">script execution context</ins></a> <ins class=
                   32958: "diff-chg">of the event handler must be the</ins> <code><a href=
                   32959: "#window"><ins class="diff-chg">Window</ins></a></code> <ins class=
                   32960: "diff-chg">object at the end of the scope chain.</ins></p>
                   32961: <p class="big-issue">How do we allow non-JS event handlers?</p>
                   32962: <p><dfn id="event4">Event handler DOM attributes</dfn> , on
                   32963: setting, must set the corresponding event handler attribute to
                   32964: their new value, and on getting, must return whatever the current
                   32965: value of the corresponding event handler attribute is (possibly
                   32966: null).</p>
                   32967: <p>The following are the event handler attributes that must be
                   32968: supported by all <a href="#html-elements">HTML elements</a> , as
                   32969: both content attributes and DOM attributes, and on <code><a href=
                   32970: "#window">Window</a></code> objects, as DOM attributes:</p>
                   32971: <dl>
                   32972: <dt><dfn id="onabort" title=
                   32973: "handler-onabort"><code>onabort</code></dfn></dt>
                   32974: <dd>
                   32975: <p>Must be invoked whenever an <code title="event-abort"><a href=
                   32976: "#abort">abort</a></code> event is targeted at or bubbles through
                   32977: the element.</p>
                   32978: </dd>
                   32979: <dt><dfn id="onbeforeunload" title=
                   32980: "handler-onbeforeunload"><code>onbeforeunload</code></dfn></dt>
                   32981: <dd>
                   32982: <p>Must be invoked whenever a <code title=
                   32983: "event-beforeunload">beforeunload</code> event is targeted at or
                   32984: bubbles through the element.</p>
                   32985: </dd>
                   32986: <dt><dfn id="onblur" title=
                   32987: "handler-onblur"><code>onblur</code></dfn></dt>
                   32988: <dd>
                   32989: <p>Must be invoked whenever a <code title="event-blur">blur</code>
                   32990: event is targeted at or bubbles through the element.</p>
                   32991: </dd>
                   32992: <dt><dfn id="onchange" title=
                   32993: "handler-onchange"><code>onchange</code></dfn></dt>
                   32994: <dd>
                   32995: <p>Must be invoked whenever a <code title=
                   32996: "event-change">change</code> event is targeted at or bubbles
                   32997: through the element.</p>
                   32998: </dd>
                   32999: <dt><dfn id="onclick" title=
                   33000: "handler-onclick"><code>onclick</code></dfn></dt>
                   33001: <dd>
                   33002: <p>Must be invoked whenever a <code title=
                   33003: "event-click">click</code> event is targeted at or bubbles through
                   33004: the element.</p>
                   33005: </dd>
                   33006: <dt><dfn id="oncontextmenu" title=
                   33007: "handler-oncontextmenu"><code>oncontextmenu</code></dfn></dt>
                   33008: <dd>
                   33009: <p>Must be invoked whenever a <code title=
                   33010: "event-contextmenu">contextmenu</code> event is targeted at or
                   33011: bubbles through the element.</p>
                   33012: </dd>
                   33013: <dt><dfn id="ondblclick" title=
                   33014: "handler-ondblclick"><code>ondblclick</code></dfn></dt>
                   33015: <dd>
                   33016: <p>Must be invoked whenever a <code title=
                   33017: "event-dblclick">dblclick</code> event is targeted at or bubbles
                   33018: through the element.</p>
                   33019: </dd>
                   33020: <dt><dfn id="ondrag" title=
                   33021: "handler-ondrag"><code>ondrag</code></dfn></dt>
                   33022: <dd>
                   33023: <p>Must be invoked whenever a <code title="event-drag"><a href=
                   33024: "#drag">drag</a></code> event is targeted at or bubbles through the
                   33025: element.</p>
                   33026: </dd>
                   33027: <dt><dfn id="ondragend" title=
                   33028: "handler-ondragend"><code>ondragend</code></dfn></dt>
                   33029: <dd>
                   33030: <p>Must be invoked whenever a <code title="event-dragend"><a href=
                   33031: "#dragend">dragend</a></code> event is targeted at or bubbles
                   33032: through the element.</p>
                   33033: </dd>
                   33034: <dt><dfn id="ondragenter" title=
                   33035: "handler-ondragenter"><code>ondragenter</code></dfn></dt>
                   33036: <dd>
                   33037: <p>Must be invoked whenever a <code title=
                   33038: "event-dragenter"><a href="#dragenter">dragenter</a></code> event
                   33039: is targeted at or bubbles through the element.</p>
                   33040: </dd>
                   33041: <dt><dfn id="ondragleave" title=
                   33042: "handler-ondragleave"><code>ondragleave</code></dfn></dt>
                   33043: <dd>
                   33044: <p>Must be invoked whenever a <code title=
                   33045: "event-dragleave"><a href="#dragleave">dragleave</a></code> event
                   33046: is targeted at or bubbles through the element.</p>
                   33047: </dd>
                   33048: <dt><dfn id="ondragover" title=
                   33049: "handler-ondragover"><code>ondragover</code></dfn></dt>
                   33050: <dd>
                   33051: <p>Must be invoked whenever a <code title="event-dragover"><a href=
                   33052: "#dragover">dragover</a></code> event is targeted at or bubbles
                   33053: through the element.</p>
                   33054: </dd>
                   33055: <dt><dfn id="ondragstart" title=
                   33056: "handler-ondragstart"><code>ondragstart</code></dfn></dt>
                   33057: <dd>
                   33058: <p>Must be invoked whenever a <code title=
                   33059: "event-dragstart"><a href="#dragstart">dragstart</a></code> event
                   33060: is targeted at or bubbles through the element.</p>
                   33061: </dd>
                   33062: <dt><dfn id="ondrop" title=
                   33063: "handler-ondrop"><code>ondrop</code></dfn></dt>
                   33064: <dd>
                   33065: <p>Must be invoked whenever a <code title="event-drop"><a href=
                   33066: "#drop">drop</a></code> event is targeted at or bubbles through the
                   33067: element.</p>
                   33068: </dd>
                   33069: <dt><dfn id="onerror" title=
                   33070: "handler-onerror"><code>onerror</code></dfn></dt>
                   33071: <dd>
                   33072: <p>Must be invoked whenever an <code title="event-error"><a href=
                   33073: "#error1">error</a></code> event is targeted at or bubbles through
                   33074: the element.</p>
                   33075: <p class="note">The <code title="handler-onerror"><a href=
                   33076: "#onerror">onerror</a></code> handler is also used for <a href=
                   33077: "#runtime-script-errors">reporting script errors</a> .</p>
                   33078: </dd>
                   33079: <dt><dfn id="onfocus" title=
                   33080: "handler-onfocus"><code>onfocus</code></dfn></dt>
                   33081: <dd>
                   33082: <p>Must be invoked whenever a <code title=
                   33083: "event-focus">focus</code> event is targeted at or bubbles through
                   33084: the element.</p>
                   33085: </dd>
                   33086: <dt><dfn id="onkeydown" title=
                   33087: "handler-onkeydown"><code>onkeydown</code></dfn></dt>
                   33088: <dd>
                   33089: <p>Must be invoked whenever a <code title=
                   33090: "event-keydown">keydown</code> event is targeted at or bubbles
                   33091: through the element.</p>
                   33092: </dd>
                   33093: <dt><dfn id="onkeypress" title=
                   33094: "handler-onkeypress"><code>onkeypress</code></dfn></dt>
                   33095: <dd>
                   33096: <p>Must be invoked whenever a <code title=
                   33097: "event-keypress">keypress</code> event is targeted at or bubbles
                   33098: through the element.</p>
                   33099: </dd>
                   33100: <dt><dfn id="onkeyup" title=
                   33101: "handler-onkeyup"><code>onkeyup</code></dfn></dt>
                   33102: <dd>
                   33103: <p>Must be invoked whenever a <code title=
                   33104: "event-keyup">keyup</code> event is targeted at or bubbles through
                   33105: the element.</p>
                   33106: </dd>
                   33107: <dt><dfn id="onload" title=
                   33108: "handler-onload"><code>onload</code></dfn></dt>
                   33109: <dd>
                   33110: <p>Must be invoked whenever a <code title="event-load"><a href=
                   33111: "#load0">load</a></code> event is targeted at or bubbles through
                   33112: the element.</p>
                   33113: </dd>
                   33114: <dt><dfn id="onmessage" title=
                   33115: "handler-onmessage"><code>onmessage</code></dfn></dt>
                   33116: <dd>
                   33117: <p>Must be invoked whenever a <code title="event-message"><a href=
                   33118: "#message0">message</a></code> event is targeted at or bubbles
                   33119: through the element.</p>
                   33120: </dd>
                   33121: <dt><dfn id="onmousedown" title=
                   33122: "handler-onmousedown"><code>onmousedown</code></dfn></dt>
                   33123: <dd>
                   33124: <p>Must be invoked whenever a <code title=
                   33125: "event-mousedown">mousedown</code> event is targeted at or bubbles
                   33126: through the element.</p>
                   33127: </dd>
                   33128: <dt><dfn id="onmousemove" title=
                   33129: "handler-onmousemove"><code>onmousemove</code></dfn></dt>
                   33130: <dd>
                   33131: <p>Must be invoked whenever a <code title=
                   33132: "event-mousemove">mousemove</code> event is targeted at or bubbles
                   33133: through the element.</p>
                   33134: </dd>
                   33135: <dt><dfn id="onmouseout" title=
                   33136: "handler-onmouseout"><code>onmouseout</code></dfn></dt>
                   33137: <dd>
                   33138: <p>Must be invoked whenever a <code title=
                   33139: "event-mouseout">mouseout</code> event is targeted at or bubbles
                   33140: through the element.</p>
                   33141: </dd>
                   33142: <dt><dfn id="onmouseover" title=
                   33143: "handler-onmouseover"><code>onmouseover</code></dfn></dt>
                   33144: <dd>
                   33145: <p>Must be invoked whenever a <code title=
                   33146: "event-mouseover">mouseover</code> event is targeted at or bubbles
                   33147: through the element.</p>
                   33148: </dd>
                   33149: <dt><dfn id="onmouseup" title=
                   33150: "handler-onmouseup"><code>onmouseup</code></dfn></dt>
                   33151: <dd>
                   33152: <p>Must be invoked whenever a <code title=
                   33153: "event-mouseup">mouseup</code> event is targeted at or bubbles
                   33154: through the element.</p>
                   33155: </dd>
                   33156: <dt><dfn id="onmousewheel" title=
                   33157: "handler-onmousewheel"><code>onmousewheel</code></dfn></dt>
                   33158: <dd>
                   33159: <p>Must be invoked whenever a <code title=
                   33160: "event-mousewheel">mousewheel</code> event is targeted at or
                   33161: bubbles through the element.</p>
                   33162: </dd>
                   33163: <dt><dfn id="onresize" title=
                   33164: "handler-onresize"><code>onresize</code></dfn></dt>
                   33165: <dd>
                   33166: <p>Must be invoked whenever a <code title=
                   33167: "event-resize">resize</code> event is targeted at or bubbles
                   33168: through the element.</p>
                   33169: </dd>
                   33170: <dt><dfn id="onscroll" title=
                   33171: "handler-onscroll"><code>onscroll</code></dfn></dt>
                   33172: <dd>
                   33173: <p>Must be invoked whenever a <code title=
                   33174: "event-scroll">scroll</code> event is targeted at or bubbles
                   33175: through the element.</p>
                   33176: </dd>
                   33177: <dt><dfn id="onselect" title=
                   33178: "handler-onselect"><code>onselect</code></dfn></dt>
                   33179: <dd>
                   33180: <p>Must be invoked whenever a <code title="event-select"><a href=
                   33181: "#select">select</a></code> event is targeted at or bubbles through
                   33182: the element.</p>
                   33183: </dd>
                   33184: <dt><dfn id="onstorage" title="handler-onstorage"><code><ins class=
                   33185: "diff-new">onstorage</ins></code></dfn></dt>
                   33186: <dd>
                   33187: <p><ins class="diff-new">Must be invoked whenever a</ins>
                   33188: <code title="event-storage"><a href="#storage1"><ins class=
                   33189: "diff-new">storage</ins></a></code> <ins class="diff-new">event is
                   33190: targeted at or bubbles through the element.</ins></p>
                   33191: </dd>
                   33192: <dt><dfn id="onsubmit" title=
                   33193: "handler-onsubmit"><code>onsubmit</code></dfn></dt>
                   33194: <dd>
                   33195: <p>Must be invoked whenever a <code title=
                   33196: "event-submit">submit</code> event is targeted at or bubbles
                   33197: through the element.</p>
                   33198: </dd>
                   33199: <dt><dfn id="onunload" title=
                   33200: "handler-onunload"><code>onunload</code></dfn></dt>
                   33201: <dd>
                   33202: <p>Must be invoked whenever an <code title=
                   33203: "event-unload">unload</code> event is targeted at or bubbles
                   33204: through the element.</p>
                   33205: </dd>
                   33206: </dl>
                   33207: <p>When an event handler attribute is invoked, its argument must be
                   33208: set to the <code>Event</code> object of the event in question. If
                   33209: the function returns the exact boolean value false, the event's
                   33210: <code>preventDefault()</code> method must then invoked. Exception:
                   33211: for historical reasons, for the HTML <code>mouseover</code> event,
                   33212: the <code>preventDefault()</code> method must be called when the
                   33213: function returns true instead.</p>
                   33214: <p><del class="diff-old">When scripting is disabled , event handler
                   33215: attributes must do nothing. When scripting is enabled , all</del>
                   33216: <ins class="diff-chg">All</ins> event handler attributes on an
                   33217: element, whether set to null or to a function, must be registered
                   33218: as event listeners on the element, as if the <code title=
                   33219: "dom-EventTarget-addEventListenerNS">addEventListenerNS()</code>
                   33220: method on the <code>Element</code> object's
                   33221: <code>EventTarget</code> interface had been invoked when the
                   33222: element was created, with the event type ( <var title=
                   33223: "dom-event-type">type</var> argument) equal to the type described
                   33224: for the event handler attribute in the list above, the namespace (
                   33225: <var title="dom-event-namespaceURI">namespaceURI</var> argument)
                   33226: set to null, the listener set to be a target and bubbling phase
                   33227: listener ( <var title="dom-event-useCapture">useCapture</var>
                   33228: argument set to false), the event group set to the default group (
                   33229: <var title="dom-event-evtGroup">evtGroup</var> argument set to
                   33230: null), and the event listener itself ( <var title=
                   33231: "dom-event-listener">listener</var> argument) set to do nothing
                   33232: while the event handler attribute is null, and set to invoke the
                   33233: function associated with the event handler attribute otherwise.
                   33234: <ins class="diff-new">(The</ins> <var title=
                   33235: "dom-event-listener"><ins class="diff-new">listener</ins></var>
                   33236: <ins class="diff-new">argument is emphatically</ins>
                   33237: <em><ins class="diff-new">not</ins></em> <ins class="diff-new">the
                   33238: event handler attribute itself.)</ins></p>
                   33239: <h5 id="event"><span class="secno"><del class=
                   33240: "diff-old">4.3.6.2.</del> <ins class=
                   33241: "diff-chg">4.4.4.2.</ins></span> Event firing</h5>
                   33242: <p class="big-issue">maybe this should be moved higher up
                   33243: (terminology? conformance? DOM?) Also, the whole terminology thing
                   33244: should be changed so that we don't define any specific events here,
                   33245: we only define 'simple event', 'progress event', 'mouse event',
                   33246: 'key event', and the like, and have the actual dispatch use those
                   33247: generic terms when firing events.</p>
                   33248: <p>Certain operations and methods are defined as firing events on
                   33249: elements. For example, the <code title="dom-click"><a href=
                   33250: "#click">click()</a></code> method on the <code><a href=
                   33251: "#htmlelement">HTMLElement</a></code> interface is defined as
                   33252: firing a <code title="event-click">click</code> event on the
                   33253: element. <a href="#references">[DOM3EVENTS]</a></p>
                   33254: <p><dfn id="firing" title="fire a click event">Firing a
                   33255: <code title="event-click">click</code> event</dfn> means that a
                   33256: <a href=
                   33257: "http://www.w3.org/TR/DOM-Level-3-Events/events.html#event-click"><code>
                   33258: click</code></a> event with no namespace, which bubbles and is
                   33259: cancelable, and which uses the <code>MouseEvent</code> interface,
                   33260: must be dispatched at the given element. The event object must have
                   33261: its <code title="">screenX</code> , <code title="">screenY</code> ,
                   33262: <code title="">clientX</code> , <code title="">clientY</code> , and
                   33263: <code title="">button</code> attributes set to 0, its <code title=
                   33264: "">ctrlKey</code> , <code title="">shiftKey</code> , <code title=
                   33265: "">altKey</code> , and <code title="">metaKey</code> attributes set
                   33266: according to the current state of the key input device, if any
                   33267: (false for any keys that are not available), its <code title=
                   33268: "">detail</code> attribute set to 1, and its <code title=
                   33269: "">relatedTarget</code> attribute set to null. The <code title=
                   33270: "">getModifierState()</code> method on the object must return
                   33271: values appropriately describing the state of the key input device
                   33272: at the time the event is created.</p>
                   33273: <p><dfn id="firing0" title="fire a change event">Firing a
                   33274: <code title="event-change">change</code> event</dfn> means that a
                   33275: <a href=
                   33276: "http://www.w3.org/TR/DOM-Level-3-Events/events.html#event-change"><code>
                   33277: change</code></a> event with no namespace, which bubbles but is not
                   33278: cancelable, and which uses the <code>Event</code> interface, must
                   33279: be dispatched at the given element. The event object must have its
                   33280: <code title="">detail</code> attribute set to 0.</p>
                   33281: <p><dfn id="firing1" title="fire a contextmenu event">Firing a
                   33282: <code title="event-contextmenu">contextmenu</code> event</dfn>
                   33283: means that a <code title="event-contextmenu">contextmenu</code>
                   33284: event with no namespace, which bubbles and is cancelable, and which
                   33285: uses the <code>Event</code> interface, must be dispatched at the
                   33286: given element. The event object must have its <code title=
                   33287: "">detail</code> attribute set to 0.</p>
                   33288: <p><dfn id="firing2" title="fire a simple event">Firing a simple
                   33289: event called <var title="">e</var></dfn> means that an event with
                   33290: the name <var title="">e</var> , with no namespace, which does not
                   33291: bubble but is <del class="diff-old">cancelable,</del> <ins class=
                   33292: "diff-chg">cancelable (unless otherwise stated),</ins> and which
                   33293: uses the <code>Event</code> interface, must be dispatched at the
                   33294: given element.</p>
                   33295: <p><dfn id="firing3" title="fire a show event">Firing a
                   33296: <code title="event-show">show</code> event</dfn> means <a href=
                   33297: "#firing2" title="fire a simple event">firing a simple event called
                   33298: <code title="event-show">show</code></a> . <span title=
                   33299: "big-issue">Actually this should fire an event that has modifier
                   33300: information (shift/ctrl <del class="diff-old">etc).</del>
                   33301: <ins class="diff-chg">etc), as well as having a pointer to the node
                   33302: on which the menu was fired, and with which the menu was associated
                   33303: (which could be an ancestor of the former).</ins></span></p>
                   33304: <p><dfn id="firing4" title="fire a load event">Firing a
                   33305: <code title="event-load">load</code> event</dfn> means <a href=
                   33306: "#firing2" title="fire a simple event">firing a simple event called
                   33307: <code title="event-load">load</code></a> . <dfn id="firing5" title=
                   33308: "fire an error event">Firing an <code title=
                   33309: "event-error">error</code> event</dfn> means <a href="#firing2"
                   33310: title="fire a simple event">firing a simple event called
                   33311: <code title="event-error">error</code></a> .</p>
                   33312: <p class="big-issue"><dfn id="firing6" title=
                   33313: "fire a progress event">Firing a progress event called <var title=
                   33314: "">e</var></dfn> means something that hasn't yet been defined, in
                   33315: the <a href="#references">[PROGRESS]</a> spec.</p>
                   33316: <p>The default action of these event is to do nothing unless
                   33317: otherwise stated.</p>
                   33318: <p class="big-issue">If you dispatch a custom "click" event at an
                   33319: element that would normally have default actions, should they get
                   33320: triggered? If so, we need to go through the entire spec and make
                   33321: sure that any default actions are defined in terms of <em>any</em>
                   33322: event of the right type on that element, not those that are
                   33323: dispatched in expected ways.</p>
                   33324: <h5 id="events0"><span class="secno"><del class=
                   33325: "diff-old">4.3.6.3.</del> <ins class=
                   33326: "diff-chg">4.4.4.3.</ins></span> Events and the <code><a href=
                   33327: "#window">Window</a></code> object</h5>
                   33328: <p>When an event is dispatched at a DOM node in a
                   33329: <code>Document</code> in a <a href="#browsing1">browsing
                   33330: context</a> , if the event is not a <code title=
                   33331: "event-load"><a href="#load0">load</a></code> event, the user agent
                   33332: must also dispatch the event to the <code><a href=
                   33333: "#window">Window</a></code> , as follows:</p>
                   33334: <ol>
                   33335: <li>In the capture phase, the event must be dispatched to the
                   33336: <code><a href="#window">Window</a></code> object before being
                   33337: dispatched to any of the nodes.</li>
                   33338: <li>In the bubble phase, the event must be dispatched to the
                   33339: <code><a href="#window">Window</a></code> object at the end of the
                   33340: phase, unless bubbling has been prevented.</li>
                   33341: </ol>
                   33342: <h5 id="runtime-script-errors"><span class="secno"><del class=
                   33343: "diff-old">4.3.6.4.</del> <ins class=
                   33344: "diff-chg">4.4.4.4.</ins></span> Runtime script errors</h5>
                   33345: <p><em>This section only applies to user agents that support
                   33346: scripting in general and ECMAScript in particular.</em></p>
                   33347: <p>Whenever a runtime script error occurs in one of the scripts
                   33348: associated with the document, the value of the <code title=
                   33349: "handler-onerror"><a href="#onerror">onerror</a></code> <span>event
                   33350: handler DOM attribute</span> of the <code><a href=
                   33351: "#window">Window</a></code> object must be processed, as
                   33352: follows:</p>
                   33353: <dl class="switch">
                   33354: <dt>If the value is a function</dt>
                   33355: <dd>
                   33356: <p>The function referenced by the <code title=
                   33357: "handler-onerror"><a href="#onerror">onerror</a></code> attribute
                   33358: must be invoked with three arguments, before notifying the user of
                   33359: the error.</p>
                   33360: <p>The three arguments passed to the function are all
                   33361: <code>DOMString</code> s; the first must give the message that the
                   33362: UA is considering reporting, the second must give the URI to the
                   33363: resource in which the error <del class="diff-old">occured,</del>
                   33364: <ins class="diff-chg">occurred,</ins> and the third must give the
                   33365: line number in that resource on which the error <del class=
                   33366: "diff-old">occured.</del> <ins class="diff-chg">occurred.</ins></p>
                   33367: <p>If the function returns false, then the error should not be
                   33368: reported to the user. Otherwise, if the function returns another
                   33369: value (or does not return at all), the error should be reported to
                   33370: the user.</p>
                   33371: <p>Any exceptions thrown or errors caused by this function must be
                   33372: reported to the user immediately after the error that the function
                   33373: was called for, without calling the function again.</p>
                   33374: </dd>
                   33375: <dt>If the value is <code>null</code></dt>
                   33376: <dd>
                   33377: <p>The error should not reported to the user.</p>
                   33378: </dd>
                   33379: <dt>If the value is anything else</dt>
                   33380: <dd>
                   33381: <p>The error should be reported to the user.</p>
                   33382: </dd>
                   33383: </dl>
                   33384: <p>The initial value of <code title="handler-onerror"><a href=
                   33385: "#onerror">onerror</a></code> must be <code>undefined</code> .</p>
                   33386: <h3 id="user-prompts"><span class="secno"><del class=
                   33387: "diff-old">4.4.</del> <ins class="diff-chg">4.5</ins></span> User
                   33388: prompts</h3>
                   33389: <h4 id="simple0"><span class="secno"><ins class=
                   33390: "diff-new">4.5.1</ins></span> <ins class="diff-new">Simple
                   33391: dialogs</ins></h4>
                   33392: <p>The <dfn id="alert" title="dom-alert"><code>alert( <var title=
                   33393: "">message</var> )</code></dfn> method, when invoked, must show the
                   33394: given <var title="">message</var> to the user. The user agent may
                   33395: make the method wait for the user to acknowledge the message before
                   33396: returning; if so, the user agent must <a href="#pause">pause</a>
                   33397: while the method is waiting.</p>
                   33398: <p>The <dfn id="confirm" title="dom-confirm"><code>confirm(
                   33399: <var title="">message</var> )</code></dfn> method, when invoked,
                   33400: must show the given <var title="">message</var> to the user, and
                   33401: ask the user to respond with a positive or negative response. The
                   33402: user agent must then <a href="#pause">pause</a> as the <del class=
                   33403: "diff-old">the</del> method waits for the user's response. If the
                   33404: user responds positively, the method must return true, and if the
                   33405: user responds negatively, the method must return false.</p>
                   33406: <p>The <dfn id="prompt" title="dom-prompt"><code>prompt(
                   33407: <var title="">message</var> , <var title="">default</var>
                   33408: )</code></dfn> method, when invoked, must show the given
                   33409: <var title="">message</var> to the user, and ask the user to either
                   33410: respond with a string value or abort. The user agent must then
                   33411: <a href="#pause">pause</a> as the <del class="diff-old">the</del>
                   33412: method waits for the user's response. The second argument is
                   33413: optional. If the second argument ( <var title="">default</var> ) is
                   33414: present, then the response must be defaulted to the value given by
                   33415: <var title="">default</var> . If the user aborts, then the method
                   33416: must return null; otherwise, the method must return the string that
                   33417: the user responded with.</p>
                   33418: <h4 id="printing"><span class="secno"><ins class=
                   33419: "diff-new">4.5.2</ins></span> <ins class=
                   33420: "diff-new">Printing</ins></h4>
                   33421: <p>The <dfn id="print" title="dom-print"><code>print()</code></dfn>
                   33422: method, when invoked, <ins class="diff-new">must run the</ins>
                   33423: <a href="#printing0"><ins class="diff-new">printing steps</ins></a>
                   33424: .</p>
                   33425: <p><ins class="diff-new">User agents should also run the</ins>
                   33426: <a href="#printing0"><ins class="diff-new">printing steps</ins></a>
                   33427: <ins class="diff-new">whenever the user attempts to obtain a
                   33428: physical form (e.g. printed copy), or the representation of a
                   33429: physical form (e.g. PDF copy), of a document.</ins></p>
                   33430: <p><ins class="diff-new">The</ins> <dfn id="printing0"><ins class=
                   33431: "diff-new">printing steps</ins></dfn> <ins class="diff-new">are as
                   33432: follows:</ins></p>
                   33433: <ol>
                   33434: <li>
                   33435: <p><ins class="diff-new">The user agent may display a message to
                   33436: the user and/or may abort these steps.</ins></p>
                   33437: <p class="example"><ins class="diff-new">For instance, a kiosk
                   33438: browser could silently ignore any invocations of the</ins>
                   33439: <code title="dom-print"><a href="#print"><ins class=
                   33440: "diff-new">print()</ins></a></code> <ins class=
                   33441: "diff-new">method.</ins></p>
                   33442: <p class="example"><ins class="diff-new">For instance, a browser on
                   33443: a mobile device could detect that there are no printers in the
                   33444: vicinity and display a message saying so before continuing to offer
                   33445: a "save to PDF" option.</ins></p>
                   33446: </li>
                   33447: <li>
                   33448: <p><ins class="diff-new">The user agent must</ins> <a href=
                   33449: "#firing2"><ins class="diff-new">fire a simple event</ins></a>
                   33450: <ins class="diff-new">called</ins> <code title=
                   33451: "event-beforeprint"><ins class="diff-new">beforeprint</ins></code>
                   33452: <ins class="diff-new">at the</ins> <code><a href=
                   33453: "#window"><ins class="diff-new">Window</ins></a></code> <ins class=
                   33454: "diff-new">object of the browsing context of the</ins>
                   33455: <code><ins class="diff-new">Document</ins></code> <ins class=
                   33456: "diff-new">that is being printed, as well as any</ins> <a href=
                   33457: "#nested0" title="nested browsing context"><ins class=
                   33458: "diff-new">nested browsing contexts</ins></a> <ins class=
                   33459: "diff-new">in it.</ins></p>
                   33460: <p class="example"><ins class="diff-new">The</ins> <code title=
                   33461: "event-beforeprint"><ins class="diff-new">beforeprint</ins></code>
                   33462: <ins class="diff-new">event can be used to annotate the printed
                   33463: copy, for instance adding the time at which the document was
                   33464: printed.</ins></p>
                   33465: </li>
                   33466: <li>
                   33467: <p><ins class="diff-new">The user agent</ins> should offer the user
                   33468: the opportunity to <a href="#obtain">obtain a physical form</a>
                   33469: <ins class="diff-new">(or the representation of a physical
                   33470: form)</ins> of the document. The user agent may <del class=
                   33471: "diff-old">make the method</del> wait for the user to either accept
                   33472: or decline before returning; if so, the user agent must <a href=
                   33473: "#pause">pause</a> while the method is waiting. <del class=
                   33474: "diff-old">(This</del> <ins class="diff-chg">Even if the user agent
                   33475: doesn't wait at this point, the user agent must use the state of
                   33476: the relevant documents as they are at this point in the algorithm
                   33477: if and when it eventually creates the alternate form.</ins></p>
                   33478: </li>
                   33479: <li>
                   33480: <p><ins class="diff-chg">The user agent must</ins> <a href=
                   33481: "#firing2"><ins class="diff-chg">fire a simple event</ins></a>
                   33482: <ins class="diff-chg">called</ins> <code title=
                   33483: "event-afterprint"><ins class="diff-chg">afterprint</ins></code>
                   33484: <ins class="diff-chg">at the</ins> <code><a href=
                   33485: "#window"><ins class="diff-chg">Window</ins></a></code> <ins class=
                   33486: "diff-chg">object of the browsing context of the</ins>
                   33487: <code><ins class="diff-chg">Document</ins></code> <ins class=
                   33488: "diff-chg">that is being printed, as well as any</ins> <a href=
                   33489: "#nested0" title="nested browsing context"><ins class=
                   33490: "diff-chg">nested browsing contexts</ins></a> <ins class=
                   33491: "diff-chg">in it.</ins></p>
                   33492: <p class="example"><ins class="diff-chg">The</ins> <code title=
                   33493: "event-afterprint"><ins class="diff-chg">afterprint</ins></code>
                   33494: <ins class="diff-chg">event can be used to revert annotations added
                   33495: in the earlier event, as well as showing post-printing UI. For
                   33496: instance, if a page is walking the user through the steps of
                   33497: applying for a home loan, the script could automatically advance to
                   33498: the next step after having printed a form or other.</ins></p>
                   33499: </li>
                   33500: </ol>
                   33501: <h4 id="dialogs"><span class="secno"><ins class=
                   33502: "diff-chg">4.5.3</ins></span> <ins class="diff-chg">Dialogs
                   33503: implemented using separate documents</ins></h4>
                   33504: <p><ins class="diff-chg">The</ins> <dfn id="showmodaldialog" title=
                   33505: "dom-showModalDialog"><code><ins class=
                   33506: "diff-chg">showModalDialog(</ins> <var title=""><ins class=
                   33507: "diff-chg">url</ins></var> ,<var title=""><ins class=
                   33508: "diff-chg">arguments</ins></var> <ins class=
                   33509: "diff-chg">)</ins></code></dfn> <ins class="diff-chg">method, when
                   33510: invoked, must cause the user agent to run the following
                   33511: steps:</ins></p>
                   33512: <ol>
                   33513: <li>
                   33514: <p><ins class="diff-chg">If the user agent is configured such that
                   33515: this invocation of</ins> <code title="dom-showModalDialog"><a href=
                   33516: "#showmodaldialog"><ins class=
                   33517: "diff-chg">showModalDialog()</ins></a></code> <ins class=
                   33518: "diff-chg">is somehow disabled, then the method returns the empty
                   33519: string; abort these steps.</ins></p>
                   33520: <p class="note"><ins class="diff-chg">User agents are expected to
                   33521: disable this method in certain cases to avoid user annoyance. For
                   33522: instance, a user agent could require that a site be white-listed
                   33523: before enabling this method, or the user agent could be configured
                   33524: to only allow one modal dialog at a time.</ins></p>
                   33525: </li>
                   33526: <li>
                   33527: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   33528: "diff-chg">the list of background browsing contexts</ins></var>
                   33529: <ins class="diff-chg">be a list of all the browsing contexts
                   33530: that:</ins></p>
                   33531: <ul>
                   33532: <li><ins class="diff-chg">are part of the same</ins> <a href=
                   33533: "#unit-of"><ins class="diff-chg">unit of related browsing
                   33534: contexts</ins></a> <ins class="diff-chg">as the browsing context of
                   33535: the</ins> <code><a href="#window"><ins class=
                   33536: "diff-chg">Window</ins></a></code> <ins class="diff-chg">object on
                   33537: which the</ins> <code title="dom-showModalDialog"><a href=
                   33538: "#showmodaldialog"><ins class=
                   33539: "diff-chg">showModalDialog()</ins></a></code> <ins class=
                   33540: "diff-chg">method was called, and that</ins></li>
                   33541: <li><ins class="diff-chg">have an</ins> <a href=
                   33542: "#active"><ins class="diff-chg">active document</ins></a>
                   33543: <ins class="diff-chg">whose</ins> <a href="#origin0"><ins class=
                   33544: "diff-chg">origin</ins></a> <ins class="diff-chg">is the</ins>
                   33545: <a href="#same-origin" title="same origin"><ins class=
                   33546: "diff-chg">same</ins></a> <ins class="diff-chg">as the</ins>
                   33547: <a href="#origin0"><ins class="diff-chg">origin</ins></a>
                   33548: <ins class="diff-chg">of the script that called the</ins>
                   33549: <code title="dom-showModalDialog"><a href=
                   33550: "#showmodaldialog"><ins class=
                   33551: "diff-chg">showModalDialog()</ins></a></code> <ins class=
                   33552: "diff-chg">method at the time the method was called,</ins></li>
                   33553: </ul>
                   33554: <p>...as<ins class="diff-chg">well as any browsing contexts that
                   33555: are nested inside any of the browsing contexts matching those
                   33556: conditions.</ins></p>
                   33557: </li>
                   33558: <li>
                   33559: <p><ins class="diff-chg">Disable the user interface for all the
                   33560: browsing contexts in</ins> <var title=""><ins class="diff-chg">the
                   33561: list of background browsing contexts</ins></var> .<ins class=
                   33562: "diff-chg">This should prevent the user from navigating those
                   33563: browsing contexts, causing events to to be sent to those browsing
                   33564: context, or editing any content in those browsing contexts.
                   33565: However, it</ins> does <del class="diff-old">not,</del> <ins class=
                   33566: "diff-chg">not prevent those browsing contexts from receiving
                   33567: events from sources other than the user, from running scripts, from
                   33568: running animations, and so forth.</ins></p>
                   33569: </li>
                   33570: <li>
                   33571: <p><ins class="diff-chg">Create a new</ins> <a href=
                   33572: "#auxiliary0"><ins class="diff-chg">auxiliary browsing
                   33573: context</ins></a> ,<ins class="diff-chg">with the</ins> <a href=
                   33574: "#opener"><ins class="diff-chg">opener browsing context</ins></a>
                   33575: <ins class="diff-chg">being the browsing context</ins> of
                   33576: <del class="diff-old">course, preclude</del> the <code><a href=
                   33577: "#window"><ins class="diff-new">Window</ins></a></code> <ins class=
                   33578: "diff-new">object on which the</ins> <code title=
                   33579: "dom-showModalDialog"><a href="#showmodaldialog"><ins class=
                   33580: "diff-new">showModalDialog()</ins></a></code> <ins class=
                   33581: "diff-new">method was called. The new auxiliary browsing context
                   33582: has no name.</ins></p>
                   33583: <p class="note"><ins class="diff-new">This browsing context
                   33584: implements the</ins> <code><a href="#modalwindow"><ins class=
                   33585: "diff-new">ModalWindow</ins></a></code> <ins class=
                   33586: "diff-new">interface.</ins></p>
                   33587: </li>
                   33588: <li>
                   33589: <p><ins class="diff-new">Let the</ins> <a href=
                   33590: "#dialog0"><ins class="diff-new">dialog arguments</ins></a>
                   33591: <ins class="diff-new">of the new browsing context be set to the
                   33592: value of</ins> <var title=""><ins class=
                   33593: "diff-new">arguments</ins></var> .</p>
                   33594: </li>
                   33595: <li>
                   33596: <p><ins class="diff-new">Let the</ins> <a href=
                   33597: "#dialog1"><ins class="diff-new">dialog arguments' origin</ins></a>
                   33598: <ins class="diff-new">be the</ins> <a href="#origin0"><ins class=
                   33599: "diff-new">origin</ins></a> <ins class="diff-new">of the script
                   33600: that called the</ins> <code title="dom-showModalDialog"><a href=
                   33601: "#showmodaldialog"><ins class=
                   33602: "diff-new">showModalDialog()</ins></a></code> <ins class=
                   33603: "diff-new">method.</ins></p>
                   33604: </li>
                   33605: <li>
                   33606: <p><a href="#navigate"><ins class="diff-new">Navigate</ins></a>
                   33607: <ins class="diff-new">the new browsing context to</ins> <var title=
                   33608: ""><ins class="diff-new">url</ins></var> ,<ins class=
                   33609: "diff-new">with</ins> <a href="#replacement"><ins class=
                   33610: "diff-new">replacement enabled</ins></a> ,<ins class="diff-new">and
                   33611: with the</ins> <a href="#browsing1"><ins class="diff-new">browsing
                   33612: context</ins></a> <ins class="diff-new">of the</ins> <code><a href=
                   33613: "#window"><ins class="diff-new">Window</ins></a></code> <ins class=
                   33614: "diff-new">object that is the</ins> <a href="#script2"><ins class=
                   33615: "diff-new">script execution context</ins></a> <ins class=
                   33616: "diff-new">of the script that invoked the method as the</ins>
                   33617: <a href="#source0"><ins class="diff-new">source browsing
                   33618: context</ins></a> .</p>
                   33619: <p class="note"><ins class="diff-new">If the</ins> <a href=
                   33620: "#script2"><ins class="diff-new">script execution context</ins></a>
                   33621: <ins class="diff-new">of a script isn't a</ins> <code><a href=
                   33622: "#window"><ins class="diff-new">Window</ins></a></code> <ins class=
                   33623: "diff-new">object, then it can't ever get to a</ins> <code><a href=
                   33624: "#window"><ins class="diff-new">Window</ins></a></code> <ins class=
                   33625: "diff-new">object to call this method.</ins></p>
                   33626: </li>
                   33627: <li>
                   33628: <p><ins class="diff-new">Wait for the browsing context to be
                   33629: closed. (The</ins> user agent <ins class="diff-new">must allow the
                   33630: user to indicate that the browsing context is to be
                   33631: closed.)</ins></p>
                   33632: </li>
                   33633: <li>
                   33634: <p><ins class="diff-new">Reenable the user interface for all the
                   33635: browsing contexts in</ins> <var title=""><ins class="diff-new">the
                   33636: list of background browsing contexts</ins></var> .</p>
                   33637: </li>
                   33638: <li>
                   33639: <p><ins class="diff-new">Return the</ins> <a href=
                   33640: "#auxiliary0"><ins class="diff-new">auxiliary browsing
                   33641: context</ins></a> <ins class="diff-new">'s</ins> <a href=
                   33642: "#return"><ins class="diff-new">return value</ins></a> .</p>
                   33643: </li>
                   33644: </ol>
                   33645: <p><ins class="diff-new">Browsing contexts created by the above
                   33646: algorithm must implement the</ins> <code><a href=
                   33647: "#modalwindow"><ins class="diff-new">ModalWindow</ins></a></code>
                   33648: <ins class="diff-new">interface:</ins></p>
                   33649: <pre class="idl">
                   33650: [XXX] interface <dfn id=
                   33651: "modalwindow">ModalWindow</dfn> {<ins class="diff-new">
                   33652:   readonly attribute any <a href="#dialogarguments" title=
                   33653: "dom-modalWindow-dialogArguments">dialogArguments</a>;
                   33654:            attribute DOMString <a href="#returnvalue" title=
                   33655: "dom-modalWindow-returnValue">returnValue</a>;
                   33656: };
                   33657: </ins>
                   33658: </pre>
                   33659: <p><ins class="diff-new">Such browsing contexts have
                   33660: associated</ins> <dfn id="dialog0"><ins class="diff-new">dialog
                   33661: arguments</ins></dfn> ,<ins class="diff-new">which are stored along
                   33662: with the</ins> <dfn id="dialog1"><ins class="diff-new">dialog
                   33663: arguments' origin</ins></dfn> .<ins class="diff-new">These values
                   33664: are set by the</ins> <code title="dom-showModalDialog"><a href=
                   33665: "#showmodaldialog"><ins class=
                   33666: "diff-new">showModalDialog()</ins></a></code> <ins class=
                   33667: "diff-new">method in the algorithm above, when the browsing context
                   33668: is created, based on the arguments provided to the
                   33669: method.</ins></p>
                   33670: <p><ins class="diff-new">The</ins> <dfn id="dialogarguments" title=
                   33671: "dom-modalWindow-dialogArguments"><code><ins class=
                   33672: "diff-new">dialogArguments</ins></code></dfn> <ins class=
                   33673: "diff-new">DOM attribute, on getting, must check whether its
                   33674: browsing context's</ins> <a href="#active"><ins class=
                   33675: "diff-new">active document</ins></a> <ins class="diff-new">'s</ins>
                   33676: <a href="#origin0"><ins class="diff-new">origin</ins></a>
                   33677: <ins class="diff-new">is the</ins> <a href="#same-origin" title=
                   33678: "same origin"><ins class="diff-new">same</ins></a> <ins class=
                   33679: "diff-new">as the</ins> <a href="#dialog1"><ins class=
                   33680: "diff-new">dialog arguments' origin</ins></a> .<ins class=
                   33681: "diff-new">If it is, then the browsing context's</ins> <a href=
                   33682: "#dialog0"><ins class="diff-new">dialog arguments</ins></a>
                   33683: <ins class="diff-new">must be returned unchanged. Otherwise, if
                   33684: the</ins> <a href="#dialog0"><ins class="diff-new">dialog
                   33685: arguments</ins></a> <ins class="diff-new">are an object, then the
                   33686: empty string must be returned, and if the</ins> <a href=
                   33687: "#dialog0"><ins class="diff-new">dialog arguments</ins></a>
                   33688: <ins class="diff-new">are not an object, then the stringification
                   33689: of the</ins> <a href="#dialog0"><ins class="diff-new">dialog
                   33690: arguments</ins></a> <ins class="diff-new">must be
                   33691: returned.</ins></p>
                   33692: <p><ins class="diff-new">These browsing contexts also have an
                   33693: associated</ins> <dfn id="return"><ins class="diff-new">return
                   33694: value</ins></dfn> .<ins class="diff-new">The</ins> <a href=
                   33695: "#return"><ins class="diff-new">return value</ins></a> <ins class=
                   33696: "diff-new">of a browsing context must be initialized to the empty
                   33697: string when the browsing context is created.</ins></p>
                   33698: <p><ins class="diff-new">The</ins> <dfn id="returnvalue" title=
                   33699: "dom-modalWindow-returnValue"><code><ins class=
                   33700: "diff-new">returnValue</ins></code></dfn> <ins class="diff-new">DOM
                   33701: attribute, on getting, must return the</ins> <a href=
                   33702: "#return"><ins class="diff-new">return value</ins></a> <ins class=
                   33703: "diff-new">of its browsing context, and on setting, must set
                   33704: the</ins> <a href="#return"><ins class="diff-new">return
                   33705: value</ins></a> <ins class="diff-new">to the given new
                   33706: value.</ins></p>
                   33707: <h4 id="notifications"><span class="secno"><ins class=
                   33708: "diff-new">4.5.4</ins></span> <ins class=
                   33709: "diff-new">Notifications</ins></h4>
                   33710: <p><ins class="diff-new">Notifications are short, transient
                   33711: messages that bring the user's attention to new information, or
                   33712: remind the user of scheduled events.</ins></p>
                   33713: <p><ins class="diff-new">Since notifications can be annoying if
                   33714: abused, this specification defines a mechanism that scopes
                   33715: notifications to a site's existing rendering area unless the user
                   33716: explicitly indicates that the site can be trusted.</ins></p>
                   33717: <p><ins class="diff-new">To this end, each</ins> <a href=
                   33718: "#origin0"><ins class="diff-new">origin</ins></a> <ins class=
                   33719: "diff-new">can be flagged as being a</ins> <dfn id=
                   33720: "trusted"><ins class="diff-new">trusted notification
                   33721: source</ins></dfn> .<ins class="diff-new">By default origins should
                   33722: not be flagged as such, but user agents may allow users to
                   33723: whitelist origins or groups of origins as being</ins> <a href=
                   33724: "#trusted" title="trusted notification source"><ins class=
                   33725: "diff-new">trusted notification sources</ins></a> .<ins class=
                   33726: "diff-new">Only origins flagged as trusted in this way are allowed
                   33727: to show notification UI outside of their tab.</ins></p>
                   33728: <p class="example"><ins class="diff-new">For example, a user agent
                   33729: could allow a user to mark all subdomains and ports of example.org
                   33730: as trusted notification sources. Then, mail.example.org and
                   33731: calendar.example.org would both be able to show notifications,
                   33732: without the user having to flag them individually.</ins></p>
                   33733: <p><ins class="diff-new">The</ins> <dfn id="shownotification"
                   33734: title="dom-showNotification"><code><ins class=
                   33735: "diff-new">showNotification(</ins> <var title=""><ins class=
                   33736: "diff-new">title</ins></var> ,<var title=""><ins class=
                   33737: "diff-new">subtitle</ins></var> ,<var title=""><ins class=
                   33738: "diff-new">description</ins></var> ,<var title=""><ins class=
                   33739: "diff-new">onclick</ins></var> <ins class=
                   33740: "diff-new">)</ins></code></dfn> <ins class="diff-new">method, when
                   33741: invoked, must cause the user agent to show a
                   33742: notification.</ins></p>
                   33743: <p id="sandboxNotifications"><ins class="diff-new">If the method
                   33744: was invoked</ins> from <ins class="diff-new">a script whose</ins>
                   33745: <a href="#script2"><ins class="diff-new">script execution
                   33746: context</ins></a> <ins class="diff-new">'s associated</ins>
                   33747: <a href="#browsing1"><ins class="diff-new">browsing
                   33748: context</ins></a> <ins class="diff-new">has the</ins> <a href=
                   33749: "#sandboxed1"><ins class="diff-new">sandboxed annoyances browsing
                   33750: context flag</ins></a> <ins class="diff-new">set, then the
                   33751: notification must be shown within that</ins> <a href=
                   33752: "#browsing1"><ins class="diff-new">browsing context</ins></a>
                   33753: .<ins class="diff-new">The notification is said to be a</ins>
                   33754: <dfn id="sandboxed5"><ins class="diff-new">sandboxed
                   33755: notification</ins></dfn> .</p>
                   33756: <p><ins class="diff-new">Otherwise, if the</ins> <a href=
                   33757: "#origin0"><ins class="diff-new">origin</ins></a> <ins class=
                   33758: "diff-new">of the</ins> <a href="#browsing1"><ins class=
                   33759: "diff-new">browsing context</ins></a> <ins class=
                   33760: "diff-new">associated with the</ins> <a href="#script2"><ins class=
                   33761: "diff-new">script execution context</ins></a> <ins class=
                   33762: "diff-new">of the script that invoked the method is</ins>
                   33763: <em><del class="diff-old">always</del> <ins class=
                   33764: "diff-chg">not</ins></em> <del class="diff-old">offering</del>
                   33765: <ins class="diff-chg">flagged as being a</ins> <a href=
                   33766: "#trusted"><ins class="diff-chg">trusted notification
                   33767: source</ins></a> ,<ins class="diff-chg">then the notification
                   33768: should be rendered within the</ins> <a href=
                   33769: "#top-level"><ins class="diff-chg">top-level browsing
                   33770: context</ins></a> <ins class="diff-chg">of the</ins> <a href=
                   33771: "#browsing1"><ins class="diff-chg">browsing context</ins></a>
                   33772: <ins class="diff-chg">associated with the</ins> <a href=
                   33773: "#script2"><ins class="diff-chg">script execution context</ins></a>
                   33774: <ins class="diff-chg">of the script that invoked the method. The
                   33775: notification is said to be a</ins> <dfn id="normal"><ins class=
                   33776: "diff-chg">normal notification</ins></dfn> .<ins class=
                   33777: "diff-chg">User agents should provide a way to set the
                   33778: origin's</ins> <a href="#trusted"><ins class="diff-chg">trusted
                   33779: notification source</ins></a> <ins class="diff-chg">flag from the
                   33780: notification, so that the user can benefit from notifications even
1.2     ! mike     33781: when the user agent is not the active application.</ins></p>
        !          33782: <p><ins class="diff-chg">Otherwise, the</ins> <a href=
        !          33783: "#origin0"><ins class="diff-chg">origin</ins></a> <ins class=
        !          33784: "diff-chg">is flagged as a</ins> <a href="#trusted"><ins class=
        !          33785: "diff-chg">trusted notification source</ins></a> ,<ins class=
        !          33786: "diff-chg">and the notification should be shown using the platform
1.1       mike     33787: conventions for system-wide notifications. The notification is said
1.2     ! mike     33788: to be a</ins> <dfn id="trusted0"><ins class="diff-chg">trusted
        !          33789: notification</ins></dfn> .<ins class="diff-chg">User agents may
1.1       mike     33790: provide a way to unset the origin's</ins> <a href=
1.2     ! mike     33791: "#trusted"><ins class="diff-chg">trusted notification
        !          33792: source</ins></a> <ins class="diff-chg">flag from within the
1.1       mike     33793: notification, so as to allow users to easily disable notifications
                   33794: from sites that abuse the privilege.</ins></p>
                   33795: <div class="example">
1.2     ! mike     33796: <p><ins class="diff-chg">For example, if a site contains a gadget
1.1       mike     33797: of a mail application in a sandboxed</ins> <code><a href=
1.2     ! mike     33798: "#iframe"><ins class="diff-chg">iframe</ins></a></code> <ins class=
        !          33799: "diff-chg">and that frame triggers a notification upon the receipt
1.1       mike     33800: of a new e-mail message, that notification would be displayed on
                   33801: top of the gadget only.</ins></p>
1.2     ! mike     33802: <p><ins class="diff-chg">However, if the user then goes to the main
1.1       mike     33803: site of that mail application, the notification would be displayed
                   33804: over the entire rendering area of the tab for the site.</ins></p>
1.2     ! mike     33805: <p><ins class="diff-chg">The notification, in this case, would have
1.1       mike     33806: a button on it to let the user indicate that he trusts the site. If
                   33807: the user clicked this button, the next notification would use the
                   33808: system-wide notification system, appearing even if the tab for the
                   33809: mail application was buried deep inside a minimised
                   33810: window.</ins></p>
                   33811: </div>
                   33812: <div class="example">
1.2     ! mike     33813: <p><ins class="diff-chg">The style of notifications varies from
1.1       mike     33814: platform to platform. On some, it is typically displayed as a
                   33815: "toast" window that slides in from the bottom right corner. In
                   33816: others, notifications are shown as semi-transparent white-on-grey
                   33817: overlays centered over the screen. Other schemes could include
                   33818: simulated ticker tapes, and speech-synthesis playback.</ins></p>
                   33819: </div>
1.2     ! mike     33820: <p><ins class="diff-chg">When a</ins> <a href="#normal"><ins class=
        !          33821: "diff-chg">normal notification</ins></a> <ins class="diff-chg">(but
        !          33822: not a</ins> <a href="#sandboxed5"><ins class="diff-chg">sandboxed
        !          33823: notification</ins></a> <ins class="diff-chg">) is shown,</ins> the
        !          33824: user <ins class="diff-new">agent may bring the user's attention to
        !          33825: the</ins> <a href="#top-level"><ins class="diff-new">top-level
        !          33826: browsing context</ins></a> <ins class="diff-new">of the</ins>
        !          33827: <a href="#browsing1"><ins class="diff-new">browsing
        !          33828: context</ins></a> <ins class="diff-new">associated</ins> with the
        !          33829: <del class="diff-old">opportunity</del> <a href=
        !          33830: "#script2"><ins class="diff-chg">script execution context</ins></a>
        !          33831: <ins class="diff-chg">of the script that invoked the method, if
        !          33832: that would be useful; but user agents should not use system-wide
        !          33833: notification mechanisms</ins> to <del class=
        !          33834: "diff-old">convert</del> <ins class="diff-chg">do so.</ins></p>
1.1       mike     33835: <p><ins class="diff-chg">When a</ins> <a href=
                   33836: "#trusted0"><ins class="diff-chg">trusted notification</ins></a>
1.2     ! mike     33837: <ins class="diff-chg">is shown, the user agent should bring</ins>
        !          33838: the <ins class="diff-new">user's attention to the notification and
        !          33839: the</ins> <a href="#browsing1"><ins class="diff-new">browsing
        !          33840: context</ins></a> <ins class="diff-new">associated with the</ins>
        !          33841: <a href="#script2"><ins class="diff-new">script execution
        !          33842: context</ins></a> <ins class="diff-new">of the script that invoked
        !          33843: the method, as per the platform conventions for attracting the
        !          33844: user's attention to applications.</ins></p>
        !          33845: <div class="example">
        !          33846: <p><ins class="diff-new">In the case of</ins> <a href="#normal"
        !          33847: title="normal notification"><ins class="diff-new">normal
        !          33848: notifications</ins></a> ,<ins class="diff-new">typically the only
1.1       mike     33849: attention-grabbing device that would be employed would be something
                   33850: like flashing the tab's caption, or making it bold, or some
                   33851: such.</ins></p>
1.2     ! mike     33852: <p><ins class="diff-new">In addition, in the case of a</ins>
        !          33853: <a href="#trusted0"><ins class="diff-new">trusted
        !          33854: notification</ins></a> ,<ins class="diff-new">the entire window
        !          33855: could flash, or the browser's application icon could bounce or
        !          33856: flash briefly, or a short sound effect could be played.</ins></p>
1.1       mike     33857: </div>
                   33858: <p><ins class="diff-new">Notifications should include the following
                   33859: content:</ins></p>
                   33860: <ul>
                   33861: <li><ins class="diff-new">The</ins> <var title=""><ins class=
                   33862: "diff-new">title</ins></var> ,<var title=""><ins class=
                   33863: "diff-new">subtitle</ins></var> ,<ins class="diff-new">and</ins>
                   33864: <var title=""><ins class="diff-new">description</ins></var>
                   33865: <ins class="diff-new">strings passed to the method. They may be
                   33866: truncated or abbreviated if necessary.</ins></li>
                   33867: <li><ins class="diff-new">The</ins> <a href="#application-name"
                   33868: title="meta-application-name"><ins class="diff-new">application
                   33869: name</ins></a> ,<ins class="diff-new">if available, or else
                   33870: the</ins> <a href="#document.title" title=
1.2     ! mike     33871: "dom-document-title"><ins class="diff-new">document title</ins></a>
1.1       mike     33872: ,<ins class="diff-new">of the</ins> <a href="#active"><ins class=
1.2     ! mike     33873: "diff-new">active</ins> document</a> <ins class="diff-new">of
1.1       mike     33874: the</ins> <a href="#browsing1"><ins class="diff-new">browsing
                   33875: context</ins></a> <ins class="diff-new">associated with the</ins>
                   33876: <a href="#script2"><ins class="diff-new">script execution
                   33877: context</ins></a> <ins class="diff-new">of the script that invoked
                   33878: the method.</ins></li>
                   33879: <li><ins class="diff-new">An icon chosen from the</ins> <a href=
                   33880: "#links1" title="external resource link"><ins class=
                   33881: "diff-new">external resource links</ins></a> <ins class=
                   33882: "diff-new">of type</ins> <code title="rel-icon"><a href=
                   33883: "#icon3"><ins class="diff-new">icon</ins></a></code> ,<ins class=
                   33884: "diff-new">if any are available.</ins></li>
                   33885: </ul>
                   33886: <p><ins class="diff-new">If a new notification from one</ins>
                   33887: <a href="#browsing1"><ins class="diff-new">browsing
                   33888: context</ins></a> <ins class="diff-new">has</ins> <var title=
                   33889: ""><ins class="diff-new">title</ins></var> ,<var title=
                   33890: ""><ins class="diff-new">subtitle</ins></var> ,<ins class=
                   33891: "diff-new">and</ins> <var title=""><ins class=
                   33892: "diff-new">description</ins></var> <ins class="diff-new">strings
                   33893: that are identical</ins> to <del class="diff-old">whatever
                   33894: media</del> <ins class="diff-chg">the</ins> <var title=
                   33895: ""><ins class="diff-chg">title</ins></var> ,<var title=
                   33896: ""><ins class="diff-chg">subtitle</ins></var> ,<ins class=
                   33897: "diff-chg">and</ins> <var title=""><ins class=
                   33898: "diff-chg">description</ins></var> <ins class="diff-chg">strings of
                   33899: an already-active notification from the same</ins> <a href=
                   33900: "#browsing1"><ins class="diff-chg">browsing context</ins></a>
                   33901: <ins class="diff-chg">or another</ins> <a href="#browsing1" title=
                   33902: "browsing context"><ins class="diff-chg">browsing context</ins></a>
                   33903: <ins class="diff-chg">with the same</ins> <a href=
                   33904: "#origin0"><ins class="diff-chg">origin</ins></a> , the user
                   33905: <del class="diff-old">might want.)</del> <ins class=
                   33906: "diff-chg">agent should not display the new notification, but
                   33907: should instead add an indicator to the already-active notification
                   33908: that another identical notification would otherwise have been
                   33909: shown.</ins></p>
                   33910: <div class="example">
                   33911: <p><ins class="diff-chg">For instance, if a user has his mail
                   33912: application open in three windows, and thus the same "New Mail"
                   33913: notification is fired three times each time a mail is received,
                   33914: instead of displaying three identical notifications each time, the
                   33915: user agent could just show one, with the title "New Mail
                   33916: x3".</ins></p>
                   33917: </div>
                   33918: <p><ins class="diff-chg">Notifications should have a lifetime based
                   33919: on the platform conventions for notifications. However, the
                   33920: lifetime of a notification should not begin until the user has had
                   33921: the opportunity to see it, so if a notification is spawned for
                   33922: a</ins> <a href="#browsing1"><ins class="diff-chg">browsing
                   33923: context</ins></a> <ins class="diff-chg">that is hidden, it should
                   33924: be shown for its complete lifetime once the user brings that</ins>
                   33925: <a href="#browsing1"><ins class="diff-chg">browsing
                   33926: context</ins></a> <ins class="diff-chg">into view.</ins></p>
                   33927: <p><ins class="diff-chg">User agents should support multiple
                   33928: notifications at once.</ins></p>
                   33929: <p><ins class="diff-chg">User agents should support user
                   33930: interaction with notifications, if and as appropriate given the
                   33931: platform conventions. If a user activates a notification, and
                   33932: the</ins> <var title=""><ins class="diff-chg">onclick</ins></var>
                   33933: <ins class="diff-chg">callback argument was present and is not
                   33934: null, then the</ins> <a href="#browsing1"><ins class=
                   33935: "diff-chg">browsing context</ins></a> <ins class=
                   33936: "diff-chg">associated with the</ins> <a href="#script2"><ins class=
                   33937: "diff-chg">script execution context</ins></a> <ins class=
                   33938: "diff-chg">of the function given by</ins> <var title=""><ins class=
                   33939: "diff-chg">onclick</ins></var> <ins class="diff-chg">should be
                   33940: brought to the user's attention, and the</ins> <var title=
                   33941: ""><ins class="diff-chg">onclick</ins></var> <ins class=
                   33942: "diff-chg">callback should then be invoked.</ins></p>
                   33943: <h3 id="browser"><span class="secno"><del class=
                   33944: "diff-old">4.5.</del> <ins class="diff-chg">4.6</ins></span>
                   33945: Browser state</h3>
                   33946: <p>The <dfn id="navigator" title=
                   33947: "dom-navigator"><code>navigator</code></dfn> attribute of the
                   33948: <code><a href="#window">Window</a></code> interface must return an
                   33949: instance of the <code><a href=
                   33950: "#clientinformation">ClientInformation</a></code> interface, which
                   33951: represents the identity and state of the user agent (the client),
                   33952: and allows Web pages to register themselves as potential protocol
                   33953: and content handlers:</p>
                   33954: <pre class="idl">
                   33955: interface <dfn id="clientinformation">ClientInformation</dfn> {
                   33956:   readonly attribute boolean <a href="#navigator.online" title=
                   33957: "dom-navigator-onLine">onLine</a>;
                   33958:   void <a href="#registerprotocolhandler" title=
                   33959: "dom-navigator-registerProtocolHandler">registerProtocolHandler</a>(in DOMString protocol, in DOMString uri, in DOMString title);
                   33960:   void <a href="#registercontenthandler" title=
                   33961: "dom-navigator-registerContentHandler">registerContentHandler</a>(in DOMString mimeType, in DOMString uri, in DOMString title);
                   33962: };
                   33963: </pre>
                   33964: <h4 id="custom-handlers"><span class="secno"><del class=
                   33965: "diff-old">4.5.1.</del> <ins class="diff-chg">4.6.1</ins></span>
                   33966: Custom protocol and content handlers</h4>
                   33967: <p>The <dfn id="registerprotocolhandler" title=
                   33968: "dom-navigator-registerProtocolHandler"><code>registerProtocolHandler()</code></dfn>
                   33969: method allows Web sites to register themselves as possible handlers
                   33970: for particular protocols. For example, an online fax service could
                   33971: register itself as a handler of the <code>fax:</code> protocol (
                   33972: <a href="#references">[RFC2806]</a> ), so that if the user clicks
                   33973: on such a link, he is given the opportunity to use that Web site.
                   33974: Analogously, the <dfn id="registercontenthandler" title=
                   33975: "dom-navigator-registerContentHandler"><code>registerContentHandler()</code></dfn>
                   33976: method allows Web sites to register themselves as possible handlers
                   33977: for content in a particular MIME type. For example, the same online
                   33978: fax service could register itself as a handler for
                   33979: <code>image/g3fax</code> files ( <a href=
                   33980: "#references">[RFC1494]</a> ), so that if the user has no native
                   33981: application capable of handling G3 Facsimile byte streams, his Web
                   33982: browser can instead suggest he use that site to view the image.</p>
                   33983: <p>User agents may, within the constraints described in this
                   33984: section, do whatever they like when the methods are called. A UA
                   33985: could, for instance, prompt the user and offer the user the
                   33986: opportunity to add the site to a shortlist of handlers, or make the
                   33987: handlers his default, or cancel the request. UAs could provide such
                   33988: a UI through modal UI or through a non-modal transient notification
                   33989: interface. UAs could also simply silently collect the information,
                   33990: providing it only when relevant to the user.</p>
                   33991: <p>There is <a href="#sample-handler-impl">an example of how these
                   33992: methods could be presented to the user</a> below.</p>
                   33993: <p>The arguments to the methods have the following meanings:</p>
                   33994: <dl>
                   33995: <dt><var title="">protocol</var> ( <code title=
                   33996: "dom-navigator-registerProtocolHandler"><a href=
                   33997: "#registerprotocolhandler">registerProtocolHandler()</a></code>
                   33998: only)</dt>
                   33999: <dd>
                   34000: <p>A scheme, such as <code>ftp</code> or <code>fax</code> . The
                   34001: scheme must be treated case-insensitively by user agents for the
                   34002: purposes of comparing with the scheme part of URIs that they
                   34003: consider against the list of registered handlers.</p>
                   34004: <p>The <var title="">protocol</var> value, if it contains a colon
                   34005: (as in " <code>ftp:</code> "), will never match anything, since
                   34006: schemes don't contain colons.</p>
                   34007: </dd>
                   34008: <dt><var title="">mimeType</var> ( <code title=
                   34009: "dom-navigator-registerContentHandler"><a href=
                   34010: "#registercontenthandler">registerContentHandler()</a></code>
                   34011: only)</dt>
                   34012: <dd>
                   34013: <p>A MIME type, such as <code>model/vrml</code> or
                   34014: <code>text/richtext</code> . The MIME type must be treated
                   34015: case-insensitively by user agents for the purposes of comparing
                   34016: with MIME types of documents that they consider against the list of
                   34017: registered handlers.</p>
                   34018: <p>User agents must compare the given values only to the MIME
                   34019: type/subtype parts of content types, not to the complete type
                   34020: including parameters. Thus, if <var title="">mimeType</var> values
                   34021: passed to this method include characters such as commas or
                   34022: whitespace, or include MIME parameters, then the handler being
                   34023: registered will never be used.</p>
                   34024: </dd>
                   34025: <dt><var title="">uri</var></dt>
                   34026: <dd>
                   34027: <p>The URI of the page that will handle the requests. When the user
                   34028: agent uses this URI, it must replace the first occurrence of the
                   34029: exact literal string " <code>%s</code> " with an escaped version of
                   34030: the URI of the content in question (as defined below), and then
                   34031: fetch the resulting URI using the GET method (or equivalent for
                   34032: non-HTTP URIs).</p>
                   34033: <p>To get the escaped version of the URI, first, the domain part of
                   34034: the URI (if any) must be converted to its punycode representation,
                   34035: and then, every character in the URI that is not in the ranges
                   34036: given in the next paragraph must be replaced by its UTF-8 byte
                   34037: representation, each byte being represented by a U+0025 (%)
                   34038: character and two digits in the range U+0030 (0) to U+0039 (9) and
                   34039: U+0041 (A) to U+0046 (F) giving the hexadecimal representation of
                   34040: the byte.</p>
                   34041: <p>The ranges of characters that must not be escaped are: U+002D
                   34042: (-), U+002E (.), U+0030 (0) to U+0039 (9), U+0041 (A) to U+005A
                   34043: (Z), U+005F (_), U+0061 (a) to U+007A (z), and U+007E (~).</p>
                   34044: <div class="example">
                   34045: <p>If the user had visited a site that made the following call:</p>
                   34046: <pre>
                   34047: navigator.registerContentHandler('application/x-soup',
                   34048: 'http://example.com/soup?url=%s',
                   34049: 'SoupWeb™')
                   34050: </pre>
                   34051: <p>...and then clicked on a link such as:</p>
                   34052: <pre>
                   34053: &lt;a
                   34054: href="http://www.example.net/chickenkïwi.soup"&gt;
                   34055: Download
                   34056: our
                   34057: Chicken
                   34058: Kiwi
                   34059: soup!&lt;/a&gt;
                   34060: </pre>
                   34061: <p>...then, assuming this <code>chickenkïwi.soup</code> file was
                   34062: served with the MIME type <code>application/x-soup</code> , the UA
                   34063: might navigate to the following URI:</p>
                   34064: <pre>
                   34065: http://example.com/soup?url=https%3A%2F%2F2.zoppoz.workers.dev%3A443%2Fhttp%2Fwww.example.net%2Fchickenk%C3%AFwi.soup
                   34066: </pre>
                   34067: <p>This site could then fetch the <code>chickenkïwi.soup</code>
                   34068: file and do whatever it is that it does with soup <del class=
                   34069: "diff-old">(synthesise</del> <ins class=
                   34070: "diff-chg">(synthesize</ins> it and ship it to the user, or
                   34071: whatever).</p>
                   34072: </div>
                   34073: </dd>
                   34074: <dt><var title="">title</var></dt>
                   34075: <dd>
                   34076: <p>A descriptive title of the handler, which the UA might use to
                   34077: remind the user what the site in question is.</p>
                   34078: </dd>
                   34079: </dl>
                   34080: <p>User agents should raise <a href="#security9" title=
                   34081: "security exception">security exceptions</a> if the methods are
                   34082: called with <var title="">protocol</var> or <var title=
                   34083: "">mimeType</var> values that the UA deems to be "privileged". For
                   34084: example, a site attempting to register a handler for
                   34085: <code>http</code> URIs or <code>text/html</code> content in a Web
                   34086: browser would likely cause an exception to be raised.</p>
                   34087: <p>User agents must raise a <code>SYNTAX_ERR</code> exception if
                   34088: the <var title="">uri</var> argument passed to one of these methods
                   34089: does not contain the exact literal string " <code>%s</code> ".</p>
                   34090: <p>User agents must not raise any other exceptions (other than
                   34091: binding-specific exceptions, such as for an incorrect number of
                   34092: arguments in an ECMAScript implementation).</p>
                   34093: <p>This section does not define how the pages registered by these
                   34094: methods are used, beyond the requirements on how to process the
                   34095: <var title="">uri</var> value (see above). To some extent, the
                   34096: <a href="#navigate" title="navigate">processing model for
                   34097: navigating across documents</a> defines some cases where these
                   34098: methods are relevant, but in general UAs may use this information
                   34099: wherever they would otherwise consider handing content to native
                   34100: plugins or helper applications.</p>
                   34101: <p>UAs must not use registered content handlers to handle content
                   34102: that was returned as part of a non-GET transaction (or rather, as
                   34103: part of any non-idempotent transaction), as the remote site would
                   34104: not be able to fetch the same data.</p>
                   34105: <h5 id="security5"><span class="secno"><del class=
                   34106: "diff-old">4.5.1.1.</del> <ins class=
                   34107: "diff-chg">4.6.1.1.</ins></span> Security and privacy</h5>
                   34108: <p>These mechanisms can introduce a number of concerns, in
                   34109: particular privacy concerns.</p>
                   34110: <p><strong>Hijacking all Web usage.</strong> User agents should not
                   34111: allow protocols that are key to its normal operation, such as
                   34112: <code>http</code> or <code>https</code> , to be rerouted through
                   34113: third-party sites. This would allow a user's activities to be
                   34114: trivially tracked, and would allow user information, even in secure
                   34115: connections, to be collected.</p>
                   34116: <p><strong>Hijacking defaults.</strong> It is strongly recommended
                   34117: that user agents do not automatically change any defaults, as this
                   34118: could lead the user to send data to remote hosts that the user is
                   34119: not expecting. New handlers registering themselves should never
                   34120: automatically cause those sites to be used.</p>
                   34121: <p><strong>Registration spamming.</strong> User agents should
                   34122: consider the possibility that a site will attempt to register a
                   34123: large number of handlers, possibly from multiple domains (e.g. by
                   34124: redirecting through a series of pages each on a different domain,
                   34125: and each registering a handler for <code>video/mpeg</code> —
                   34126: analogous practices abusing other Web browser features have been
                   34127: used by pornography Web sites for many years). User agents should
                   34128: gracefully handle such hostile attempts, protecting the user.</p>
                   34129: <p><strong>Misleading titles.</strong> User agents should not rely
                   34130: <del class="diff-old">wholy</del> <ins class=
                   34131: "diff-chg">wholly</ins> on the <var title="">title</var> argument
                   34132: to the methods when presenting the registered handlers to the user,
                   34133: since sites could easily lie. For example, a site
                   34134: <code>hostile.example.net</code> could claim that it was
                   34135: registering the "Cuddly Bear Happy Content Handler". User agents
                   34136: should therefore use the handler's domain in any UI along with any
                   34137: title.</p>
                   34138: <p><strong>Hostile handler metadata.</strong> User agents should
                   34139: protect against typical attacks against strings embedded in their
                   34140: interface, for example ensuring that markup or escape characters in
                   34141: such strings are not executed, that null bytes are properly
                   34142: handled, that over-long strings do not cause crashes or buffer
                   34143: overruns, and so forth.</p>
                   34144: <p><strong>Leaking Intranet URIs.</strong> The mechanism described
                   34145: in this section can result in secret Intranet URIs being leaked, in
                   34146: the following manner:</p>
                   34147: <ol>
                   34148: <li>The user registers a third-party content handler as the default
                   34149: handler for a content type.</li>
                   34150: <li>The user then browses his corporate Intranet site and accesses
                   34151: a document that uses that content type.</li>
                   34152: <li>The user agent contacts the third party and hands the third
                   34153: party the URI to the Intranet content.</li>
                   34154: </ol>
                   34155: <p>No actual confidential file data is leaked in this manner, but
                   34156: the URIs themselves could contain confidential information. For
                   34157: example, the URI could be
                   34158: <code>https://www.corp.example.com/upcoming-aquisitions/samples.egf</code>
                   34159: , which might tell the third party that Example Corporation is
                   34160: intending to merge with Samples LLC. Implementors might wish to
                   34161: consider allowing administrators to disable this feature for
                   34162: certain subdomains, content types, or protocols.</p>
                   34163: <p><strong>Leaking secure URIs.</strong> User agents should not
                   34164: send HTTPS URIs to third-party sites registered as content
                   34165: handlers, in the same way that user agents do not send
                   34166: <code>Referer</code> headers from secure sites to third-party
                   34167: sites.</p>
                   34168: <p><strong>Leaking credentials.</strong> User agents must never
                   34169: send username or password information in the URIs that are escaped
                   34170: and included sent to the handler sites. User agents may even avoid
                   34171: attempting to pass to Web-based handlers the URIs of resources that
                   34172: are known to require authentication to access, as such sites would
                   34173: be unable to access the resources in question without prompting the
                   34174: user for credentials themselves (a practice that would require the
                   34175: user to know whether to trust the third-party handler, a decision
                   34176: many users are unable to make or even understand).</p>
                   34177: <h5 id="sample-handler-impl"><span class="secno"><del class=
                   34178: "diff-old">4.5.1.2.</del> <ins class=
                   34179: "diff-chg">4.6.1.2.</ins></span> Sample user interface</h5>
                   34180: <p><em>This section is non-normative.</em></p>
                   34181: <p>A simple implementation of this feature for a desktop Web
                   34182: browser might work as follows.</p>
                   34183: <p>The <code title="dom-navigator-registerProtocolHandler"><a href=
                   34184: "#registerprotocolhandler">registerProtocolHandler()</a></code>
                   34185: method could display a modal dialog box:</p>
                   34186: <pre>
                   34187: ||[ Protocol Handler Registration ]|||||||||||||||||||||||||||
                   34188: |                                                            |
                   34189: | This Web page:                                             |
                   34190: |                                                            |
                   34191: |    Kittens at work                                         |
                   34192: |    http://kittens.example.org/                             |
                   34193: |                                                            |
                   34194: | ...would like permission to handle the protocol "x-meow:"  |
                   34195: | using the following Web-based application:                 |
                   34196: |                                                            |
                   34197: |    Kittens-at-work displayer                               |
                   34198: |    http://kittens.example.org/?show=%s                     |
                   34199: |                                                            |
                   34200: | Do you trust the administrators of the "kittens.example.   |
                   34201: | org" domain?                                               |
                   34202: |                                                            |
                   34203: |              ( Trust kittens.example.org )  (( Cancel ))   |
                   34204: |____________________________________________________________|
                   34205: </pre>
                   34206: <p>...where "Kittens at work" is the title of the page that invoked
                   34207: the method, "http://kittens.example.org/" is the URI of that page,
                   34208: "x-meow" is the string that was passed to the <code title=
                   34209: "dom-navigator-registerProtocolHandler"><a href=
                   34210: "#registerprotocolhandler">registerProtocolHandler()</a></code>
                   34211: method as its first argument ( <var title="">protocol</var> ),
                   34212: "http://kittens.example.org/?show=%s" was the second argument (
                   34213: <var title="">uri</var> ), and "Kittens-at-work displayer" was the
                   34214: third argument ( <var title="">title</var> ).</p>
                   34215: <p>If the user clicks the Cancel button, then nothing further
                   34216: happens. If the user clicks the "Trust" button, then the handler is
                   34217: remembered.</p>
                   34218: <p>When the user then attempts to fetch a URI that uses the
                   34219: "x-meow:" scheme, then it might display a dialog as follows:</p>
                   34220: <pre>
                   34221: ||[ Unknown Protocol ]||||||||||||||||||||||||||||||||||||||||
                   34222: |                                                            |
                   34223: | You have attempted to access:                              |
                   34224: |                                                            |
                   34225: |    x-meow:S2l0dGVucyBhcmUgdGhlIGN1dGVzdCE%3D               |
                   34226: |                                                            |
                   34227: | How would you like FerretBrowser to handle this resource?  |
                   34228: |                                                            |
                   34229: |  (o) Contact the FerretBrowser plugin registry to see if   |
                   34230: |      there is an official way to handle this resource.     |
                   34231: |                                                            |
                   34232: |  ( ) Pass this URI to a local application:                 |
                   34233: |      [ /no application selected/             ] ( Choose )  |
                   34234: |                                                            |
                   34235: |  ( ) Pass this URI to the "Kittens-at-work displayer"      |
                   34236: |      application at "kittens.example.org".                 |
                   34237: |                                                            |
                   34238: |  [ ] Always do this for resources using the "x-meow"       |
                   34239: |      protocol in future.                                   |
                   34240: |                                                            |
                   34241: |                                     ( Ok )  (( Cancel ))   |
                   34242: |____________________________________________________________|
                   34243: </pre>
                   34244: <p>...where the third option is the one that was primed by the site
                   34245: registering itself earlier.</p>
                   34246: <p>If the user does select that option, then the browser, in
                   34247: accordance with the requirements described in the previous two
                   34248: sections, will redirect the user to
                   34249: "http://kittens.example.org/?show=x-meow%3AS2l0dGVucyBhcmUgdGhlIGN1dGVzdCE%253D".</p>
                   34250: <p>The <code title="dom-navigator-registerContentHandler"><a href=
                   34251: "#registercontenthandler">registerContentHandler()</a></code>
                   34252: method would work equivalently, but for unknown MIME types instead
                   34253: of unknown protocols.</p>
                   34254: <h3 id="offline"><span class="secno"><del class=
                   34255: "diff-old">4.6.</del> <ins class="diff-chg">4.7</ins></span>
                   34256: Offline Web applications</h3>
                   34257: <h4 id="introduction1"><span class="secno"><del class=
                   34258: "diff-old">4.6.1.</del> <ins class="diff-chg">4.7.1</ins></span>
                   34259: Introduction</h4>
                   34260: <p><em><ins class="diff-new">This section is
                   34261: non-normative.</ins></em></p>
                   34262: <p class="big-issue">...</p>
                   34263: <h4 id="appcache"><span class="secno"><del class=
                   34264: "diff-old">4.6.2.</del> <ins class="diff-chg">4.7.2</ins></span>
                   34265: Application caches</h4>
                   34266: <p>An <dfn id="application0">application cache</dfn> is a
                   34267: collection of resources. An application cache is identified by the
                   34268: URI of a resource manifest which is used to populate the cache.</p>
                   34269: <p>Application caches are versioned, and there can be different
                   34270: instances of caches for the same manifest URI, each having a
                   34271: different version. A cache is newer than another if it was created
                   34272: after the other (in other words, caches in a group have a
                   34273: chronological order).</p>
                   34274: <p>Each group of application caches for the same manifest URI have
                   34275: a common <dfn id="update0" title="concept-appcache-status">update
                   34276: status</dfn> , which is one of the following: <i>idle</i> ,
                   34277: <i>checking</i> , <i>downloading</i> .</p>
                   34278: <p id="appcache-history-1">A <a href="#browsing1">browsing
                   34279: context</a> can be associated with an application cache. A <a href=
                   34280: "#child">child browsing context</a> is always associated with the
                   34281: same <del class="diff-old">browsing context</del> <ins class=
                   34282: "diff-chg">application cache</ins> as its <a href="#parent">parent
                   34283: browsing context</a> , if any. A <a href="#top-level">top-level
                   34284: browsing context</a> is associated with the application cache
                   34285: appropriate for its <a href="#active">active document</a> . (A
                   34286: browsing context's associated cache thus can <a href=
                   34287: "#appcache-history-2">change</a> during <a href="#traverse" title=
                   34288: "traverse the history">session history traversal</a> .)</p>
                   34289: <p>A <code>Document</code> initially has no appropriate cache, but
                   34290: steps <a href="#parser-appcache">in the parser</a> and in the
                   34291: <a href="#navigate" title="navigate">navigation</a> sections cause
                   34292: <a href="#application2" title=
                   34293: "concept-appcache-init-with-attribute">cache selection</a> to occur
                   34294: early in the page load process.</p>
                   34295: <p>An application cache consists of:</p>
                   34296: <ul>
                   34297: <li>
                   34298: <p>One of more resources (including their out-of-band metadata,
                   34299: such as HTTP headers, if any), identified by URIs, each falling
                   34300: into one (or more) of the following categories:</p>
                   34301: <dl>
                   34302: <dt><dfn id="implicit" title="concept-appcache-implicit">Implicit
                   34303: entries</dfn></dt>
                   34304: <dd>Documents that were added to the cache because a <a href=
                   34305: "#top-level">top-level browsing context</a> was <a href="#navigate"
                   34306: title="navigate">navigated</a> to that document and the document
                   34307: indicated that this was its cache, using the <code title=
                   34308: "attr-html-manifest"><a href="#manifest">manifest</a></code>
                   34309: attribute.</dd>
                   34310: <dt><dfn id="the-manifest" title="concept-appcache-manifest">The
                   34311: manifest</dfn></dt>
                   34312: <dd>The resource corresponding to the URI that was given in an
                   34313: implicit entry's <code><a href="#html">html</a></code> element's
                   34314: <code title="attr-html-manifest"><a href=
                   34315: "#manifest">manifest</a></code> attribute. The manifest is
                   34316: downloaded and processed during the <a href=
                   34317: "#application1">application cache update process</a> . All the
                   34318: <a href="#implicit" title="concept-appcache-implicit">implicit
                   34319: entries</a> have the <a href="#same-origin" title=
                   34320: "same origin">same <del class="diff-old">scheme/host/port</del>
                   34321: <ins class="diff-chg">origin</ins></a> as the manifest.</dd>
                   34322: <dt><dfn id="explicit" title="concept-appcache-explicit">Explicit
                   34323: entries</dfn></dt>
                   34324: <dd>Resources that were listed in the cache's <a href=
                   34325: "#the-manifest" title="concept-appcache-manifest">manifest</a> .
                   34326: Explicit entries can also be marked as <dfn id="foreign" title=
                   34327: "concept-appcache-foreign">foreign</dfn> , which means that they
                   34328: have <del class="diff-old">an</del> <ins class="diff-chg">a</ins>
                   34329: <code title="attr-html-manifest"><a href=
                   34330: "#manifest">manifest</a></code> attribute but that it doesn't point
                   34331: at this cache's <a href="#the-manifest" title=
                   34332: "concept-appcache-manifest">manifest</a> .</dd>
                   34333: <dt><dfn id="fallback0" title="concept-appcache-fallback">Fallback
                   34334: entries</dfn></dt>
                   34335: <dd>Resources that were listed in the cache's <a href=
                   34336: "#the-manifest" title="concept-appcache-manifest">manifest</a> as
                   34337: fallback entries.</dd>
                   34338: <dt><dfn id="opportunistically" title=
                   34339: "concept-appcache-oppcache">Opportunistically cached
                   34340: entries</dfn></dt>
                   34341: <dd>Resources whose URIs <a href="#matches" title=
                   34342: "concept-appcache-matches-oppcache">matched</a> an <a href=
                   34343: "#opportunistic" title="concept-appcache-oppcache-ns">opportunistic
                   34344: caching namespace</a> when they were fetched, and were therefore
                   34345: cached in the application cache.</dd>
                   34346: <dt><dfn id="dynamic3" title="concept-appcache-dynamic">Dynamic
                   34347: entries</dfn></dt>
                   34348: <dd>Resources that were added to the cache by the <code title=
                   34349: "dom-appcache-add"><a href="#adduri">add()</a></code> method.</dd>
                   34350: </dl>
                   34351: <p class="note">A URI in the list can be flagged with multiple
                   34352: different types, and thus an entry can end up being <del class=
                   34353: "diff-old">categorised</del> <ins class=
                   34354: "diff-chg">categorized</ins> as multiple entries. For example, an
                   34355: entry can be an explicit entry and a dynamic entry at the same
                   34356: time.</p>
                   34357: </li>
                   34358: <li>Zero or more <dfn id="opportunistic" title=
                   34359: "concept-appcache-oppcache-ns">opportunistic caching
                   34360: namespaces</dfn> : URIs, used as <a href="#matches" title=
                   34361: "concept-appcache-matches-oppcache">prefix match patterns</a> ,
                   34362: each of which is mapped to a <a href="#fallback0" title=
                   34363: "concept-appcache-fallback">fallback entry</a> . Each namespace URI
                   34364: prefix, when parsed as a URI, has the <a href="#same-origin">same
                   34365: <del class="diff-old">scheme/host/port</del> <ins class=
                   34366: "diff-chg">origin</ins></a> as <a href="#the-manifest" title=
                   34367: "concept-appcache-manifest">the manifest</a> .</li>
                   34368: <li>Zero or more URIs that form the <dfn id="online" title=
                   34369: "concept-appcache-onlinewhitelist">online whitelist</dfn> .</li>
                   34370: </ul>
                   34371: <p>Multiple application caches can contain the same resource, e.g.
                   34372: if their manifests all reference that resource. If the user agent
                   34373: is to <dfn id="select0" title="concept-appcache-selection">select
                   34374: an application cache</dfn> from a list of caches that contain a
                   34375: resource, that the user agent must use the application cache that
                   34376: the user most likely wants to see the resource from, taking into
                   34377: account the following:</p>
                   34378: <ul>
                   34379: <li>which application cache was most recently updated,</li>
                   34380: <li>which application cache was being used to display the resource
                   34381: from which the user decided to look at the new resource, and</li>
                   34382: <li>which application cache the user prefers.</li>
                   34383: </ul>
                   34384: <h4 id="manifests"><span class="secno"><del class=
                   34385: "diff-old">4.6.3.</del> <ins class="diff-chg">4.7.3</ins></span>
                   34386: The cache manifest syntax</h4>
                   34387: <h5 id="writing"><span class="secno"><del class=
                   34388: "diff-old">4.6.3.1.</del> <ins class=
                   34389: "diff-chg">4.7.3.1.</ins></span> Writing cache manifests</h5>
                   34390: <p>Manifests must be served using the <code title=
                   34391: "">text/cache-manifest</code> MIME type. All resources served using
                   34392: the <code title="">text/cache-manifest</code> MIME type must follow
                   34393: the syntax of application cache manifests, as described in this
                   34394: section.</p>
                   34395: <p>An application cache manifest is a text file, whose text is
                   34396: encoded using UTF-8. Data in application cache manifests is
                   34397: line-based. Newlines must be represented by U+000A LINE FEED (LF)
                   34398: characters, U+000D CARRIAGE RETURN (CR) characters, or U+000D
                   34399: CARRIAGE RETURN (CR) U+000A LINE FEED (LF) pairs.</p>
                   34400: <p class="note">This is a willful double violation of RFC2046.
                   34401: <a href="#references"><ins class="diff-new">[RFC2046]</ins></a></p>
                   34402: <p>The first line of an application cache manifest must consist of
                   34403: the string "CACHE", a single U+0020 SPACE character, the string
                   34404: "MANIFEST", and zero or more U+0020 SPACE and U+0009 CHARACTER
                   34405: TABULATION (tab) characters. <ins class="diff-new">The first line
                   34406: may optionally be preceded by a U+FEFF BYTE ORDER MARK (BOM)
                   34407: character.</ins> If any other text is found on the first line, the
                   34408: user agent will ignore the entire file. <del class="diff-old">The
                   34409: first line may optionally be preceded by a U+FEFF BYTE ORDER MARK
                   34410: (BOM) character.</del></p>
                   34411: <p>Subsequent lines, if any, must all be one of the following:</p>
                   34412: <dl>
                   34413: <dt>A blank line</dt>
                   34414: <dd>
                   34415: <p>Blank lines must consist of zero or more U+0020 SPACE and U+0009
                   34416: CHARACTER TABULATION (tab) characters only.</p>
                   34417: </dd>
                   34418: <dt>A comment</dt>
                   34419: <dd>
                   34420: <p>Comment lines must consist of zero or more U+0020 SPACE and
                   34421: U+0009 CHARACTER TABULATION (tab) characters, followed by a single
                   34422: U+0023 NUMBER SIGN (#) character, followed by zero or more
                   34423: characters other than U+000A LINE FEED (LF) and U+000D CARRIAGE
                   34424: RETURN (CR) characters.</p>
                   34425: <p class="note">Comments must be on a line on their own. If they
                   34426: were to be included on a line with a URI, the "#" would be mistaken
                   34427: for part of a fragment identifier.</p>
                   34428: </dd>
                   34429: <dt>A section header</dt>
                   34430: <dd>
                   34431: <p>Section headers change the current section. There are three
                   34432: possible section headers:</p>
                   34433: <dl>
                   34434: <dt><code>CACHE:</code></dt>
                   34435: <dd>Switches to the explicit section.</dd>
                   34436: <dt><code>FALLBACK:</code></dt>
                   34437: <dd>Switches to the fallback section.</dd>
                   34438: <dt><code>NETWORK:</code></dt>
                   34439: <dd>Switches to the online whitelist section.</dd>
                   34440: </dl>
                   34441: <p>Section header lines must consist of zero or more U+0020 SPACE
                   34442: and U+0009 CHARACTER TABULATION (tab) characters, followed by one
                   34443: of the names above (including the U+003A COLON (:) character)
                   34444: followed by zero or more U+0020 SPACE and U+0009 CHARACTER
                   34445: TABULATION (tab) characters.</p>
                   34446: <p>Ironically, by default, the current section is the explicit
                   34447: section.</p>
                   34448: </dd>
                   34449: <dt>Data for the current section</dt>
                   34450: <dd>
                   34451: <p>The format that data lines must take depends on the current
                   34452: section.</p>
                   34453: <p>When the current section is the explicit section or the online
                   34454: whitelist section, data lines must consist of zero or more U+0020
                   34455: SPACE and U+0009 CHARACTER TABULATION (tab) characters, a valid URI
                   34456: reference or IRI <del class="diff-old">reference,</del> <ins class=
                   34457: "diff-chg">reference to a resource other than the manifest
                   34458: itself,</ins> and then zero or more U+0020 SPACE and U+0009
                   34459: CHARACTER TABULATION (tab) characters. <a href=
                   34460: "#references">[RFC3986]</a> <a href="#references">[RFC3987]</a></p>
                   34461: <p>When the current section is the fallback section, data lines
                   34462: must consist of zero or more U+0020 SPACE and U+0009 CHARACTER
                   34463: TABULATION (tab) characters, a valid URI reference or IRI
                   34464: <del class="diff-old">reference,</del> <ins class=
                   34465: "diff-chg">reference to a resource other than the manifest
                   34466: itself,</ins> one or more U+0020 SPACE and U+0009 CHARACTER
                   34467: TABULATION (tab) characters, another valid URI reference or IRI
                   34468: <del class="diff-old">reference,</del> <ins class=
                   34469: "diff-chg">reference to a resource other than the manifest
                   34470: itself,</ins> and then zero or more U+0020 SPACE and U+0009
                   34471: CHARACTER TABULATION (tab) characters. <a href=
                   34472: "#references">[RFC3986]</a> <a href="#references">[RFC3987]</a></p>
                   34473: <p class="note"><ins class="diff-new">The URI or IRI references in
                   34474: data lines can't be empty strings, since those would be relative
                   34475: URIs to the manifest itself. Such lines would be confused with
                   34476: blank or invalid lines, anyway.</ins></p>
                   34477: </dd>
                   34478: </dl>
                   34479: <p>Manifests may contain sections more than once. Sections may be
                   34480: empty.</p>
                   34481: <p>URIs that are to be fallback pages associated with <a href=
                   34482: "#opportunistic" title="concept-appcache-oppcache-ns">opportunistic
                   34483: caching namespaces</a> , and those namespaces themselves, must be
                   34484: given in fallback sections, with the namespace being the first URI
                   34485: of the data line, and the corresponding fallback page being the
                   34486: second URI. All the other pages to be cached must be listed in
                   34487: explicit sections.</p>
                   34488: <p><a href="#opportunistic" title=
                   34489: "concept-appcache-oppcache-ns">Opportunistic caching namespaces</a>
                   34490: must have the <a href="#same-origin">same <del class=
                   34491: "diff-old">scheme/host/port</del> <ins class=
                   34492: "diff-chg">origin</ins></a> as the manifest itself.</p>
                   34493: <p>An opportunistic caching namespace must not be listed more than
                   34494: once.</p>
                   34495: <p>URIs that the user agent is to put into the <a href="#online"
                   34496: title="concept-appcache-onlinewhitelist">online whitelist</a> must
                   34497: all be specified in online whitelist sections. (This is needed for
                   34498: any URI that the page is intending to use to communicate back to
                   34499: the server.)</p>
                   34500: <p>URIs in the online whitelist section must not also be listed in
                   34501: explicit section, and must not be listed as fallback entries in the
                   34502: fallback section. (URIs in the online whitelist section may match
                   34503: opportunistic caching namespaces, however.)</p>
                   34504: <p>Relative URIs must be given relative to the manifest's own
                   34505: URI.</p>
                   34506: <p>URIs in manifests must not have fragment identifiers.</p>
                   34507: <h5 id="parsing0"><span class="secno"><del class=
                   34508: "diff-old">4.6.3.2.</del> <ins class=
                   34509: "diff-chg">4.7.3.2.</ins></span> Parsing cache manifests</h5>
                   34510: <p>When a user agent is to <dfn id="parse0">parse a manifest</dfn>
                   34511: , it means that the user agent must run the following steps:</p>
                   34512: <ol>
                   34513: <li>
                   34514: <p>The user agent must decode the <del class=
                   34515: "diff-old">bytestream</del> <ins class="diff-chg">byte stream</ins>
                   34516: corresponding with the manifest to be parsed, treating it as UTF-8.
                   34517: Bytes or sequences of bytes that are not valid UTF-8 sequences must
                   34518: be interpreted as a U+FFFD REPLACEMENT CHARACTER. <del class=
                   34519: "diff-old">All U+0000 NULL characters must be replaced by U+FFFD
                   34520: REPLACEMENT CHARACTERs.</del></p>
                   34521: </li>
                   34522: <li>
                   34523: <p>Let <var title="">explicit URIs</var> be an initially empty list
                   34524: of <a href="#explicit" title="concept-appcache-explicit">explicit
                   34525: entries</a> .</p>
                   34526: </li>
                   34527: <li>
                   34528: <p>Let <var title="">fallback URIs</var> be an initially empty
                   34529: mapping of <a href="#opportunistic" title=
                   34530: "concept-appcache-oppcache-ns">opportunistic caching namespaces</a>
                   34531: to <a href="#fallback0" title="concept-appcache-fallback">fallback
                   34532: entries</a> .</p>
                   34533: </li>
                   34534: <li>
                   34535: <p>Let <var title="">online whitelist URIs</var> be an initially
                   34536: empty list of URIs for a <a href="#online" title=
                   34537: "concept-appcache-onlinewhitelist">online whitelist</a> .</p>
                   34538: </li>
                   34539: <li>
                   34540: <p>Let <var title="">input</var> be the decoded text of the
                   34541: manifest's <del class="diff-old">bytestream.</del> <ins class=
                   34542: "diff-chg">byte stream.</ins></p>
                   34543: </li>
                   34544: <li>
                   34545: <p>Let <var title="">position</var> be a pointer into <var title=
                   34546: "">input</var> , initially pointing at the first character.</p>
                   34547: </li>
                   34548: <li>
                   34549: <p>If <var title="">position</var> is pointing at a U+FEFF BYTE
                   34550: ORDER MARK (BOM) character, then advance <var title=
                   34551: "">position</var> to the next character.</p>
                   34552: </li>
                   34553: <li>
                   34554: <p>If the characters starting from <var title="">position</var> are
                   34555: "CACHE", followed by a U+0020 SPACE character, followed by
                   34556: "MANIFEST", then advance <var title="">position</var> to the next
                   34557: character after those. Otherwise, this isn't a cache manifest;
                   34558: abort this algorithm with a failure while checking for the magic
                   34559: signature.</p>
                   34560: </li>
                   34561: <li>
                   34562: <p><a href="#collect">Collect a sequence of characters</a> that are
                   34563: U+0020 SPACE or U+0009 CHARACTER TABULATION (tab) characters.</p>
                   34564: </li>
                   34565: <li>
                   34566: <p>If <var title="">position</var> is not past the end of
                   34567: <var title="">input</var> and the character at <var title=
                   34568: "">position</var> is neither a U+000A LINE FEED (LF) characters nor
                   34569: a U+000D CARRIAGE RETURN (CR) character, then this isn't a cache
                   34570: manifest; abort this algorithm with a failure while checking for
                   34571: the magic signature.</p>
                   34572: </li>
                   34573: <li>
                   34574: <p>This is a cache manifest. The algorithm cannot fail beyond this
                   34575: point (though bogus lines can get ignored).</p>
                   34576: </li>
                   34577: <li>
                   34578: <p>Let <var title="">mode</var> be "explicit".</p>
                   34579: </li>
                   34580: <li>
                   34581: <p><em>Start of line</em> : If <var title="">position</var> is past
                   34582: the end of <var title="">input</var> , then jump to the last step.
                   34583: Otherwise, <a href="#collect">collect a sequence of characters</a>
                   34584: that are U+000A LINE FEED (LF), U+000D CARRIAGE RETURN (CR), U+0020
                   34585: SPACE, or U+0009 CHARACTER TABULATION (tab) characters.</p>
                   34586: </li>
                   34587: <li>
                   34588: <p>Now, <a href="#collect">collect a sequence of characters</a>
                   34589: that are <em>not</em> U+000A LINE FEED (LF) or U+000D CARRIAGE
                   34590: RETURN (CR) characters, and let the result be <var title=
                   34591: "">line</var> .</p>
                   34592: </li>
                   34593: <li>
                   34594: <p><ins class="diff-new">Drop any trailing U+0020 SPACE, or U+0009
                   34595: CHARACTER TABULATION (tab) characters at the end of</ins>
                   34596: <var title=""><ins class="diff-new">line</ins></var> .</p>
                   34597: </li>
                   34598: <li>
                   34599: <p><ins class="diff-new">If</ins> <var title=""><ins class=
                   34600: "diff-new">line</ins></var> <ins class="diff-new">is the empty
                   34601: string, then jump back to the step labeled "start of
                   34602: line".</ins></p>
                   34603: </li>
                   34604: <li>
                   34605: <p>If the first character in <var title="">line</var> is a U+0023
                   34606: NUMBER SIGN (#) character, then jump back to the step <del class=
                   34607: "diff-old">labelled</del> <ins class="diff-chg">labeled</ins>
                   34608: "start of line".</p>
                   34609: </li>
                   34610: <li>
                   34611: <p><del class="diff-old">Drop any trailing U+0020 SPACE, or U+0009
                   34612: CHARACTER TABULATION (tab) characters at the end of line .</del> If
                   34613: <var title="">line</var> equals "CACHE:" (the word "CACHE" followed
                   34614: by a U+003A COLON (:) character), then set <var title="">mode</var>
                   34615: to "explicit" and jump back to the step <del class=
                   34616: "diff-old">labelled</del> <ins class="diff-chg">labeled</ins>
                   34617: "start of line".</p>
                   34618: </li>
                   34619: <li>
                   34620: <p>If <var title="">line</var> equals "FALLBACK:" (the word
                   34621: "FALLBACK" followed by a U+003A COLON (:) character), then set
                   34622: <var title="">mode</var> to "fallback" and jump back to the step
                   34623: <del class="diff-old">labelled</del> <ins class=
                   34624: "diff-chg">labeled</ins> "start of line".</p>
                   34625: </li>
                   34626: <li>
                   34627: <p>If <var title="">line</var> equals "NETWORK:" (the word
                   34628: "NETWORK" followed by a U+003A COLON (:) character), then set
                   34629: <var title="">mode</var> to "online whitelist" and jump back to the
                   34630: step <del class="diff-old">labelled</del> <ins class=
                   34631: "diff-chg">labeled</ins> "start of line".</p>
                   34632: </li>
                   34633: <li>
                   34634: <p>This is either a data line or it is syntactically incorrect.</p>
                   34635: <dl class="switch">
                   34636: <dt>If <var title="">mode</var> is "explicit"</dt>
                   34637: <dd>
                   34638: <p>If <var title="">line</var> is not a syntactically <del class=
                   34639: "diff-old">valid</del> <ins class="diff-chg">correct</ins> URI
                   34640: reference or IRI reference, then jump back to the step <del class=
                   34641: "diff-old">labelled</del> <ins class="diff-chg">labeled</ins>
                   34642: "start of line".</p>
                   34643: <p>Otherwise, resolve the URI reference or IRI reference to an
                   34644: absolute URI or IRI, and drop the fragment identifier, if any.</p>
                   34645: <p>Now, if the resource's URI has a different &lt;scheme&gt;
                   34646: component than the manifest's <del class="diff-old">URI,</del>
                   34647: <ins class="diff-chg">URI (compared case-insensitively),</ins> then
                   34648: jump back to the step <del class="diff-old">labelled</del>
                   34649: <ins class="diff-chg">labeled</ins> "start of line".</p>
                   34650: <p>Otherwise, add this URI to the <var title="">explicit URIs</var>
                   34651: .</p>
                   34652: </dd>
                   34653: <dt>If <var title="">mode</var> is "fallback"</dt>
                   34654: <dd>
                   34655: <p>If <var title="">line</var> does not contain at least one U+0020
                   34656: SPACE or U+0009 CHARACTER TABULATION (tab) character, then jump
                   34657: back to the step <del class="diff-old">labelled</del> <ins class=
                   34658: "diff-chg">labeled</ins> "start of line".</p>
                   34659: <p>Otherwise, let everything before the first U+0020 SPACE or
                   34660: U+0009 CHARACTER TABULATION (tab) character in <var title=
                   34661: "">line</var> be <var title="">part one</var> , and let everything
                   34662: after the first U+0020 SPACE or U+0009 CHARACTER TABULATION (tab)
                   34663: character in <var title="">line</var> be <var title="">part
                   34664: two</var> .</p>
                   34665: <p>Strip any leading U+0020 SPACE or U+0009 CHARACTER TABULATION
                   34666: (tab) characters in <var title="">part two</var> .</p>
                   34667: <p>If <var title="">part one</var> and <var title="">part two</var>
                   34668: are not both syntactically <del class="diff-old">valid</del>
                   34669: <ins class="diff-chg">correct</ins> URI or IRI references, then
                   34670: jump back to the step <del class="diff-old">labelled</del>
                   34671: <ins class="diff-chg">labeled</ins> "start of line".</p>
                   34672: <p>Resolve the URI or IRI references in <var title="">part
                   34673: one</var> and <var title="">part two</var> to absolute URIs or
                   34674: <del class="diff-old">IRIs.</del> <ins class="diff-chg">IRIs, and
                   34675: drop the fragment identifiers, if any.</ins></p>
                   34676: <p>If the absolute URI or IRI corresponding to <var title="">part
                   34677: one</var> is already in the <var title="">fallback URIs</var>
                   34678: mapping as an <a href="#opportunistic" title=
                   34679: "concept-appcache-oppcache-ns">opportunistic caching namespace</a>
                   34680: , then jump back to the step <del class="diff-old">labelled</del>
                   34681: <ins class="diff-chg">labeled</ins> "start of line".</p>
                   34682: <p>If the absolute URI or IRI corresponding to <var title="">part
                   34683: one</var> does not have the <a href="#same-origin">same <del class=
                   34684: "diff-old">scheme/host/port</del> <ins class=
                   34685: "diff-chg">origin</ins></a> as the manifest's URI, then jump back
                   34686: to the step <del class="diff-old">labelled</del> <ins class=
                   34687: "diff-chg">labeled</ins> "start of line".</p>
                   34688: <p>If the absolute URI or IRI corresponding to <var title="">part
                   34689: two</var> has a different &lt;scheme&gt; component than the
                   34690: manifest's <del class="diff-old">URI,</del> <ins class=
                   34691: "diff-chg">URI (compared case-insensitively ),</ins> then jump back
                   34692: to the step <del class="diff-old">labelled</del> <ins class=
                   34693: "diff-chg">labeled</ins> "start of line".</p>
                   34694: <p>Otherwise, add the absolute URI or IRI corresponding to
                   34695: <var title="">part one</var> to the <var title="">fallback
                   34696: URIs</var> mapping as an <a href="#opportunistic" title=
                   34697: "concept-appcache-oppcache-ns">opportunistic caching namespace</a>
                   34698: , mapped to the absolute URI corresponding to <var title="">part
                   34699: two</var> as the <a href="#fallback0" title=
                   34700: "concept-appcache-fallback">fallback entry</a> .</p>
                   34701: </dd>
                   34702: <dt>If <var title="">mode</var> is "online whitelist"</dt>
                   34703: <dd>
                   34704: <p>If <var title="">line</var> is not a syntactically <del class=
                   34705: "diff-old">valid</del> <ins class="diff-chg">correct</ins> URI
                   34706: reference or IRI reference, then jump back to the step <del class=
                   34707: "diff-old">labelled</del> <ins class="diff-chg">labeled</ins>
                   34708: "start of line".</p>
                   34709: <p>Otherwise, resolve the URI reference or IRI reference to an
                   34710: absolute URI or IRI, and drop the fragment identifier, if any.</p>
                   34711: <p>Now, if the resource's URI has a different &lt;scheme&gt;
                   34712: component than the manifest's URI, then jump back to the step
                   34713: <del class="diff-old">labelled</del> <ins class=
                   34714: "diff-chg">labeled</ins> "start of line".</p>
                   34715: <p>Otherwise, add this URI to the <var title="">online whitelist
                   34716: URIs</var> .</p>
                   34717: </dd>
                   34718: </dl>
                   34719: </li>
                   34720: <li>
                   34721: <p>Jump back to the step <del class="diff-old">labelled</del>
                   34722: <ins class="diff-chg">labeled</ins> "start of line". (That step
                   34723: jumps to the next, and last, step when the end of the file is
                   34724: reached.)</p>
                   34725: </li>
                   34726: <li>
                   34727: <p>Return the <var title="">explicit URIs</var> list, the
                   34728: <var title="">fallback URIs</var> mapping, and the <var title=
                   34729: "">online whitelist URIs</var> .</p>
                   34730: </li>
                   34731: </ol>
                   34732: <p>Relative URI references and IRI references resolved to absolute
                   34733: URIs or IRIs in the above algorithm must <del class=
                   34734: "diff-old">use</del> <ins class="diff-chg">be resolved according to
                   34735: section 5.1 of RFC3986 (i.e. relative to</ins> the <del class=
                   34736: "diff-old">manifest's</del> <ins class="diff-chg">base</ins> URI
                   34737: <del class="diff-old">as</del> <ins class="diff-chg">from the
                   34738: encapsulating entity or</ins> the <del class="diff-old">Base</del>
                   34739: URI <del class="diff-old">from</del> <ins class="diff-chg">used to
                   34740: retrieve</ins> the <del class="diff-old">Retrieval</del>
                   34741: <ins class="diff-chg">entity, since there is no way to embed a
                   34742: base</ins> URI <del class="diff-old">for</del> <ins class=
                   34743: "diff-chg">in</ins> the <del class="diff-old">purposes reference
                   34744: resolution as defined by RFC 3986.</del> <ins class=
                   34745: "diff-chg">manifest itself).</ins> <a href=
                   34746: "#references">[RFC3986]</a></p>
                   34747: <p class="note">If a resource is listed in both the online
                   34748: whitelist and in the explicit section, then that resource will be
                   34749: downloaded and cached, but when the page tries to use this
                   34750: resource, the user agent will ignore the cached copy and attempt to
                   34751: fetch the file from the network. Indeed, the cached copy will only
                   34752: be used if it is opened from a top-level browsing context.</p>
                   34753: <h4 id="updating1"><span class="secno"><del class=
                   34754: "diff-old">4.6.4.</del> <ins class="diff-chg">4.7.4</ins></span>
                   34755: Updating an application cache</h4>
                   34756: <p>When the user agent is required (by other parts of this
                   34757: specification) to start the <dfn id="application1">application
                   34758: cache update process</dfn> , the user agent must run the following
                   34759: steps:</p>
                   34760: <p class="big-issue">the event stuff needs to be more consistent --
                   34761: something about showing every step of the ui or no steps or
                   34762: something; and we need to deal with showing ui for browsing
                   34763: contexts that open when an update is already in progress, and we
                   34764: may need to give applications control over the ui the first time
                   34765: they cache themselves (right now the original cache is done without
                   34766: notifications to the browsing contexts)</p>
                   34767: <ol>
                   34768: <li>
                   34769: <p>Let <var title="">manifest URI</var> be the URI of the <a href=
                   34770: "#the-manifest" title="concept-appcache-manifest">manifest</a> of
                   34771: the cache to be updated.</p>
                   34772: </li>
                   34773: <li>
                   34774: <p>Let <var title="">cache group</var> be the group of <a href=
                   34775: "#application0" title="application cache">application caches</a>
                   34776: identified by <var title="">manifest URI</var> .</p>
                   34777: </li>
                   34778: <li>
                   34779: <p>Let <var title="">cache</var> be the most recently updated
                   34780: <a href="#application0">application cache</a> identified by
                   34781: <var title="">manifest URI</var> (that is, the newest version found
                   34782: in <var title="">cache group</var> ).</p>
                   34783: </li>
                   34784: <li>
                   34785: <p>If the <a href="#update0" title=
                   34786: "concept-appcache-status">status</a> of the <var title="">cache
                   34787: group</var> is either <i>checking</i> or <i>downloading</i> , then
                   34788: abort these steps, as an update is already in progress for them.
                   34789: Otherwise, set the <a href="#update0" title=
                   34790: "concept-appcache-status">status</a> of this group of caches to
                   34791: <i>checking</i> . This entire step must be performed as one atomic
                   34792: operation so as to avoid race conditions.</p>
                   34793: </li>
                   34794: <li>
                   34795: <p>If there is already a resource with the URI of <var title=
                   34796: "">manifest URI</var> in <var title="">cache</var> , and that
                   34797: resource is <del class="diff-old">categorised</del> <ins class=
                   34798: "diff-chg">categorized</ins> as a <a href="#the-manifest" title=
                   34799: "concept-appcache-manifest">manifest</a> , then this is an <dfn id=
                   34800: "upgrade" title="concept-appcache-upgrade">upgrade attempt</dfn> .
                   34801: Otherwise, this is a <dfn id="cache" title=
                   34802: "concept-appcache-cache">cache attempt</dfn> .</p>
                   34803: <p class="note">If this is a <a href="#cache" title=
                   34804: "concept-appcache-cache">cache attempt</a> , then <var title=
                   34805: "">cache</var> is forcibly the only application cache in
                   34806: <var title="">cache group</var> , and it hasn't ever been populated
                   34807: from its manifest (i.e. this update is an attempt to download the
                   34808: application for the first time). It also can't have any browsing
                   34809: contexts associated with it.</p>
                   34810: </li>
                   34811: <li>
                   34812: <p><a href="#firing2">Fire a simple event</a> called <code title=
                   34813: "event-checking">checking</code> at the <code><a href=
                   34814: "#applicationcache">ApplicationCache</a></code> singleton of each
                   34815: <a href="#top-level">top-level browsing context</a> that is
                   34816: associated with a cache in <var title="">cache group</var> . The
                   34817: default action of this event should be the display of some sort of
                   34818: user interface indicating to the user that the user agent is
                   34819: checking for the availability of updates.</p>
                   34820: </li>
                   34821: <li>
                   34822: <p>Fetch the resource from <var title="">manifest URI</var> , and
                   34823: let <var title="">manifest</var> be that resource.</p>
                   34824: <p>If the resource is <del class="diff-old">labelled</del>
                   34825: <ins class="diff-chg">labeled</ins> with the MIME type <code title=
                   34826: "">text/cache-manifest</code> , parse <var title="">manifest</var>
                   34827: according to the <a href="#parse0" title="parse a manifest">rules
                   34828: for parsing manifests</a> , obtaining a list of <a href="#explicit"
                   34829: title="concept-appcache-explicit">explicit entries</a> , <a href=
                   34830: "#fallback0" title="concept-appcache-fallback">fallback entries</a>
                   34831: and the <a href="#opportunistic" title=
                   34832: "concept-appcache-oppcache-ns">opportunistic caching namespaces</a>
                   34833: that map to them, and entries for the <a href="#online" title=
                   34834: "concept-appcache-onlinewhitelist">online whitelist</a> .</p>
                   34835: </li>
                   34836: <li>
                   34837: <p>If the previous step fails (e.g. the server returns a 4xx or 5xx
                   34838: response or equivalent, or there is a DNS error, or the connection
                   34839: times out, or the <ins class="diff-new">user cancels the download,
                   34840: or the</ins> parser for manifests fails when checking the magic
                   34841: signature), or if the resource is <del class=
                   34842: "diff-old">labelled</del> <ins class="diff-chg">labeled</ins> with
                   34843: a MIME type other than <code title="">text/cache-manifest</code> ,
                   34844: then run <del class="diff-old">these substeps: Fire a simple event
1.2     ! mike     34845: called error at the ApplicationCache singleton of each top-level
        !          34846: browsing context that is associated with a cache in cache group .
        !          34847: The default action of this event should be the display of some sort
        !          34848: of user interface indicating to the user that the user agent failed
        !          34849: to save</del> the <del class="diff-old">application for offline
        !          34850: use. If this is a cache attempt , then discard</del> <a href=
        !          34851: "#cache0">cache <del class="diff-old">and abort the update process,
        !          34852: optionally alerting the user to the failure. Otherwise, jump to the
        !          34853: last step in the overall set of</del> <ins class=
1.1       mike     34854: "diff-chg">failure</ins> steps <del class="diff-old">of the update
                   34855: process.</del></a> .</p>
                   34856: </li>
                   34857: <li>
                   34858: <p>If this is an <a href="#upgrade" title=
                   34859: "concept-appcache-upgrade">upgrade attempt</a> and the newly
                   34860: downloaded <var title="">manifest</var> is byte-for-byte identical
                   34861: to the manifest found in <var title="">cache</var> , or if the
                   34862: server reported it as "304 Not Modified" or equivalent, then
                   34863: <ins class="diff-new">run these substeps:</ins></p>
                   34864: <ol>
                   34865: <li>
                   34866: <p><a href="#firing2"><del class="diff-old">fire</del> <ins class=
                   34867: "diff-chg">Fire</ins> a simple event</a> called <code title=
                   34868: "event-noupdate">noupdate</code> at the <code><a href=
                   34869: "#applicationcache">ApplicationCache</a></code> singleton of each
                   34870: <a href="#top-level">top-level browsing context</a> that is
                   34871: associated with a cache in <var title="">cache group</var> . The
                   34872: default action of this event should be the display of some sort of
                   34873: user interface indicating to the user that the application is up to
                   34874: date. <del class="diff-old">Then, jump</del></p>
                   34875: </li>
                   34876: <li>
                   34877: <p><ins class="diff-chg">If there are any pending downloads
                   34878: of</ins> <span title="implicit entry"><ins class=
                   34879: "diff-chg">implicit entries</ins></span> <ins class="diff-chg">that
                   34880: are being stored in the cache, then wait for all of them</ins> to
                   34881: <ins class="diff-new">have completed. If any of these downloads
                   34882: fail (e.g.</ins> the <del class="diff-old">last step</del>
                   34883: <ins class="diff-chg">server returns a 4xx or 5xx response or
                   34884: equivalent, or there is a DNS error, or the connection times out,
                   34885: or the user cancels the download), then run the</ins> <a href=
                   34886: "#cache0"><ins class="diff-chg">cache failure steps</ins></a> .</p>
                   34887: </li>
                   34888: <li>
                   34889: <p><ins class="diff-chg">Let the</ins> <a href="#update0" title=
1.2     ! mike     34890: "concept-appcache-status"><ins class="diff-chg">status</ins></a> of
        !          34891: the <ins class="diff-new">group of caches to which</ins>
        !          34892: <var title=""><ins class="diff-new">cache</ins></var> <ins class=
        !          34893: "diff-new">belongs be</ins> <i><ins class="diff-new">idle</ins></i>
        !          34894: .<ins class="diff-new">If appropriate, remove any user interface
        !          34895: indicating that an update for this cache is in progress.</ins></p>
1.1       mike     34896: </li>
                   34897: <li>
1.2     ! mike     34898: <p><ins class="diff-new">Abort the</ins> update process.</p>
1.1       mike     34899: </li>
                   34900: </ol>
                   34901: </li>
                   34902: <li>
                   34903: <p>Set the <a href="#update0" title=
                   34904: "concept-appcache-status">status</a> of <var title="">cache
                   34905: group</var> to <i>downloading</i> .</p>
                   34906: </li>
                   34907: <li>
                   34908: <p><a href="#firing2">Fire a simple event</a> called <code title=
                   34909: "event-downloading">downloading</code> at the <code><a href=
                   34910: "#applicationcache">ApplicationCache</a></code> singleton of each
                   34911: <a href="#top-level">top-level browsing context</a> that is
                   34912: associated with a cache in <var title="">cache group</var> . The
                   34913: default action of this event should be the display of some sort of
                   34914: user interface indicating to the user that a new version is being
                   34915: downloaded.</p>
                   34916: </li>
                   34917: <li>
                   34918: <p>If this is an <a href="#upgrade" title=
                   34919: "concept-appcache-upgrade">upgrade attempt</a> , then let
                   34920: <var title="">new cache</var> be a newly created <a href=
                   34921: "#application0">application cache</a> identified by <span title=
                   34922: "">manifest URI</span> , being a new version in <var title="">cache
                   34923: group</var> . Otherwise, let <var title="">new cache</var> and
                   34924: <var title="">cache</var> be the same version of the application
                   34925: cache.</p>
                   34926: </li>
                   34927: <li>
                   34928: <p>Let <var title="">file list</var> be an empty list of URIs with
                   34929: flags.</p>
                   34930: </li>
                   34931: <li>
                   34932: <p>Add all the URIs in the list of <a href="#explicit" title=
                   34933: "concept-appcache-explicit">explicit entries</a> obtained by
                   34934: parsing <var title="">manifest</var> to <var title="">file
                   34935: list</var> , each flagged with "explicit entry".</p>
                   34936: </li>
                   34937: <li>
                   34938: <p>Add all the URIs in the list of <a href="#fallback0" title=
                   34939: "concept-appcache-fallback">fallback entries</a> obtained by
                   34940: parsing <var title="">manifest</var> to <var title="">file
                   34941: list</var> , each flagged with "fallback entry".</p>
                   34942: </li>
                   34943: <li>
                   34944: <p>If this is an <a href="#upgrade" title=
                   34945: "concept-appcache-upgrade">upgrade attempt</a> , then add all the
                   34946: URIs of <a href="#opportunistically" title=
                   34947: "concept-appcache-oppcache">opportunistically cached entries</a> in
                   34948: <var title="">cache</var> that <a href="#matches" title=
                   34949: "concept-appcache-matches-oppcache">match</a> the <a href=
                   34950: "#opportunistic" title="concept-appcache-oppcache-ns">opportunistic
                   34951: caching namespaces</a> obtained by parsing <var title=
                   34952: "">manifest</var> to <var title="">file list</var> , each flagged
                   34953: with "opportunistic entry".</p>
                   34954: </li>
                   34955: <li>
                   34956: <p>If this is an <a href="#upgrade" title=
                   34957: "concept-appcache-upgrade">upgrade attempt</a> , then add all the
                   34958: URIs of <a href="#implicit" title=
                   34959: "concept-appcache-implicit">implicit entries</a> in <var title=
                   34960: "">cache</var> to <var title="">file list</var> , each flagged with
                   34961: "implicit entry".</p>
                   34962: </li>
                   34963: <li>
                   34964: <p>If this is an <a href="#upgrade" title=
                   34965: "concept-appcache-upgrade">upgrade attempt</a> , then add all the
                   34966: URIs of <a href="#dynamic3" title=
                   34967: "concept-appcache-dynamic">dynamic entries</a> in <var title=
                   34968: "">cache</var> to <var title="">file list</var> , each flagged with
                   34969: "dynamic entry".</p>
                   34970: </li>
                   34971: <li>
                   34972: <p>If any URI is in <var title="">file list</var> more than once,
                   34973: then merge the entries into one entry for that URI, that entry
                   34974: having all the flags that the original entries had.</p>
                   34975: </li>
                   34976: <li>
                   34977: <p>For each URI in <var title="">file list</var> , run the
                   34978: following <del class="diff-old">steps:</del> <ins class=
                   34979: "diff-chg">steps. These steps may be run in parallel for two or
                   34980: more of the URIs at a time.</ins></p>
                   34981: <ol>
                   34982: <li>
                   34983: <p><a href="#firing2">Fire a simple event</a> called <code title=
                   34984: "event-progress"><a href="#progress0">progress</a></code> at the
                   34985: <code><a href="#applicationcache">ApplicationCache</a></code>
                   34986: singleton of each <a href="#top-level">top-level browsing
                   34987: context</a> that is associated with a cache in <var title="">cache
                   34988: group</var> . The default action of this event should be the
                   34989: display of some sort of user interface indicating to the user that
                   34990: a file is being downloaded in preparation for updating the
                   34991: application.</p>
                   34992: </li>
                   34993: <li>
                   34994: <p>Fetch the resource. If this is an <a href="#upgrade" title=
                   34995: "concept-appcache-upgrade">upgrade attempt</a> , then use
                   34996: <var title="">cache</var> as an HTTP cache, and <del class=
                   34997: "diff-old">honour</del> <ins class="diff-chg">honor</ins> HTTP
                   34998: caching semantics (such as expiration, ETags, and so forth) with
                   34999: respect to that cache. User agents may also have other caches in
                   35000: place that are also honored. <ins class="diff-new">If the resource
                   35001: in question is already being downloaded for other reasons then the
                   35002: existing download process may be used for the purposes of this
                   35003: step.</ins></p>
                   35004: <p class="example"><ins class="diff-new">An example of a resource
                   35005: that might already be being downloaded is a large image on a Web
                   35006: page that is being seen for the first time. The image would get
                   35007: downloaded to satisfy the</ins> <code><a href="#img"><ins class=
                   35008: "diff-new">img</ins></a></code> <ins class="diff-new">element on
                   35009: the page, as well as being listed in the cache manifest. According
                   35010: to the previous paragraph, that image only need be downloaded once,
                   35011: and it can be used both for the cache and for the rendered Web
                   35012: page.</ins></p>
                   35013: </li>
                   35014: <li>
                   35015: <p>If the previous steps fails (e.g. the server returns a 4xx or
                   35016: 5xx response or equivalent, or there is a DNS error, or the
                   35017: connection times <del class="diff-old">out), then run these
                   35018: substeps: Fire a simple event called error at the ApplicationCache
                   35019: singleton of each top-level browsing context that is associated
                   35020: with a cache in cache group . The default action of this event
                   35021: should be the display of some sort of user interface indicating to
                   35022: the user that</del> <ins class="diff-chg">out, or</ins> the user
                   35023: <del class="diff-old">agent failed to save</del> <ins class=
                   35024: "diff-chg">cancels</ins> the <del class="diff-old">application for
                   35025: offline use. If this is a cache attempt ,</del> <ins class=
                   35026: "diff-chg">download),</ins> then <del class="diff-old">discard
                   35027: cache and abort the update process, optionally alerting the user to
                   35028: the failure. Otherwise, jump to the last step in</del> <ins class=
                   35029: "diff-chg">run</ins> the <del class="diff-old">overall set of</del>
                   35030: <a href="#cache0"><ins class="diff-chg">cache failure</ins> steps
                   35031: <del class="diff-old">of the update process.</del></a> .</p>
                   35032: </li>
                   35033: <li>
                   35034: <p>Otherwise, the fetching succeeded. Store the resource in the
                   35035: <var title="">new cache</var> .</p>
                   35036: </li>
                   35037: <li>
                   35038: <p>If the URI being processed was flagged as an "explicit entry" in
                   35039: <var title="">file list</var> , then <del class=
                   35040: "diff-old">categorise</del> <ins class="diff-chg">categorize</ins>
                   35041: the entry as an <a href="#explicit" title=
                   35042: "concept-appcache-explicit">explicit entry</a> .</p>
                   35043: </li>
                   35044: <li>
                   35045: <p>If the URI being processed was flagged as a "fallback entry" in
                   35046: <var title="">file list</var> , then <del class=
                   35047: "diff-old">categorise</del> <ins class="diff-chg">categorize</ins>
                   35048: the entry as a <a href="#fallback0" title=
                   35049: "concept-appcache-fallback">fallback entry</a> .</p>
                   35050: </li>
                   35051: <li>
                   35052: <p>If the URI being processed was flagged as a "opportunistic
                   35053: entry" in <var title="">file list</var> , then <del class=
                   35054: "diff-old">categorise</del> <ins class="diff-chg">categorize</ins>
                   35055: the entry as an <a href="#opportunistically" title=
                   35056: "concept-appcache-oppcache">opportunistically cached entry</a>
                   35057: .</p>
                   35058: </li>
                   35059: <li>
                   35060: <p>If the URI being processed was flagged as an "implicit entry" in
                   35061: <var title="">file list</var> , then <del class=
                   35062: "diff-old">categorise</del> <ins class="diff-chg">categorize</ins>
                   35063: the entry as a <a href="#implicit" title=
                   35064: "concept-appcache-implicit">implicit entry</a> .</p>
                   35065: </li>
                   35066: <li>
                   35067: <p>If the URI being processed was flagged as an "dynamic entry" in
                   35068: <var title="">file list</var> , then <del class=
                   35069: "diff-old">categorise</del> <ins class="diff-chg">categorize</ins>
                   35070: the entry as a <a href="#dynamic3" title=
                   35071: "concept-appcache-dynamic">dynamic entry</a> .</p>
                   35072: </li>
                   35073: </ol>
                   35074: </li>
                   35075: <li>
                   35076: <p>Store <var title="">manifest</var> in <var title="">new
                   35077: cache</var> , if it's not there already, and <del class=
                   35078: "diff-old">categorise</del> <ins class="diff-chg">categorize</ins>
                   35079: this entry (whether newly added or not) as <a href="#the-manifest"
                   35080: title="concept-appcache-manifest">the manifest</a> .</p>
                   35081: </li>
                   35082: <li>
                   35083: <p>Store the list of <a href="#opportunistic" title=
                   35084: "concept-appcache-oppcache-ns">opportunistic caching namespaces</a>
                   35085: , and the URIs of the <a href="#fallback0" title=
                   35086: "concept-appcache-fallback">fallback entries</a> that they map to,
                   35087: in the new cache.</p>
                   35088: </li>
                   35089: <li>
                   35090: <p>Store the URIs that form the new <a href="#online" title=
                   35091: "concept-appcache-onlinewhitelist">online whitelist</a> in the new
                   35092: cache.</p>
                   35093: </li>
                   35094: <li>
                   35095: <p><ins class="diff-new">Wait for all pending downloads of</ins>
                   35096: <span title="implicit entry"><ins class="diff-new">implicit
                   35097: entries</ins></span> <ins class="diff-new">that are being stored in
                   35098: the cache to have completed.</ins></p>
                   35099: <p class="example"><ins class="diff-new">For example, if the</ins>
                   35100: <a href="#top-level"><ins class="diff-new">top-level browsing
                   35101: context</ins></a> <ins class="diff-new">'s</ins> <a href=
                   35102: "#active"><ins class="diff-new">active document</ins></a>
                   35103: <ins class="diff-new">isn't itself listed in the cache manifest,
                   35104: then it might still be being downloaded.</ins></p>
                   35105: <p><ins class="diff-new">If any of these downloads fail (e.g. the
                   35106: server returns a 4xx or 5xx response or equivalent, or there is a
                   35107: DNS error, or the connection times out, or the user cancels the
                   35108: download), then run the</ins> <a href="#cache0"><ins class=
                   35109: "diff-new">cache failure steps</ins></a> .</p>
                   35110: </li>
                   35111: <li>
                   35112: <p>If this is a <a href="#cache" title=
                   35113: "concept-appcache-cache">cache attempt</a> , then:</p>
                   35114: <del class="diff-old">Set the status of cache group to idle .</del>
                   35115: <p id="flagAsCandidateForCache-result">Associate any
                   35116: <code>Document</code> objects that were <a href=
                   35117: "#flagAsCandidateForCache">flagged as candidates</a> for this
                   35118: manifest URI's caches with <var title="">cache</var> .</p>
                   35119: <p><a href="#firing2">Fire a simple event</a> called <code title=
                   35120: "event-cached">cached</code> at the <code><a href=
                   35121: "#applicationcache">ApplicationCache</a></code> singleton of each
                   35122: <a href="#top-level">top-level browsing context</a> that is
                   35123: associated with a cache in <var title="">cache group</var> . The
                   35124: default action of this event should be the display of some sort of
                   35125: user interface indicating to the user that the application has been
                   35126: cached and that they can now use it offline.</p>
                   35127: <del class="diff-old">Otherwise, this is an upgrade attempt :</del>
                   35128: <p>Set the <a href="#update0" title=
                   35129: "concept-appcache-status">status</a> of <var title="">cache
                   35130: group</var> to <i>idle</i> .</p>
                   35131: </li>
                   35132: <li>
                   35133: <p><ins class="diff-new">Otherwise, this is an</ins> <a href=
                   35134: "#upgrade" title="concept-appcache-upgrade"><ins class=
                   35135: "diff-new">upgrade attempt</ins></a> :</p>
                   35136: <p><a href="#firing2">Fire a simple event</a> called <code title=
                   35137: "event-updateready">updateready</code> at the <code><a href=
                   35138: "#applicationcache">ApplicationCache</a></code> singleton of each
                   35139: <a href="#top-level">top-level browsing context</a> that is
                   35140: associated with a cache in <var title="">cache group</var> . The
                   35141: default action of this event should be the display of some sort of
                   35142: user interface indicating to the user that a new version is
                   35143: available and that they can activate it by reloading the page.</p>
                   35144: <p><del class="diff-old">Abort these steps.</del> <ins class=
                   35145: "diff-chg">Set the</ins> <a href="#update0" title=
                   35146: "concept-appcache-status"><ins class="diff-chg">status</ins></a>
                   35147: <ins class="diff-chg">of</ins> <var title=""><ins class=
                   35148: "diff-chg">cache group</ins></var> <ins class="diff-chg">to</ins>
                   35149: <i><ins class="diff-chg">idle</ins></i> .</p>
                   35150: </li>
                   35151: </ol>
                   35152: <p>The <del class="diff-old">following step</del> <dfn id=
                   35153: "cache0"><ins class="diff-chg">cache failure steps</ins></dfn>
                   35154: <ins class="diff-chg">are as follows:</ins></p>
                   35155: <ol>
                   35156: <li>
                   35157: <p><a href="#firing2"><ins class="diff-chg">Fire a simple
                   35158: event</ins></a> <ins class="diff-chg">called</ins> <code title=
                   35159: "event-error"><a href="#error1"><ins class=
                   35160: "diff-chg">error</ins></a></code> <ins class="diff-chg">at
                   35161: the</ins> <code><a href="#applicationcache"><ins class=
                   35162: "diff-chg">ApplicationCache</ins></a></code> <ins class=
                   35163: "diff-chg">singleton of each</ins> <a href="#top-level"><ins class=
                   35164: "diff-chg">top-level browsing context</ins></a> <ins class=
                   35165: "diff-chg">that</ins> is <del class="diff-old">jumped to by various
                   35166: parts</del> <ins class="diff-chg">associated with a cache in</ins>
                   35167: <var title=""><ins class="diff-chg">cache group</ins></var>
1.2     ! mike     35168: .<ins class="diff-chg">The default action</ins> of <ins class=
        !          35169: "diff-new">this event should be</ins> the <del class=
        !          35170: "diff-old">algorithm above when they have</del> <ins class=
        !          35171: "diff-chg">display of some sort of user interface indicating</ins>
        !          35172: to <del class="diff-old">cancel</del> the <del class=
        !          35173: "diff-old">update.</del> <ins class="diff-chg">user that the user
        !          35174: agent failed to save the application for offline use.</ins></p>
1.1       mike     35175: </li>
                   35176: <li>
                   35177: <p><del class="diff-old">Let</del> <ins class="diff-chg">If this is
                   35178: a</ins> <a href="#cache" title="concept-appcache-cache"><ins class=
                   35179: "diff-chg">cache attempt</ins></a> ,<ins class="diff-chg">then
                   35180: discard</ins> <var title=""><ins class="diff-chg">cache</ins></var>
                   35181: <ins class="diff-chg">and abort the update process.</ins></p>
                   35182: </li>
                   35183: <li>
                   35184: <p><ins class="diff-chg">Otherwise, let</ins> the <a href=
                   35185: "#update0" title="concept-appcache-status">status</a> of the group
                   35186: of caches to which <var title="">cache</var> belongs be <i>idle</i>
                   35187: . If appropriate, remove any user interface indicating that an
                   35188: update for this cache is in progress. <ins class="diff-new">Abort
                   35189: the update process.</ins></p>
                   35190: </li>
                   35191: </ol>
                   35192: <h4 id="processing2"><span class="secno"><del class=
                   35193: "diff-old">4.6.5.</del> <ins class="diff-chg">4.7.5</ins></span>
                   35194: Processing model</h4>
                   35195: <p>The processing model of application caches for offline support
                   35196: in Web applications is part of the <a href="#navigate" title=
                   35197: "navigate">navigation</a> model, but references the algorithms
                   35198: defined in this section.</p>
                   35199: <p>A URI <dfn id="matches" title=
                   35200: "concept-appcache-matches-oppcache">matches an opportunistic
                   35201: caching namespace</dfn> if there exists an <a href=
                   35202: "#application0">application cache</a> whose <a href="#the-manifest"
                   35203: title="concept-appcache-manifest">manifest</a> 's URI has the
                   35204: <a href="#same-origin">same <del class=
                   35205: "diff-old">scheme/host/port</del> <ins class=
                   35206: "diff-chg">origin</ins></a> as the URI in question, and if that
                   35207: application cache has an <a href="#opportunistic" title=
                   35208: "concept-appcache-oppcache-ns">opportunistic caching namespace</a>
                   35209: with a &lt;path&gt; component that exactly matches the start of the
                   35210: &lt;path&gt; component of the URI being examined. If multiple
                   35211: opportunistic caching namespaces match the same URI, the one with
                   35212: the longest &lt;path&gt; component is the one that matches. A URI
                   35213: looking for an opportunistic caching namespace can match more than
                   35214: one application cache at a time, but only matches one namespace in
                   35215: each cache.</p>
                   35216: <div class="example">
                   35217: <p>If a manifest <code title=
                   35218: "">http://example.com/app1/manifest</code> declares that
                   35219: <code title="">http://example.com/resources/images</code> should be
                   35220: opportunistically cached, and the user navigates to <code title=
                   35221: "">http://example.com/resources/images/cat.png</code> , then the
                   35222: user agent will decide that the application cache identified by
                   35223: <code title="">http://example.com/app1/manifest</code> contains a
                   35224: namespace with a match for that URI.</p>
                   35225: </div>
                   35226: <p>When the <dfn id="application2" title=
                   35227: "concept-appcache-init-with-attribute">application cache selection
                   35228: algorithm</dfn> algorithm is invoked with a manifest URI, the user
                   35229: agent must run the first applicable set of steps from the following
                   35230: list:</p>
                   35231: <dl class="switch">
                   35232: <dt>If the resource is not being loaded as part of navigation of a
                   35233: <a href="#top-level">top-level browsing context</a></dt>
                   35234: <dd>
                   35235: <p>As an <del class="diff-old">optimisation,</del> <ins class=
                   35236: "diff-chg">optimization,</ins> if the resource was loaded from an
                   35237: <a href="#application0">application cache</a> , and the manifest
                   35238: URI of that cache doesn't match the manifest URI with which the
                   35239: algorithm was invoked, then the user agent should mark the entry in
                   35240: that application cache corresponding to the resource that was just
                   35241: loaded as being <a href="#foreign" title=
                   35242: "concept-appcache-foreign">foreign</a> .</p>
                   35243: <p>Other than that, nothing special happens with respect to
                   35244: application caches.</p>
                   35245: </dd>
                   35246: <dt>If the resource being loaded was loaded from an application
                   35247: cache and the URI of that application cache's manifest is the same
                   35248: as the manifest URI with which the algorithm was invoked</dt>
                   35249: <dd>
                   35250: <p>Associate the <code>Document</code> with the cache from which it
                   35251: was loaded. Invoke the <a href="#application1">application cache
                   35252: update process</a> .</p>
                   35253: </dd>
                   35254: <dt>If the resource being loaded was loaded from an application
                   35255: cache and the URI of that application cache's manifest is
                   35256: <em>not</em> the same as the manifest URI with which the algorithm
                   35257: was invoked</dt>
                   35258: <dd>
                   35259: <p>Mark the entry for this resource in the application cache from
                   35260: which it was loaded as <a href="#foreign" title=
                   35261: "concept-appcache-foreign">foreign</a> .</p>
                   35262: <p>Restart the current navigation from the top of the <a href=
                   35263: "#navigate" title="navigate">navigation algorithm</a> , undoing any
                   35264: changes that were made as part of the initial load (changes can be
                   35265: avoided by ensuring that the step to <a href="#update2">update the
                   35266: session history with the new page</a> is only ever completed
                   35267: <em>after</em> the application cache selection algorithm is run,
                   35268: though this is not required).</p>
                   35269: <p class="note">The navigation will not result in the same resource
                   35270: being loaded, because "foreign" entries are never picked during
                   35271: navigation.</p>
                   35272: <p>User agents may notify the user of the inconsistency between the
                   35273: cache manifest and the resource's own metadata, to aid in
                   35274: application development.</p>
                   35275: </dd>
                   35276: <dt>If the resource being loaded was not loaded from an application
                   35277: cache, but it was loaded using HTTP GET or equivalent</dt>
                   35278: <dd>
                   35279: <ol>
                   35280: <li>
                   35281: <p>If the manifest URI does not have the <a href=
                   35282: "#same-origin">same <del class="diff-old">scheme/host/port</del>
                   35283: <ins class="diff-chg">origin</ins></a> as the resource's own URI,
                   35284: then invoke the <a href="#application3" title=
                   35285: "concept-appcache-init-no-attribute">application cache selection
                   35286: algorithm</a> again, but without a manifest, and abort these
                   35287: steps.</p>
                   35288: </li>
                   35289: <li>
                   35290: <p>If there is already an <a href="#application0">application
                   35291: cache</a> identified by this manifest URI, and <ins class=
                   35292: "diff-new">the most up to date version of</ins> that <a href=
                   35293: "#application0">application cache</a> contains a resource with the
                   35294: URI of the manifest, and that resource is <del class=
                   35295: "diff-old">categorised</del> <ins class=
                   35296: "diff-chg">categorized</ins> as a <a href="#the-manifest" title=
                   35297: "concept-appcache-manifest">manifest</a> , then: store the resource
                   35298: in the matching <del class="diff-old">cache with the most up to
                   35299: date version, categorised</del> <ins class="diff-chg">cache,
                   35300: categorized</ins> as an <a href="#implicit" title=
                   35301: "concept-appcache-implicit">implicit entry</a> , associate the
                   35302: <code>Document</code> with that cache, invoke the <a href=
                   35303: "#application1">application cache update process</a> , and abort
                   35304: these steps.</p>
                   35305: </li>
                   35306: <li id="flagAsCandidateForCache">
                   35307: <p>Flag the resource's <code>Document</code> as a candidate for
                   35308: this manifest URI's <del class="diff-old">caches.</del> <ins class=
                   35309: "diff-chg">caches, so that it will be</ins> <a href=
                   35310: "#flagAsCandidateForCache-result"><ins class="diff-chg">associated
                   35311: with an application cache identified by this manifest URI</ins></a>
                   35312: <ins class="diff-chg">later, when such an</ins> <a href=
                   35313: "#application0"><ins class="diff-chg">application cache</ins></a>
                   35314: <ins class="diff-chg">is ready.</ins></p>
                   35315: </li>
                   35316: <li>
                   35317: <p>If there is already an <a href="#application0">application
                   35318: cache</a> identified by this manifest URI, then <ins class=
                   35319: "diff-new">the most up to date version of</ins> that <a href=
                   35320: "#application0">application cache</a> does not yet contain a
                   35321: resource with the URI of the manifest, or it does but that resource
                   35322: is not yet <del class="diff-old">categorised</del> <ins class=
                   35323: "diff-chg">categorized</ins> as a <a href="#the-manifest" title=
                   35324: "concept-appcache-manifest">manifest</a> : store the resource in
                   35325: that cache, <del class="diff-old">categorised</del> <ins class=
                   35326: "diff-chg">categorized</ins> as an <a href="#implicit" title=
                   35327: "concept-appcache-implicit">implicit entry</a> (replacing the
                   35328: file's previous contents if it was already in the cache, but not
                   35329: removing any other categories it might have), and abort these
                   35330: steps. <ins class="diff-new">(An</ins> <a href=
                   35331: "#application1"><ins class="diff-new">application cache update
                   35332: process</ins></a> <ins class="diff-new">is already in
                   35333: progress.)</ins></p>
                   35334: </li>
                   35335: <li>
                   35336: <p>Otherwise, there is no matching <a href=
                   35337: "#application0">application cache</a> : create a new application
                   35338: cache identified by this manifest URI, store the resource in that
                   35339: cache, <del class="diff-old">categorised</del> <ins class=
                   35340: "diff-chg">categorized</ins> as an <a href="#implicit" title=
                   35341: "concept-appcache-implicit">implicit entry</a> , and then invoke
                   35342: the <a href="#application1">application cache update process</a>
                   35343: .</p>
                   35344: </li>
                   35345: </ol>
                   35346: </dd>
                   35347: <dt>Otherwise</dt>
                   35348: <dd>
                   35349: <p>Invoke the <a href="#application3" title=
                   35350: "concept-appcache-init-no-attribute">application cache selection
                   35351: algorithm</a> again, but without a manifest.</p>
                   35352: </dd>
                   35353: </dl>
                   35354: <p>When the <dfn id="application3" title=
                   35355: "concept-appcache-init-no-attribute">application cache selection
                   35356: algorithm</dfn> is invoked <em>without</em> a manifest, then: if
                   35357: the resource is being loaded as part of navigation of a <a href=
                   35358: "#top-level">top-level browsing context</a> , and the resource was
                   35359: fetched from a particular <a href="#application0">application
                   35360: cache</a> , then the user agent must associate the
                   35361: <code>Document</code> with that application cache and invoke the
                   35362: <a href="#application1">application cache update process</a> for
                   35363: that cache; otherwise, nothing special happens with respect to
                   35364: application caches.</p>
                   35365: <h5 id="changes"><span class="secno"><del class=
                   35366: "diff-old">4.6.5.1.</del> <ins class=
                   35367: "diff-chg">4.7.5.1.</ins></span> Changes to the networking
                   35368: model</h5>
                   35369: <p>When a browsing context is associated with an <a href=
                   35370: "#application0">application cache</a> , any and all resource loads
                   35371: must go through the following steps instead of immediately invoking
                   35372: the mechanisms appropriate to that resource's scheme:</p>
                   35373: <ol>
                   35374: <li>
                   35375: <p>If the resource is not to be fetched using the HTTP GET
                   35376: mechanism or equivalent, then fetch the resource normally and abort
                   35377: these steps.</p>
                   35378: </li>
                   35379: <li>
                   35380: <p>If the resource's URI, ignoring its fragment identifier if any,
                   35381: is listed in the <a href="#application0">application cache</a> 's
                   35382: <a href="#online" title="concept-appcache-onlinewhitelist">online
                   35383: whitelist</a> , then fetch the resource normally and abort these
                   35384: steps.</p>
                   35385: </li>
                   35386: <li>
                   35387: <p>If the resource's URI is <a href="#implicit" title=
                   35388: "concept-appcache-implicit">an implicit entry</a> , <a href=
                   35389: "#the-manifest" title="concept-appcache-manifest">the manifest</a>
                   35390: , <a href="#explicit" title="concept-appcache-explicit">an explicit
                   35391: entry</a> , <a href="#fallback0" title=
                   35392: "concept-appcache-fallback">a fallback entry</a> , <a href=
                   35393: "#opportunistically" title="concept-appcache-oppcache">an
                   35394: opportunistically cached entry</a> , or a <a href="#dynamic3"
                   35395: title="concept-appcache-dynamic">dynamic entry</a> in the <a href=
                   35396: "#application0">application cache</a> , then fetch the resource
                   35397: from the cache and abort these steps.</p>
                   35398: </li>
                   35399: <li>
                   35400: <p>If the resource's URI has the <a href="#same-origin">same
                   35401: <del class="diff-old">scheme/host/port</del> <ins class=
                   35402: "diff-chg">origin</ins></a> as the manifest's URI, and the start of
                   35403: the resource's URI's &lt;path&gt; component is exactly matched by
                   35404: the &lt;path&gt; component of an <a href="#opportunistic" title=
                   35405: "concept-appcache-oppcache-ns">opportunistic caching namespace</a>
                   35406: in the <a href="#application0">application cache</a> , then:</p>
                   35407: <p>Fetch the resource normally. If this results 4xx or 5xx status
                   35408: codes or equivalent, or if there were network <del class=
                   35409: "diff-old">errors,</del> <ins class="diff-chg">errors (but not if
                   35410: the user canceled the download),</ins> then instead fetch, from the
                   35411: cache, the resource of the <a href="#fallback0" title=
                   35412: "concept-appcache-fallback">fallback entry</a> corresponding to the
                   35413: namespace with the longest matching &lt;path&gt; component. Abort
                   35414: these steps.</p>
                   35415: </li>
                   35416: <li>
                   35417: <p>Fail the resource load.</p>
                   35418: </li>
                   35419: </ol>
                   35420: <p class="note">The above algorithm ensures that resources that are
                   35421: not present in the manifest will always fail to load (at least,
                   35422: after the cache has been primed the first time), making the testing
                   35423: of offline applications simpler.</p>
                   35424: <h4 id="application"><span class="secno"><del class=
                   35425: "diff-old">4.6.6.</del> <ins class="diff-chg">4.7.6</ins></span>
                   35426: Application cache API</h4>
                   35427: <pre class="idl">
                   35428: interface <dfn id="applicationcache">ApplicationCache</dfn> {
                   35429:   // <a href="#update0" title=
                   35430: "concept-appcache-status">update status</a>
                   35431:   const unsigned short <a href="#uncached" title=
                   35432: "dom-appcache-UNCACHED">UNCACHED</a> = 0;
                   35433:   const unsigned short <a href="#idle" title=
                   35434: "dom-appcache-IDLE">IDLE</a> = 1;
                   35435:   const unsigned short <a href="#checking" title=
                   35436: "dom-appcache-CHECKING">CHECKING</a> = 2;
                   35437:   const unsigned short <a href="#downloading" title=
                   35438: "dom-appcache-DOWNLOADING">DOWNLOADING</a> = 3;
                   35439:   const unsigned short <a href="#updateready" title=
                   35440: "dom-appcache-UPDATEREADY">UPDATEREADY</a> = 4;
                   35441:   readonly attribute unsigned short <a href="#status0" title=
                   35442: "dom-appcache-status">status</a>;
                   35443:   // updates
                   35444:   void <a href="#update1" title="dom-appcache-update">update</a>();
                   35445:   void <a href="#swapcache" title=
                   35446: "dom-appcache-swapCache">swapCache</a>();
                   35447:   // dynamic entries
                   35448: <del class="diff-old">  readonly attribute unsigned long ;
                   35449: </del>
                   35450: <ins class="diff-chg">  readonly attribute unsigned long <a href=
                   35451: "#length7" title="dom-appcache-length">length</a>;
                   35452: </ins>
                   35453:   DOMString <a href="#itemindex4" title=
                   35454: "dom-appcache-item">item</a>(in unsigned long index);
                   35455:   void <a href="#adduri" title=
                   35456: "dom-appcache-add">add</a>(in DOMString uri);
                   35457:   void <a href="#remove1" title=
                   35458: "dom-appcache-remove">remove</a>(in DOMString uri);
                   35459:   // events
                   35460:            attribute <span>EventListener</span> <a href=
                   35461: "#onchecking" title="handler-appcache-onchecking">onchecking</a>;
                   35462:            attribute <span>EventListener</span> <a href="#onerror0"
                   35463: title="handler-appcache-onerror">onerror</a>;
                   35464:            attribute <span>EventListener</span> <a href=
                   35465: "#onnoupdate" title="handler-appcache-onnoupdate">onnoupdate</a>;
                   35466:            attribute <span>EventListener</span> <a href=
                   35467: "#ondownloading" title=
                   35468: "handler-appcache-ondownloading">ondownloading</a>;
                   35469:            attribute <span>EventListener</span> <a href=
                   35470: "#onprogress" title="handler-appcache-onprogress">onprogress</a>;
                   35471:            attribute <span>EventListener</span> <a href=
                   35472: "#onupdateready" title=
                   35473: "handler-appcache-onupdateready">onupdateready</a>;
                   35474:            attribute <span>EventListener</span> <a href="#oncached"
                   35475: title="handler-appcache-oncached">oncached</a>;
                   35476: };
                   35477: </pre>
                   35478: <p>Objects implementing the <code><a href=
                   35479: "#applicationcache">ApplicationCache</a></code> interface must also
                   35480: implement the <code>EventTarget</code> interface.</p>
                   35481: <p>There is a one-to-one mapping from <code>Document</code> objects
                   35482: to <code><a href="#applicationcache">ApplicationCache</a></code>
                   35483: objects. The <dfn id="applicationcache0" title=
                   35484: "dom-applicationCache"><code>applicationCache</code></dfn>
                   35485: attribute on <code><a href="#window">Window</a></code> objects must
                   35486: return the <code><a href=
                   35487: "#applicationcache">ApplicationCache</a></code> object associated
                   35488: with the <a href="#active">active document</a> of the
                   35489: <code><a href="#window">Window</a></code> 's <a href=
                   35490: "#browsing1">browsing context</a> .</p>
                   35491: <p>An <code><a href="#applicationcache">ApplicationCache</a></code>
                   35492: object might be associated with an <a href=
                   35493: "#application0">application cache</a> . When the
                   35494: <code>Document</code> object that the <code><a href=
                   35495: "#applicationcache">ApplicationCache</a></code> object maps to is
                   35496: associated with an application cache, then that is the application
                   35497: cache with which the <code><a href=
                   35498: "#applicationcache">ApplicationCache</a></code> object is
                   35499: associated. Otherwise, the <code><a href=
                   35500: "#applicationcache">ApplicationCache</a></code> object is
                   35501: associated with the application cache that the
                   35502: <code>Document</code> object's <a href="#browsing1">browsing
                   35503: context</a> is associated with, if any.</p>
                   35504: <p>The <dfn id="status0" title=
                   35505: "dom-appcache-status"><code>status</code></dfn> attribute, on
                   35506: getting, must return the current state of the <a href=
                   35507: "#application0">application cache</a> <code><a href=
                   35508: "#applicationcache">ApplicationCache</a></code> object is
                   35509: associated with, if any. This must be the appropriate value from
                   35510: the following list:</p>
                   35511: <dl>
                   35512: <dt><dfn id="uncached" title=
                   35513: "dom-appcache-UNCACHED"><code>UNCACHED</code></dfn> (numeric value
                   35514: 0)</dt>
                   35515: <dd>
                   35516: <p>The <code><a href=
                   35517: "#applicationcache">ApplicationCache</a></code> object is not
                   35518: associated with an <a href="#application0">application cache</a> at
                   35519: this time.</p>
                   35520: </dd>
                   35521: <dt><dfn id="idle" title=
                   35522: "dom-appcache-IDLE"><code>IDLE</code></dfn> (numeric value 1)</dt>
                   35523: <dd>
                   35524: <p>The <code><a href=
                   35525: "#applicationcache">ApplicationCache</a></code> object is
                   35526: associated with an <a href="#application0">application cache</a>
                   35527: whose group is in the <i>idle</i> <span title=
                   35528: "concept-appcache-states">update status</span> , and that
                   35529: application cache is the newest cache in its group that contains a
                   35530: resource <del class="diff-old">categorised</del> <ins class=
                   35531: "diff-chg">categorized</ins> as a <a href="#the-manifest" title=
                   35532: "concept-appcache-manifest">manifest</a> .</p>
                   35533: </dd>
                   35534: <dt><dfn id="checking" title=
                   35535: "dom-appcache-CHECKING"><code>CHECKING</code></dfn> (numeric value
                   35536: 2)</dt>
                   35537: <dd>
                   35538: <p>The <code><a href=
                   35539: "#applicationcache">ApplicationCache</a></code> object is
                   35540: associated with an <a href="#application0">application cache</a>
                   35541: whose group is in the <i>checking</i> <span title=
                   35542: "concept-appcache-states">update status</span> .</p>
                   35543: </dd>
                   35544: <dt><dfn id="downloading" title=
                   35545: "dom-appcache-DOWNLOADING"><code>DOWNLOADING</code></dfn> (numeric
                   35546: value 3)</dt>
                   35547: <dd>
                   35548: <p>The <code><a href=
                   35549: "#applicationcache">ApplicationCache</a></code> object is
                   35550: associated with an <a href="#application0">application cache</a>
                   35551: whose group is in the <i>downloading</i> <span title=
                   35552: "concept-appcache-states">update status</span> .</p>
                   35553: </dd>
                   35554: <dt><dfn id="updateready" title=
                   35555: "dom-appcache-UPDATEREADY"><code>UPDATEREADY</code></dfn> (numeric
                   35556: value 4)</dt>
                   35557: <dd>
                   35558: <p>The <code><a href=
                   35559: "#applicationcache">ApplicationCache</a></code> object is
                   35560: associated with an <a href="#application0">application cache</a>
                   35561: whose group is in the <i>idle</i> <span title=
                   35562: "concept-appcache-states">update status</span> , but that
                   35563: application cache is <em>not</em> the newest cache in its group
                   35564: that contains a resource <del class="diff-old">categorised</del>
                   35565: <ins class="diff-chg">categorized</ins> as a <a href=
                   35566: "#the-manifest" title="concept-appcache-manifest">manifest</a>
                   35567: .</p>
                   35568: </dd>
                   35569: </dl>
                   35570: <p>The <dfn id="length7" title=
                   35571: "dom-appcache-length"><code>length</code></dfn> attribute must
                   35572: return the number of <a href="#dynamic3" title=
                   35573: "concept-appcache-dynamic">dynamic entries</a> in the <a href=
                   35574: "#application0">application cache</a> with which the <code><a href=
                   35575: "#applicationcache">ApplicationCache</a></code> object is
                   35576: associated, if any, and zero if the object is not associated with
                   35577: any application cache.</p>
                   35578: <p>The <a href="#dynamic3" title="concept-appcache-dynamic">dynamic
                   35579: entries</a> in the <a href="#application0">application cache</a>
                   35580: are ordered in the same order as they were added to the cache by
                   35581: the <code title="dom-appcache-add"><a href=
                   35582: "#adduri">add()</a></code> method, with the oldest entry being the
                   35583: zeroth entry, and the most recently added entry having the index
                   35584: <span><code title="dom-appcache-length"><a href=
                   35585: "#length7">length</a></code> -1</span> .</p>
                   35586: <p>The <dfn id="itemindex4" title="dom-appcache-item"><code>item(
                   35587: <var title="">index</var> )</code></dfn> method must return the
                   35588: <ins class="diff-new">absolute URI of the</ins> <a href="#dynamic3"
                   35589: title="concept-appcache-dynamic">dynamic <del class=
                   35590: "diff-old">entries</del> <ins class="diff-chg">entry</ins></a> with
                   35591: index <var title="">index</var> from the <a href=
                   35592: "#application0">application cache</a> , if one is associated with
                   35593: the <code><a href="#applicationcache">ApplicationCache</a></code>
                   35594: object. If the object is not associated with any application cache,
                   35595: or if the <var title="">index</var> argument is lower than zero or
                   35596: greater than <span><code title="dom-appcache-length"><a href=
                   35597: "#length7">length</a></code> -1</span> , the method must instead
                   35598: raise an <code>INDEX_SIZE_ERR</code> exception.</p>
                   35599: <p>The <dfn id="adduri" title="dom-appcache-add"><code>add(
                   35600: <var title="">uri</var> )</code></dfn> method must run the
                   35601: following steps:</p>
                   35602: <ol>
                   35603: <li>
                   35604: <p>If the <code><a href=
                   35605: "#applicationcache">ApplicationCache</a></code> object is not
                   35606: associated with any application cache, then raise an
                   35607: <code>INVALID_STATE_ERR</code> exception and abort these steps.</p>
                   35608: </li>
                   35609: <li>
                   35610: <p>If <var title=""><ins class="diff-new">uri</ins></var>
                   35611: <ins class="diff-new">is not a valid URI reference, then raise
                   35612: a</ins> <code><ins class="diff-new">SYNTAX_ERR</ins></code>
                   35613: <ins class="diff-new">exception and abort these steps.</ins>
                   35614: <a href="#references"><ins class="diff-new">[RFC3986]</ins></a>
                   35615: <a href="#references"><ins class="diff-new">[RFC3987]</ins></a></p>
                   35616: </li>
                   35617: <li>
                   35618: <p class="big-issue"><ins class="diff-new">resolve relative URIs;
                   35619: on failure, raise a</ins> <code><ins class=
                   35620: "diff-new">SYNTAX_ERR</ins></code> <ins class=
                   35621: "diff-new">exception</ins></p>
                   35622: </li>
                   35623: <li>
                   35624: <p><ins class="diff-new">If</ins> there is already a resource in in
                   35625: the <a href="#application0">application cache</a> with which the
                   35626: <code><a href="#applicationcache">ApplicationCache</a></code>
                   35627: object is associated that has the address <var title="">uri</var> ,
                   35628: then ensure that entry is <del class="diff-old">categorised</del>
                   35629: <ins class="diff-chg">categorized</ins> as a <a href="#dynamic3"
                   35630: title="concept-appcache-dynamic">dynamic entry</a> and return and
                   35631: abort these steps.</p>
                   35632: </li>
                   35633: <li>
                   35634: <p>If <var title="">uri</var> has a different &lt;scheme&gt;
                   35635: component than the manifest's URI, then raise a <a href=
                   35636: "#security9">security exception</a> .</p>
                   35637: </li>
                   35638: <li>
                   35639: <p>Return, but do not abort these steps.</p>
                   35640: </li>
                   35641: <li>
                   35642: <p>Fetch the resource referenced by <var title="">uri</var> .</p>
                   35643: </li>
                   35644: <li>
                   35645: <p>If this results 4xx or 5xx status codes or equivalent, or if
                   35646: there were network errors, <ins class="diff-new">or if the user
                   35647: canceled the download,</ins> then abort these steps.</p>
                   35648: </li>
                   35649: <li>
                   35650: <p>Wait for there to be no running scripts, or at least no running
                   35651: scripts that can reach an <code><a href=
                   35652: "#applicationcache">ApplicationCache</a></code> object associated
                   35653: with the <a href="#application0">application cache</a> with which
                   35654: this <code><a href="#applicationcache">ApplicationCache</a></code>
                   35655: object is associated.</p>
                   35656: <p>Add the fetched resource to the <a href=
                   35657: "#application0">application cache</a> and <del class=
                   35658: "diff-old">categorise</del> <ins class="diff-chg">categorize</ins>
                   35659: it as a <a href="#dynamic3" title=
                   35660: "concept-appcache-dynamic">dynamic entry</a> before letting any
                   35661: such scripts resume.</p>
                   35662: </li>
                   35663: </ol>
                   35664: <p class="big-issue">We can make the add() API more usable (i.e.
                   35665: make it possible to detect progress and distinguish success from
                   35666: errors without polling and timeouts) if we have the method return
                   35667: an object that is a target of Progress Events, much like the
                   35668: <a href=
                   35669: "http://dev.w3.org/cvsweb/~checkout~/2006/webapi/XMLHttpRequest-2/Overview.html?content-type=text/html;%20charset=utf-8#xmlhttprequesteventtarget-interface">
                   35670: XMLHttpRequestEventTarget</a> interface. This would also make this
                   35671: far more complex to spec and implement.</p>
                   35672: <p>The <dfn id="remove1" title="dom-appcache-remove"><code>remove(
                   35673: <var title="">uri</var> )</code></dfn> method must remove the
                   35674: <a href="#dynamic3" title="concept-appcache-dynamic">dynamic
                   35675: entry</a> <del class="diff-old">categorisation</del> <ins class=
                   35676: "diff-chg">categorization</ins> of any entry with the address
                   35677: <var title="">uri</var> in the <a href="#application0">application
                   35678: cache</a> with which the <code><a href=
                   35679: "#applicationcache">ApplicationCache</a></code> object is
                   35680: associated. <span class="big-issue"><ins class="diff-new">Resolve
                   35681: relative URIs... (ignore syntax errors)</ins></span> If this
                   35682: removes the last <del class="diff-old">categorisation</del>
                   35683: <ins class="diff-chg">categorization</ins> of an entry in that
                   35684: cache, then the entry must be removed entirely (such that if it is
                   35685: re-added, it will be loaded from the network again). If the
                   35686: <code><a href="#applicationcache">ApplicationCache</a></code>
                   35687: object is not associated with any application cache, then the
                   35688: method must raise an <code>INVALID_STATE_ERR</code> exception
                   35689: instead.</p>
                   35690: <p>If the <dfn id="update1" title=
                   35691: "dom-appcache-update"><code>update()</code></dfn> method is
                   35692: invoked, the user agent must invoke the <a href=
                   35693: "#application1">application cache update process</a> , in the
                   35694: background, for the <a href="#application0">application cache</a>
                   35695: with which the <code><a href=
                   35696: "#applicationcache">ApplicationCache</a></code> object is
                   35697: associated. If there is no such application cache, then the method
                   35698: must raise an <code>INVALID_STATE_ERR</code> exception instead.</p>
                   35699: <p>If the <dfn id="swapcache" title=
                   35700: "dom-appcache-swapCache"><code>swapCache()</code></dfn> method is
                   35701: invoked, the user agent must run the following steps:</p>
                   35702: <ol>
                   35703: <li>
                   35704: <p>Let <var title="">document</var> be the <code>Document</code>
                   35705: with which the <code><a href=
                   35706: "#applicationcache">ApplicationCache</a></code> object is
                   35707: associated.</p>
                   35708: </li>
                   35709: <li>
                   35710: <p>Check that <var title="">document</var> is associated with an
                   35711: <a href="#application0">application cache</a> . If it is not, then
                   35712: raise an <code>INVALID_STATE_ERR</code> exception and abort these
                   35713: steps.</p>
                   35714: <p class="note">This is not the same thing as the <code><a href=
                   35715: "#applicationcache">ApplicationCache</a></code> object being itself
                   35716: associated with an <a href="#application0">application cache</a> !
                   35717: In particular, the <code>Document</code> with which the
                   35718: <code><a href="#applicationcache">ApplicationCache</a></code>
                   35719: object is associated can only itself be associated with an
                   35720: application cache if it is in a <a href="#top-level">top-level
                   35721: browsing context</a> .</p>
                   35722: </li>
                   35723: <li>
                   35724: <p>Let <var title="">cache</var> be the <a href=
                   35725: "#application0">application cache</a> with which the <code><a href=
                   35726: "#applicationcache">ApplicationCache</a></code> object is
                   35727: associated. (By definition, this is the same as the one that was
                   35728: found in the previous step.)</p>
                   35729: </li>
                   35730: <li>
                   35731: <p>Check that there is an application cache in the same group as
                   35732: <var title="">cache</var> which has an entry <del class=
                   35733: "diff-old">categorised</del> <ins class=
                   35734: "diff-chg">categorized</ins> as a <a href="#the-manifest" title=
                   35735: "concept-appcache-manifest">manifest</a> that has is newer than
                   35736: <var title="">cache</var> . If there is not, then raise an
                   35737: <code>INVALID_STATE_ERR</code> exception and abort these steps.</p>
                   35738: </li>
                   35739: <li>
                   35740: <p>Let <var title="">new cache</var> be the newest <a href=
                   35741: "#application0">application cache</a> in the same group as
                   35742: <var title="">cache</var> which has an entry <del class=
                   35743: "diff-old">categorised</del> <ins class=
                   35744: "diff-chg">categorized</ins> as a <a href="#the-manifest" title=
                   35745: "concept-appcache-manifest">manifest</a> .</p>
                   35746: </li>
                   35747: <li>
                   35748: <p>Unassociate <var title="">document</var> from <var title=
                   35749: "">cache</var> and instead associate it with <var title="">new
                   35750: cache</var> .</p>
                   35751: </li>
                   35752: </ol>
                   35753: <p>The following are the <a href="#event4">event handler DOM
                   35754: attributes</a> that must be supported by objects implementing the
                   35755: <code><a href="#applicationcache">ApplicationCache</a></code>
                   35756: interface:</p>
                   35757: <dl>
                   35758: <dt><dfn id="onchecking" title=
                   35759: "handler-appcache-onchecking"><code>onchecking</code></dfn></dt>
                   35760: <dd>
                   35761: <p>Must be invoked whenever an <code title=
                   35762: "event-checking">checking</code> event is targeted at or bubbles
                   35763: through the <code><a href=
                   35764: "#applicationcache">ApplicationCache</a></code> object.</p>
                   35765: </dd>
                   35766: <dt><dfn id="onerror0" title=
                   35767: "handler-appcache-onerror"><code>onerror</code></dfn></dt>
                   35768: <dd>
                   35769: <p>Must be invoked whenever an <code title="event-error"><a href=
                   35770: "#error1">error</a></code> event is targeted at or bubbles through
                   35771: the <code><a href="#applicationcache">ApplicationCache</a></code>
                   35772: object.</p>
                   35773: </dd>
                   35774: <dt><dfn id="onnoupdate" title=
                   35775: "handler-appcache-onnoupdate"><code>onnoupdate</code></dfn></dt>
                   35776: <dd>
                   35777: <p>Must be invoked whenever an <code title=
                   35778: "event-noupdate">noupdate</code> event is targeted at or bubbles
                   35779: through the <code><a href=
                   35780: "#applicationcache">ApplicationCache</a></code> object.</p>
                   35781: </dd>
                   35782: <dt><dfn id="ondownloading" title=
                   35783: "handler-appcache-ondownloading"><code>ondownloading</code></dfn></dt>
                   35784: <dd>
                   35785: <p>Must be invoked whenever an <code title=
                   35786: "event-downloading">downloading</code> event is targeted at or
                   35787: bubbles through the <code><a href=
                   35788: "#applicationcache">ApplicationCache</a></code> object.</p>
                   35789: </dd>
                   35790: <dt><dfn id="onprogress" title=
                   35791: "handler-appcache-onprogress"><code>onprogress</code></dfn></dt>
                   35792: <dd>
                   35793: <p>Must be invoked whenever an <code title=
                   35794: "event-progress"><a href="#progress0">progress</a></code> event is
                   35795: targeted at or bubbles through the <code><a href=
                   35796: "#applicationcache">ApplicationCache</a></code> object.</p>
                   35797: </dd>
                   35798: <dt><dfn id="onupdateready" title=
                   35799: "handler-appcache-onupdateready"><code>onupdateready</code></dfn></dt>
                   35800: <dd>
                   35801: <p>Must be invoked whenever an <code title=
                   35802: "event-updateready">updateready</code> event is targeted at or
                   35803: bubbles through the <code><a href=
                   35804: "#applicationcache">ApplicationCache</a></code> object.</p>
                   35805: </dd>
                   35806: <dt><dfn id="oncached" title=
                   35807: "handler-appcache-oncached"><code>oncached</code></dfn></dt>
                   35808: <dd>
                   35809: <p>Must be invoked whenever a <code title=
                   35810: "event-cached">cached</code> event is targeted at or bubbles
                   35811: through the <code><a href=
                   35812: "#applicationcache">ApplicationCache</a></code> object.</p>
                   35813: </dd>
                   35814: </dl>
                   35815: <h4 id="browser0"><span class="secno"><del class=
                   35816: "diff-old">4.6.7.</del> <ins class="diff-chg">4.7.7</ins></span>
                   35817: Browser state</h4>
                   35818: <p>The <dfn id="navigator.online" title=
                   35819: "dom-navigator-onLine"><code>navigator.onLine</code></dfn>
                   35820: attribute must return false if the user agent will not contact the
                   35821: network when the user follows links or when a script requests a
                   35822: remote page (or knows that such an attempt would fail), and must
                   35823: return true otherwise.</p>
                   35824: <p>When the value that would be returned by the <code title=
                   35825: "dom-navigator-onLine"><a href=
                   35826: "#navigator.online">navigator.onLine</a></code> attribute of the
                   35827: <code><a href="#window">Window</a></code> changes from true to
                   35828: false, the user agent must <a href="#firing2">fire a simple
                   35829: event</a> called <dfn id="offline0" title=
                   35830: "event-offline"><code>offline</code></dfn> at <a href=
                   35831: "#the-body1">the body element</a> .</p>
                   35832: <p>On the other hand, when the value that would be returned by the
                   35833: <code title="dom-navigator-onLine"><a href=
                   35834: "#navigator.online">navigator.onLine</a></code> attribute of the
                   35835: <code><a href="#window">Window</a></code> changes from false to
                   35836: true, the user agent must <a href="#firing2">fire a simple
                   35837: event</a> called <dfn id="online0" title=
                   35838: "event-online"><code>online</code></dfn> at <a href=
                   35839: "#the-body1">the body element</a> .</p>
                   35840: <h3 id="history"><span class="secno"><del class=
                   35841: "diff-old">4.7.</del> <ins class="diff-chg">4.8</ins></span>
                   35842: Session history and navigation</h3>
                   35843: <h4 id="the-session"><span class="secno"><del class=
                   35844: "diff-old">4.7.1.</del> <ins class="diff-chg">4.8.1</ins></span>
                   35845: The session history of browsing contexts</h4>
                   35846: <p>The sequence of <code>Document</code> s in a <a href=
                   35847: "#browsing1">browsing context</a> is its <dfn id="session">session
                   35848: history</dfn> .</p>
                   35849: <p><code><a href="#history2">History</a></code> objects provide a
                   35850: representation of the pages in the session history of <a href=
                   35851: "#browsing1" title="browsing context">browsing contexts</a> . Each
                   35852: browsing context has a distinct session history.</p>
                   35853: <p>Each <code>Document</code> object in a browsing context's
                   35854: session history is associated with a unique instance of the
                   35855: <code><a href="#history2">History</a></code> object, although they
                   35856: all must model the same underlying session history.</p>
                   35857: <p>The <dfn id="history1" title=
                   35858: "dom-history"><code>history</code></dfn> attribute of the
                   35859: <code><a href="#window">Window</a></code> interface must return the
                   35860: object implementing the <code><a href=
                   35861: "#history2">History</a></code> interface for that <code><a href=
                   35862: "#window">Window</a></code> object's <a href="#active">active
                   35863: document</a> .</p>
                   35864: <p><code><a href="#history2">History</a></code> objects represent
                   35865: their <a href="#browsing1">browsing context</a> 's session history
                   35866: as a flat list of <a href="#session0" title=
                   35867: "session history entry">session history entries</a> . Each <dfn id=
                   35868: "session0">session history entry</dfn> consists of either a URI or
                   35869: a <a href="#state">state object</a> , or both, and may in addition
                   35870: have a title, a <code>Document</code> object, form data, a scroll
                   35871: position, and other information associated with it.</p>
                   35872: <p class="note">This does not imply that the user interface need be
                   35873: linear. See the <a href="#history-notes">notes below</a> .</p>
                   35874: <p>URIs without <del class="diff-old">assaciated</del> <ins class=
                   35875: "diff-chg">associated</ins> <a href="#state" title=
                   35876: "state object">state objects</a> are added to the session history
                   35877: as the user (or script) navigates from page to page.</p>
                   35878: <p>A <dfn id="state">state object</dfn> is an object representing a
                   35879: user interface state.</p>
                   35880: <p>Pages can <a href="#pushstate" title=
                   35881: "dom-history-pushState">add</a> <a href="#state" title=
                   35882: "state object">state objects</a> between their entry in the session
                   35883: history and the next ("forward") entry. These are then <a href=
                   35884: "#popstate" title="event-popstate">returned to the script</a> when
                   35885: the user (or script) goes back in the history, thus enabling
                   35886: authors to use the "navigation" metaphor even in one-page
                   35887: applications.</p>
                   35888: <p><ins class="diff-new">Every</ins> <code><ins class=
                   35889: "diff-new">Document</ins></code> <ins class="diff-new">in the
                   35890: session history is defined to have a</ins> <dfn id=
                   35891: "last-activated"><ins class="diff-new">last activated
                   35892: entry</ins></dfn> ,<ins class="diff-new">which is the</ins>
                   35893: <a href="#state"><ins class="diff-new">state object</ins></a>
                   35894: <ins class="diff-new">entry associated with that</ins>
                   35895: <code><ins class="diff-new">Document</ins></code> <ins class=
                   35896: "diff-new">which was most recently activated. Initially, the</ins>
                   35897: <a href="#last-activated"><ins class="diff-new">last activated
                   35898: entry</ins></a> <ins class="diff-new">of a</ins> <code><ins class=
                   35899: "diff-new">Document</ins></code> <ins class="diff-new">must be the
                   35900: first entry for the</ins> <code><ins class=
                   35901: "diff-new">Document</ins></code> ,<ins class=
                   35902: "diff-new">representing the fact that no</ins> <a href=
                   35903: "#state"><ins class="diff-new">state object</ins></a> <ins class=
                   35904: "diff-new">entry has yet been activated.</ins></p>
                   35905: <p>At any point, one of the entries in the session history is the
                   35906: <dfn id="current1">current entry</dfn> . This is the entry
                   35907: representing the <a href="#active">active document</a> of the
                   35908: <a href="#browsing1">browsing context</a> . The <a href=
                   35909: "#current1">current entry</a> is usually an entry for the <a href=
                   35910: "#href5" title="dom-location-href">location</a> of the
                   35911: <code>Document</code> . However, it can also be one of the entries
                   35912: for <a href="#state" title="state object">state objects</a> added
                   35913: to the history by that document.</p>
                   35914: <p>Entries that consist of <a href="#state" title=
                   35915: "state object">state objects</a> share the same
                   35916: <code>Document</code> as the entry for the page that was active
                   35917: when they were added.</p>
                   35918: <p>Contiguous entries that differ just by fragment identifier also
                   35919: share the same <code>Document</code> .</p>
                   35920: <p class="note">All entries that share the same
                   35921: <code>Document</code> (and that are therefore merely different
                   35922: states of one particular document) are contiguous by
                   35923: definition.</p>
                   35924: <p>User agents may <dfn id="discard">discard</dfn> the DOMs of
                   35925: entries other than the <a href="#current1">current entry</a> that
                   35926: are not referenced from any script, reloading the pages afresh when
                   35927: the user or script navigates back to such pages. This specification
                   35928: does not specify when user agents should discard pages' DOMs and
                   35929: when they should cache them. See the section on the <code title=
                   35930: "event-load"><a href="#load0">load</a></code> and <code title=
                   35931: "event-unload">unload</code> events for more details.</p>
                   35932: <p>Entries that have had their DOM discarded must, for the purposes
                   35933: of the algorithms given below, act as if they had not. When the
                   35934: user or script navigates back or forwards to a page which has no
                   35935: in-memory DOM objects, any other entries that shared the same
                   35936: <code>Document</code> object with it must share the new object as
                   35937: well.</p>
                   35938: <p>When state object entries are added, a URI can be provided. This
                   35939: URI is used to replace the state object entry if the
                   35940: <code>Document</code> is evicted.</p>
                   35941: <p>When a user agent discards the DOM from an entry in the session
                   35942: history, it must also discard all the entries that share that
                   35943: <code>Document</code> but do not have an associated URI (i.e.
                   35944: entries that only have a <a href="#state">state object</a> ).
                   35945: Entries that shared that <code>Document</code> object but had a
                   35946: state object and have a different URI must then have their
                   35947: <em>state objects</em> removed. Removed entries are not recreated
                   35948: if the user or script navigates back to the page. If there are no
                   35949: state object entries for that <code>Document</code> object then no
                   35950: entries are removed.</p>
                   35951: <p class="big-issue"><ins class="diff-new">when an entry is
                   35952: discarded, any frozen timers, intervals, XMLHttpRequests, database
                   35953: transactions, etc, must be killed</ins></p>
                   35954: <h4 id="the-history"><span class="secno"><del class=
                   35955: "diff-old">4.7.2.</del> <ins class="diff-chg">4.8.2</ins></span>
                   35956: The <code><a href="#history2">History</a></code> interface</h4>
                   35957: <del class="diff-old">{ readonly attribute long ;</del>
                   35958: <pre class="idl">
                   35959: interface <dfn id="history2">History</dfn> {
                   35960: <ins class="diff-chg">  readonly attribute long <a href="#length8"
                   35961: title="dom-history-length">length</a>;
                   35962: </ins>
                   35963:   void <a href="#godelta" title=
                   35964: "dom-history-go">go</a>(in long delta);
                   35965:   void <a href="#go" title="dom-history-go-0">go</a>();
                   35966:   void <a href="#back" title="dom-history-back">back</a>();
                   35967:   void <a href="#forward" title=
                   35968: "dom-history-forward">forward</a>();
                   35969:   void <a href="#pushstate" title=
                   35970: "dom-history-pushState">pushState</a>(in DOMObject data, in DOMString title);
                   35971:   void <a href="#pushstate" title=
                   35972: "dom-history-pushState">pushState</a>(in DOMObject data, in DOMString title, in DOMString url);
                   35973:   void <a href="#clearstate" title=
                   35974: "dom-history-clearState">clearState</a>();
                   35975: };
                   35976: </pre>
                   35977: <p>The <dfn id="length8" title=
                   35978: "dom-history-length"><code>length</code></dfn> attribute of the
                   35979: <code><a href="#history2">History</a></code> interface must return
                   35980: the number of entries in this <a href="#session">session
                   35981: history</a> .</p>
                   35982: <p>The actual entries are not accessible from script.</p>
                   35983: <p>The <dfn id="godelta" title="dom-history-go"><code>go(
                   35984: <var title="">delta</var> )</code></dfn> method causes the UA to
                   35985: move the number of steps specified by <var title="">delta</var> in
                   35986: the session history.</p>
                   35987: <p>If the index of the <a href="#current1">current entry</a> plus
                   35988: <var title="">delta</var> is less than zero or greater than or
                   35989: equal to the <a href="#length8" title="dom-history-length">number
                   35990: of items in the session history</a> , then the user agent must do
                   35991: nothing.</p>
                   35992: <p>If the <var title="">delta</var> is zero, then the user agent
                   35993: must act as if the <code title=
                   35994: "dom-location-reload">location.reload()</code> method was called
                   35995: instead.</p>
                   35996: <p>Otherwise, the user agent must cause the current <a href=
                   35997: "#browsing1">browsing context</a> to <a href="#traverse">traverse
                   35998: the history</a> to the specified <del class="diff-old">entry, as
                   35999: described below.</del> <ins class="diff-chg">entry.</ins> The
                   36000: <i>specified entry</i> is the one whose index equals the index of
                   36001: the <a href="#current1">current entry</a> plus <var title=
                   36002: "">delta</var> .</p>
                   36003: <p>When <del class="diff-old">a user agent is required to traverse
                   36004: the history to a specified entry, the user agent must act as
                   36005: follows: If there is no longer a Document object for the entry in
                   36006: question, the user agent must navigate the browsing context to the
                   36007: location for that entry to preform an entry update of that entry,
                   36008: and abort these steps. The " navigate " algorithm reinvokes this
                   36009: "traverse" algorithm to complete the traversal, at which point
                   36010: there is a Document object and so this step gets skipped. If
                   36011: appropriate, update the current entry in the browsing context 's
                   36012: Document object's History object to reflect any state that the user
                   36013: agent wishes to persist. For example, some user agents might want
                   36014: to persist the scroll position, or the values of form controls. If
                   36015: there are any entries with state objects between the current entry
                   36016: and the specified entry (not inclusive), then the user agent must
                   36017: iterate through every entry between the current entry and the
                   36018: specified entry, starting with the entry closest to the current
                   36019: entry, and ending with the one closest to the specified entry. For
                   36020: each entry, if the entry is a state object, the user agent must
                   36021: activate the state object . If the specified entry has a different
                   36022: Document object than the current entry then the user agent must run
                   36023: the following substeps: The user agent must move any properties
                   36024: that have been added to the browsing context's default view's
                   36025: Window object to the active document 's Document 's list of added
                   36026: properties . If the browsing context is a top-level browsing
                   36027: context (and not an auxiliary browsing context ), and the origin of
                   36028: the Document of the specified entry is not the same as the origin
                   36029: of the Document of the current entry , then the following
                   36030: sub-sub-steps must be run: The current browsing context name must
                   36031: be stored with all the entries in the history that are associated
                   36032: with Document objects with the same origin as the active document
                   36033: and that are contiguous with the current entry . The browsing
                   36034: context's browsing context name must be unset. The user agent must
                   36035: make the specified entry 's Document object the active document of
                   36036: the browsing context . (If it is a top-level browsing context ,
                   36037: this might change which application cache it is associated with.)
                   36038: If the specified entry has a browsing context name stored with it,
                   36039: then the following sub-sub-steps must be run: The browsing
                   36040: context's browsing context name must be set to the name stored with
                   36041: the specified entry. Any browsing context name stored with the
                   36042: entries in the history that are associated with Document objects
                   36043: with the same origin as the new active document , and that are
                   36044: contiguous with the specified entry, must be cleared. The user
                   36045: agent must move any properties that have been added to the active
                   36046: document 's Document 's list of added properties to browsing
                   36047: context's default view's Window object. If the specified entry is a
                   36048: state object, the user agent must activate that state object . If
                   36049: the specified entry has a URI that differs from the current entry
                   36050: 's only by its fragment identifier, and the two share the same
                   36051: Document object, then fire a simple event with the name hashchanged
                   36052: at the body element , and, if the new URI has a fragment
                   36053: identifier, scroll to the fragment identifier . User agents may
                   36054: also update other aspects of the document view when the location
                   36055: changes in this way, for instance the scroll position, values of
                   36056: form fields, etc. The current entry is now the specified entry .
                   36057: how does the changing of the global attributes affect .watch() when
                   36058: seen from other Windows? When</del> the user navigates through a
                   36059: <a href="#browsing1">browsing context</a> , e.g. using a browser's
                   36060: back and forward buttons, the user agent must translate this action
                   36061: into the equivalent invocations of the <code title=
                   36062: "dom-history-go"><a href="#godelta">history.go( <var title=
                   36063: "">delta</var> )</a></code> method on the various affected
                   36064: <code title="dom-window"><a href="#window0">window</a></code>
                   36065: objects.</p>
                   36066: <p>Some of the other members of the <code><a href=
                   36067: "#history2">History</a></code> interface are defined in terms of
                   36068: the <code title="dom-history-go"><a href="#godelta">go()</a></code>
                   36069: method, as follows:</p>
                   36070: <table>
                   36071: <tbody>
                   36072: <tr>
                   36073: <th>Member</th>
                   36074: <th>Definition</th>
                   36075: </tr>
                   36076: <tr>
                   36077: <td><dfn id="go" title=
                   36078: "dom-history-go-0"><code>go()</code></dfn></td>
                   36079: <td>Must do the same as <code title="dom-history-go"><a href=
                   36080: "#godelta">go(0)</a></code></td>
                   36081: </tr>
                   36082: <tr>
                   36083: <td><dfn id="back" title=
                   36084: "dom-history-back"><code>back()</code></dfn></td>
                   36085: <td>Must do the same as <code title="dom-history-go"><a href=
                   36086: "#godelta">go(-1)</a></code></td>
                   36087: </tr>
                   36088: <tr>
                   36089: <td><dfn id="forward" title=
                   36090: "dom-history-forward"><code>forward()</code></dfn></td>
                   36091: <td>Must do the same as <code title="dom-history-go"><a href=
                   36092: "#godelta">go(1)</a></code></td>
                   36093: </tr>
                   36094: </tbody>
                   36095: </table>
                   36096: <p>The <dfn id="pushstate" title=
                   36097: "dom-history-pushState"><code>pushState( <var title="">data</var> ,
                   36098: <var title="">title</var> , <var title="">url</var> )</code></dfn>
                   36099: method adds a state object to the history.</p>
                   36100: <p>When this method is invoked, the user agent must first check the
                   36101: third argument. If a third argument is specified, then the user
                   36102: agent must verify that the third argument is a valid URI or IRI (as
                   36103: defined by RFC 3986 and 3987), and if so, that, after resolving it
                   36104: to an absolute URI, it is either identical to the document's URI,
                   36105: or that it differs from the document's URI only in the
                   36106: &lt;query&gt;, &lt;abs_path&gt;, and/or &lt;fragment&gt; parts, as
                   36107: applicable (the &lt;query&gt; and &lt;abs_path&gt; parts can only
                   36108: be the same if the document's URI uses a hierarchical
                   36109: &lt;scheme&gt;). If the verification fails (either because the
                   36110: argument is syntactically incorrect, or differs in a way not
                   36111: described as acceptable in the previous sentence) then the user
                   36112: agent must raise a <a href="#security9">security exception</a> .
                   36113: <a href="#references">[RFC3986]</a> <a href=
                   36114: "#references">[RFC3987]</a></p>
                   36115: <p>If the third argument passes its verification step, or if the
                   36116: third argument was omitted, then the user agent must remove from
                   36117: the <a href="#session">session history</a> any entries for that
                   36118: <code>Document</code> from the entry after the <a href=
                   36119: "#current1">current entry</a> up to the last entry in the session
                   36120: history that references the same <code>Document</code> object, if
                   36121: any. If the <a href="#current1">current entry</a> is the last entry
                   36122: in the session history, or if there are no entries after the
                   36123: <a href="#current1">current entry</a> that reference the same
                   36124: <code>Document</code> object, then no entries are removed.</p>
                   36125: <p>Then, the user agent must add a state object entry to the
                   36126: session history, after the <a href="#current1">current entry</a> ,
                   36127: with the specified <var title="">data</var> as the state object,
                   36128: the given <var title="">title</var> as the title, and, if the third
                   36129: argument is present, the given <var title="">url</var> as the URI
                   36130: of the entry.</p>
                   36131: <p><ins class="diff-new">Then, the user agent must set this new
                   36132: entry as being the</ins> <a href="#last-activated"><ins class=
                   36133: "diff-new">last activated entry</ins></a> <ins class="diff-new">for
                   36134: the</ins> <code><ins class="diff-new">Document</ins></code> .</p>
                   36135: <p>Finally, the user agent must update the <a href=
                   36136: "#current1">current entry</a> to be the this newly added entry.</p>
                   36137: <p class="note">The <var title="">title</var> is purely advisory.
                   36138: User agents might use the title in the user interface.</p>
                   36139: <p>User agents may limit the number of state objects added to the
                   36140: session history per page. If a page hits the UA-defined limit, user
                   36141: agents must remove the entry immediately after the first entry for
                   36142: that <code>Document</code> object in the session history after
                   36143: having added the new entry. (Thus the state history acts as a FIFO
                   36144: buffer for eviction, but as a LIFO buffer for navigation.)</p>
                   36145: <p>The <dfn id="clearstate" title=
                   36146: "dom-history-clearState"><code>clearState()</code></dfn> method
                   36147: removes all the state objects for the <code>Document</code> object
                   36148: from the session history.</p>
                   36149: <p>When this method is invoked, the user agent must remove from the
                   36150: session history all the entries from the first state object entry
                   36151: for that <code>Document</code> object up to the last entry that
                   36152: references that same <code>Document</code> object, if any.</p>
                   36153: <p>Then, if the <a href="#current1">current entry</a> was removed
                   36154: in the previous step, the <a href="#current1">current entry</a>
                   36155: must be set to the last entry for that <code>Document</code> object
                   36156: in the session history.</p>
                   36157: <h4 id="activating"><span class="secno"><del class=
                   36158: "diff-old">4.7.3.</del> <ins class="diff-chg">4.8.3</ins></span>
                   36159: <dfn id="activating0" title="activate the state object">Activating
                   36160: state <del class="diff-old">objects</del> <ins class=
                   36161: "diff-chg">object entries</ins></dfn></h4>
                   36162: <p>When <del class="diff-old">a state object</del> <ins class=
                   36163: "diff-chg">an entry</ins> in the session history is activated
                   36164: (which happens <del class="diff-old">in the cases</del> <ins class=
                   36165: "diff-chg">during</ins> <a href="#traverse" title=
                   36166: "traverse the history"><ins class="diff-chg">session
                   36167: traversal</ins></a> ,<ins class="diff-chg">as</ins> described
                   36168: above), the user agent must <ins class="diff-new">run the following
                   36169: steps:</ins></p>
                   36170: <ol>
                   36171: <li>
                   36172: <p><ins class="diff-new">First, the user agent must set this new
                   36173: entry as being the</ins> <a href="#last-activated"><ins class=
                   36174: "diff-new">last activated entry</ins></a> <ins class="diff-new">for
                   36175: the</ins> <code><ins class="diff-new">Document</ins></code>
                   36176: <ins class="diff-new">to which the entry belongs.</ins></p>
                   36177: </li>
                   36178: <li>
                   36179: <p><ins class="diff-new">If the entry is a</ins> <a href=
                   36180: "#state"><ins class="diff-new">state object</ins></a> <ins class=
                   36181: "diff-new">entry, let</ins> <var title=""><ins class=
                   36182: "diff-new">state</ins></var> <ins class="diff-new">be that state
                   36183: object. Otherwise, the entry is the first entry for the</ins>
                   36184: <code><ins class="diff-new">Document</ins></code> <ins class=
                   36185: "diff-new">; let</ins> <var title=""><ins class=
                   36186: "diff-new">state</ins></var> <ins class="diff-new">be
                   36187: null.</ins></p>
                   36188: </li>
                   36189: <li>
                   36190: <p><ins class="diff-new">The user agent must then</ins> fire a
                   36191: <dfn id="popstate" title=
                   36192: "event-popstate"><code>popstate</code></dfn> event in no namespace
                   36193: on <del class="diff-old">the</del> <a href="#the-body1">the body
                   36194: element</a> using the <code><a href=
                   36195: "#popstateevent">PopStateEvent</a></code> interface, with the
                   36196: <del class="diff-old">state object in the</del> <code title=
                   36197: "dom-PopStateEvent-state"><a href="#state0">state</a></code>
                   36198: <del class="diff-old">attribute.</del> <ins class=
                   36199: "diff-chg">attribute set to the value of</ins> <var title=
                   36200: ""><ins class="diff-chg">state</ins></var> . This event bubbles but
                   36201: is not cancelable and has no default action.</p>
                   36202: </li>
                   36203: </ol>
                   36204: <pre class="idl">
                   36205: interface <dfn id="popstateevent">PopStateEvent</dfn> : Event {
                   36206:   readonly attribute DOMObject <a href="#state0" title=
                   36207: "dom-PopStateEvent-state">state</a>;
                   36208: <del class=
                   36209: "diff-old">  void (in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMObject statetArg);
                   36210: </del>
                   36211: <ins class="diff-chg">  void <a href="#initpopstateevent" title=
                   36212: "dom-PopStateEvent-initPopStateEvent">initPopStateEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMObject stateArg);
                   36213: </ins>
                   36214:   void <a href="#initpopstateeventns" title=
                   36215: "dom-PopStateEvent-initPopStateEventNS">initPopStateEventNS</a>(in DOMString namespaceURIArg, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMObject stateArg);
                   36216: };
                   36217: </pre>
                   36218: <p>The <dfn id="initpopstateevent" title=
                   36219: "dom-PopStateEvent-initPopStateEvent"><code>initPopStateEvent()</code></dfn>
                   36220: and <dfn id="initpopstateeventns" title=
                   36221: "dom-PopStateEvent-initPopStateEventNS"><code>initPopStateEventNS()</code></dfn>
                   36222: methods must initialise the event in a manner analogous to the
                   36223: similarly-named methods in the DOM3 Events interfaces. <a href=
                   36224: "#references">[DOM3EVENTS]</a></p>
                   36225: <p>The <dfn id="state0" title=
                   36226: "dom-PopStateEvent-state"><code>state</code></dfn> attribute
                   36227: represents the context information for the <del class=
                   36228: "diff-old">event. Should we coalesce these events</del> <ins class=
                   36229: "diff-chg">event, or null,</ins> if <del class="diff-old">they
                   36230: occur while</del> the <del class="diff-old">page</del> <ins class=
                   36231: "diff-chg">state represented</ins> is <del class="diff-old">away?
                   36232: (e.g. during traversal -- see above)</del> <ins class=
                   36233: "diff-chg">the initial state of the</ins> <code><ins class=
                   36234: "diff-chg">Document</ins></code> .</p>
                   36235: <h4 id="the-location"><span class="secno"><del class=
                   36236: "diff-old">4.7.4.</del> <ins class="diff-chg">4.8.4</ins></span>
                   36237: The <code><a href="#location2">Location</a></code> interface</h4>
                   36238: <p>Each <code>Document</code> object in a browsing context's
                   36239: session history is associated with a unique instance of a
                   36240: <code><a href="#location2">Location</a></code> object.</p>
                   36241: <p>The <dfn id="location0" title=
                   36242: "dom-document-location"><code>location</code></dfn> attribute of
                   36243: the <code><a href="#htmldocument">HTMLDocument</a></code> interface
                   36244: must return the <code><a href="#location2">Location</a></code>
                   36245: object for that <code>Document</code> object.</p>
                   36246: <p>The <dfn id="location1" title=
                   36247: "dom-location"><code>location</code></dfn> attribute of the
                   36248: <code><a href="#window">Window</a></code> interface must return the
                   36249: <code><a href="#location2">Location</a></code> object for that
                   36250: <code><a href="#window">Window</a></code> object's <a href=
                   36251: "#active">active document</a> .</p>
                   36252: <p><code><a href="#location2">Location</a></code> objects provide a
                   36253: representation of the URI of their document, and allow the <a href=
                   36254: "#current1">current entry</a> of the <a href="#browsing1">browsing
                   36255: context</a> 's session history to be changed, by adding or
                   36256: replacing entries in the <code title="dom-history"><a href=
                   36257: "#history1">history</a></code> object.</p>
                   36258: <pre class="idl">
                   36259: interface <dfn id="location2">Location</dfn> {
                   36260:   readonly attribute DOMString <a href="#href5" title=
                   36261: "dom-location-href">href</a>;
                   36262:   void <a href="#assign" title=
                   36263: "dom-location-assign">assign</a>(in DOMString url);
                   36264:   void <a href="#replace" title=
                   36265: "dom-location-replace">replace</a>(in DOMString url);
                   36266:   void <span title="dom-location-reload">reload</span>();
                   36267:   // <a href="#uri-decomposition">URI decomposition attributes</a> 
                   36268:            attribute DOMString <a href="#protocol" title=
                   36269: "dom-location-protocol">protocol</a>;
                   36270:            attribute DOMString <a href="#host" title=
                   36271: "dom-location-host">host</a>;
                   36272:            attribute DOMString <a href="#hostname" title=
                   36273: "dom-location-hostname">hostname</a>;
                   36274:            attribute DOMString <a href="#port" title=
                   36275: "dom-location-port">port</a>;
                   36276:            attribute DOMString <a href="#pathname" title=
                   36277: "dom-location-pathname">pathname</a>;
                   36278:            attribute DOMString <a href="#search" title=
                   36279: "dom-location-search">search</a>;
                   36280:            attribute DOMString <a href="#hash" title=
                   36281: "dom-location-hash">hash</a>;
                   36282: };
                   36283: </pre>
                   36284: <p><del class="diff-old">In the ECMAScript DOM binding, objects
                   36285: implementing this interface must stringify to the same value as the
                   36286: href attribute. In the ECMAScript DOM binding, the location members
                   36287: of the HTMLDocument and Window interfaces behave as if they had a
                   36288: setter: user agents must treats attempts to set these location
                   36289: attribute as attempts at setting the href attribute of the relevant
                   36290: Location object instead.</del> The <dfn id="href5" title=
                   36291: "dom-location-href"><code>href</code></dfn> attribute returns the
                   36292: address of the page represented by the associated
                   36293: <code>Document</code> object, as an absolute IRI reference.</p>
                   36294: <p>On setting, the user agent must act as if the <code title=
                   36295: "dom-location-assign"><a href="#assign">assign()</a></code> method
                   36296: had been called with the new value as its argument.</p>
                   36297: <p>When the <dfn id="assign" title=
                   36298: "dom-location-assign"><code>assign( <var title="">url</var>
                   36299: )</code></dfn> method is invoked, the UA must <a href=
                   36300: "#navigate">navigate</a> the <a href="#browsing1">browsing
                   36301: context</a> to the specified <var title="">url</var> .</p>
                   36302: <p>When the <dfn id="replace" title=
                   36303: "dom-location-replace"><code>replace( <var title="">url</var>
                   36304: )</code></dfn> method is invoked, the UA must <a href=
                   36305: "#navigate">navigate</a> <ins class="diff-new">the</ins> <a href=
                   36306: "#browsing1"><ins class="diff-new">browsing context</ins></a> to
                   36307: the specified <var title="">url</var> with <a href=
                   36308: "#replacement">replacement enabled</a> .</p>
                   36309: <p><ins class="diff-new">Navigation for the</ins> <code title=
                   36310: "dom-location-assign"><a href="#assign"><ins class=
                   36311: "diff-new">assign()</ins></a></code> <ins class=
                   36312: "diff-new">and</ins> <code title="dom-location-replace"><a href=
                   36313: "#replace"><ins class="diff-new">replace()</ins></a></code>
                   36314: <ins class="diff-new">methods must be done with the</ins> <a href=
                   36315: "#browsing1"><ins class="diff-new">browsing context</ins></a>
                   36316: <ins class="diff-new">of the</ins> <code><a href=
                   36317: "#window"><ins class="diff-new">Window</ins></a></code> <ins class=
                   36318: "diff-new">object that is the</ins> <a href="#script2"><ins class=
                   36319: "diff-new">script execution context</ins></a> <ins class=
                   36320: "diff-new">of the script that invoked the method as the</ins>
                   36321: <a href="#source0"><ins class="diff-new">source browsing
                   36322: context</ins></a> .</p>
                   36323: <p class="note"><ins class="diff-new">If the</ins> <a href=
                   36324: "#script2"><ins class="diff-new">script execution context</ins></a>
                   36325: <ins class="diff-new">of a script isn't a</ins> <code><a href=
                   36326: "#window"><ins class="diff-new">Window</ins></a></code> <ins class=
                   36327: "diff-new">object, then it can't ever get to a</ins> <code><a href=
                   36328: "#location2"><ins class="diff-new">Location</ins></a></code>
                   36329: <ins class="diff-new">object to call these methods.</ins></p>
                   36330: <p>Relative <var title="">url</var> arguments for <code title=
                   36331: "dom-location-assign"><a href="#assign">assign()</a></code> and
                   36332: <code title="dom-location-replace"><a href=
                   36333: "#replace">replace()</a></code> must be resolved relative to the
                   36334: <a href="#scripts0" title="script's base URI">base URI of the
                   36335: script</a> that made the method call.</p>
                   36336: <p>The <code><a href="#location2">Location</a></code> interface
                   36337: also has the complement of <a href="#uri-decomposition">URI
                   36338: decomposition attributes</a> , <dfn id="protocol" title=
                   36339: "dom-location-protocol"><code>protocol</code></dfn> , <dfn id=
                   36340: "host" title="dom-location-host"><code>host</code></dfn> , <dfn id=
                   36341: "port" title="dom-location-port"><code>port</code></dfn> , <dfn id=
                   36342: "hostname" title=
                   36343: "dom-location-hostname"><code>hostname</code></dfn> , <dfn id=
                   36344: "pathname" title=
                   36345: "dom-location-pathname"><code>pathname</code></dfn> , <dfn id=
                   36346: "search" title="dom-location-search"><code>search</code></dfn> ,
                   36347: and <dfn id="hash" title=
                   36348: "dom-location-hash"><code>hash</code></dfn> . These must follow the
                   36349: rules given for URI decomposition attributes, with the <a href=
                   36350: "#input" title="concept-uda-input">input</a> being the address of
                   36351: the page represented by the associated <code>Document</code>
                   36352: object, as an absolute IRI reference (same as the <code title=
                   36353: "dom-location-href"><a href="#href5">href</a></code> attribute),
                   36354: and the <a href="#common3" title="concept-uda-setter">common setter
                   36355: action</a> being the same as setting the <code title=
                   36356: "dom-location-href"><a href="#href5">href</a></code> attribute to
                   36357: the new output value.</p>
                   36358: <h5 id="security6"><span class="secno"><del class=
                   36359: "diff-old">4.7.4.1.</del> <ins class=
                   36360: "diff-chg">4.8.4.1.</ins></span> Security</h5>
                   36361: <p>User agents must raise a <a href="#security9">security
                   36362: exception</a> whenever any of the members of a <code><a href=
                   36363: "#location2">Location</a></code> object are accessed by scripts
                   36364: whose <a href="#effective3"><ins class="diff-chg">effective
                   36365: script</ins> origin</a> is not the <a href="#same-origin" title=
                   36366: "same origin">same</a> as the <code><a href=
                   36367: "#location2">Location</a></code> object's associated
                   36368: <code>Document</code> 's <del class="diff-old">origin,</del>
                   36369: <a href="#effective3"><ins class="diff-chg">effective script
                   36370: origin</ins></a> , with the following exceptions:</p>
                   36371: <ul>
                   36372: <li>The <code title="dom-location-href"><a href=
                   36373: "#href5">href</a></code> <del class="diff-old">setter</del>
                   36374: <ins class="diff-chg">setter, if the script is running in a</ins>
                   36375: <a href="#browsing1"><ins class="diff-chg">browsing
                   36376: context</ins></a> <ins class="diff-chg">that is</ins> <a href=
                   36377: "#allowed"><ins class="diff-chg">allowed to navigate</ins></a>
                   36378: <ins class="diff-chg">the browsing context with which the</ins>
                   36379: <code><a href="#location2"><ins class=
                   36380: "diff-chg">Location</ins></a></code> <ins class="diff-chg">object
                   36381: is associated</ins></li>
                   36382: </ul>
                   36383: <p>User agents must not allow scripts to override the <code title=
                   36384: "dom-location-href"><a href="#href5">href</a></code> attribute's
                   36385: setter.</p>
                   36386: <h4 id="history-notes"><span class="secno"><del class=
                   36387: "diff-old">4.7.5.</del> <ins class="diff-chg">4.8.5</ins></span>
                   36388: Implementation notes for session history</h4>
                   36389: <p><em>This section is non-normative.</em></p>
                   36390: <p>The <code><a href="#history2">History</a></code> interface is
                   36391: not meant to place restrictions on how implementations represent
                   36392: the session history to the user.</p>
                   36393: <p>For example, session history could be implemented in a tree-like
                   36394: manner, with each page having multiple "forward" pages. This
                   36395: specification doesn't define how the linear list of pages in the
                   36396: <code title="dom-history"><a href="#history1">history</a></code>
                   36397: object are derived from the actual session history as seen from the
                   36398: user's perspective.</p>
                   36399: <p>Similarly, a page containing two <code><a href=
                   36400: "#iframe">iframe</a></code> s has a <code title=
                   36401: "dom-history"><a href="#history1">history</a></code> object
                   36402: distinct from the <code><a href="#iframe">iframe</a></code> s'
                   36403: <code title="dom-history"><a href="#history1">history</a></code>
                   36404: objects, despite the fact that typical Web browsers present the
                   36405: user with just one "Back" button, with a session history that
                   36406: interleaves the navigation of the two inner frames and the outer
                   36407: page.</p>
                   36408: <p><strong>Security:</strong> It is suggested that to avoid letting
                   36409: a page "hijack" the history navigation facilities of a UA by
                   36410: abusing <code title="dom-history-pushState"><a href=
                   36411: "#pushstate">pushState()</a></code> , the UA provide the user with
                   36412: a way to jump back to the previous page (rather than just going
                   36413: back to the previous state). For example, the back button could
                   36414: have a drop down showing just the pages in the session history, and
                   36415: not showing any of the states. Similarly, an aural browser could
                   36416: have two "back" commands, one that goes back to the previous state,
                   36417: and one that jumps straight back to the previous page.</p>
                   36418: <p>In addition, a user agent could ignore calls to <code title=
                   36419: "dom-history-pushState"><a href="#pushstate">pushState()</a></code>
                   36420: that are invoked on a timer, or from event handlers that do not
                   36421: represent a clear user action, or that are invoked in rapid
                   36422: succession.</p>
                   36423: <h3 id="browsing0"><span class="secno"><del class=
                   36424: "diff-old">4.8.</del> <ins class="diff-chg">4.9</ins></span>
                   36425: <ins class="diff-chg">Browsing the Web</ins></h3>
                   36426: <h4 id="navigating"><span class="secno"><ins class=
                   36427: "diff-chg">4.9.1</ins></span> Navigating across documents</h4>
                   36428: <p>Certain actions cause the <a href="#browsing1">browsing
                   36429: context</a> to <dfn id="navigate">navigate</dfn> . <ins class=
                   36430: "diff-new">Navigation always involves a</ins> <dfn id=
                   36431: "source0"><ins class="diff-new">source browsing context</ins></dfn>
                   36432: ,<ins class="diff-new">which is the browsing context which was
                   36433: responsible for starting the navigation.</ins></p>
                   36434: <p class="example">For example, <a href="#following0" title=
                   36435: "following hyperlinks">following a hyperlink</a> , <span title=
                   36436: "">form submission</span> , and the <code title="dom-open"><a href=
                   36437: "#open2">window.open()</a></code> and <code title=
                   36438: "dom-location-assign"><a href=
                   36439: "#assign">location.assign()</a></code> methods can all cause a
                   36440: browsing context to navigate.</p>
                   36441: <p>A user agent may also provide various ways for the user to
                   36442: explicitly cause a browsing context to navigate.</p>
                   36443: <p>When a browsing context is navigated, the user agent must run
                   36444: the following steps:</p>
                   36445: <ol>
                   36446: <li id="sandboxLinks">
                   36447: <p><ins class="diff-new">If the</ins> <a href=
                   36448: "#source0"><ins class="diff-new">source browsing context</ins></a>
                   36449: <ins class="diff-new">is not the same as the</ins> <a href=
                   36450: "#browsing1"><ins class="diff-new">browsing context</ins></a>
                   36451: <ins class="diff-new">being navigated, and the</ins> <a href=
                   36452: "#source0"><ins class="diff-new">source browsing context</ins></a>
                   36453: <ins class="diff-new">is not one of the</ins> <a href="#ancestor"
                   36454: title="ancestor browsing context"><ins class="diff-new">ancestor
                   36455: browsing contexts</ins></a> <ins class="diff-new">of the</ins>
                   36456: <a href="#browsing1"><ins class="diff-new">browsing
                   36457: context</ins></a> <ins class="diff-new">being navigated, and
                   36458: the</ins> <a href="#source0"><ins class="diff-new">source browsing
                   36459: context</ins></a> <ins class="diff-new">has its</ins> <a href=
                   36460: "#sandboxed"><ins class="diff-new">sandboxed navigation browsing
                   36461: context flag</ins></a> <ins class="diff-new">set, then abort these
                   36462: steps. The user agent may offer to open the specified resource in a
                   36463: new</ins> <a href="#top-level"><ins class="diff-new">top-level
                   36464: browsing context</ins></a> <ins class="diff-new">or in the</ins>
                   36465: <a href="#top-level"><ins class="diff-new">top-level browsing
                   36466: context</ins></a> <ins class="diff-new">of the</ins> <a href=
                   36467: "#source0"><ins class="diff-new">source browsing context</ins></a>
                   36468: ,<ins class="diff-new">at the user's option, in which case the user
                   36469: agent must</ins> <a href="#navigate"><ins class=
                   36470: "diff-new">navigate</ins></a> <ins class="diff-new">that
                   36471: designated</ins> <a href="#top-level"><ins class=
                   36472: "diff-new">top-level browsing context</ins></a> <ins class=
                   36473: "diff-new">to the specified resource as if the user had requested
                   36474: it independently.</ins></p>
                   36475: </li>
                   36476: <li id="seamlessLinks">
                   36477: <p><ins class="diff-new">If the</ins> <a href=
                   36478: "#source0"><ins class="diff-new">source browsing context</ins></a>
                   36479: <ins class="diff-new">is the same as the</ins> <a href=
                   36480: "#browsing1"><ins class="diff-new">browsing context</ins></a>
                   36481: <ins class="diff-new">being navigated, and this browsing context
                   36482: has its</ins> <a href="#seamless0"><ins class="diff-new">seamless
                   36483: browsing context flag</ins></a> <ins class="diff-new">set, then
                   36484: find the nearest</ins> <a href="#ancestor"><ins class=
                   36485: "diff-new">ancestor browsing context</ins></a> <ins class=
                   36486: "diff-new">that does not have its</ins> <a href=
                   36487: "#seamless0"><ins class="diff-new">seamless browsing context
                   36488: flag</ins></a> <ins class="diff-new">set, and continue these steps
                   36489: as if</ins> <em><ins class="diff-new">that</ins></em> <a href=
                   36490: "#browsing1"><ins class="diff-new">browsing context</ins></a>
                   36491: <ins class="diff-new">was the one that was going to be</ins>
                   36492: <a href="#navigate" title="navigate"><ins class=
                   36493: "diff-new">navigated</ins></a> <ins class=
                   36494: "diff-new">instead.</ins></p>
                   36495: </li>
                   36496: <li>
                   36497: <p>Cancel any preexisting attempt to navigate the browsing
                   36498: context.</p>
                   36499: </li>
                   36500: <li>
                   36501: <p>If the new resource is the same as the current resource, but a
                   36502: fragment identifier has been specified, <ins class=
                   36503: "diff-new">changed, or removed,</ins> then <a href="#navigating0"
                   36504: title="navigate-fragid">navigate to that fragment identifier</a>
                   36505: and abort these steps.</p>
                   36506: </li>
                   36507: <li>
                   36508: <p>If the new resource is to be handled by displaying some sort of
                   36509: inline content, e.g. an error message because the specified scheme
                   36510: is not one of the supported protocols, or an inline prompt to allow
                   36511: the user to select <a href="#registerprotocolhandler" title=
                   36512: "dom-navigator-registerProtocolHandler">a registered handler</a>
                   36513: for the given scheme, then <a href="#page-load4" title=
                   36514: "navigate-ua-inline">display the inline content</a> and abort these
                   36515: steps.</p>
                   36516: </li>
                   36517: <li>
                   36518: <p>If the new resource is to be handled using a mechanism that does
                   36519: not affect the browsing context, then abort these steps and proceed
                   36520: with that mechanism instead.</p>
                   36521: </li>
                   36522: <li>
                   36523: <p>If the new resource is to be fetched using HTTP GET or
                   36524: equivalent, and if the browsing context being navigated is a
                   36525: <a href="#top-level">top-level browsing context</a> , then check if
                   36526: there are any <a href="#application0" title=
                   36527: "application cache">application caches</a> that have a <a href=
                   36528: "#the-manifest" title="concept-appcache-manifest">manifest</a> with
                   36529: the <a href="#same-origin">same <del class=
                   36530: "diff-old">scheme/host/port</del> <ins class=
                   36531: "diff-chg">origin</ins></a> as the URI in question, and that have
                   36532: this URI as one of their entries (excluding entries marked as
                   36533: <a href="#foreign" title="concept-appcache-foreign"><del class=
                   36534: "diff-old">manifest</del> <ins class="diff-chg">foreign</ins></a>
                   36535: ), and that already contain their manifest, <del class=
                   36536: "diff-old">categorised</del> <ins class=
                   36537: "diff-chg">categorized</ins> as a <a href="#the-manifest" title=
                   36538: "concept-appcache-manifest">manifest</a> . If so, then the user
                   36539: agent must then fetch the resource from the <a href="#select0"
                   36540: title="concept-appcache-selection">most appropriate application
                   36541: cache</a> of those that match.</p>
                   36542: <p>Otherwise, start fetching the specified resource in the
                   36543: appropriate manner (e.g. performing an HTTP GET or POST operation,
                   36544: or reading the file from disk, or executing script in the case of a
                   36545: <a href="#the-javascript" title="javascript protocol"><code title=
                   36546: "">javascript:</code> URI</a> ). If this results in a redirect,
                   36547: return to step 2 with the new resource.</p>
                   36548: <p class="example">For example, imagine an HTML page with an
                   36549: associated application cache displaying an image and a form, where
                   36550: the image is also used by several other application caches. If the
                   36551: user right-clicks on the image and chooses "View Image", then the
                   36552: user agent could decide to show the image from any of those caches,
                   36553: but it is likely that the most useful cache for the user would be
                   36554: the one that was used for the aforementioned HTML page. On the
                   36555: other hand, if the user submits the form, and the form does a POST
                   36556: submission, then the user agent will not use an application cache
                   36557: at all; the submission will be made to the network.</p>
                   36558: </li>
                   36559: <li>
                   36560: <p>Wait for one or more bytes to be available or for the user agent
                   36561: to establish that the resource in question is empty. During this
                   36562: time, the user agent may allow the user to cancel this navigation
                   36563: attempt or start other navigation attempts.</p>
                   36564: </li>
                   36565: <li>
                   36566: <p>If the resource was not fetched from an <a href=
                   36567: "#application0">application cache</a> , and was to be fetched using
                   36568: HTTP GET or equivalent, and its URI <a href="#matches" title=
                   36569: "concept-appcache-matches-oppcache">matches the opportunistic
                   36570: caching namespace</a> of one or more application caches,
                   36571: <ins class="diff-new">and the user didn't cancel the navigation
                   36572: attempt during the previous step,</ins> then:</p>
                   36573: <dl class="switch">
                   36574: <dt>If the <del class="diff-old">file was successfully downloaded
                   36575: The user agent must cache</del> <ins class="diff-chg">browsing
                   36576: context being navigated is a</ins> <a href="#top-level"><ins class=
                   36577: "diff-chg">top-level browsing context</ins></a> ,<ins class=
                   36578: "diff-chg">and</ins> the <del class="diff-old">resource in all
                   36579: those application caches, categorised as opportunistically cached
                   36580: entries . If</del> <ins class="diff-chg">navigation attempt failed
                   36581: (e.g.</ins> the server returned a 4xx or 5xx status code or
                   36582: equivalent, or there <del class="diff-old">were network errors If
                   36583: the browsing context being navigated is</del> <ins class=
                   36584: "diff-chg">was</ins> a <del class="diff-old">top-level browsing
                   36585: context , then the user agent must discard the failed load and
                   36586: instead use</del> <ins class="diff-chg">DNS error)</ins></dt>
                   36587: <dd>
                   36588: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   36589: "diff-chg">candidate</ins></var> <ins class="diff-chg">be</ins> the
                   36590: <a href="#fallback0" title="concept-appcache-fallback">fallback
                   36591: resource</a> specified for the opportunistic caching namespace in
                   36592: question. If multiple application caches match, the user agent must
                   36593: use the fallback of the <a href="#select0" title=
                   36594: "concept-appcache-selection">most appropriate application cache</a>
                   36595: of those that match.</p>
                   36596: <p><ins class="diff-new">If</ins> <var title=""><ins class=
                   36597: "diff-new">candidate</ins></var> <ins class="diff-new">is not
                   36598: marked as</ins> <a href="#foreign" title=
                   36599: "concept-appcache-foreign"><ins class="diff-new">foreign</ins></a>
                   36600: ,<ins class="diff-new">then the user agent must discard the failed
                   36601: load and instead continue along these steps using</ins> <var title=
                   36602: ""><ins class="diff-new">candidate</ins></var> <ins class=
                   36603: "diff-new">as the resource.</ins></p>
                   36604: <p>For the purposes of session history (and features that depend on
                   36605: session history, e.g. bookmarking) the user agent must use the URI
                   36606: of the resource that was requested (the one that matched the
                   36607: opportunistic caching namespace), not the fallback resource.
                   36608: However, the user agent may indicate to the user that the original
                   36609: page load failed, that the page used was a fallback resource, and
                   36610: what the URI of the fallback resource actually is.</p>
                   36611: </dd>
                   36612: <dt><ins class="diff-new">Otherwise</ins></dt>
                   36613: <dd>
                   36614: <p><ins class="diff-new">Once the download is complete, if there
                   36615: were no errors and the user didn't cancel the request, the user
                   36616: agent must cache the resource in all the application caches that
                   36617: have a</ins> <a href="#matches" title=
                   36618: "concept-appcache-matches-oppcache"><ins class="diff-new">matching
                   36619: opportunistic caching namespace</ins></a> ,<ins class=
                   36620: "diff-new">categorized as</ins> <a href="#opportunistically" title=
                   36621: "concept-appcache-oppcache"><ins class="diff-new">opportunistically
                   36622: cached entries</ins></a> .<ins class="diff-new">Meanwhile, the user
                   36623: must continue along these steps.</ins></p>
                   36624: </dd>
                   36625: </dl>
                   36626: </li>
                   36627: <li>
                   36628: <p>If the document's out-of-band metadata (e.g. HTTP headers), not
                   36629: counting any <a href="#content-type8" title="Content-Type">type
                   36630: information</a> (such as the Content-Type HTTP header), requires
                   36631: some sort of processing that will not affect the browsing context,
                   36632: then perform that processing and abort these steps.</p>
                   36633: <div class="note">
                   36634: <p>Such processing might be triggered by, amongst other things, the
                   36635: following:</p>
                   36636: <ul class="brief">
                   36637: <li>HTTP status codes (e.g. 204 No Content or 205 Reset
                   36638: Content)</li>
                   36639: <li>HTTP Content-Disposition headers</li>
                   36640: <li>Network errors</li>
                   36641: </ul>
                   36642: </div>
                   36643: </li>
                   36644: <li>
                   36645: <p>Let <var title="">type</var> be <a href="#sniffed" title=
                   36646: "Content-Type sniffing">the sniffed type of the resource</a> .</p>
                   36647: </li>
                   36648: <li>
                   36649: <p>If the user agent has been configured to process resources of
                   36650: the given <var title="">type</var> using some mechanism other than
                   36651: rendering the content in a <a href="#browsing1">browsing
                   36652: context</a> , then skip this step. Otherwise, if the <var title=
                   36653: "">type</var> is one of the following types, jump to the
                   36654: appropriate entry in the following list, and process the resource
                   36655: as described there:</p>
                   36656: <dl class="switch">
                   36657: <dt>"text/html"</dt>
                   36658: <dd>Follow the steps given in the <a href="#page-load" title=
                   36659: "navigate-html">HTML document</a> section, and abort these
                   36660: steps.</dd>
                   36661: <dt>Any type ending in "+xml"</dt>
                   36662: <dt>"application/xml"</dt>
                   36663: <dt>"text/xml"</dt>
                   36664: <dd>Follow the steps given in the <a href="#page-load0" title=
                   36665: "navigate-xml">XML document</a> section. If that section determines
                   36666: that the content is <em>not</em> to be displayed as a generic XML
                   36667: document, then proceed to the next step in this overall set of
                   36668: steps. Otherwise, abort these steps.</dd>
                   36669: <dt>"text/plain"</dt>
                   36670: <dd>Follow the steps given in the <a href="#page-load1" title=
                   36671: "navigate-text">plain text file</a> section, and abort these
                   36672: steps.</dd>
                   36673: <dt>A supported image type</dt>
                   36674: <dd>Follow the steps given in the <a href="#page-load2" title=
                   36675: "navigate-image">image</a> section, and abort these steps.</dd>
                   36676: <dt>A type that will use an external application to render the
                   36677: content in the <a href="#browsing1">browsing context</a></dt>
                   36678: <dd>Follow the steps given in the <a href="#page-load3" title=
                   36679: "navigate-plugin">plugin</a> section, and abort these steps.</dd>
                   36680: </dl>
                   36681: </li>
                   36682: <li id="navigate-non-Document">
                   36683: <p>If, given <var title="">type</var> , the new resource is to be
                   36684: handled by displaying some sort of inline content, e.g. a native
                   36685: rendering of the content, an error message because the specified
                   36686: type is not supported, or an inline prompt to allow the user to
                   36687: select <a href="#registercontenthandler" title=
                   36688: "dom-navigator-registerContentHandler">a registered handler</a> for
                   36689: the given type, then <a href="#page-load4" title=
                   36690: "navigate-ua-inline">display the inline content</a> and abort these
                   36691: steps.</p>
                   36692: </li>
                   36693: <li>
                   36694: <p>Otherwise, the document's <var title="">type</var> is such that
                   36695: the resource will not affect the browsing context, e.g. because the
                   36696: resource is to be handed to an external application. Process the
                   36697: resource appropriately.</p>
                   36698: </li>
                   36699: </ol>
                   36700: <p>Some of the sections below, to which the above algorithm defers
                   36701: in certain cases, require the user agent to <dfn id=
                   36702: "update2">update the session history with the new page</dfn> . When
                   36703: a user agent is required to do this, it must follows the set of
                   36704: steps given below that is appropriate for the situation at hand.
                   36705: From the point of view of any script, these steps must occur
                   36706: atomically.</p>
                   36707: <ol>
                   36708: <li>
                   36709: <p class="big-issue">pause for scripts</p>
                   36710: </li>
                   36711: <li>
                   36712: <p class="big-issue"><del class="diff-old">onbeforeunload</del>
                   36713: <ins class="diff-chg">onbeforeunload, and if present set flag that
                   36714: we will kill document</ins></p>
                   36715: </li>
                   36716: <li>
                   36717: <p class="big-issue"><del class="diff-old">onunload</del>
                   36718: <ins class="diff-chg">onunload, and if present set flag that we
                   36719: will kill document</ins></p>
                   36720: </li>
                   36721: <li>
                   36722: <p class="big-issue"><ins class="diff-chg">if flag is set: reset
                   36723: timers, empty event queue, kill any pending transactions, kill
                   36724: XMLHttpRequests, etc, and set things up so that the document will
                   36725: be discarded asap</ins></p>
                   36726: </li>
                   36727: <li>
                   36728: <dl>
                   36729: <dt>If the navigation was initiated for <dfn id="entry">entry
                   36730: update</dfn> of an entry</dt>
                   36731: <dd>
                   36732: <ol>
                   36733: <li>
                   36734: <p>Replace the entry being updated with a new entry representing
                   36735: the new resource and its <code>Document</code> object and related
                   36736: state. The user agent may propagate state from the old entry to the
                   36737: new entry (e.g. scroll position).</p>
                   36738: </li>
                   36739: <li>
                   36740: <p><a href="#traverse">Traverse the history</a> to the new
                   36741: entry.</p>
                   36742: </li>
                   36743: </ol>
                   36744: </dd>
                   36745: <dt>Otherwise</dt>
                   36746: <dd>
                   36747: <ol>
                   36748: <li>
                   36749: <p>Remove all the entries after the <a href="#current1">current
                   36750: entry</a> in the <a href="#browsing1">browsing context</a> 's
                   36751: <code>Document</code> object's <code><a href=
                   36752: "#history2">History</a></code> object.</p>
                   36753: <p class="note">This <a href="#history-notes">doesn't necessarily
                   36754: have to affect</a> the user agent's user interface.</p>
                   36755: </li>
                   36756: <li>
                   36757: <p>Append a new entry at the end of the <code><a href=
                   36758: "#history2">History</a></code> object representing the new resource
                   36759: and its <code>Document</code> object and related state.</p>
                   36760: </li>
                   36761: <li>
                   36762: <p><a href="#traverse">Traverse the history</a> to the new
                   36763: entry.</p>
                   36764: </li>
                   36765: <li>
                   36766: <p>If the navigation was initiated with <dfn id=
                   36767: "replacement">replacement enabled</dfn> , remove the entry
                   36768: immediately before the new <a href="#current1">current entry</a> in
                   36769: the session history.</p>
                   36770: </li>
                   36771: </ol>
                   36772: </dd>
                   36773: </dl>
                   36774: </li>
                   36775: </ol>
                   36776: <h4 id="read-html"><span class="secno"><del class=
                   36777: "diff-old">4.8.1.</del> <ins class="diff-chg">4.9.2</ins></span>
                   36778: <dfn id="page-load" title="navigate-html">Page load processing
                   36779: model for HTML files</dfn></h4>
                   36780: <p>When an HTML document is to be loaded in a <a href=
                   36781: "#browsing1">browsing context</a> , the user agent must create a
                   36782: <code>Document</code> object, mark it as being an <a href="#html-"
                   36783: title="HTML documents">HTML document</a> , create an <a href=
                   36784: "#html-0">HTML parser</a> , associate it with the document, and
                   36785: begin to use the bytes provided for the document as the <a href=
                   36786: "#input0">input stream</a> for that parser.</p>
                   36787: <p class="note">The <a href="#input0">input stream</a> converts
                   36788: bytes into characters for use in the <span>tokeniser</span> . This
                   36789: process relies, in part, on character encoding information found in
                   36790: the real <a href="#content-type8" title="Content-Type">Content-Type
                   36791: metadata</a> of the resource; the "sniffed type" is not used for
                   36792: this purpose.</p>
                   36793: <p>When no more bytes are available, an EOF character is implied,
                   36794: which eventually causes a <code title="event-load"><a href=
                   36795: "#load0">load</a></code> event to be fired.</p>
                   36796: <p>After creating the <code>Document</code> object, but potentially
                   36797: before the page has finished parsing, the user agent must <a href=
                   36798: "#update2">update the session history with the new page</a> .</p>
                   36799: <p class="note"><a href="#application2" title=
                   36800: "concept-appcache-init-with-attribute">Application cache
                   36801: selection</a> happens <a href="#parser-appcache">in the HTML
                   36802: parser</a> .</p>
                   36803: <h4 id="read-xml"><span class="secno"><del class=
                   36804: "diff-old">4.8.2.</del> <ins class="diff-chg">4.9.3</ins></span>
                   36805: <dfn id="page-load0" title="navigate-xml">Page load processing
                   36806: model for XML files</dfn></h4>
                   36807: <p>When faced with displaying an XML file inline, user agents must
                   36808: first create a <code>Document</code> object, following the
                   36809: requirements of the XML and Namespaces in XML recommendations, RFC
                   36810: 3023, DOM3 Core, and other relevant specifications. <a href=
                   36811: "#references">[XML]</a> <a href="#references">[XMLNS]</a> <a href=
                   36812: "#references">[RFC3023]</a> <a href=
                   36813: "#references">[DOM3CORE]</a></p>
                   36814: <p>The actual HTTP headers and other metadata, not the headers as
                   36815: mutated or implied by the algorithms given in this specification,
                   36816: are the ones that must be used when determining the character
                   36817: encoding according to the rules given in the above specifications.
                   36818: <ins class="diff-new">Once the character encoding is established,
                   36819: the</ins> <a href="#character1"><ins class="diff-new">document's
                   36820: character encoding</ins></a> <ins class="diff-new">must be set to
                   36821: that character encoding.</ins></p>
                   36822: <p>If the root element, as parsed according to the XML
                   36823: specifications cited above, is found to be an <code><a href=
                   36824: "#html">html</a></code> element with an attribute <code title=
                   36825: "attr-html-manifest"><a href="#manifest">manifest</a></code> ,
                   36826: then, as soon as the element is inserted into the DOM, the user
                   36827: agent must run the <a href="#application2" title=
                   36828: "concept-appcache-init-with-attribute">application cache selection
                   36829: algorithm</a> with the value of that <del class=
                   36830: "diff-old">attribute</del> <ins class="diff-chg">attribute,
                   36831: resolved relative to the</ins> <a href="#elements2"><ins class=
                   36832: "diff-chg">element's base URI</ins></a> , as the manifest URI.
                   36833: Otherwise, as soon as the root element is inserted into the DOM,
                   36834: the user agent must run the <a href="#application3" title=
                   36835: "concept-appcache-init-no-attribute">application cache selection
                   36836: algorithm</a> with no manifest.</p>
                   36837: <p class="note">Because the processing of the <code title=
                   36838: "attr-html-manifest"><a href="#manifest">manifest</a></code>
                   36839: attribute happens only once the root element is parsed, any URIs
                   36840: referenced by processing instructions before the root element (such
                   36841: as <code title="">&lt;?xml-styleesheet?&gt;</code> and <code title=
                   36842: "">&lt;?xbl?&gt;</code> PIs) will be fetched from the network and
                   36843: cannot be cached.</p>
                   36844: <p>User agents may examine the namespace of the root
                   36845: <code>Element</code> node of this <code>Document</code> object to
                   36846: perform namespace-based dispatch to alternative processing tools,
                   36847: e.g. determining that the content is actually a syndication feed
                   36848: and passing it to a feed handler. If such processing is to take
                   36849: place, abort the steps in this section, and jump to <a href=
                   36850: "#navigate-non-Document">step 10</a> in the <a href=
                   36851: "#navigate">navigate</a> steps above.</p>
                   36852: <p>Otherwise, then, with the newly created <code>Document</code> ,
                   36853: the user agents must <a href="#update2">update the session history
                   36854: with the new page</a> . User agents may do this before the complete
                   36855: document has been parsed (thus achieving <i>incremental
                   36856: rendering</i> ).</p>
                   36857: <p>Error messages from the parse process (e.g. namespace
                   36858: well-formedness errors) may be reported inline by mutating the
                   36859: <code>Document</code> .</p>
                   36860: <h4 id="read-text"><span class="secno"><del class=
                   36861: "diff-old">4.8.3.</del> <ins class="diff-chg">4.9.4</ins></span>
                   36862: <dfn id="page-load1" title="navigate-text">Page load processing
                   36863: model for text files</dfn></h4>
                   36864: <p>When a plain text document is to be loaded in a <a href=
                   36865: "#browsing1">browsing context</a> , the user agent should create a
                   36866: <code>Document</code> object, mark it as being an <a href="#html-"
                   36867: title="HTML documents">HTML document</a> , create an <a href=
                   36868: "#html-0">HTML parser</a> , associate it with the document, act as
                   36869: if the tokeniser had emitted a start tag token with the tag name
                   36870: "pre", set the <a href="#tokenisation0">tokenisation</a> stage's
                   36871: <a href="#content2">content model flag</a> to <i>PLAINTEXT</i> ,
                   36872: and begin to pass the stream of characters in the plain text
                   36873: document to that tokeniser.</p>
                   36874: <p>The rules for how to convert the bytes of the plain text
                   36875: document into actual characters are defined in RFC 2046, RFC 2646,
                   36876: and subsequent versions thereof. <a href=
                   36877: "#references">[RFC2046]</a> <a href="#references">[RFC2646]</a></p>
                   36878: <p><ins class="diff-new">The</ins> <a href=
                   36879: "#character1"><ins class="diff-new">document's character
                   36880: encoding</ins></a> <ins class="diff-new">must be set to the
                   36881: character encoding used to decode the document.</ins></p>
                   36882: <p>Upon creation of the <code>Document</code> object, the user
                   36883: agent must run the <a href="#application3" title=
                   36884: "concept-appcache-init-no-attribute">application cache selection
                   36885: algorithm</a> with no manifest.</p>
                   36886: <p>When no more character are available, an EOF character is
                   36887: implied, which eventually causes a <code title=
                   36888: "event-load"><a href="#load0">load</a></code> event to be
                   36889: fired.</p>
                   36890: <p>After creating the <code>Document</code> object, but potentially
                   36891: before the page has finished parsing, the user agent must <a href=
                   36892: "#update2">update the session history with the new page</a> .</p>
                   36893: <p>User agents may add content to the <code><a href=
                   36894: "#head">head</a></code> element of the <code>Document</code> , e.g.
                   36895: linking to stylesheet or an XBL binding, providing script, giving
                   36896: the document a <code><a href="#title1">title</a></code> , etc.</p>
                   36897: <h4 id="read-image"><span class="secno"><del class=
                   36898: "diff-old">4.8.4.</del> <ins class="diff-chg">4.9.5</ins></span>
                   36899: <dfn id="page-load2" title="navigate-image">Page load processing
                   36900: model for images</dfn></h4>
                   36901: <p>When an image resource is to be loaded in a <a href=
                   36902: "#browsing1">browsing context</a> , the user agent should create a
                   36903: <code>Document</code> object, mark it as being an <a href="#html-"
                   36904: title="HTML documents">HTML document</a> , append an <code><a href=
                   36905: "#html">html</a></code> element to the <code>Document</code> ,
                   36906: append a <code><a href="#head">head</a></code> element and a
                   36907: <code><a href="#body0">body</a></code> element to the
                   36908: <code><a href="#html">html</a></code> element, append an
                   36909: <code><a href="#img">img</a></code> to the <code><a href=
                   36910: "#body0">body</a></code> element, and set the <code title=
                   36911: "attr-img-src"><a href="#src">src</a></code> attribute of the
                   36912: <code><a href="#img">img</a></code> element to the address of the
                   36913: image.</p>
                   36914: <p>Then, the user agent must act as if it had <a href="#stops"
                   36915: title="stop parsing">stopped parsing</a> .</p>
                   36916: <p>Upon creation of the <code>Document</code> object, the user
                   36917: agent must run the <a href="#application3" title=
                   36918: "concept-appcache-init-no-attribute">application cache selection
                   36919: algorithm</a> with no manifest.</p>
                   36920: <p>After creating the <code>Document</code> object, but potentially
                   36921: before the page has finished fully loading, the user agent must
                   36922: <a href="#update2">update the session history with the new page</a>
                   36923: .</p>
                   36924: <p>User agents may add content to the <code><a href=
                   36925: "#head">head</a></code> element of the <code>Document</code> , or
                   36926: attributes to the <code><a href="#img">img</a></code> element, e.g.
                   36927: to link to stylesheet or an XBL binding, to provide a script, to
                   36928: give the document a <code><a href="#title1">title</a></code> ,
                   36929: etc.</p>
                   36930: <h4 id="read-plugin"><span class="secno"><del class=
                   36931: "diff-old">4.8.5.</del> <ins class="diff-chg">4.9.6</ins></span>
                   36932: <dfn id="page-load3" title="navigate-plugin">Page load processing
                   36933: model for content that uses plugins</dfn></h4>
                   36934: <p>When a resource that requires an external resource to be
                   36935: rendered is to be loaded in a <a href="#browsing1">browsing
                   36936: context</a> , the user agent should create a <code>Document</code>
                   36937: object, mark it as being an <a href="#html-" title=
                   36938: "HTML documents">HTML document</a> , append an <code><a href=
                   36939: "#html">html</a></code> element to the <code>Document</code> ,
                   36940: append a <code><a href="#head">head</a></code> element and a
                   36941: <code><a href="#body0">body</a></code> element to the
                   36942: <code><a href="#html">html</a></code> element, append an
                   36943: <code><a href="#embed">embed</a></code> to the <code><a href=
                   36944: "#body0">body</a></code> element, and set the <code title=
                   36945: "attr-img-src"><a href="#src">src</a></code> attribute of the
                   36946: <code><a href="#img">img</a></code> element to the address of the
                   36947: image.</p>
                   36948: <p>Then, the user agent must act as if it had <a href="#stops"
                   36949: title="stop parsing">stopped parsing</a> .</p>
                   36950: <p>Upon creation of the <code>Document</code> object, the user
                   36951: agent must run the <a href="#application3" title=
                   36952: "concept-appcache-init-no-attribute">application cache selection
                   36953: algorithm</a> with no manifest.</p>
                   36954: <p>After creating the <code>Document</code> object, but potentially
                   36955: before the page has finished fully loading, the user agent must
                   36956: <a href="#update2">update the session history with the new page</a>
                   36957: .</p>
                   36958: <p>User agents may add content to the <code><a href=
                   36959: "#head">head</a></code> element of the <code>Document</code> , or
                   36960: attributes to the <code><a href="#embed">embed</a></code> element,
                   36961: e.g. to link to stylesheet or an XBL binding, or to give the
                   36962: document a <code><a href="#title1">title</a></code> .</p>
                   36963: <p class="note" id="sandboxPluginNavigate"><ins class="diff-new">If
                   36964: the</ins> <a href="#sandboxed0"><ins class="diff-new">sandboxed
                   36965: plugins browsing context flag</ins></a> <ins class="diff-new">is
                   36966: set on the</ins> <a href="#browsing1"><ins class=
                   36967: "diff-new">browsing context</ins></a> ,<ins class="diff-new">the
                   36968: synthesized</ins> <code><a href="#embed"><ins class=
                   36969: "diff-new">embed</ins></a></code> <ins class="diff-new">element
                   36970: will</ins> <a href="#sandboxPluginEmbed"><ins class="diff-new">fail
                   36971: to render the content</ins></a> .</p>
                   36972: <h4 id="read-ua-inline"><span class="secno"><del class=
                   36973: "diff-old">4.8.6.</del> <ins class="diff-chg">4.9.7</ins></span>
                   36974: <dfn id="page-load4" title="navigate-ua-inline">Page load
                   36975: processing model for inline content that doesn't have a
                   36976: DOM</dfn></h4>
                   36977: <p>When the user agent is to display a user agent page inline in a
                   36978: <a href="#browsing1">browsing context</a> , the user agent should
                   36979: create a <code>Document</code> object, mark it as being an <a href=
                   36980: "#html-" title="HTML documents">HTML document</a> , and then either
                   36981: associate that <code>Document</code> with a custom rendering that
                   36982: is not rendered using the normal <code>Document</code> rendering
                   36983: rules, or mutate that <code>Document</code> until it represents the
                   36984: content the user agent wants to render.</p>
                   36985: <p>Once the page has been set up, the user agent must act as if it
                   36986: had <a href="#stops" title="stop parsing">stopped parsing</a> .</p>
                   36987: <p>Upon creation of the <code>Document</code> object, the user
                   36988: agent must run the <a href="#application3" title=
                   36989: "concept-appcache-init-no-attribute">application cache selection
                   36990: algorithm</a> with no manifest.</p>
                   36991: <p>After creating the <code>Document</code> object, but potentially
                   36992: before the page has been completely set up, the user agent must
                   36993: <a href="#update2">update the session history with the new page</a>
                   36994: .</p>
                   36995: <h4 id="scroll-to-fragid"><span class="secno"><del class=
                   36996: "diff-old">4.8.7.</del> <ins class="diff-chg">4.9.8</ins></span>
                   36997: <dfn id="navigating0" title="navigate-fragid">Navigating to a
                   36998: fragment identifier</dfn></h4>
                   36999: <p>When a user agent is supposed to navigate to a fragment
                   37000: identifier, then the user agent must <a href="#update2">update the
                   37001: session history with the new page</a> , where "the new page" has
                   37002: the same <code>Document</code> as before but with the URI having
                   37003: the newly specified fragment identifier.</p>
                   37004: <p>Part of that algorithm involves the user agent having to
                   37005: <a href="#scroll">scroll to the fragment identifier</a> , which is
                   37006: the important part for this step.</p>
                   37007: <p>When the user agent is required to <dfn id="scroll">scroll to
                   37008: the fragment identifier</dfn> , it must change the scrolling
                   37009: position of the document, or perform some other action, such that
                   37010: <a href="#the-indicated">the indicated part of the document</a> is
                   37011: brought to the user's attention. If there is no indicated part,
                   37012: then the user agent must not scroll anywhere.</p>
                   37013: <p>The <dfn id="the-indicated">the indicated part of the
                   37014: document</dfn> is the one that the fragment <del class=
                   37015: "diff-old">identifier</del> <ins class="diff-chg">identifier, if
                   37016: any,</ins> identifies. The semantics of the fragment identifier in
                   37017: terms of mapping it to a specific DOM Node is defined by the MIME
                   37018: type specification of the document's MIME Type (for example, the
                   37019: processing of fragment identifiers for XML MIME types is the
                   37020: responsibility of RFC3023).</p>
                   37021: <p>For HTML documents (and the <code>text/html</code> MIME type),
                   37022: the following processing model must be followed to determine what
                   37023: <a href="#the-indicated">the indicated part of the document</a>
                   37024: is.</p>
                   37025: <ol>
                   37026: <li>
                   37027: <p>Let <i>fragid</i> be the &lt;fragment&gt; part of the URI.
                   37028: <a href="#references">[RFC3987]</a></p>
                   37029: </li>
                   37030: <li>
                   37031: <p>If <i>fragid</i> is the empty string, then the <del class=
                   37032: "diff-old">the</del> indicated part of the document is the top of
                   37033: the document.</p>
                   37034: </li>
                   37035: <li>
                   37036: <p>If there is an element in the DOM that has an ID exactly equal
                   37037: to <i>fragid</i> , then the first such element in tree order is
                   37038: <a href="#the-indicated">the indicated part of the document</a> ;
                   37039: stop the algorithm here.</p>
                   37040: </li>
                   37041: <li>
                   37042: <p>If there is an <code><a href="#a">a</a></code> element in the
                   37043: DOM that has a <code title="attr-a-name">name</code> attribute
                   37044: whose value is exactly equal to <i>fragid</i> , then the first such
                   37045: element in tree order is <a href="#the-indicated">the indicated
                   37046: part of the document</a> ; stop the algorithm here.</p>
                   37047: </li>
                   37048: <li>
                   37049: <p>Otherwise, there is no indicated part of the document.</p>
                   37050: </li>
                   37051: </ol>
                   37052: <p>For the purposes of the interaction of HTML with Selectors'
                   37053: <del class="diff-old">:target</del> <code title="">:target</code>
                   37054: pseudo-class, the <i>target element</i> is <a href=
                   37055: "#the-indicated">the indicated part of the document</a> , if that
                   37056: is an element; otherwise there is no <i>target element</i> .
                   37057: <a href="#references">[SELECTORS]</a></p>
                   37058: <h4 id="history0"><span class="secno"><ins class=
                   37059: "diff-new">4.9.9</ins></span> <ins class="diff-new">History
                   37060: traversal</ins></h4>
                   37061: <p><ins class="diff-new">When a user agent is required to</ins>
                   37062: <dfn id="traverse"><ins class="diff-new">traverse the
                   37063: history</ins></dfn> <ins class="diff-new">to a</ins> <i><ins class=
                   37064: "diff-new">specified entry</ins></i> ,<ins class="diff-new">the
                   37065: user agent must act as follows:</ins></p>
                   37066: <ol>
                   37067: <li>
                   37068: <p><ins class="diff-new">If there is no longer a</ins>
                   37069: <code><ins class="diff-new">Document</ins></code> <ins class=
                   37070: "diff-new">object for the entry in question, the user agent
                   37071: must</ins> <a href="#navigate"><ins class=
                   37072: "diff-new">navigate</ins></a> <ins class="diff-new">the browsing
                   37073: context to the location for that entry to perform an</ins> <a href=
                   37074: "#entry"><ins class="diff-new">entry update</ins></a> <ins class=
                   37075: "diff-new">of that entry, and abort these steps. The "</ins>
                   37076: <a href="#navigate"><ins class="diff-new">navigate</ins></a>
                   37077: <ins class="diff-new">" algorithm reinvokes this "traverse"
                   37078: algorithm to complete the traversal, at which point there</ins>
                   37079: <em><ins class="diff-new">is</ins></em> <ins class=
                   37080: "diff-new">a</ins> <code><ins class=
                   37081: "diff-new">Document</ins></code> <ins class="diff-new">object and
                   37082: so this step gets skipped. The navigation must be done using the
                   37083: same</ins> <a href="#source0"><ins class="diff-new">source browsing
                   37084: context</ins></a> <ins class="diff-new">as was used the first time
                   37085: this entry was created.</ins></p>
                   37086: </li>
                   37087: <li>
                   37088: <p><ins class="diff-new">If appropriate, update the</ins> <a href=
                   37089: "#current1"><ins class="diff-new">current entry</ins></a>
                   37090: <ins class="diff-new">in the</ins> <a href="#browsing1"><ins class=
                   37091: "diff-new">browsing context</ins></a> <ins class=
                   37092: "diff-new">'s</ins> <code><ins class=
                   37093: "diff-new">Document</ins></code> <ins class=
                   37094: "diff-new">object's</ins> <code><a href="#history2"><ins class=
                   37095: "diff-new">History</ins></a></code> <ins class="diff-new">object to
                   37096: reflect any state that the user agent wishes to persist.</ins></p>
                   37097: <p class="example"><ins class="diff-new">For example, some user
                   37098: agents might want to persist the scroll position, or the values of
                   37099: form controls.</ins></p>
                   37100: </li>
                   37101: <li>
                   37102: <p><ins class="diff-new">If the</ins> <i><ins class=
                   37103: "diff-new">specified entry</ins></i> <ins class="diff-new">has a
                   37104: different</ins> <code><ins class="diff-new">Document</ins></code>
                   37105: <ins class="diff-new">object than the</ins> <a href=
                   37106: "#current1"><ins class="diff-new">current entry</ins></a>
                   37107: <ins class="diff-new">then the user agent must run the following
                   37108: substeps:</ins></p>
                   37109: <ol>
                   37110: <li class="big-issue"><ins class="diff-new">freeze any timers,
                   37111: intervals, XMLHttpRequests, database transactions, etc</ins></li>
                   37112: <li><ins class="diff-new">The user agent must move any properties
                   37113: that have been added to the browsing context's default view's</ins>
                   37114: <code><a href="#window"><ins class=
                   37115: "diff-new">Window</ins></a></code> <ins class="diff-new">object to
                   37116: the</ins> <a href="#active"><ins class="diff-new">active
                   37117: document</ins></a> <ins class="diff-new">'s</ins> <code><ins class=
                   37118: "diff-new">Document</ins></code> <ins class="diff-new">'s</ins>
                   37119: <a href="#list-of2"><ins class="diff-new">list of added
                   37120: properties</ins></a> .</li>
                   37121: <li><ins class="diff-new">If the browsing context is a</ins>
                   37122: <a href="#top-level"><ins class="diff-new">top-level browsing
                   37123: context</ins></a> <ins class="diff-new">(and not an</ins> <a href=
                   37124: "#auxiliary0"><ins class="diff-new">auxiliary browsing
                   37125: context</ins></a> <ins class="diff-new">), and the</ins> <a href=
                   37126: "#origin0"><ins class="diff-new">origin</ins></a> <ins class=
                   37127: "diff-new">of the</ins> <code><ins class=
                   37128: "diff-new">Document</ins></code> <ins class="diff-new">of the</ins>
                   37129: <i><ins class="diff-new">specified entry</ins></i> <ins class=
                   37130: "diff-new">is not the</ins> <a href="#same-origin" title=
                   37131: "same origin"><ins class="diff-new">same</ins></a> <ins class=
                   37132: "diff-new">as the</ins> <a href="#origin0"><ins class=
                   37133: "diff-new">origin</ins></a> <ins class="diff-new">of the</ins>
                   37134: <code><ins class="diff-new">Document</ins></code> <ins class=
                   37135: "diff-new">of the</ins> <a href="#current1"><ins class=
                   37136: "diff-new">current entry</ins></a> ,<ins class="diff-new">then the
                   37137: following sub-sub-steps must be run:</ins>
                   37138: <ol>
                   37139: <li><ins class="diff-new">The current</ins> <a href=
                   37140: "#browsing2"><ins class="diff-new">browsing context name</ins></a>
                   37141: <ins class="diff-new">must be stored with all the entries in the
                   37142: history that are associated with</ins> <code><ins class=
                   37143: "diff-new">Document</ins></code> <ins class="diff-new">objects with
                   37144: the</ins> <a href="#same-origin"><ins class="diff-new">same
                   37145: origin</ins></a> <ins class="diff-new">as the</ins> <a href=
                   37146: "#active"><ins class="diff-new">active document</ins></a>
                   37147: <em><ins class="diff-new">and</ins></em> <ins class="diff-new">that
                   37148: are contiguous with the</ins> <a href="#current1"><ins class=
                   37149: "diff-new">current entry</ins></a> .</li>
                   37150: <li id="resetBCName"><ins class="diff-new">The browsing
                   37151: context's</ins> <a href="#browsing2"><ins class="diff-new">browsing
                   37152: context name</ins></a> <ins class="diff-new">must be
                   37153: unset.</ins></li>
                   37154: </ol>
                   37155: </li>
                   37156: <li id="appcache-history-2"><ins class="diff-new">The user agent
                   37157: must make the</ins> <i><ins class="diff-new">specified
                   37158: entry</ins></i> <ins class="diff-new">'s</ins> <code><ins class=
                   37159: "diff-new">Document</ins></code> <ins class="diff-new">object
                   37160: the</ins> <a href="#active"><ins class="diff-new">active
                   37161: document</ins></a> <ins class="diff-new">of the</ins> <a href=
                   37162: "#browsing1"><ins class="diff-new">browsing context</ins></a>
                   37163: .<ins class="diff-new">(If it is a</ins> <a href=
                   37164: "#top-level"><ins class="diff-new">top-level browsing
                   37165: context</ins></a> ,<ins class="diff-new">this might</ins> <a href=
                   37166: "#appcache-history-1"><ins class="diff-new">change</ins></a>
                   37167: <ins class="diff-new">which</ins> <a href=
                   37168: "#application0"><ins class="diff-new">application cache</ins></a>
                   37169: <ins class="diff-new">it is associated with.)</ins></li>
                   37170: <li><ins class="diff-new">If the</ins> <i><ins class=
                   37171: "diff-new">specified entry</ins></i> <ins class="diff-new">has
                   37172: a</ins> <a href="#browsing2"><ins class="diff-new">browsing context
                   37173: name</ins></a> <ins class="diff-new">stored with it, then the
                   37174: following sub-sub-steps must be run:</ins>
                   37175: <ol>
                   37176: <li><ins class="diff-new">The browsing context's</ins> <a href=
                   37177: "#browsing2"><ins class="diff-new">browsing context name</ins></a>
                   37178: <ins class="diff-new">must be set to the name stored with the
                   37179: specified entry.</ins></li>
                   37180: <li><ins class="diff-new">Any</ins> <a href=
                   37181: "#browsing2"><ins class="diff-new">browsing context name</ins></a>
                   37182: <ins class="diff-new">stored with the entries in the history that
                   37183: are associated with</ins> <code><ins class=
                   37184: "diff-new">Document</ins></code> <ins class="diff-new">objects with
                   37185: the</ins> <a href="#same-origin"><ins class="diff-new">same
                   37186: origin</ins></a> <ins class="diff-new">as the new</ins> <a href=
                   37187: "#active"><ins class="diff-new">active document</ins></a>
                   37188: ,<ins class="diff-new">and that are contiguous with the specified
                   37189: entry, must be cleared.</ins></li>
                   37190: </ol>
                   37191: </li>
                   37192: <li><ins class="diff-new">The user agent must move any properties
                   37193: that have been added to the</ins> <a href="#active"><ins class=
                   37194: "diff-new">active document</ins></a> <ins class="diff-new">'s</ins>
                   37195: <code><ins class="diff-new">Document</ins></code> <ins class=
                   37196: "diff-new">'s</ins> <a href="#list-of2"><ins class="diff-new">list
                   37197: of added properties</ins></a> <ins class="diff-new">to browsing
                   37198: context's default view's</ins> <code><a href="#window"><ins class=
                   37199: "diff-new">Window</ins></a></code> <ins class=
                   37200: "diff-new">object.</ins></li>
                   37201: <li class="big-issue"><ins class="diff-new">unfreeze any timers,
                   37202: intervals, XMLHttpRequests, database transactions, etc</ins></li>
                   37203: </ol>
                   37204: </li>
                   37205: <li>
                   37206: <p><ins class="diff-new">If there are any entries with state
                   37207: objects between the</ins> <a href="#last-activated"><ins class=
                   37208: "diff-new">last activated entry</ins></a> <ins class="diff-new">for
                   37209: the</ins> <code><ins class="diff-new">Document</ins></code>
                   37210: <ins class="diff-new">of the</ins> <i><ins class=
                   37211: "diff-new">specified entry</ins></i> <ins class="diff-new">and
                   37212: the</ins> <i><ins class="diff-new">specified entry</ins></i>
                   37213: <ins class="diff-new">itself (not inclusive), then the user agent
                   37214: must iterate through every entry between that</ins> <a href=
                   37215: "#last-activated"><ins class="diff-new">last activated
                   37216: entry</ins></a> <ins class="diff-new">and the</ins> <i><ins class=
                   37217: "diff-new">specified entry</ins></i> ,<ins class=
                   37218: "diff-new">starting with the entry closest to the</ins> <a href=
                   37219: "#current1"><ins class="diff-new">current entry</ins></a>
                   37220: ,<ins class="diff-new">and ending with the one closest to the</ins>
                   37221: <i><ins class="diff-new">specified entry</ins></i> .<ins class=
                   37222: "diff-new">For each entry, if the entry is a state object, the user
                   37223: agent must</ins> <a href="#activating0"><ins class=
                   37224: "diff-new">activate the state object</ins></a> .</p>
                   37225: </li>
                   37226: <li>
                   37227: <p><ins class="diff-new">If the</ins> <i><ins class=
                   37228: "diff-new">specified entry</ins></i> <ins class="diff-new">is a
                   37229: state object or the first entry for a</ins> <code><ins class=
                   37230: "diff-new">Document</ins></code> ,<ins class="diff-new">the user
                   37231: agent must</ins> <a href="#activating0" title=
                   37232: "activate the state object"><ins class="diff-new">activate that
                   37233: entry</ins></a> .</p>
                   37234: </li>
                   37235: <li>
                   37236: <p><ins class="diff-new">If the</ins> <i><ins class=
                   37237: "diff-new">specified entry</ins></i> <ins class="diff-new">has a
                   37238: URI that differs from the</ins> <a href="#current1"><ins class=
                   37239: "diff-new">current entry</ins></a> <ins class="diff-new">'s only by
                   37240: its fragment identifier, and the two share the same</ins>
                   37241: <code><ins class="diff-new">Document</ins></code> <ins class=
                   37242: "diff-new">object, then</ins> <a href="#firing2"><ins class=
                   37243: "diff-new">fire a simple event</ins></a> <ins class="diff-new">with
                   37244: the name</ins> <code><ins class="diff-new">hashchanged</ins></code>
                   37245: <ins class="diff-new">at</ins> <a href="#the-body1"><ins class=
                   37246: "diff-new">the</ins> <code><ins class="diff-new">body</ins></code>
                   37247: <ins class="diff-new">element</ins></a> ,<ins class="diff-new">and,
                   37248: if the new URI has a fragment identifier,</ins> <a href=
                   37249: "#scroll"><ins class="diff-new">scroll to the fragment
                   37250: identifier</ins></a> .</p>
                   37251: </li>
                   37252: <li>
                   37253: <p><ins class="diff-new">User agents may also update other aspects
                   37254: of the document view when the location changes in this way, for
                   37255: instance the scroll position, values of form fields, etc.</ins></p>
                   37256: </li>
                   37257: <li>
                   37258: <p><ins class="diff-new">The</ins> <a href="#current1"><ins class=
                   37259: "diff-new">current entry</ins></a> <ins class="diff-new">is now
                   37260: the</ins> <i><ins class="diff-new">specified entry</ins></i> .</p>
                   37261: </li>
                   37262: </ol>
                   37263: <p class="big-issue"><ins class="diff-new">how does the changing of
                   37264: the global attributes affect .watch() when seen from other
                   37265: Windows?</ins></p>
                   37266: <h3 id="content-type-sniffing"><span class="secno"><del class=
                   37267: "diff-old">4.9.</del> <ins class="diff-chg">4.10</ins></span>
                   37268: Determining the type of a new resource in a browsing context</h3>
                   37269: <p class="warning">It is imperative that the rules in this section
                   37270: be followed exactly. When <del class="diff-old">two</del>
                   37271: <ins class="diff-chg">a</ins> user <del class="diff-old">agents
                   37272: use</del> <ins class="diff-chg">agent uses</ins> different
                   37273: heuristics for content type <del class="diff-old">detection,</del>
                   37274: <ins class="diff-chg">detection than the server expects,</ins>
                   37275: security problems can occur. For example, if a server believes
                   37276: <ins class="diff-new">that the client will treat</ins> a
                   37277: contributed file <del class="diff-old">to be</del> <ins class=
                   37278: "diff-chg">as</ins> an image (and thus <ins class="diff-new">treat
                   37279: it as</ins> benign), but a Web browser believes the content to be
                   37280: HTML (and thus <del class="diff-old">capable of executing
                   37281: script),</del> <ins class="diff-chg">execute any scripts contained
                   37282: therein),</ins> the end user can be exposed to malicious content,
                   37283: making the user vulnerable to cookie theft attacks and other
                   37284: cross-site scripting attacks.</p>
                   37285: <p>The <dfn id="sniffed" title="Content-Type sniffing">sniffed type
                   37286: of a resource</dfn> must be found as follows:</p>
                   37287: <ol>
                   37288: <li>
                   37289: <p><ins class="diff-new">Let</ins> <var title=""><ins class=
                   37290: "diff-new">official type</ins></var> <ins class="diff-new">be the
                   37291: type given by the</ins> <a href="#content-type8" title=
                   37292: "Content-Type"><ins class="diff-new">Content-Type
                   37293: metadata</ins></a> <ins class="diff-new">for the resource (in
                   37294: lowercase, ignoring any parameters). If there is no such type, jump
                   37295: to the</ins> <em title=
                   37296: "content-type sniffing: unknown type"><a href=
                   37297: "#content-type5"><ins class="diff-new">unknown type</ins></a></em>
                   37298: <ins class="diff-new">step below.</ins></p>
                   37299: </li>
                   37300: <li>
                   37301: <p><ins class="diff-new">If the user agent is configured to
                   37302: strictly obey Content-Type headers for this resource, then jump to
                   37303: the last step in this set of steps.</ins></p>
                   37304: </li>
                   37305: <li>
                   37306: <p>If the resource was fetched over an HTTP <del class=
                   37307: "diff-old">protocol,</del> <ins class="diff-chg">protocol</ins> and
                   37308: there is <del class="diff-old">no HTTP Content-Encoding header, but
                   37309: there is</del> an HTTP Content-Type header and <del class=
                   37310: "diff-old">it has a</del> <ins class="diff-chg">the</ins> value
                   37311: <del class="diff-old">whose</del> <ins class="diff-chg">of the
                   37312: first such header has</ins> bytes <ins class="diff-new">that</ins>
                   37313: exactly match one of the following <del class=
                   37314: "diff-old">three</del> lines:</p>
                   37315: <table>
                   37316: <thead>
                   37317: <tr>
                   37318: <th>Bytes in Hexadecimal</th>
                   37319: <th>Textual representation</th>
                   37320: </tr>
                   37321: </thead>
                   37322: <tbody>
                   37323: <tr>
                   37324: <td>74 65 78 74 2f 70 6c 61 69 6e</td>
                   37325: <td><code title="">text/plain</code></td>
                   37326: </tr>
                   37327: <tr>
                   37328: <td>74 65 78 74 2f 70 6c 61 69 6e 3b 20 63 68 61 72 73 65 74 3d 49
                   37329: 53 4f 2d 38 38 35 39 2d 31</td>
                   37330: <td><code title="">text/plain;&nbsp;charset=ISO-8859-1</code></td>
                   37331: </tr>
                   37332: <tr>
                   37333: <td>74 65 78 74 2f 70 6c 61 69 6e 3b 20 63 68 61 72 73 65 74 3d 69
                   37334: 73 6f 2d 38 38 35 39 2d 31</td>
                   37335: <td><code title="">text/plain;&nbsp;charset=iso-8859-1</code></td>
                   37336: </tr>
                   37337: <tr>
                   37338: <td><ins class="diff-new">74 65 78 74 2f 70 6c 61 69 6e 3b 20 63 68
                   37339: 61 72 73 65 74 3d 55 54 46 2d 38</ins></td>
                   37340: <td><code title=""><ins class=
                   37341: "diff-new">text/plain;&nbsp;charset=UTF-8</ins></code></td>
                   37342: </tr>
                   37343: </tbody>
                   37344: </table>
                   37345: <p>...then jump to the <em title=
                   37346: "content-type sniffing: text or binary"><a href=
                   37347: "#content-type4">text or binary</a></em> section below.</p>
                   37348: </li>
                   37349: <li>
                   37350: <p><del class="diff-old">Let official type be the type given by the
                   37351: Content-Type metadata for the resource (in lowercase, ignoring any
                   37352: parameters). If there is no such type, jump to the unknown type
                   37353: step below.</del> If <var title="">official type</var> is
                   37354: "unknown/unknown" or "application/unknown", jump to the <em title=
                   37355: "content-type sniffing: unknown type"><a href=
                   37356: "#content-type5">unknown type</a></em> step below.</p>
                   37357: </li>
                   37358: <li>
                   37359: <p>If <var title="">official type</var> ends in "+xml", or if it is
                   37360: either "text/xml" or "application/xml", then the <del class=
                   37361: "diff-old">the</del> sniffed type of the resource is <var title=
                   37362: "">official type</var> ; return that and abort these steps.</p>
                   37363: </li>
                   37364: <li>
                   37365: <p>If <var title="">official type</var> is an image type supported
                   37366: by the user agent (e.g. "image/png", "image/gif", "image/jpeg",
                   37367: etc), then jump to the <em title=
                   37368: "content-type sniffing: image"><a href=
                   37369: "#content-type6">images</a></em> section below.</p>
                   37370: </li>
                   37371: <li>
                   37372: <p>If <var title="">official type</var> is "text/html", then jump
                   37373: to the <em title="content-type sniffing: feed or html"><a href=
                   37374: "#content-type7">feed or HTML</a></em> section below.</p>
                   37375: </li>
                   37376: <li>
                   37377: <p><del class="diff-old">Otherwise, the</del> <ins class=
                   37378: "diff-chg">The</ins> sniffed type of the resource is <var title=
                   37379: "">official type</var> .</p>
                   37380: </li>
                   37381: </ol>
                   37382: <h4 id="content-type0"><span class="secno"><del class=
                   37383: "diff-old">4.9.1.</del> <ins class="diff-chg">4.10.1</ins></span>
                   37384: <dfn id="content-type4">Content-Type sniffing: text or
                   37385: binary</dfn></h4>
                   37386: <ol>
                   37387: <li>
                   37388: <p>The user agent may wait for 512 or more bytes of the resource to
                   37389: be available.</p>
                   37390: </li>
                   37391: <li>
                   37392: <p>Let <var title="">n</var> be the smaller of either 512 or the
                   37393: number of bytes already available.</p>
                   37394: </li>
                   37395: <li>
                   37396: <p>If <var title="">n</var> is 4 or more, and the first bytes of
                   37397: the file match one of the following byte sets:</p>
                   37398: <table>
                   37399: <thead>
                   37400: <tr>
                   37401: <th>Bytes in Hexadecimal</th>
                   37402: <th>Description</th>
                   37403: </tr>
                   37404: </thead>
                   37405: <tbody>
                   37406: <tr>
                   37407: <td>FE FF</td>
                   37408: <td>UTF-16BE BOM <del class="diff-old">or UTF-32LE BOM</del></td>
                   37409: </tr>
                   37410: <tr>
                   37411: <td>FF FE</td>
                   37412: <td>UTF-16LE BOM</td>
                   37413: </tr>
                   37414: <tr>
                   37415: <td><del class="diff-old">00 00 FE FF UTF-32BE BOM</del> EF BB
                   37416: BF</td>
                   37417: <td>UTF-8 BOM</td>
                   37418: </tr>
                   37419: </tbody>
                   37420: </table>
                   37421: <p>...then the sniffed type of the resource is "text/plain".
                   37422: <del class="diff-old">Should we remove UTF-32 from the
                   37423: above?</del></p>
                   37424: </li>
                   37425: <li>
                   37426: <p>Otherwise, if any of the first <var title="">n</var> bytes of
                   37427: the resource are in one of the following byte ranges:</p>
                   37428: <ul class="brief">
                   37429: <li>0x00 - 0x08</li>
                   37430: <li>0x0E - 0x1A</li>
                   37431: <li>0x1C - 0x1F</li>
                   37432: </ul>
                   37433: <p>...then the sniffed type of the resource is
                   37434: "application/octet-stream".</p>
                   37435: <p class="big-issue">maybe we should invoke the "Content-Type
                   37436: sniffing: image" section now, falling back on
                   37437: "application/octet-stream".</p>
                   37438: </li>
                   37439: <li>
                   37440: <p>Otherwise, the sniffed type of the resource is "text/plain".</p>
                   37441: </li>
                   37442: </ol>
                   37443: <h4 id="content-type1"><span class="secno"><del class=
                   37444: "diff-old">4.9.2.</del> <ins class="diff-chg">4.10.2</ins></span>
                   37445: <dfn id="content-type5">Content-Type sniffing: unknown
                   37446: type</dfn></h4>
                   37447: <ol>
                   37448: <li>
                   37449: <p>The user agent may wait for 512 or more bytes of the resource to
                   37450: be available.</p>
                   37451: </li>
                   37452: <li>
                   37453: <p>Let <var title="">stream length</var> be the smaller of either
                   37454: 512 or the number of bytes already available.</p>
                   37455: </li>
                   37456: <li>
                   37457: <p>For each row in the table below:</p>
                   37458: <dl class="switch">
                   37459: <dt>If the row has no " <em>WS</em> " bytes:</dt>
                   37460: <dd>
                   37461: <ol>
                   37462: <li>Let <var title="">pattern length</var> be the length of the
                   37463: pattern (number of bytes described by the cell in the second column
                   37464: of the row).</li>
                   37465: <li>If <var title="">pattern length</var> is smaller than
                   37466: <var title="">stream length</var> then skip this row.</li>
                   37467: <li>Apply the "and" operator to the first <var title="">pattern
                   37468: length</var> bytes of the resource and the given mask (the bytes in
                   37469: the cell of first column of that row), and let the result be the
                   37470: <var title="">data</var> .</li>
                   37471: <li>If the bytes of the <var title="">data</var> matches the given
                   37472: pattern bytes exactly, then the sniffed type of the resource is the
                   37473: type given in the cell of the third column in that row; abort these
                   37474: steps.</li>
                   37475: </ol>
                   37476: </dd>
                   37477: <dt>If the row has a " <em>WS</em> " byte:</dt>
                   37478: <dd>
                   37479: <ol>
                   37480: <li>
                   37481: <p>Let <var title="">index <sub>pattern</sub></var> be an index
                   37482: into the mask and pattern byte strings of the row.</p>
                   37483: </li>
                   37484: <li>
                   37485: <p>Let <var title="">index <sub>stream</sub></var> be an index into
                   37486: the byte stream being examined.</p>
                   37487: </li>
                   37488: <li>
                   37489: <p><em>Loop</em> : If <var title="">index <sub>stream</sub></var>
                   37490: points beyond the end of the byte stream, then this row doesn't
                   37491: match, skip this row.</p>
                   37492: </li>
                   37493: <li>
                   37494: <p>Examine the <var title="">index <sub>stream</sub></var> th byte
                   37495: of the byte stream as follows:</p>
                   37496: <dl class="switch">
                   37497: <dt>If the <var title="">index <sub>stream</sub></var> th byte of
                   37498: the pattern is a normal hexadecimal byte and not a " <em>WS</em> "
                   37499: byte:</dt>
                   37500: <dd>
                   37501: <p>If the "and" operator, applied to the <var title="">index
                   37502: <sub>stream</sub></var> th byte of the stream and the <var title=
                   37503: "">index <sub>pattern</sub></var> th byte of the mask, yield a
                   37504: value different that the <var title="">index
                   37505: <sub>pattern</sub></var> th byte of the pattern, then skip this
                   37506: row.</p>
                   37507: <p>Otherwise, increment <var title="">index
                   37508: <sub>pattern</sub></var> to the next byte in the mask and pattern
                   37509: and <var title="">index <sub>stream</sub></var> to the next byte in
                   37510: the byte stream.</p>
                   37511: </dd>
                   37512: <dt><del class="diff-old">Otherwies,</del> <ins class=
                   37513: "diff-chg">Otherwise,</ins> if the <var title="">index
                   37514: <sub>stream</sub></var> th byte of the pattern is a " <em>WS</em> "
                   37515: byte:</dt>
                   37516: <dd>
                   37517: <p>" <em>WS</em> " means "whitespace", and allows insignificant
                   37518: whitespace to be skipped when sniffing for a type signature.</p>
                   37519: <p>If the <var title="">index <sub>stream</sub></var> th byte of
                   37520: the stream is one of 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0B (ASCII
                   37521: VT), 0x0C (ASCII FF), 0x0D (ASCII CR), or 0x20 (ASCII space), then
                   37522: increment only the <var title="">index <sub>stream</sub></var> to
                   37523: the next byte in the byte stream.</p>
                   37524: <p>Otherwise, increment only the <var title="">index
                   37525: <sub>pattern</sub></var> to the next byte in the mask and
                   37526: pattern.</p>
                   37527: </dd>
                   37528: </dl>
                   37529: </li>
                   37530: <li>
                   37531: <p>If <var title="">index <sub>pattern</sub></var> does not point
                   37532: beyond the end of the mask and pattern byte strings, then jump back
                   37533: to the <em>loop</em> step in this algorithm.</p>
                   37534: </li>
                   37535: <li>
                   37536: <p>Otherwise, the sniffed type of the resource is the type given in
                   37537: the cell of the third column in that row; abort these steps.</p>
                   37538: </li>
                   37539: </ol>
                   37540: </dd>
                   37541: </dl>
                   37542: </li>
                   37543: <li>
                   37544: <p>As a last-ditch effort, jump to the <a href="#content-type4"
                   37545: title="content-type sniffing: text or binary">text or binary</a>
                   37546: section.</p>
                   37547: </li>
                   37548: </ol>
                   37549: <table>
                   37550: <thead>
                   37551: <tr>
                   37552: <th colspan="2">Bytes in Hexadecimal</th>
                   37553: <th rowspan="2">Sniffed type</th>
                   37554: <th rowspan="2">Comment</th>
                   37555: </tr>
                   37556: <tr>
                   37557: <th>Mask</th>
                   37558: <th>Pattern</th>
                   37559: </tr>
                   37560: </thead>
                   37561: <tbody>
                   37562: <tr>
                   37563: <td>FF FF DF DF DF DF DF DF DF FF DF DF DF DF</td>
                   37564: <td>3C 21 44 4F 43 54 59 50 45 20 48 54 4D 4C</td>
                   37565: <td>text/html</td>
                   37566: <td>The string " <code title="">&lt;!DOCTYPE HTML</code> " in
                   37567: US-ASCII or compatible encodings, case-insensitively.</td>
                   37568: </tr>
                   37569: <tr>
                   37570: <td>FF FF DF DF DF DF</td>
                   37571: <td><em>WS</em> 3C 48 54 4D 4C</td>
                   37572: <td>text/html</td>
                   37573: <td>The string " <code title="">&lt;HTML</code> " in US-ASCII or
                   37574: compatible encodings, case-insensitively, possibly with leading
                   37575: spaces.</td>
                   37576: </tr>
                   37577: <tr>
                   37578: <td>FF FF DF DF DF DF</td>
                   37579: <td><em>WS</em> 3C 48 45 41 44</td>
                   37580: <td>text/html</td>
                   37581: <td>The string " <code title="">&lt;HEAD</code> " in US-ASCII or
                   37582: compatible encodings, case-insensitively, possibly with leading
                   37583: spaces.</td>
                   37584: </tr>
                   37585: <tr>
                   37586: <td>FF FF DF DF DF DF DF DF</td>
                   37587: <td><em>WS</em> 3C 53 43 52 49 50 54</td>
                   37588: <td>text/html</td>
                   37589: <td>The string " <code title="">&lt;SCRIPT</code> " in US-ASCII or
                   37590: compatible encodings, case-insensitively, possibly with leading
                   37591: spaces.</td>
                   37592: </tr>
                   37593: <tr>
                   37594: <td>FF FF FF FF FF</td>
                   37595: <td>25 50 44 46 2D</td>
                   37596: <td>application/pdf</td>
                   37597: <td>The string " <code title="">%PDF-</code> ", the PDF
                   37598: signature.</td>
                   37599: </tr>
                   37600: <tr>
                   37601: <td>FF FF FF FF FF FF FF FF FF FF FF</td>
                   37602: <td>25 21 50 53 2D 41 64 6F 62 65 2D</td>
                   37603: <td>application/postscript</td>
                   37604: <td>The string " <code title="">%!PS-Adobe-</code> ", the
                   37605: PostScript signature.</td>
                   37606: </tr>
                   37607: </tbody>
                   37608: <tbody>
                   37609: <tr>
                   37610: <td>FF FF FF FF FF FF</td>
                   37611: <td>47 49 46 38 37 61</td>
                   37612: <td>image/gif</td>
                   37613: <td>The string " <code title="">GIF87a</code> ", a GIF
                   37614: signature.</td>
                   37615: </tr>
                   37616: <tr>
                   37617: <td>FF FF FF FF FF FF</td>
                   37618: <td>47 49 46 38 39 61</td>
                   37619: <td>image/gif</td>
                   37620: <td>The string " <code title="">GIF89a</code> ", a GIF
                   37621: signature.</td>
                   37622: </tr>
                   37623: <tr>
                   37624: <td>FF FF FF FF FF FF FF FF</td>
                   37625: <td>89 50 4E 47 0D 0A 1A 0A</td>
                   37626: <td>image/png</td>
                   37627: <td>The PNG signature.</td>
                   37628: </tr>
                   37629: <tr>
                   37630: <td>FF FF FF</td>
                   37631: <td>FF D8 FF</td>
                   37632: <td>image/jpeg</td>
                   37633: <td>A JPEG SOI marker followed by the first byte of another
                   37634: marker.</td>
                   37635: </tr>
                   37636: <tr>
                   37637: <td>FF FF</td>
                   37638: <td>42 4D</td>
                   37639: <td>image/bmp</td>
                   37640: <td>The string " <code title="">BM</code> ", a BMP signature.</td>
                   37641: </tr>
                   37642: <tr>
                   37643: <td><ins class="diff-new">FF FF FF FF</ins></td>
                   37644: <td><ins class="diff-new">00 00 01 00</ins></td>
                   37645: <td><ins class="diff-new">image/vnd.microsoft.icon</ins></td>
                   37646: <td><ins class="diff-new">A 0 word following by a 1 word, a Windows
                   37647: Icon file format signature.</ins></td>
                   37648: </tr>
                   37649: </tbody>
                   37650: </table>
                   37651: <p>User agents may support further types if desired, by implicitly
                   37652: adding to the above table. However, user agents should not use any
                   37653: other patterns for types already mentioned in the table above, as
                   37654: this could then be used for privilege escalation (where, e.g., a
                   37655: server uses the above table to determine that content is not HTML
                   37656: and thus safe from XSS attacks, but then a user agent detects it as
                   37657: HTML anyway and allows script to execute).</p>
                   37658: <h4 id="content-type2"><span class="secno"><del class=
                   37659: "diff-old">4.9.3.</del> <ins class="diff-chg">4.10.3</ins></span>
                   37660: <dfn id="content-type6">Content-Type sniffing: image</dfn></h4>
                   37661: <p>If the first bytes of the file match one of the byte sequences
                   37662: in the first columns of the following table, then the sniffed type
                   37663: of the resource is the type given in the corresponding cell in the
                   37664: second column on the same row:</p>
                   37665: <table>
                   37666: <thead>
                   37667: <tr>
                   37668: <th>Bytes in Hexadecimal</th>
                   37669: <th>Sniffed type</th>
                   37670: <th>Comment</th>
                   37671: </tr>
                   37672: </thead>
                   37673: <tbody>
                   37674: <tr>
                   37675: <td>47 49 46 38 37 61</td>
                   37676: <td>image/gif</td>
                   37677: <td>The string " <code title="">GIF87a</code> ", a GIF
                   37678: signature.</td>
                   37679: </tr>
                   37680: <tr>
                   37681: <td>47 49 46 38 39 61</td>
                   37682: <td>image/gif</td>
                   37683: <td>The string " <code title="">GIF89a</code> ", a GIF
                   37684: signature.</td>
                   37685: </tr>
                   37686: <tr>
                   37687: <td>89 50 4E 47 0D 0A 1A 0A</td>
                   37688: <td>image/png</td>
                   37689: <td>The PNG signature.</td>
                   37690: </tr>
                   37691: <tr>
                   37692: <td>FF D8 FF</td>
                   37693: <td>image/jpeg</td>
                   37694: <td>A JPEG SOI marker followed by the first byte of another
                   37695: marker.</td>
                   37696: </tr>
                   37697: <tr>
                   37698: <td>42 4D</td>
                   37699: <td>image/bmp</td>
                   37700: <td>The string " <code title="">BM</code> ", a BMP signature.</td>
                   37701: </tr>
                   37702: <tr>
                   37703: <td><ins class="diff-new">00 00 01 00</ins></td>
                   37704: <td><ins class="diff-new">image/vnd.microsoft.icon</ins></td>
                   37705: <td><ins class="diff-new">A 0 word following by a 1 word, a Windows
                   37706: Icon file format signature.</ins></td>
                   37707: </tr>
                   37708: </tbody>
                   37709: </table>
                   37710: <p>User agents must ignore any rows for image types that they do
                   37711: not support.</p>
                   37712: <p>Otherwise, the <i>sniffed type</i> of the resource is the same
                   37713: as its <var title="">official type</var> .</p>
                   37714: <h4 id="content-type3"><span class="secno"><del class=
                   37715: "diff-old">4.9.4.</del> <ins class="diff-chg">4.10.4</ins></span>
                   37716: <dfn id="content-type7">Content-Type sniffing: feed or
                   37717: HTML</dfn></h4>
                   37718: <ol>
                   37719: <li>
                   37720: <p>The user agent may wait for 512 or more bytes of the resource to
                   37721: be available.</p>
                   37722: </li>
                   37723: <li>
                   37724: <p>Let <var title="">s</var> be the stream of bytes, and let
                   37725: <span><var title="">s</var> [ <var title="">i</var> ]</span>
                   37726: represent the byte in <var title="">s</var> with position
                   37727: <var title="">i</var> , treating <var title="">s</var> as
                   37728: zero-indexed (so the first byte is at <span><var title="">i</var>
                   37729: =0</span> ).</p>
                   37730: </li>
                   37731: <li>
                   37732: <p>If at any point this algorithm requires the user agent to
                   37733: determine the value of a byte in <var title="">s</var> which is not
                   37734: yet available, or which is past the first 512 bytes of the
                   37735: resource, or which is beyond the end of the resource, the user
                   37736: agent must stop this algorithm, and assume that the sniffed type of
                   37737: the resource is "text/html".</p>
                   37738: <p class="note">User agents are allowed, by the first step of this
                   37739: algorithm, to wait until the first 512 bytes of the resource are
                   37740: available.</p>
                   37741: </li>
                   37742: <li>
                   37743: <p>Initialise <var title="">pos</var> to 0.</p>
                   37744: </li>
                   37745: <li>
                   37746: <p><ins class="diff-new">If</ins> <span><var title=""><ins class=
                   37747: "diff-new">s</ins></var> <ins class="diff-new">[0]</ins></span>
                   37748: <ins class="diff-new">is 0xEF,</ins> <span><var title=
                   37749: ""><ins class="diff-new">s</ins></var> <ins class=
                   37750: "diff-new">[1]</ins></span> <ins class="diff-new">is 0xBB,
                   37751: and</ins> <span><var title=""><ins class="diff-new">s</ins></var>
                   37752: <ins class="diff-new">[2]</ins></span> <ins class="diff-new">is
                   37753: 0xBF, then set</ins> <var title=""><ins class=
                   37754: "diff-new">pos</ins></var> <ins class="diff-new">to 3. (This skips
                   37755: over a leading UTF-8 BOM, if any.)</ins></p>
                   37756: </li>
                   37757: <li>
                   37758: <p><i><ins class="diff-new">Loop start:</ins></i> Examine
                   37759: <span><var title="">s</var> [ <var title="">pos</var> ]</span>
                   37760: .</p>
                   37761: <dl class="switch">
                   37762: <dt>If it is 0x09 (ASCII tab), 0x20 (ASCII space), 0x0A (ASCII LF),
                   37763: or 0x0D (ASCII CR)</dt>
                   37764: <dd>Increase <var title="">pos</var> by 1 and repeat this
                   37765: step.</dd>
                   37766: <dt>If it is 0x3C (ASCII " <code title="">&lt;</code> ")</dt>
                   37767: <dd>Increase <var title="">pos</var> by 1 and go to the next
                   37768: step.</dd>
                   37769: <dt>If it is anything else</dt>
                   37770: <dd>The sniffed type of the resource is "text/html". Abort these
                   37771: steps.</dd>
                   37772: </dl>
                   37773: </li>
                   37774: <li>
                   37775: <p>If the bytes with positions <var title="">pos</var> to
                   37776: <span><var title="">pos</var> +2</span> in <var title="">s</var>
                   37777: are exactly equal to 0x21, 0x2D, 0x2D respectively (ASCII for "
                   37778: <code title="">!--</code> "), then:</p>
                   37779: <ol>
                   37780: <li>Increase <var title="">pos</var> by 3.</li>
                   37781: <li>If the bytes with positions <span><var title=
                   37782: "">pos</var></span> to <span><var title="">pos</var> +2</span> in
                   37783: <var title="">s</var> are exactly equal to 0x2D, 0x2D, 0x3E
                   37784: respectively (ASCII for " <code title="">--&gt;</code> "), then
                   37785: increase <var title="">pos</var> by 3 and jump back to the previous
                   37786: step <del class="diff-old">(step 5)</del> <ins class=
                   37787: "diff-chg">(the step labeled</ins> <i><ins class="diff-chg">loop
                   37788: start</ins></i> <ins class="diff-chg">)</ins> in the overall
                   37789: algorithm in this section.</li>
                   37790: <li>Otherwise, increase <var title="">pos</var> by 1.</li>
                   37791: <li><del class="diff-old">Otherwise, return</del> <ins class=
                   37792: "diff-chg">Return</ins> to step 2 in these substeps.</li>
                   37793: </ol>
                   37794: </li>
                   37795: <li>
                   37796: <p>If <span><var title="">s</var> [ <var title="">pos</var>
                   37797: ]</span> is 0x21 (ASCII " <code title="">!</code> "):</p>
                   37798: <ol>
                   37799: <li>Increase <var title="">pos</var> by 1.</li>
                   37800: <li>If <span><var title="">s</var> [ <var title="">pos</var>
                   37801: ]</span> equal 0x3E, then increase <var title="">pos</var> by 1 and
                   37802: jump back to <ins class="diff-new">the</ins> step <del class=
                   37803: "diff-old">5</del> <ins class="diff-chg">labeled</ins>
                   37804: <i><ins class="diff-chg">loop start</ins></i> in the overall
                   37805: algorithm in this section.</li>
                   37806: <li>Otherwise, return to step 1 in these substeps.</li>
                   37807: </ol>
                   37808: </li>
                   37809: <li>
                   37810: <p>If <span><var title="">s</var> [ <var title="">pos</var>
                   37811: ]</span> is 0x3F (ASCII " <code title="">?</code> "):</p>
                   37812: <ol>
                   37813: <li>Increase <var title="">pos</var> by 1.</li>
                   37814: <li>If <span><var title="">s</var> [ <var title="">pos</var>
                   37815: ]</span> and <span><var title="">s</var> [ <var title="">pos</var>
                   37816: +1]</span> equal 0x3F and 0x3E respectively, then increase
                   37817: <var title="">pos</var> by 1 and jump back to <ins class=
                   37818: "diff-new">the</ins> step <del class="diff-old">5</del> <ins class=
                   37819: "diff-chg">labeled</ins> <i><ins class="diff-chg">loop
                   37820: start</ins></i> in the overall algorithm in this section.</li>
                   37821: <li>Otherwise, return to step 1 in these substeps.</li>
                   37822: </ol>
                   37823: </li>
                   37824: <li>
                   37825: <p>Otherwise, if the bytes in <var title="">s</var> starting at
                   37826: <var title="">pos</var> match any of the sequences of bytes in the
                   37827: first column of the following table, then the user agent must
                   37828: follow the steps given in the corresponding cell in the second
                   37829: column of the same row.</p>
                   37830: <table>
                   37831: <thead>
                   37832: <tr>
                   37833: <th>Bytes in Hexadecimal</th>
                   37834: <th>Requirement</th>
                   37835: <th>Comment</th>
                   37836: </tr>
                   37837: </thead>
                   37838: <tbody>
                   37839: <tr>
                   37840: <td>72 73 73</td>
                   37841: <td>The sniffed type of the resource is "application/rss+xml";
                   37842: abort these steps</td>
                   37843: <td>The three ASCII characters " <code title="">rss</code> "</td>
                   37844: </tr>
                   37845: <tr>
                   37846: <td>66 65 65 64</td>
                   37847: <td>The sniffed type of the resource is "application/atom+xml";
                   37848: abort these steps</td>
                   37849: <td>The four ASCII characters " <code title="">feed</code> "</td>
                   37850: </tr>
                   37851: <tr>
                   37852: <td>72 64 66 3A 52 44 46</td>
                   37853: <td>Continue to the next step in this algorithm</td>
                   37854: <td>The ASCII characters " <code title="">rdf:RDF</code> "</td>
                   37855: </tr>
                   37856: </tbody>
                   37857: </table>
                   37858: <p>If none of the byte sequences above match the bytes in
                   37859: <var title="">s</var> starting at <var title="">pos</var> , then
                   37860: the sniffed type of the resource is "text/html". Abort these
                   37861: steps.</p>
                   37862: </li>
                   37863: <li>
                   37864: <p class="big-issue">If, before the next "&gt; ", you find two
                   37865: xmlns* attributes with http://www.w3.org/1999/02/22-rdf-syntax-ns#
                   37866: and http://purl.org/rss/1.0/ as the namespaces, then the sniffed
                   37867: type of the resource is "application/rss+xml", abort these steps.
                   37868: (maybe we only need to check for http://purl.org/rss/1.0/
                   37869: actually)</p>
                   37870: </li>
                   37871: <li>
                   37872: <p>Otherwise, the sniffed type of the resource is "text/html".</p>
                   37873: </li>
                   37874: </ol>
                   37875: <p class="note">For efficiency <del class="diff-old">reaons,</del>
                   37876: <ins class="diff-chg">reasons,</ins> implementations may wish to
                   37877: implement this algorithm and the algorithm for detecting the
                   37878: character encoding of HTML documents in parallel.</p>
                   37879: <h4 id="content-type"><span class="secno"><del class=
                   37880: "diff-old">4.9.5.</del> <ins class="diff-chg">4.10.5</ins></span>
                   37881: Content-Type metadata</h4>
                   37882: <p>What explicit <dfn id="content-type8" title=
                   37883: "Content-Type">Content-Type metadata</dfn> is associated with the
                   37884: resource (the resource's type information) depends on the protocol
                   37885: that was used to fetch the resource.</p>
                   37886: <p>For HTTP resources, only the <ins class="diff-new">first</ins>
                   37887: Content-Type HTTP <del class="diff-old">header</del> <ins class=
                   37888: "diff-chg">header, if any,</ins> contributes any <del class=
                   37889: "diff-old">data;</del> <ins class="diff-chg">type
                   37890: information;</ins> the explicit type of the resource is then the
                   37891: value of that header, interpreted as described by the HTTP
                   37892: specifications. If the Content-Type HTTP header is present but
                   37893: <del class="diff-old">it</del> <ins class="diff-chg">the value of
                   37894: the first such header</ins> cannot be interpreted as described by
                   37895: the HTTP specifications (e.g. because its value doesn't contain a
                   37896: U+002F SOLIDUS ('/') character), then the resource has no type
                   37897: <del class="diff-old">information.</del> <ins class=
                   37898: "diff-chg">information (even if there are multiple Content-Type
                   37899: HTTP headers and one of the other ones is syntactically
                   37900: correct).</ins> <a href="#references">[HTTP]</a></p>
                   37901: <p>For resources fetched from the <del class=
                   37902: "diff-old">filesystem,</del> <ins class="diff-chg">file
                   37903: system,</ins> user agents should use platform-specific conventions,
                   37904: e.g. operating system extension/type mappings.</p>
                   37905: <p>Extensions must not be used for determining resource types for
                   37906: resources fetched over HTTP.</p>
                   37907: <p>For resources fetched over most other protocols, e.g. FTP, there
                   37908: is no type information.</p>
                   37909: <p>The <dfn id="algorithm4">algorithm for extracting an encoding
                   37910: from a Content-Type</dfn> , given a string <var title="">s</var> ,
                   37911: is as follows. It either returns <del class="diff-old">a</del>
                   37912: <ins class="diff-chg">an</ins> encoding or nothing.</p>
                   37913: <ol>
                   37914: <li>
                   37915: <p><del class="diff-old">Skip</del> <ins class="diff-chg">Find the
                   37916: first seven</ins> characters in <var title="">s</var> <del class=
                   37917: "diff-old">up to and including the first U+003B SEMICOLON ( ; )
                   37918: character. Skip any U+0009, U+000A, U+000B, U+000C, U+000D, or
                   37919: U+0020 characters (i.e. spaces)</del> that <del class=
                   37920: "diff-old">immediately follow</del> <ins class="diff-chg">are a
                   37921: case-insensitive match for</ins> the <del class=
                   37922: "diff-old">semicolon.</del> <ins class="diff-chg">word
                   37923: 'charset'.</ins> If <del class="diff-old">the next six characters
                   37924: are not 'charset',</del> <ins class="diff-chg">no such match is
                   37925: found,</ins> return nothing.</p>
                   37926: </li>
                   37927: <li>
                   37928: <p>Skip any U+0009, U+000A, U+000B, U+000C, U+000D, or U+0020
                   37929: characters that immediately follow the word 'charset' (there might
                   37930: not be any).</p>
                   37931: </li>
                   37932: <li>
                   37933: <p>If the next character is not a U+003D EQUALS SIGN ('='), return
                   37934: nothing.</p>
                   37935: </li>
                   37936: <li>
                   37937: <p>Skip any U+0009, U+000A, U+000B, U+000C, U+000D, or U+0020
                   37938: characters that immediately follow the <del class=
                   37939: "diff-old">word</del> equals sign (there might not be any).</p>
                   37940: </li>
                   37941: <li>
                   37942: <p>Process the next character as follows:</p>
                   37943: <dl class="switch">
                   37944: <dt>If it is a U+0022 QUOTATION MARK ('"') and there is a later
                   37945: U+0022 QUOTATION MARK ('"') in <var title="">s</var> <del class=
                   37946: "diff-old">Return string between the two quotation
                   37947: marks.</del></dt>
                   37948: <dt>If it is a U+0027 APOSTROPHE ("'") and there is a later U+0027
                   37949: APOSTROPHE ("'") in <var title="">s</var></dt>
                   37950: <dd>
                   37951: <p>Return the string between <ins class="diff-new">this character
                   37952: and</ins> the <del class="diff-old">two apostrophes.</del>
                   37953: <ins class="diff-chg">next earliest occurrence of this
                   37954: character.</ins></p>
                   37955: </dd>
                   37956: <dt>If it is an unmatched U+0022 QUOTATION MARK ('"')</dt>
                   37957: <dt>If it is an unmatched U+0027 APOSTROPHE ("'")</dt>
                   37958: <dt><ins class="diff-new">If there is no next character</ins></dt>
                   37959: <dd>
                   37960: <p>Return nothing.</p>
                   37961: </dd>
                   37962: <dt>Otherwise</dt>
                   37963: <dd>
                   37964: <p>Return the string from this character to the first U+0009,
                   37965: U+000A, U+000B, U+000C, U+000D, <ins class="diff-new">U+0020,</ins>
                   37966: or <del class="diff-old">U+0020</del> <ins class=
                   37967: "diff-chg">U+003B</ins> character or the end of <var title=
                   37968: "">s</var> , whichever comes first.</p>
                   37969: </dd>
                   37970: </dl>
                   37971: </li>
                   37972: </ol>
                   37973: <p class="note"><ins class="diff-chg">The above algorithm is a
                   37974: willful violation of the HTTP specification.</ins> <a href=
                   37975: "#references"><ins class="diff-chg">[RFC2616]</ins></a></p>
                   37976: <h3 id="structured"><span class="secno"><del class=
                   37977: "diff-old">4.10.</del> <ins class="diff-chg">4.11</ins></span>
                   37978: <del class="diff-old">Client-side session and persistent</del>
                   37979: <ins class="diff-chg">Structured client-side</ins> storage
                   37980: <del class="diff-old">of</del></h3>
                   37981: <h4 id="storage"><span class="secno"><ins class=
                   37982: "diff-chg">4.11.1</ins></span> <ins class="diff-chg">Storing</ins>
                   37983: name/value pairs</h4>
                   37984: <h5 id="introduction2"><span class="secno"><del class=
                   37985: "diff-old">4.10.1.</del> <ins class=
                   37986: "diff-chg">4.11.1.1.</ins></span> Introduction</h5>
                   37987: <p><em>This section is non-normative.</em></p>
                   37988: <p>This specification introduces two related mechanisms, similar to
                   37989: HTTP session cookies <a href="#references">[RFC2965]</a> , for
                   37990: storing structured data on the client side.</p>
                   37991: <p>The first is designed for scenarios where the user is carrying
                   37992: out a single transaction, but could be carrying out multiple
                   37993: transactions in different windows at the same time.</p>
                   37994: <p>Cookies don't really handle this case well. For example, a user
                   37995: could be buying plane tickets in two different windows, using the
                   37996: same site. If the site used cookies to keep track of which ticket
                   37997: the user was buying, then as the user clicked from page to page in
                   37998: both windows, the ticket currently being purchased would "leak"
                   37999: from one window to the other, potentially causing the user to buy
                   38000: two tickets for the same flight without really noticing.</p>
                   38001: <p>To address this, this specification introduces the <code title=
                   38002: "dom-sessionStorage"><a href=
                   38003: "#sessionstorage">sessionStorage</a></code> DOM attribute. Sites
                   38004: can add data to the session storage, and it will be accessible to
                   38005: any page from <del class="diff-old">that origin</del> <ins class=
                   38006: "diff-chg">the same site</ins> opened in that window.</p>
                   38007: <div class="example">
                   38008: <p>For example, a page could have a checkbox that the user ticks to
                   38009: indicate that he wants insurance:</p>
                   38010: <pre>
                   38011: &lt;label&gt;
                   38012:  &lt;input type="checkbox" onchange="sessionStorage.insurance = checked"&gt;
                   38013:  I want insurance on this trip.
                   38014: &lt;/label&gt;
                   38015: </pre>
                   38016: <p>A later page could then check, from script, whether the user had
                   38017: checked the checkbox or not:</p>
                   38018: <pre>
                   38019: if
                   38020: (sessionStorage.insurance)
                   38021: {
                   38022: ...
                   38023: }
                   38024: </pre>
                   38025: <p>If the user had multiple windows opened on the site, each one
                   38026: would have its own individual copy of the session storage
                   38027: object.</p>
                   38028: </div>
                   38029: <p>The second storage mechanism is designed for storage that spans
                   38030: multiple windows, and lasts beyond the current session. In
                   38031: particular, Web applications may wish to store megabytes of user
                   38032: data, such as entire user-authored documents or a user's mailbox,
                   38033: on the <del class="diff-old">clientside</del> <ins class=
                   38034: "diff-chg">client side</ins> for performance reasons.</p>
                   38035: <p>Again, cookies do not handle this case well, because they are
                   38036: transmitted with every request.</p>
                   38037: <p>The <code title="dom-localStorage"><del class=
                   38038: "diff-old">globalStorage</del> <a href="#localstorage"><ins class=
                   38039: "diff-chg">localStorage</ins></a></code> DOM attribute is used to
                   38040: access a page's <del class="diff-old">global</del> <ins class=
                   38041: "diff-chg">local</ins> storage area.</p>
                   38042: <div class="example">
                   38043: <p>The site at example.com can display a count of how many times
                   38044: the user has loaded its page by putting the following at the bottom
                   38045: of its page:</p>
                   38046: <pre>
                   38047: &lt;p&gt;
                   38048:   You have viewed this page
                   38049:   &lt;span id="count"&gt;an untold number of&lt;/span&gt;
                   38050:   time(s).
                   38051: &lt;/p&gt;
                   38052: &lt;script&gt;
                   38053: <del class="diff-old">  if (!globalStorage.pageLoadCount)
                   38054:     globalStorage.pageLoadCount = 0;
                   38055:   globalStorage.pageLoadCount = parseInt(globalStorage.pageLoadCount, 10) + 1;
                   38056:   document.getElementById('count').textContent = globalStorage.pageLoadCount;
                   38057: </del>
                   38058: <ins class="diff-chg">  if (!localStorage.pageLoadCount)
                   38059:     localStorage.pageLoadCount = 0;
                   38060:   localStorage.pageLoadCount = parseInt(localStorage.pageLoadCount, 10) + 1;
                   38061:   document.getElementById('count').textContent = localStorage.pageLoadCount;
                   38062: </ins>
                   38063: &lt;/script&gt;
                   38064: </pre></div>
                   38065: <p>Each <del class="diff-old">origin</del> <ins class=
                   38066: "diff-chg">site</ins> has its own separate storage area.</p>
                   38067: <p>Storage areas (both session storage and <del class=
                   38068: "diff-old">global</del> <ins class="diff-chg">local</ins> storage)
                   38069: store strings. To store structured data in a storage area, you must
                   38070: first convert it to a string.</p>
                   38071: <h5 id="the-storage"><span class="secno"><del class=
                   38072: "diff-old">4.10.2.</del> <ins class=
                   38073: "diff-chg">4.11.1.2.</ins></span> The <code><a href=
                   38074: "#storage0">Storage</a></code> interface <del class=
                   38075: "diff-old">interface { readonly attribute unsigned long ; DOMString
                   38076: (in unsigned long index); DOMString (in DOMString key); void (in
                   38077: DOMString key, in DOMString data); void (in DOMString
                   38078: key);</del></h5>
                   38079: <pre class="idl">
                   38080: interface <dfn id="storage0">Storage</dfn> {
                   38081: <ins class="diff-chg">  readonly attribute unsigned long <a href=
                   38082: "#length9" title="dom-Storage-length">length</a>;
                   38083:   [IndexGetter] DOMString <a href="#keyn" title=
                   38084: "dom-Storage-key">key</a>(in unsigned long index);
                   38085:   [NameGetter] DOMString <a href="#getitem" title=
                   38086: "dom-Storage-getItem">getItem</a>(in DOMString key);
                   38087:   [NameSetter] void <a href="#setitem" title=
                   38088: "dom-Storage-setItem">setItem</a>(in DOMString key, in DOMString data);
                   38089:   [XXX] void <a href="#removeitem" title=
                   38090: "dom-Storage-removeItem">removeItem</a>(in DOMString key); 
                   38091:   void <a href="#clear0" title="dom-Storage-clear">clear</a>();
                   38092: </ins>
                   38093: };
                   38094: </pre>
                   38095: <p>Each <code><a href="#storage0">Storage</a></code> object
                   38096: provides access to a list of key/value pairs, which are sometimes
                   38097: called items. Keys and values are strings. Any string (including
                   38098: the empty string) is a valid key.</p>
                   38099: <p class="note">To store more structured data, authors may consider
                   38100: using the <a href="#sql">SQL interfaces</a> instead.</p>
                   38101: <p>Each <code><a href="#storage0">Storage</a></code> object is
                   38102: associated with a list of key/value pairs when it is created, as
                   38103: defined in the sections on the <code title=
                   38104: "dom-sessionStorage"><a href=
                   38105: "#sessionstorage">sessionStorage</a></code> and <code title=
                   38106: "dom-localStorage"><del class="diff-old">globalStorage</del>
                   38107: <a href="#localstorage"><ins class=
                   38108: "diff-chg">localStorage</ins></a></code> attributes. Multiple
                   38109: separate objects implementing the <code><a href=
                   38110: "#storage0">Storage</a></code> interface can all be associated with
                   38111: the same list of key/value pairs simultaneously.</p>
                   38112: <p>The <dfn id="length9" title=
                   38113: "dom-Storage-length"><code>length</code></dfn> attribute must
                   38114: return the number of key/value pairs currently present in the list
                   38115: associated with the object.</p>
                   38116: <p>The <dfn id="keyn" title="dom-Storage-key"><code>key(
                   38117: <var title="">n</var> )</code></dfn> method must return the name of
                   38118: the <var title="">n</var> th key in the list. The order of keys is
                   38119: user-agent defined, but must be consistent within an object between
                   38120: changes to the number of keys. (Thus, <a href="#setitem" title=
                   38121: "dom-Storage-setItem">adding</a> or <a href="#removeitem" title=
                   38122: "dom-Storage-removeItem">removing</a> a key may change the order of
                   38123: the keys, but merely changing the value of an existing key must
                   38124: not.) If <var title="">n</var> is less than zero or greater than or
                   38125: equal to the number of key/value pairs in the object, then this
                   38126: method must raise an <code>INDEX_SIZE_ERR</code> exception.</p>
                   38127: <p>The <dfn id="getitem" title="dom-Storage-getItem"><code>getItem(
                   38128: <var title="">key</var> )</code></dfn> method must return the
                   38129: current value associated with the given <var title="">key</var> .
                   38130: If the given <var title="">key</var> does not exist in the list
                   38131: associated with the object then this method must return null.</p>
                   38132: <p>The <dfn id="setitem" title="dom-Storage-setItem"><code>setItem(
                   38133: <var title="">key</var> , <var title="">value</var> )</code></dfn>
                   38134: method must first check if a key/value pair with the given
                   38135: <var title="">key</var> already exists in the list associated with
                   38136: the object.</p>
                   38137: <p>If it does not, then a new key/value pair must be added to the
                   38138: list, with the given <var title="">key</var> and <var title=
                   38139: "">value</var> .</p>
                   38140: <p>If the given <var title="">key</var> <em>does</em> exist in the
                   38141: list, then it must have its value updated to the value given in the
                   38142: <var title="">value</var> argument.</p>
                   38143: <p><del class="diff-old">When</del> <ins class="diff-chg">If it
                   38144: couldn't set the new value,</ins> the <del class=
                   38145: "diff-old">setItem()</del> method <del class="diff-old">is invoked,
                   38146: events are fired on other</del> <ins class="diff-chg">must raise
                   38147: an</ins> <code><del class="diff-old">HTMLDocument</del> <ins class=
                   38148: "diff-chg">INVALID_ACCESS_ERR</ins></code> <del class=
                   38149: "diff-old">objects that can access</del> <ins class=
                   38150: "diff-chg">exception. (Setting could fail if, e.g.,</ins> the
                   38151: <del class="diff-old">newly stored data, as defined in</del>
                   38152: <ins class="diff-chg">user has disabled storage for</ins> the
                   38153: <del class="diff-old">sections on</del> <ins class=
                   38154: "diff-chg">domain, or if</ins> the <del class=
                   38155: "diff-old">sessionStorage and globalStorage attributes.</del>
                   38156: <ins class="diff-chg">quota has been exceeded.)</ins></p>
                   38157: <p>The <dfn id="removeitem" title=
                   38158: "dom-Storage-removeItem"><code>removeItem( <var title="">key</var>
                   38159: )</code></dfn> method must cause the key/value pair with the given
                   38160: <var title="">key</var> to be removed from the list associated with
                   38161: the object, if it exists. If no item with that key exists, the
                   38162: method must do nothing.</p>
                   38163: <p>The <code title="dom-Storage-setItem"><a href=
                   38164: "#setitem">setItem()</a></code> and <code title=
                   38165: "dom-Storage-removeItem"><a href=
                   38166: "#removeitem">removeItem()</a></code> methods must be atomic with
                   38167: respect to failure. That is, changes to the data storage area must
                   38168: either be successful, or the data storage area must not be changed
                   38169: at all.</p>
                   38170: <p><del class="diff-old">In the ECMAScript DOM binding, enumerating
                   38171: a Storage</del> <ins class="diff-chg">The</ins> <dfn id="clear0"
                   38172: title="dom-Storage-clear"><code><ins class=
                   38173: "diff-new">clear()</ins></code> <del class=
                   38174: "diff-old">object</del></dfn> <ins class="diff-chg">method</ins>
                   38175: must <del class="diff-old">enumerate through the currently stored
                   38176: keys in</del> <ins class="diff-chg">atomically cause</ins> the list
                   38177: <del class="diff-old">the object is</del> associated <del class=
                   38178: "diff-old">with. (It must not enumerate the values or</del>
                   38179: <ins class="diff-chg">with</ins> the <del class="diff-old">actual
                   38180: members</del> <ins class="diff-chg">object to be emptied</ins> of
                   38181: <ins class="diff-new">all key/value pairs.</ins></p>
                   38182: <p><ins class="diff-new">When</ins> the <del class=
                   38183: "diff-old">interface). In the ECMAScript DOM binding,</del>
                   38184: <code title="dom-Storage-setItem"><del class=
                   38185: "diff-old">Storage</del> <a href="#setitem"><ins class=
                   38186: "diff-chg">setItem()</ins></a> <del class="diff-old">objects must
                   38187: support dereferencing such that getting a property that is not a
                   38188: member of the object (i.e. is neither a member of the</del></code>
                   38189: , <code title="dom-Storage-removeItem"><del class=
                   38190: "diff-old">Storage</del> <a href="#removeitem"><ins class=
                   38191: "diff-chg">removeItem()</ins></a></code> ,<ins class=
                   38192: "diff-chg">and</ins> <code title="dom-Storage-clear"><a href=
                   38193: "#clear0"><ins class="diff-chg">clear()</ins></a></code>
                   38194: <del class="diff-old">interface nor of Object ) must invoke
                   38195: the</del> <ins class="diff-chg">methods are invoked, events are
                   38196: fired on other</ins> <code><del class="diff-old">getItem()</del>
                   38197: <a href="#htmldocument"><ins class=
                   38198: "diff-chg">HTMLDocument</ins></a></code> <del class=
                   38199: "diff-old">method with</del> <ins class="diff-chg">objects that can
                   38200: access</ins> the <del class="diff-old">property's name</del>
                   38201: <ins class="diff-chg">newly stored or removed data,</ins> as
                   38202: <ins class="diff-new">defined in</ins> the <del class=
                   38203: "diff-old">argument, and setting such a property must invoke</del>
                   38204: <ins class="diff-chg">sections on</ins> the <code title=
                   38205: "dom-sessionStorage"><del class="diff-old">setItem()</del> <a href=
                   38206: "#sessionstorage"><ins class=
                   38207: "diff-chg">sessionStorage</ins></a></code> <del class=
                   38208: "diff-old">method with the property's name as the first
                   38209: argument</del> and <del class="diff-old">the given value as the
                   38210: second argument.</del> <code title="dom-localStorage"><a href=
                   38211: "#localstorage"><ins class="diff-chg">localStorage</ins></a></code>
                   38212: <ins class="diff-chg">attributes.</ins></p>
                   38213: <h5 id="the-sessionstorage"><span class="secno"><del class=
                   38214: "diff-old">4.10.3.</del> <ins class=
                   38215: "diff-chg">4.11.1.3.</ins></span> The <code title=
                   38216: "dom-sessionStorage"><a href=
                   38217: "#sessionstorage">sessionStorage</a></code> attribute</h5>
                   38218: <p>The <dfn id="sessionstorage" title=
                   38219: "dom-sessionStorage"><code>sessionStorage</code></dfn> attribute
                   38220: represents the set of storage areas specific to the current
                   38221: <a href="#top-level">top-level browsing context</a> .</p>
                   38222: <p>Each <a href="#top-level">top-level browsing context</a> has a
                   38223: unique set of session storage areas, one for each <a href=
                   38224: "#origin0">origin</a> .</p>
                   38225: <p>User agents should not expire data from a browsing context's
                   38226: session storage areas, but may do so when the user requests that
                   38227: such data be deleted, or when the UA detects that it has limited
                   38228: storage space, or for security reasons. User agents should always
                   38229: avoid deleting data while a script that could access that data is
                   38230: running. When a top-level browsing context is destroyed (and
                   38231: therefore permanently inaccessible to the user) the data stored in
                   38232: its session storage areas can be discarded with it, as the API
                   38233: described in this specification provides no way for that data to
                   38234: ever be subsequently retrieved.</p>
                   38235: <p class="note">The lifetime of a browsing context can be unrelated
                   38236: to the lifetime of the actual user agent process itself, as the
                   38237: user agent may support resuming sessions after a restart.</p>
                   38238: <p>When a new <code><a href="#htmldocument">HTMLDocument</a></code>
                   38239: is created, the user agent must check to see if the document's
                   38240: <a href="#top-level">top-level browsing context</a> has allocated a
                   38241: session storage area for that document's <a href=
                   38242: "#origin0">origin</a> . If it has not, a new storage area for that
                   38243: document's <a href="#origin0">origin</a> must be created.</p>
                   38244: <p>The <code><a href="#storage0">Storage</a></code> object for the
                   38245: document's associated <code><a href="#window">Window</a></code>
                   38246: object's <code title="dom-sessionStorage"><a href=
                   38247: "#sessionstorage">sessionStorage</a></code> attribute must then be
                   38248: associated with that <a href="#origin0">origin</a> 's session
                   38249: storage area for that <a href="#top-level">top-level browsing
                   38250: context</a> .</p>
                   38251: <p>When a new <a href="#top-level">top-level browsing context</a>
                   38252: is created by cloning an existing <a href="#browsing1">browsing
                   38253: context</a> , the new browsing context must start with the same
                   38254: session storage areas as the original, but the two sets must from
                   38255: that point on be considered separate, not affecting each other in
                   38256: any way.</p>
                   38257: <p>When a new <a href="#top-level">top-level browsing context</a>
                   38258: is created by a script in an existing <a href="#browsing1">browsing
                   38259: context</a> , or by the user following a link in an existing
                   38260: browsing context, or in some other way related to a specific
                   38261: <code><a href="#htmldocument">HTMLDocument</a></code> , then the
                   38262: session storage area of the <a href="#origin0">origin</a> of that
                   38263: <code><a href="#htmldocument">HTMLDocument</a></code> must be
                   38264: copied into the new browsing context when it is created. From that
                   38265: point on, however, the two session storage areas must be considered
                   38266: separate, not affecting each other in any way.</p>
                   38267: <p id="sessionStorageEvent">When the <code title=
                   38268: "dom-Storage-setItem"><a href="#setitem">setItem()</a></code> ,
                   38269: <code title="dom-Storage-removeItem"><a href=
                   38270: "#removeitem"><ins class="diff-new">removeItem()</ins></a></code>
                   38271: ,<ins class="diff-new">and</ins> <code title=
                   38272: "dom-Storage-clear"><a href="#clear0"><ins class=
                   38273: "diff-new">clear()</ins></a></code> <del class="diff-old">method
                   38274: is</del> <ins class="diff-chg">methods are</ins> called on a
                   38275: <code><a href="#storage0">Storage</a></code> object <var title=
                   38276: "">x</var> that is associated with a session storage area, then in
                   38277: every <code><a href="#htmldocument">HTMLDocument</a></code> object
                   38278: whose <code><a href="#window">Window</a></code> object's
                   38279: <code title="dom-sessionStorage"><a href=
                   38280: "#sessionstorage">sessionStorage</a></code> attribute's
                   38281: <code><a href="#storage0">Storage</a></code> object is associated
                   38282: with the same storage area, other than <var title="">x</var> , a
                   38283: <code title="event-storage"><a href="#storage1">storage</a></code>
                   38284: event must be fired, as <a href="#storage1" title=
                   38285: "event-storage">described below</a> .</p>
                   38286: <h5 id="the-localstorage"><span class="secno"><del class=
                   38287: "diff-old">4.10.4.</del> <ins class=
                   38288: "diff-chg">4.11.1.4.</ins></span> The <code title=
                   38289: "dom-localStorage"><del class="diff-old">globalStorage</del>
                   38290: <a href="#localstorage"><ins class=
                   38291: "diff-chg">localStorage</ins></a></code> attribute</h5>
                   38292: <p>The <dfn id="localstorage" title=
                   38293: "dom-localStorage"><code><del class="diff-old">globalStorage</del>
                   38294: <ins class="diff-chg">localStorage</ins></code></dfn> object
                   38295: provides a <code><a href="#storage0">Storage</a></code> object for
                   38296: <ins class="diff-new">an</ins> <a href="#origin0">origin</a> .</p>
                   38297: <p>User agents must have a set of <del class=
                   38298: "diff-old">global</del> <ins class="diff-chg">local</ins> storage
                   38299: areas, one for each <a href="#origin0">origin</a> .</p>
                   38300: <p>User agents should <del class="diff-old">only</del> expire data
                   38301: from the <del class="diff-old">global</del> <ins class=
                   38302: "diff-chg">local</ins> storage areas <ins class=
                   38303: "diff-new">only</ins> for security reasons or when requested to do
                   38304: so by the user. User agents should always avoid deleting data while
                   38305: a script that could access that data is running. Data stored in
                   38306: <del class="diff-old">global</del> <ins class=
                   38307: "diff-chg">local</ins> storage areas should be considered
                   38308: potentially user-critical. It is expected that Web applications
                   38309: will use the <del class="diff-old">global</del> <ins class=
                   38310: "diff-chg">local</ins> storage areas for storing user-written
                   38311: documents.</p>
                   38312: <p>When the <code title="dom-localStorage"><del class=
                   38313: "diff-old">globalStorage</del> <a href="#localstorage"><ins class=
                   38314: "diff-chg">localStorage</ins></a></code> attribute is accessed, the
                   38315: user agent must check to see if it has allocated <del class=
                   38316: "diff-old">global</del> <ins class="diff-chg">local</ins> storage
                   38317: area for the <a href="#origin0">origin</a> of the <a href=
                   38318: "#browsing1">browsing context</a> within which the script is
                   38319: running. If it has not, a new storage area for that <a href=
                   38320: "#origin0">origin</a> must be created.</p>
                   38321: <p>The user agent must then create a <code><a href=
                   38322: "#storage0">Storage</a></code> object associated with that origin's
                   38323: <del class="diff-old">global</del> <ins class=
                   38324: "diff-chg">local</ins> storage area, and return it.</p>
                   38325: <p id="localStorageEvent">When the <code title=
                   38326: "dom-Storage-setItem"><a href="#setitem">setItem()</a></code> ,
                   38327: <code title="dom-Storage-removeItem"><a href=
                   38328: "#removeitem"><ins class="diff-new">removeItem()</ins></a></code>
                   38329: ,<ins class="diff-new">and</ins> <code title=
                   38330: "dom-Storage-clear"><a href="#clear0"><ins class=
                   38331: "diff-new">clear()</ins></a></code> <del class="diff-old">method
                   38332: is</del> <ins class="diff-chg">methods are</ins> called on a
                   38333: <code><a href="#storage0">Storage</a></code> object <var title=
                   38334: "">x</var> that is associated with a <del class=
                   38335: "diff-old">global</del> <ins class="diff-chg">local</ins> storage
                   38336: area, then in every <code><a href=
                   38337: "#htmldocument">HTMLDocument</a></code> object whose <code><a href=
                   38338: "#window">Window</a></code> object's <code title=
                   38339: "dom-localStorage"><del class="diff-old">globalStorage</del>
                   38340: <a href="#localstorage"><ins class=
                   38341: "diff-chg">localStorage</ins></a></code> attribute's <code><a href=
                   38342: "#storage0">Storage</a></code> object is associated with the same
                   38343: storage area, other than <var title="">x</var> , a <code title=
                   38344: "event-storage"><a href="#storage1">storage</a></code> event must
                   38345: be fired, as <a href="#storage1" title="event-storage">described
                   38346: below</a> .</p>
                   38347: <h5 id="the-storage0"><span class="secno"><del class=
                   38348: "diff-old">4.10.5.</del> <ins class=
                   38349: "diff-chg">4.11.1.5.</ins></span> The <code title=
                   38350: "event-storage"><a href="#storage1">storage</a></code> event</h5>
                   38351: <p>The <dfn id="storage1" title=
                   38352: "event-storage"><code>storage</code></dfn> event is fired in an
                   38353: <code><a href="#htmldocument">HTMLDocument</a></code> when a
                   38354: storage area changes, as described in the previous two sections (
                   38355: <a href="#sessionStorageEvent">for session storage</a> , <a href=
                   38356: "#localStorageEvent">for <del class="diff-old">global</del>
                   38357: <ins class="diff-chg">local</ins> storage</a> ).</p>
                   38358: <p>When this happens, the user agent must <del class=
                   38359: "diff-old">fire a simple</del> <ins class="diff-chg">dispatch
                   38360: an</ins> event <del class="diff-old">called</del> <ins class=
                   38361: "diff-chg">with the name</ins> <code><a href=
                   38362: "#storage0">storage</a> <del class="diff-old">on</del></code> ,
                   38363: <ins class="diff-chg">with no namespace, which does not bubble but
                   38364: is cancelable, and which uses the</ins> <code><a href=
                   38365: "#storageevent"><ins class="diff-chg">StorageEvent</ins></a></code>
                   38366: ,<ins class="diff-chg">at</ins> <a href="#the-body1">the body
                   38367: element <del class="diff-old">. However, it is possible (indeed,
                   38368: for session storage areas, likely) that the target's</del></a>
                   38369: <ins class="diff-chg">of each</ins> <a href="#active" title=
                   38370: "active document"><ins class="diff-chg">active</ins></a>
                   38371: <code><a href="#htmldocument">HTMLDocument</a></code> object
                   38372: <ins class="diff-new">affected.</ins></p>
                   38373: <p><ins class="diff-new">If the event</ins> is <del class=
                   38374: "diff-old">not</del> <ins class="diff-chg">being fired due to</ins>
                   38375: an <del class="diff-old">active document</del> <ins class=
                   38376: "diff-chg">invocation of the</ins> <code title=
                   38377: "dom-Storage-setItem"><a href="#setitem"><ins class=
                   38378: "diff-chg">setItem()</ins></a> <del class="diff-old">at that time.
                   38379: In such cases,</del></code> <ins class="diff-chg">or</ins>
                   38380: <code title="dom-Storage-removeItem"><a href=
                   38381: "#removeitem"><ins class="diff-chg">removeItem()</ins></a></code>
                   38382: <ins class="diff-chg">methods,</ins> the <del class="diff-old">user
                   38383: agent</del> <ins class="diff-chg">event</ins> must <del class=
                   38384: "diff-old">instead delay</del> <ins class="diff-chg">have its</ins>
                   38385: <code title="dom-StorageEvent-key"><a href="#key"><ins class=
                   38386: "diff-chg">key</ins></a></code> <ins class="diff-chg">attribute set
                   38387: to</ins> the <del class="diff-old">firing</del> <ins class=
                   38388: "diff-chg">name</ins> of the <del class="diff-old">event until such
                   38389: time as the</del> <ins class="diff-chg">key in question, its</ins>
                   38390: <code title="dom-StorageEvent-oldValue"><del class=
                   38391: "diff-old">HTMLDocument</del> <a href="#oldvalue"><ins class=
                   38392: "diff-chg">oldValue</ins></a></code> <del class=
                   38393: "diff-old">object</del> <ins class="diff-chg">attribute set to the
                   38394: old value of the key</ins> in <del class="diff-old">question
                   38395: becomes an active document again.</del> <ins class=
                   38396: "diff-chg">question, or null if the key is newly added, and
                   38397: its</ins> <code title="dom-StorageEvent-newValue"><ins class=
                   38398: "diff-chg">newValue</ins></code> <ins class="diff-chg">attribute
                   38399: set to the new value of the key in question, or null if the key was
                   38400: removed.</ins></p>
                   38401: <p><del class="diff-old">When there are multiple delayed</del>
                   38402: <ins class="diff-chg">Otherwise, if the event is being fired due to
                   38403: an invocation of the</ins> <code title=
                   38404: "dom-Storage-clear"><del class="diff-old">storage</del> <a href=
                   38405: "#clear0"><ins class="diff-chg">clear()</ins></a></code>
                   38406: <del class="diff-old">events for</del> <ins class=
                   38407: "diff-chg">method,</ins> the <del class="diff-old">same</del>
                   38408: <ins class="diff-chg">event must have its</ins> <code title=
                   38409: "dom-StorageEvent-key"><del class="diff-old">HTMLDocument</del>
                   38410: <a href="#key"><ins class="diff-chg">key</ins></a></code> ,
                   38411: <code title="dom-StorageEvent-oldValue"><a href=
                   38412: "#oldvalue"><ins class="diff-new">oldValue</ins></a></code>
                   38413: ,<ins class="diff-new">and</ins> <code title=
                   38414: "dom-StorageEvent-newValue"><ins class=
                   38415: "diff-new">newValue</ins></code> <del class="diff-old">object, user
                   38416: agents must coalesce those events such that only one event fires
                   38417: when the document becomes active again.</del> <ins class=
                   38418: "diff-chg">attributes set to null.</ins></p>
                   38419: <p><del class="diff-old">If</del> <ins class="diff-chg">In
                   38420: addition,</ins> the <del class="diff-old">DOM</del> <ins class=
                   38421: "diff-chg">event must have its</ins> <code title=
                   38422: "dom-StorageEvent-uri"><a href="#uri"><ins class=
                   38423: "diff-chg">uri</ins></a></code> <ins class="diff-chg">attribute set
                   38424: to the address</ins> of <del class="diff-old">a</del> <ins class=
                   38425: "diff-chg">the</ins> page <del class="diff-old">that has
                   38426: delayed</del> <ins class="diff-chg">whose</ins> <code><a href=
                   38427: "#storage0"><del class="diff-old">storage</del> <ins class=
                   38428: "diff-chg">Storage</ins></a></code> <del class="diff-old">events
                   38429: queued up</del> <ins class="diff-chg">object was affected, and
                   38430: its</ins> <code title="dom-StorageEvent-source"><a href=
                   38431: "#source1"><ins class="diff-chg">source</ins></a></code>
                   38432: <ins class="diff-chg">attribute set to the</ins> <code><a href=
                   38433: "#window"><ins class="diff-chg">Window</ins></a></code> <ins class=
                   38434: "diff-chg">object of the</ins> <a href="#browsing1"><ins class=
                   38435: "diff-chg">browsing context</ins></a> <ins class="diff-chg">that
                   38436: that document</ins> is <del class="diff-old">discarded , then</del>
                   38437: <ins class="diff-chg">in, if</ins> the <del class=
                   38438: "diff-old">delayed events</del> <ins class="diff-chg">two
                   38439: documents</ins> are <del class="diff-old">dropped as well. 4.10.6.
                   38440: Miscellaneous implementation requirements for storage areas</del>
                   38441: <ins class="diff-chg">in the same</ins> <a href=
                   38442: "#unit-of"><ins class="diff-chg">unit of related browsing
                   38443: contexts</ins></a> ,<ins class="diff-chg">or null
                   38444: otherwise.</ins></p>
                   38445: <h6 id="event0"><span class="secno"><del class=
                   38446: "diff-old">4.10.6.1.</del> <ins class=
                   38447: "diff-chg">4.11.1.5.1.</ins></span> <del class="diff-old">Disk
                   38448: space</del> <ins class="diff-chg">Event definition</ins></h6>
                   38449: <pre class="idl">
                   38450: interface <dfn id=
                   38451: "storageevent">StorageEvent</dfn> : Event {<ins class="diff-chg">
                   38452:   readonly attribute DOMString <a href="#key" title=
                   38453: "dom-StorageEvent-key">key</a>;
                   38454:   readonly attribute DOMString <a href="#oldvalue" title=
                   38455: "dom-StorageEvent-oldValue">oldValue</a>;
                   38456:   readonly attribute DOMString <span title=
                   38457: "dom-StorageEvent-newValue">newValue</span>;
                   38458:   readonly attribute DOMString <a href="#uri" title=
                   38459: "dom-StorageEvent-uri">uri</a>;
                   38460:   readonly attribute <a href="#window">Window</a> <a href=
                   38461: "#source1" title="dom-StorageEvent-source">source</a>;
                   38462:   void <a href="#initstorageevent" title=
                   38463: "dom-StorageEvent-initStorageEvent">initStorageEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString uriArg, in Window sourceArg);
                   38464:   void <a href="#initstorageeventns" title=
                   38465: "dom-StorageEvent-initStorageEventNS">initStorageEventNS</a>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString uriArg, in Window sourceArg);
                   38466: };
                   38467: </ins>
                   38468: </pre>
                   38469: <p><del class="diff-old">User agents should limit</del> <ins class=
                   38470: "diff-chg">The</ins> <dfn id="initstorageevent" title=
                   38471: "dom-StorageEvent-initStorageEvent"><code><ins class=
                   38472: "diff-chg">initStorageEvent()</ins></code></dfn> <ins class=
                   38473: "diff-chg">and</ins> <dfn id="initstorageeventns" title=
                   38474: "dom-StorageEvent-initStorageEventNS"><code><ins class=
                   38475: "diff-chg">initStorageEventNS()</ins></code></dfn> <ins class=
                   38476: "diff-chg">methods must initialise</ins> the <del class=
                   38477: "diff-old">total amount of space allowed for</del> <ins class=
                   38478: "diff-chg">event in</ins> a <del class="diff-old">storage area
                   38479: based on</del> <ins class="diff-chg">manner analogous to</ins> the
                   38480: <del class="diff-old">domain of</del> <ins class=
                   38481: "diff-chg">similarly-named methods in</ins> the <del class=
                   38482: "diff-old">page setting</del> <ins class="diff-chg">DOM3 Events
                   38483: interfaces.</ins> <a href="#references"><ins class=
                   38484: "diff-chg">[DOM3EVENTS]</ins></a></p>
                   38485: <p><ins class="diff-chg">The</ins> <dfn id="key" title=
                   38486: "dom-StorageEvent-key"><code><ins class=
                   38487: "diff-chg">key</ins></code></dfn> <ins class="diff-chg">attribute
                   38488: represents</ins> the <del class="diff-old">value.</del> <ins class=
                   38489: "diff-chg">key being changed.</ins></p>
                   38490: <p><del class="diff-old">User agents should not limit</del>
                   38491: <ins class="diff-chg">The</ins> <dfn id="oldvalue" title=
                   38492: "dom-StorageEvent-oldValue"><code><ins class=
                   38493: "diff-chg">oldValue</ins></code></dfn> <ins class=
                   38494: "diff-chg">attribute represents</ins> the <del class=
                   38495: "diff-old">total amount</del> <ins class="diff-chg">old value</ins>
                   38496: of <del class="diff-old">space allowed on a per-storage-area basis,
                   38497: otherwise a site could just store data in any number</del>
                   38498: <ins class="diff-chg">the key being changed.</ins></p>
                   38499: <p><ins class="diff-chg">The</ins> <dfn id="newvalue" title=
                   38500: "dom-StorageEvent-vnewValue"><code><ins class=
                   38501: "diff-chg">newValue</ins></code></dfn> <ins class=
                   38502: "diff-chg">attribute represents the new value</ins> of <del class=
                   38503: "diff-old">subdomains or ports, e.g. storing up to</del> the
                   38504: <del class="diff-old">limit in a1.example.com, a2.example.com,
                   38505: a3.example.com, etc, circumventing per-domain limits.</del>
                   38506: <ins class="diff-chg">key being changed.</ins></p>
                   38507: <p><del class="diff-old">User agents may prompt</del> <ins class=
                   38508: "diff-chg">The</ins> <dfn id="uri" title=
                   38509: "dom-StorageEvent-uri"><code><ins class=
                   38510: "diff-chg">uri</ins></code></dfn> <ins class="diff-chg">attribute
                   38511: represents</ins> the <del class="diff-old">user when per-domain
                   38512: space quotas are reached, allowing</del> <ins class=
                   38513: "diff-chg">address of</ins> the <del class="diff-old">user to grant
                   38514: a site more space. This enables sites to store many user-created
                   38515: documents on</del> <ins class="diff-chg">document that
                   38516: changed</ins> the <del class="diff-old">user's computer, for
                   38517: instance. User agents should allow users to see how much space each
                   38518: domain is using.</del> <ins class="diff-chg">key.</ins></p>
                   38519: <p><del class="diff-old">If</del> <ins class="diff-chg">The</ins>
                   38520: <dfn id="source1" title="dom-StorageEvent-source"><code><ins class=
                   38521: "diff-chg">source</ins></code></dfn> <ins class=
                   38522: "diff-chg">attribute represents</ins> the <del class=
                   38523: "diff-old">storage area space limit is reached during a</del>
                   38524: <code><del class="diff-old">setItem()</del> <a href=
                   38525: "#window"><ins class="diff-chg">Window</ins></a></code> <del class=
                   38526: "diff-old">call,</del> <ins class="diff-chg">that changed</ins> the
                   38527: <del class="diff-old">user agent must raise an INVALID_ACCESS_ERR
                   38528: exception. A mostly arbitrary limit of five megabytes per domain is
                   38529: recommended. Implementation feedback is welcome and will be used to
                   38530: update this suggestion in future.</del> <ins class=
                   38531: "diff-chg">key.</ins></p>
                   38532: <h5 id="threads0"><span class="secno"><del class=
                   38533: "diff-old">4.10.6.2.</del> <ins class=
                   38534: "diff-chg">4.11.1.6.</ins></span> Threads</h5>
                   38535: <p>Multiple browsing contexts must be able to access the
                   38536: <del class="diff-old">global</del> <ins class=
                   38537: "diff-chg">local</ins> storage areas simultaneously in a
                   38538: predictable manner. Scripts must not be able to detect any
                   38539: concurrent script execution.</p>
                   38540: <p>This is required to <del class="diff-old">guarentee</del>
                   38541: <ins class="diff-chg">guarantee</ins> that the <code title=
                   38542: "dom-Storage-length"><a href="#length9">length</a></code> attribute
                   38543: of a <code><a href="#storage0">Storage</a></code> object never
                   38544: changes while a script is executing, other than in a way that is
                   38545: predictable by the script itself.</p>
                   38546: <p>There are various ways of implementing this requirement. One is
                   38547: that if a script running in one browsing context accesses a
                   38548: <del class="diff-old">global</del> <ins class=
                   38549: "diff-chg">local</ins> storage area, the UA blocks scripts in other
                   38550: browsing contexts when they try to access the <del class=
                   38551: "diff-old">global</del> <ins class="diff-chg">local</ins> storage
                   38552: area for the <a href="#same-origin">same origin</a> until the first
                   38553: script has executed to completion. (Similarly, when a script in one
                   38554: browsing context accesses its session storage area, any scripts
                   38555: that have the same top level browsing context and the <a href=
                   38556: "#same-origin">same origin</a> would block when accessing their
                   38557: session storage area until the first script has executed to
                   38558: completion.) Another (potentially more efficient but probably more
                   38559: complex) implementation strategy is to use optimistic transactional
                   38560: script execution. This specification does not require any
                   38561: particular implementation strategy, so long as the requirement
                   38562: above is met. <del class="diff-old">4.10.7. Security and privacy
                   38563: 4.10.7.1. User tracking A third-party advertiser (or any entity
                   38564: capable of getting content distributed to multiple sites) could use
                   38565: a unique identifier stored in its global storage area to track a
                   38566: user across multiple sessions, building a profile of the user's
                   38567: interests to allow for highly targeted advertising. In conjunction
                   38568: with a site that is aware of the user's real identity (for example
                   38569: an e-commerce site that requires authenticated credentials), this
                   38570: could allow oppressive groups to target individuals with greater
                   38571: accuracy than in a world with purely anonymous Web usage. There are
                   38572: a number of techniques that can be used to mitigate the risk of
                   38573: user tracking: Blocking third-party storage: user agents may
                   38574: restrict access to the globalStorage object to scripts originating
                   38575: at the domain of the top-level document of the browsing context .
                   38576: Expiring stored data: user agents may automatically delete stored
                   38577: data after a period of time. For example, a user agent could treat
                   38578: third-party global storage areas as session-only storage, deleting
                   38579: the data once the user had closed all the browsing contexts that
                   38580: could access it. This can restrict the ability of a site to track a
                   38581: user, as the site would then only be able to track the user across
                   38582: multiple sessions when he authenticates with the site itself (e.g.
                   38583: by making a purchase or logging in to a service). However, this
                   38584: also puts the user's data at risk. Treating persistent storage as
                   38585: cookies: user agents may present the persistent storage feature to
                   38586: the user in a way that does not distinguish it from HTTP session
                   38587: cookies. [RFC2965] This might encourage users to view persistent
                   38588: storage with healthy suspicion. Site-specific white-listing of
                   38589: access to global storage areas: user agents may allow sites to
                   38590: access session storage areas in an unrestricted manner, but require
                   38591: the user to authorise access to global storage areas.
                   38592: Origin-tracking of persistent storage data: user agents may record
                   38593: the origins of sites that contained content from third-party
                   38594: origins that caused data to be stored. If this information is then
                   38595: used to present the view of data currently in persistent storage,
                   38596: it would allow the user to make informed decisions about which
                   38597: parts of the persistent storage to prune. Combined with a blacklist
                   38598: ("delete this data and prevent this domain from ever storing data
                   38599: again"), the user can restrict the use of persistent storage to
                   38600: sites that he trusts. Shared blacklists: user agents may allow
                   38601: users to share their persistent storage domain blacklists. This
                   38602: would allow communities to act together to protect their privacy.
                   38603: While these suggestions prevent trivial use of this API for user
                   38604: tracking, they do not block it altogether. Within a single domain,
                   38605: a site can continue to track the user during a session, and can
                   38606: then pass all this information to the third party along with any
                   38607: identifying information (names, credit card numbers, addresses)
                   38608: obtained by the site. If a third party cooperates with multiple
                   38609: sites to obtain such information, a profile can still be created.
                   38610: However, user tracking is to some extent possible even with no
                   38611: cooperation from the user agent whatsoever, for instance by using
                   38612: session identifiers in URIs, a technique already commonly used for
                   38613: innocuous purposes but easily repurposed for user tracking (even
                   38614: retroactively). This information can then be shared with other
                   38615: sites, using using visitors' IP addresses and other user-specific
                   38616: data (e.g. user-agent headers and configuration settings) to
1.2     ! mike     38617: combine separate sessions into coherent user profiles. 4.10.7.2.
        !          38618: Cookie resurrection If the user interface for persistent storage
        !          38619: presents data in the persistent storage feature separately from
        !          38620: data in HTTP session cookies, then users are likely to delete data
        !          38621: in one and not the other. This would allow sites to use the two
        !          38622: features as redundant backup for each other, defeating a user's
        !          38623: attempts to protect his privacy.</del></p>
1.1       mike     38624: <h4 id="sql"><span class="secno"><del class=
1.2     ! mike     38625: "diff-old">4.10.7.3.</del> <ins class=
        !          38626: "diff-chg">4.11.2</ins></span> <del class="diff-old">DNS spoofing
        !          38627: attacks Because of the potential for DNS spoofing attacks, one
        !          38628: cannot guarentee that a host claiming to be in a certain domain
        !          38629: really is from that domain. To mitigate this, pages can use SSL.
        !          38630: Pages using SSL can be sure that only pages using SSL that have
        !          38631: certificates identifying them as being from the same domain can
        !          38632: access their global</del> <ins class="diff-chg">Database</ins>
        !          38633: storage <del class="diff-old">areas.</del></h4>
1.1       mike     38634: <h5 id="introduction3"><span class="secno"><del class=
1.2     ! mike     38635: "diff-old">4.10.7.4.</del> <ins class=
        !          38636: "diff-chg">4.11.2.1.</ins></span> <del class=
        !          38637: "diff-old">Cross-directory attacks</del> <ins class=
1.1       mike     38638: "diff-chg">Introduction</ins></h5>
1.2     ! mike     38639: <p><del class="diff-old">Different authors sharing one host name,
        !          38640: for example users hosting content on geocities.com , all share one
        !          38641: persistent storage object. There is no feature to restrict the
        !          38642: access by pathname. Authors on shared hosts are therefore
        !          38643: recommended to avoid using the persistent storage feature, as it
        !          38644: would be trivial for other authors to read from and write to the
        !          38645: same storage area. Even if a path-restriction feature was made
        !          38646: available, the usual DOM scripting security model would make it
        !          38647: trivial to bypass this protection and access the data from any
        !          38648: path.</del> <del class="diff-old">4.10.7.5. Implementation risks
        !          38649: The two primary risks when implementing this persistent storage
        !          38650: feature are letting hostile sites read information from other
        !          38651: domains, and letting hostile sites write information that is then
        !          38652: read from other domains. Letting third-party sites read data that
        !          38653: is not supposed to be read from their domain causes</del>
        !          38654: <em><del class="diff-old">information leakage , For example, a
        !          38655: user's shopping wishlist on one domain could be used by another
        !          38656: domain for targeted advertising; or a user's work-in-progress
        !          38657: confidential documents stored by a word-processing site could be
        !          38658: examined by the site of a competing company. Letting third-party
        !          38659: sites write data to the storage areas of other domains can result
        !          38660: in information spoofing , which is equally dangerous. For example,
        !          38661: a hostile site could add items to a user's wishlist; or a hostile
        !          38662: site could set a user's session identifier to a known ID that the
        !          38663: hostile site can then use to track the user's actions on the victim
        !          38664: site. Thus, strictly following the model described in this
        !          38665: specification</del> <ins class="diff-chg">This section</ins> is
        !          38666: <del class="diff-old">important for user security. 4.11.
        !          38667: Client-side database storage 4.11.1. Introduction</del> <ins class=
1.1       mike     38668: "diff-chg">non-normative.</ins></em></p>
                   38669: <p class="big-issue">...</p>
                   38670: <h5 id="databases"><span class="secno"><del class=
                   38671: "diff-old">4.11.2.</del> <ins class=
                   38672: "diff-chg">4.11.2.2.</ins></span> Databases</h5>
                   38673: <p>Each <i><a href="#origin0">origin</a></i> has an associated set
                   38674: of databases. Each database has a name and a current version. There
                   38675: is no way to enumerate or delete the databases available for a
                   38676: domain from this API.</p>
                   38677: <p class="note">Each database has one version at a time, a database
                   38678: can't exist in multiple versions at once. Versions are intended to
                   38679: allow authors to manage schema changes incrementally and
                   38680: non-destructively, and without running the risk of old code (e.g.
                   38681: in another browser window) trying to write to a database with
                   38682: incorrect assumptions.</p>
                   38683: <p>The <dfn id="opendatabase" title=
                   38684: "dom-opendatabase"><code>openDatabase()</code></dfn> method returns
                   38685: a <code><a href="#database0">Database</a></code> object. The method
                   38686: takes four arguments: a database name, a database version, a
                   38687: display name, and an estimated size, in bytes, of the data that
                   38688: will be stored in the database.</p>
                   38689: <p><ins class="diff-new">The</ins> <code title=
                   38690: "dom-opendatabase"><a href="#opendatabase"><ins class=
                   38691: "diff-new">openDatabase()</ins></a></code> <ins class=
                   38692: "diff-new">method must use and create databases from the</ins>
                   38693: <a href="#origin0"><ins class="diff-new">origin</ins></a>
                   38694: <ins class="diff-new">of the</ins> <a href="#active"><ins class=
                   38695: "diff-new">active document</ins></a> <ins class="diff-new">of
                   38696: the</ins> <code><a href="#window"><ins class=
                   38697: "diff-new">Window</ins></a></code> <ins class="diff-new">object on
                   38698: which the method was invoked.</ins></p>
                   38699: <p>If the database version provided is not the empty string, and
                   38700: the database already exists but has a different version, then the
                   38701: method must raise an <code>INVALID_STATE_ERR</code> exception.</p>
                   38702: <p><ins class="diff-new">The user agent may also raise a</ins>
                   38703: <a href="#security9"><ins class="diff-new">security
                   38704: exception</ins></a> <ins class="diff-new">in case the request
                   38705: violates a policy decision (e.g. if the user agent is configured to
                   38706: not allow the page to open databases).</ins></p>
                   38707: <p>Otherwise, if the database <ins class="diff-new">version</ins>
                   38708: provided is the empty string, or if the database doesn't yet exist,
                   38709: or if the database exists and the version provided to the
                   38710: <code title="dom-opendatabase"><a href=
                   38711: "#opendatabase">openDatabase()</a></code> method is the same as the
                   38712: current version associated with the database, then the method must
                   38713: return a <code><a href="#database0">Database</a></code> object
                   38714: representing the database <del class="diff-old">associated with the
                   38715: origin of the active document of the browsing context of the Window
                   38716: object on which the method was called</del> that has the name that
                   38717: was given. If no such database exists, it must be created
                   38718: first.</p>
                   38719: <p>All strings including the empty string are valid database names.
                   38720: Database names are case-sensitive.</p>
                   38721: <p class="note">Implementations can support this even in
                   38722: environments that only support a subset of all strings as database
                   38723: names by mapping database names (e.g. using a hashing algorithm) to
                   38724: the supported set of names.</p>
                   38725: <p>User agents are expected to use the display name and the
                   38726: estimated database size to <del class="diff-old">optimise</del>
                   38727: <ins class="diff-chg">optimize</ins> the user experience. For
                   38728: example, a user agent could use the estimated size to suggest an
                   38729: initial quota to the user. This allows a site that is aware that it
                   38730: will try to use hundreds of megabytes to declare this upfront,
                   38731: instead of the user agent prompting the user for permission to
                   38732: increase the quota every five megabytes.</p>
                   38733: <pre class="idl">
                   38734: interface <dfn id="database0">Database</dfn> {
                   38735:   void <a href="#transaction" title=
                   38736: "dom-database-transaction">transaction</a>(in <a href=
                   38737: "#sqltransactioncallback">SQLTransactionCallback</a> callback);
                   38738:   void <a href="#transaction" title=
                   38739: "dom-database-transaction">transaction</a>(in <a href=
                   38740: "#sqltransactioncallback">SQLTransactionCallback</a> callback, in <a href="#sqltransactionerrorcallback">SQLTransactionErrorCallback</a> errorCallback);
                   38741:   void <a href="#transaction" title=
                   38742: "dom-database-transaction">transaction</a>(in <a href=
                   38743: "#sqltransactioncallback">SQLTransactionCallback</a> callback, in <a href="#sqltransactionerrorcallback">SQLTransactionErrorCallback</a> errorCallback, in <a href="#voidcallback">VoidCallback</a> successCallback);
                   38744:   readonly attribute DOMString <a href="#version" title=
                   38745: "dom-database-version">version</a>;
                   38746:   void <a href="#changeversion" title=
                   38747: "dom-database-changeVersion">changeVersion</a>(in DOMString oldVersion, in DOMString newVersion, in <a href="#sqltransactioncallback">SQLTransactionCallback</a> callback, in <a href="#sqltransactionerrorcallback">SQLTransactionErrorCallback</a> errorCallback, in <a href="#voidcallback">VoidCallback</a> successCallback);
                   38748: };
                   38749: interface <dfn id=
                   38750: "sqltransactioncallback">SQLTransactionCallback</dfn> {
                   38751:   void <span title=
                   38752: "dom-sqltransactioncallback-handleEvent">handleEvent</span>(in <a href="#sqltransaction">SQLTransaction</a> transaction);
                   38753: };
                   38754: interface <dfn id=
                   38755: "sqltransactionerrorcallback">SQLTransactionErrorCallback</dfn> {
                   38756: <del class="diff-old">  boolean  error);
                   38757: </del>
                   38758: <ins class="diff-chg">  void <span title=
                   38759: "dom-sqltransactionerrorcallback-handleEvent">handleEvent</span>(in <a href="#sqlerror">SQLError</a> error);
                   38760: </ins>
                   38761: };
                   38762: </pre>
                   38763: <p>The <dfn id="transaction" title=
                   38764: "dom-database-transaction"><code>transaction()</code></dfn> method
                   38765: takes one or two arguments. When called, the method must
                   38766: immediately return and then asynchronously run the <a href=
                   38767: "#transaction0">transaction steps</a> with the <i>transaction
                   38768: callback</i> being the first argument, the <i>error callback</i>
                   38769: being the second argument, if any, the <i>success callback</i>
                   38770: being the third argument, if any, and with no <i>preflight
                   38771: operation</i> or <i>postflight operation</i> .</p>
                   38772: <p>The version that the database was opened with is the <dfn id=
                   38773: "expected" title="concept-database-expected-version">expected
                   38774: version</dfn> of this <code><a href=
                   38775: "#database0">Database</a></code> object. It can be the empty
                   38776: string, in which case there is no expected version — any version is
                   38777: fine.</p>
                   38778: <p>On getting, the <dfn id="version" title=
                   38779: "dom-database-version"><code>version</code></dfn> attribute must
                   38780: return the current version of the database (as opposed to the
                   38781: <a href="#expected" title=
                   38782: "concept-database-expected-version">expected version</a> of the
                   38783: <code><a href="#database0">Database</a></code> object).</p>
                   38784: <p>The <dfn id="changeversion" title=
                   38785: "dom-database-changeVersion"><code>changeVersion()</code></dfn>
                   38786: method allows scripts to atomically verify the version number and
                   38787: change it at the same time as doing a schema update. When the
                   38788: method is invoked, it must immediately return, and then
                   38789: asynchronously run the <a href="#transaction0">transaction
                   38790: steps</a> with the <i>transaction callback</i> being the third
                   38791: argument, the <i>error callback</i> being the fourth argument, the
                   38792: <i>success callback</i> being the fifth argument, the <i>preflight
                   38793: operation</i> being the following:</p>
                   38794: <ol>
                   38795: <li>
                   38796: <p>Check that the value of the first argument to the <code title=
                   38797: "dom-database-changeVersion"><a href=
                   38798: "#changeversion">changeVersion()</a></code> method exactly matches
                   38799: the database's actual version. If it does not, then the
                   38800: <i>preflight operation</i> fails.</p>
                   38801: </li>
                   38802: </ol>
                   38803: <p>...and the <i>postflight operation</i> being the following:</p>
                   38804: <ol>
                   38805: <li>Change the database's actual version to the value of the second
                   38806: argument to the <code title="dom-database-changeVersion"><a href=
                   38807: "#changeversion">changeVersion()</a></code> method.</li>
                   38808: <li>Change the <code><a href="#database0">Database</a></code>
                   38809: object's expected version to the value of the second argument to
                   38810: the <code title="dom-database-changeVersion"><a href=
                   38811: "#changeversion">changeVersion()</a></code> method.</li>
                   38812: </ol>
                   38813: <h5 id="executing"><span class="secno"><del class=
                   38814: "diff-old">4.11.3.</del> <ins class=
                   38815: "diff-chg">4.11.2.3.</ins></span> Executing SQL statements</h5>
                   38816: <p>The <code title="dom-database-transaction"><a href=
                   38817: "#transaction">transaction()</a></code> and <code title=
                   38818: "dom-database-changeVersion"><a href=
                   38819: "#changeversion">changeVersion()</a></code> methods invoke
                   38820: callbacks with <code><a href=
                   38821: "#sqltransaction">SQLTransaction</a></code> objects.</p>
                   38822: <pre class="idl">
                   38823: typedef sequence&lt;Object&gt; <dfn id=
                   38824: "objectarray">ObjectArray</dfn>;
                   38825: interface <dfn id="sqltransaction">SQLTransaction</dfn> {
                   38826: <del class="diff-old">  void (in DOMString sqlStatement);
                   38827:   void  arguments);
                   38828:   void  callback);
                   38829:   void  errorCallback);
                   38830: </del>
                   38831: <ins class="diff-chg">  void <a href="#executesql" title=
                   38832: "dom-sqltransaction-executeSql">executeSql</a>(in DOMString sqlStatement);
                   38833:   void <a href="#executesql" title=
                   38834: "dom-sqltransaction-executeSql">executeSql</a>(in DOMString sqlStatement, in <a href="#objectarray">ObjectArray</a> arguments);
                   38835:   void <a href="#executesql" title=
                   38836: "dom-sqltransaction-executeSql">executeSql</a>(in DOMString sqlStatement, in <a href="#objectarray">ObjectArray</a> arguments, in <a href="#sqlstatementcallback">SQLStatementCallback</a> callback);
                   38837:   void <a href="#executesql" title=
                   38838: "dom-sqltransaction-executeSql">executeSql</a>(in DOMString sqlStatement, in <a href="#objectarray">ObjectArray</a> arguments, in <a href="#sqlstatementcallback">SQLStatementCallback</a> callback, in <a href="#sqlstatementerrorcallback">SQLStatementErrorCallback</a> errorCallback);
                   38839: </ins>
                   38840: };
                   38841: interface <dfn id=
                   38842: "sqlstatementcallback">SQLStatementCallback</dfn> {
                   38843:   void <span title=
                   38844: "dom-sqlstatementcallback-handleEvent">handleEvent</span>(in <a href="#sqltransaction">SQLTransaction</a> transaction, in <a href="#sqlresultset">SQLResultSet</a> resultSet);
                   38845: };
                   38846: interface <dfn id=
                   38847: "sqlstatementerrorcallback">SQLStatementErrorCallback</dfn> {
                   38848:   boolean <span title=
                   38849: "dom-sqlstatementerrorcallback-handleEvent">handleEvent</span>(in <a href="#sqltransaction">SQLTransaction</a> transaction, in <a href="#sqlerror">SQLError</a> error);<span class="issue">Or should these arguments be the other way around? Either way we're inconsistent with _something_. What should we be consistent with?</span>
                   38850: };
                   38851: </pre>
                   38852: <p>When the <dfn id="executesql" title=
                   38853: "dom-sqltransaction-executeSql"><code>executeSql( <var title=
                   38854: "">sqlStatement</var> , <var title="">arguments</var> , <var title=
                   38855: "">callback</var> , <var title="">errorCallback</var>
                   38856: )</code></dfn> method is invoked, the user agent must run the
                   38857: following algorithm. (This algorithm is relatively simple and
                   38858: doesn't actually execute any SQL — the bulk of the work is actually
                   38859: done as part of the <a href="#transaction0">transaction steps</a>
                   38860: .)</p>
                   38861: <ol>
                   38862: <li>
                   38863: <p>If the method was not invoked during the execution of a
                   38864: <code><a href=
                   38865: "#sqltransactioncallback">SQLTransactionCallback</a></code> ,
                   38866: <code><a href=
                   38867: "#sqlstatementcallback">SQLStatementCallback</a></code> , or
                   38868: <code><a href=
                   38869: "#sqlstatementerrorcallback">SQLStatementErrorCallback</a></code>
                   38870: then raise an <code>INVALID_STATE_ERR</code> exception. (Calls from
                   38871: inside a <code><a href=
                   38872: "#sqltransactionerrorcallback">SQLTransactionErrorCallback</a></code>
                   38873: thus raise an exception. The <code><a href=
                   38874: "#sqltransactionerrorcallback">SQLTransactionErrorCallback</a></code>
                   38875: handler is only called once a transaction has failed, and no SQL
                   38876: statements can be added to a failed transaction.)</p>
                   38877: </li>
                   38878: <li>
                   38879: <p>Parse the first argument to the method ( <var title=
                   38880: "">sqlStatement</var> ) as an SQL statement, with the exception
                   38881: that <code title="">?</code> characters can be used in place of
                   38882: literals in the statement. <a href="#references">[SQL]</a></p>
                   38883: </li>
                   38884: <li>
                   38885: <p>Replace each <code title="">?</code> placeholder with the value
                   38886: of the argument in the <var title="">arguments</var> array with the
                   38887: same position. (So the first <code title="">?</code> placeholder
                   38888: gets replaced by the first value in the <var title=
                   38889: "">arguments</var> array, and generally the <var title="">n</var>
                   38890: th <code title="">?</code> placeholder gets replaced by the
                   38891: <var title="">n</var> th value in the <var title="">arguments</var>
                   38892: array.)</p>
                   38893: <p>If the second argument is <del class="diff-old">ommitted</del>
                   38894: <ins class="diff-chg">omitted</ins> or null, then treat the
                   38895: <var title="">arguments</var> array as empty.</p>
                   38896: <p>The result is <i>the statement</i> .</p>
                   38897: <p class="big-issue"><ins class="diff-new">Implementation feedback
                   38898: is requested on what to do with arguments that are of types that
                   38899: are not supported by the underlying SQL backend. For example,
                   38900: SQLite doesn't support booleans, so what should the UA do if passed
                   38901: a boolean? The Gears team suggests failing, not silently converting
                   38902: types.</ins></p>
                   38903: </li>
                   38904: <li>
                   38905: <p>If the syntax of <var title="">sqlStatement</var> is not valid
                   38906: (except for the use of <code title="">?</code> characters in the
                   38907: place of literals), or the statement uses features that are not
                   38908: supported (e.g. due to security reasons), or the number of items in
                   38909: the <var title="">arguments</var> array is not equal to the number
                   38910: of <code title="">?</code> placeholders in the statement, or the
                   38911: statement cannot be parsed for some other reason, then mark <i>the
                   38912: statement</i> as bogus.</p>
                   38913: </li>
                   38914: <li>
                   38915: <p>If the <code><a href="#database0">Database</a></code> object
                   38916: that the <code><a href="#sqltransaction">SQLTransaction</a></code>
                   38917: object was created from has an <a href="#expected" title=
                   38918: "concept-database-expected-version">expected version</a> that is
                   38919: neither the empty string nor the actual version of the database,
                   38920: then mark <i>the statement</i> as bogus. ( <a href="#x1" title=
                   38921: "dom-sqlerror-code-2">Error code 2</a> .)</p>
                   38922: </li>
                   38923: <li>
                   38924: <p>Queue up <i>the statement</i> in the transaction, along with the
                   38925: third argument (if any) as the statement's result set callback and
                   38926: the fourth argument (if any) as the error callback.</p>
                   38927: </li>
                   38928: </ol>
                   38929: <p>The user agent must act as if the database was hosted in an
                   38930: otherwise completely empty environment with no resources. For
                   38931: example, attempts to read from or write to the <del class=
                   38932: "diff-old">filesystem</del> <ins class="diff-chg">file system</ins>
                   38933: will fail.</p>
                   38934: <p><del class="diff-old">User agents should limit the total amount
                   38935: of space allowed for each origin, but may prompt the user and
                   38936: extend the limit if a database is reaching its quota. User agents
                   38937: should allow users to see how much space each database is using. A
                   38938: mostly arbitrary limit of five megabytes per origin is recommended.
                   38939: Implementation feedback is welcome and will be used to update this
                   38940: suggestion in future.</del> SQL inherently supports multiple
                   38941: concurrent connections. Authors should make appropriate use of the
                   38942: transaction features to handle the case of multiple scripts
                   38943: interacting with the same database simultaneously (as could happen
                   38944: if the same page was opened in two different <a href="#browsing1"
                   38945: title="browsing context">browsing contexts</a> ).</p>
                   38946: <p>User agents must consider statements that use the <code title=
                   38947: "">BEGIN</code> , <code title="">COMMIT</code> , and <code title=
                   38948: "">ROLLBACK</code> SQL features as being unsupported (and thus will
                   38949: mark them as bogus), so as to not let these statements interfere
                   38950: with the explicit transactions managed by the database API
                   38951: itself.</p>
                   38952: <p class="note">A future version of this specification will
                   38953: probably define the exact SQL subset required in more detail.</p>
                   38954: <h5 id="database"><span class="secno"><del class=
                   38955: "diff-old">4.11.4.</del> <ins class=
                   38956: "diff-chg">4.11.2.4.</ins></span> Database query results</h5>
                   38957: <p>The <code title="dom-transaction-executeSql">executeSql()</code>
                   38958: method invokes its callback with a <code><a href=
                   38959: "#sqlresultset">SQLResultSet</a></code> object as an argument.</p>
                   38960: <pre class="idl">
                   38961: interface <dfn id="sqlresultset">SQLResultSet</dfn> {
                   38962:   readonly attribute int <a href="#insertid" title=
                   38963: "dom-SQLResultSet-insertId">insertId</a>;
                   38964:   readonly attribute int <a href="#rowsaffected" title=
                   38965: "dom-SQLResultSet-rowsAffected">rowsAffected</a>;
                   38966:   readonly attribute <a href=
                   38967: "#sqlresultsetrowlist">SQLResultSetRowList</a> <a href="#rows1"
                   38968: title="dom-SQLResultSet-rows">rows</a>;
                   38969: };
                   38970: </pre>
                   38971: <p>The <dfn id="insertid" title=
                   38972: "dom-SQLResultSet-insertId"><code>insertId</code></dfn> attribute
                   38973: must return the row ID of the row that the <code><a href=
                   38974: "#sqlresultset">SQLResultSet</a></code> object's SQL statement
                   38975: inserted into the database, if the statement inserted a row. If the
                   38976: statement inserted multiple rows, the ID of the last row must be
                   38977: the one returned. If the statement did not insert a row, then the
                   38978: attribute must instead raise an <code>INVALID_ACCESS_ERR</code>
                   38979: exception.</p>
                   38980: <p>The <dfn id="rowsaffected" title=
                   38981: "dom-SQLResultSet-rowsAffected"><code>rowsAffected</code></dfn>
                   38982: attribute must return the number of rows that were affected by the
                   38983: SQL statement. If the statement did not affected any rows, then the
                   38984: attribute must return zero. For "SELECT" statements, this returns
                   38985: zero (querying the database doesn't affect any rows).</p>
                   38986: <p>The <dfn id="rows1" title=
                   38987: "dom-SQLResultSet-rows"><code>rows</code></dfn> attribute must
                   38988: return a <code><a href=
                   38989: "#sqlresultsetrowlist">SQLResultSetRowList</a></code> representing
                   38990: the rows returned, in the order returned by the database. If no
                   38991: rows were returned, then the object will be <del class=
                   38992: "diff-old">empty.</del> <ins class="diff-chg">empty (its</ins>
                   38993: <code title="dom-SQLResultSetRowList-length"><a href=
                   38994: "#length10"><ins class="diff-chg">length</ins></a></code>
                   38995: <ins class="diff-chg">will be zero).</ins></p>
                   38996: <pre class="idl">
                   38997: interface <dfn id="sqlresultsetrowlist">SQLResultSetRowList</dfn> {
                   38998: <del class="diff-old">  readonly attribute unsigned long ;
                   38999:   (in unsigned long index);
                   39000: </del>
                   39001: <ins class="diff-chg">  readonly attribute unsigned long <a href=
                   39002: "#length10" title="dom-SQLResultSetRowList-length">length</a>;
                   39003:   [IndexGetter] <span>DOMObject</span> <a href="#itemindex5" title=
                   39004: "dom-SQLResultSetRowList-item">item</a>(in unsigned long index);
                   39005: </ins>
                   39006: };
                   39007: </pre>
                   39008: <p><code><a href=
                   39009: "#sqlresultsetrowlist">SQLResultSetRowList</a></code> objects have
                   39010: a <dfn id="length10" title=
                   39011: "dom-SQLResultSetRowList-length"><code>length</code></dfn>
                   39012: attribute that must return the number of rows it represents (the
                   39013: number of rows returned by the database).</p>
                   39014: <p>The <dfn id="itemindex5" title=
                   39015: "dom-SQLResultSetRowList-item"><code>item( <var title=
                   39016: "">index</var> )</code></dfn> attribute must return the row with
                   39017: the given index <var title="">index</var> . If there is no such
                   39018: row, then the method must raise an <code>INDEX_SIZE_ERR</code>
                   39019: exception.</p>
                   39020: <p>Each row must be represented by a native ordered dictionary data
                   39021: type. In the ECMAScript binding, this must be <code><a href=
                   39022: "#object">Object</a></code> . Each row object must have one
                   39023: property (or dictionary entry) per column, with those properties
                   39024: enumerating in the order that these columns were returned by the
                   39025: database. Each property must have the name of the column and the
                   39026: value of the cell, as they were returned by the database.</p>
                   39027: <h5 id="errors"><span class="secno"><del class=
                   39028: "diff-old">4.11.5.</del> <ins class=
                   39029: "diff-chg">4.11.2.5.</ins></span> Errors</h5>
                   39030: <p>Errors in the database API are reported using callbacks that
                   39031: have a <code><a href="#sqlerror">SQLError</a></code> object as one
                   39032: of their arguments.</p>
                   39033: <pre class="idl">
                   39034: interface <dfn id="sqlerror">SQLError</dfn> {
                   39035:   readonly attribute unsigned int <a href="#code1" title=
                   39036: "dom-SQLError-code">code</a>;
                   39037:   readonly attribute DOMString <a href="#message" title=
                   39038: "dom-SQLError-message">message</a>;
                   39039: };
                   39040: </pre>
                   39041: <p>The <dfn id="code1" title=
                   39042: "dom-SQLError-code"><code>code</code></dfn> DOM attribute must
                   39043: return the most appropriate code from the following table:</p>
                   39044: <table>
                   39045: <thead>
                   39046: <tr>
                   39047: <th>Code</th>
                   39048: <th>Situation</th>
                   39049: </tr>
                   39050: </thead>
                   39051: <tbody>
                   39052: <tr>
                   39053: <td><dfn id="x" title="dom-sqlerror-code-0">0</dfn></td>
                   39054: <td>The transaction failed for reasons unrelated to the database
                   39055: itself and not covered by any other error code.</td>
                   39056: </tr>
                   39057: <tr>
                   39058: <td><dfn id="x0" title="dom-sqlerror-code-1">1</dfn></td>
                   39059: <td>The statement failed for database reasons not covered by any
                   39060: other error code.</td>
                   39061: </tr>
                   39062: <tr>
                   39063: <td><dfn id="x1" title="dom-sqlerror-code-2">2</dfn></td>
                   39064: <td>The statement failed because the <a href="#expected" title=
                   39065: "concept-database-expected-version">expected version</a> of the
                   39066: database didn't match the actual database version.</td>
                   39067: </tr>
                   39068: <tr>
                   39069: <td><dfn id="x2" title="dom-sqlerror-code-3">3</dfn></td>
                   39070: <td>The statement failed because the data returned from the
                   39071: database was too large. The SQL "LIMIT" modifier might be useful to
                   39072: reduce the size of the result set.</td>
                   39073: </tr>
                   39074: <tr>
                   39075: <td><dfn id="x3" title="dom-sqlerror-code-4">4</dfn></td>
                   39076: <td>The statement failed because there was not enough remaining
                   39077: storage space, or the storage quota was reached and the user
                   39078: declined to give more space to the database.</td>
                   39079: </tr>
                   39080: <tr>
                   39081: <td><dfn id="x4" title="dom-sqlerror-code-5">5</dfn></td>
                   39082: <td>The statement failed because the transaction's first statement
                   39083: was a read-only statement, and a subsequent statement in the same
                   39084: transaction tried to modify the database, but the transaction
                   39085: failed to obtain a write lock before another transaction obtained a
                   39086: write lock and changed a part of the database that the former
                   39087: transaction was <del class="diff-old">dependending</del>
                   39088: <ins class="diff-chg">depending</ins> upon.</td>
                   39089: </tr>
                   39090: <tr>
                   39091: <td><dfn id="x5" title="dom-sqlerror-code-6">6</dfn></td>
                   39092: <td>An <code title="">INSERT</code> , <code title="">UPDATE</code>
                   39093: , or <code title="">REPLACE</code> statement failed due to a
                   39094: constraint failure. For example, because a row was being inserted
                   39095: and the value given for the primary key column duplicated the value
                   39096: of an existing row.</td>
                   39097: </tr>
                   39098: </tbody>
                   39099: </table>
                   39100: <p class="big-issue">We should define a more thorough list of
                   39101: codes. Implementation feedback is requested to determine what codes
                   39102: are needed.</p>
                   39103: <p>The <dfn id="message" title=
                   39104: "dom-SQLError-message"><code>message</code></dfn> DOM attribute
                   39105: must return an error message describing the error encountered. The
                   39106: message should be <del class="diff-old">localised</del> <ins class=
                   39107: "diff-chg">localized</ins> to the user's language.</p>
                   39108: <h5 id="processing3"><span class="secno"><del class=
                   39109: "diff-old">4.11.6.</del> <ins class=
                   39110: "diff-chg">4.11.2.6.</ins></span> Processing model</h5>
                   39111: <p>The <dfn id="transaction0">transaction steps</dfn> are as
                   39112: follows. These steps must be run asynchronously. These steps are
                   39113: invoked with a <i>transaction callback</i> , optionally an <i>error
                   39114: callback</i> , optionally a <i>success callback</i> , optionally a
                   39115: <i>preflight operation</i> , and optionally a <i>postflight
                   39116: operation</i> .</p>
                   39117: <ol>
                   39118: <li>
                   39119: <p>Open a new SQL transaction to the database, and create a
                   39120: <code><a href="#sqltransaction">SQLTransaction</a></code> object
                   39121: that represents that transaction.</p>
                   39122: </li>
                   39123: <li>
                   39124: <p>If an error <del class="diff-old">occured</del> <ins class=
                   39125: "diff-chg">occurred</ins> in the opening of the transaction, jump
                   39126: to the last step.</p>
                   39127: </li>
                   39128: <li>
                   39129: <p>If a <i>preflight operation</i> was defined for this instance of
                   39130: the transaction steps, run that. If it fails, then jump to the last
                   39131: step. (This is basically a hook for the <code title=
                   39132: "dom-database-changeVersion"><a href=
                   39133: "#changeversion">changeVersion()</a></code> method.)</p>
                   39134: </li>
                   39135: <li>
                   39136: <p>Invoke the <i>transaction callback</i> with the aforementioned
                   39137: <code><a href="#sqltransaction">SQLTransaction</a></code> object as
                   39138: its only argument.</p>
                   39139: </li>
                   39140: <li>
                   39141: <p>If the callback couldn't be called (e.g. it was null), or if the
                   39142: callback was invoked and raised an exception, jump to the last
                   39143: step.</p>
                   39144: </li>
                   39145: <li>
                   39146: <p>While there are any statements queued up in the transaction,
                   39147: perform the following steps for each queued up statement in the
                   39148: transaction, oldest first. Each statement has a statement,
                   39149: <ins class="diff-new">optionally</ins> a result set callback, and
                   39150: optionally an error callback.</p>
                   39151: <ol>
                   39152: <li>
                   39153: <p>If the statement is marked as bogus, jump to the "in case of
                   39154: error" steps below.</p>
                   39155: </li>
                   39156: <li>
                   39157: <p>Execute the statement in the context of the transaction.
                   39158: <a href="#references">[SQL]</a></p>
                   39159: </li>
                   39160: <li>
                   39161: <p>If the statement failed, jump to the "in case of error" steps
                   39162: below.</p>
                   39163: </li>
                   39164: <li>
                   39165: <p>Create a <code><a href="#sqlresultset">SQLResultSet</a></code>
                   39166: object that represents the result of the statement.</p>
                   39167: </li>
                   39168: <li>
                   39169: <p><del class="diff-old">Invoke</del> <ins class=
                   39170: "diff-chg">If</ins> the <del class="diff-old">statement's</del>
                   39171: <ins class="diff-chg">statement has a</ins> result set <del class=
                   39172: "diff-old">callback</del> <ins class="diff-chg">callback, invoke
                   39173: it</ins> with the <code><a href=
                   39174: "#sqltransaction">SQLTransaction</a></code> object as its first
                   39175: argument and the new <code><a href=
                   39176: "#sqlresultset">SQLResultSet</a></code> object as its second
                   39177: argument.</p>
                   39178: </li>
                   39179: <li>
                   39180: <p>If the callback was invoked and raised an exception, jump to the
                   39181: last step in the overall steps.</p>
                   39182: </li>
                   39183: <li>
                   39184: <p>Move on to the next statement, if any, or onto the next overall
                   39185: step otherwise.</p>
                   39186: </li>
                   39187: </ol>
                   39188: <p>In case of error (or more specifically, if the above substeps
                   39189: say to jump to the "in case of error" steps), run the following
                   39190: substeps:</p>
                   39191: <ol>
                   39192: <li>
                   39193: <p>If the statement had an associated error callback, then invoke
                   39194: that error callback with the <code><a href=
                   39195: "#sqltransaction">SQLTransaction</a></code> object and a newly
                   39196: constructed <code><a href="#sqlerror">SQLError</a></code> object
                   39197: that represents the error that caused these substeps to be run as
                   39198: the two arguments, respectively.</p>
                   39199: </li>
                   39200: <li>
                   39201: <p>If the error callback returns false, then move on to the next
                   39202: statement, if any, or onto the next overall step otherwise.</p>
                   39203: </li>
                   39204: <li>
                   39205: <p>Otherwise, the error callback did not return false, or there was
                   39206: no error callback. Jump to the last step in the overall steps.</p>
                   39207: </li>
                   39208: </ol>
                   39209: </li>
                   39210: <li>
                   39211: <p>If a <i>postflight operation</i> was defined for <del class=
                   39212: "diff-old">his</del> <ins class="diff-chg">this</ins> instance of
                   39213: the transaction steps, run that. If it fails, then jump to the last
                   39214: step. (This is basically a hook for the <code title=
                   39215: "dom-database-changeVersion"><a href=
                   39216: "#changeversion">changeVersion()</a></code> method.)</p>
                   39217: </li>
                   39218: <li>
                   39219: <p>Commit the transaction.</p>
                   39220: </li>
                   39221: <li>
                   39222: <p>If an error <del class="diff-old">occured</del> <ins class=
                   39223: "diff-chg">occurred</ins> in the committing of the transaction,
                   39224: jump to the last step.</p>
                   39225: </li>
                   39226: <li>
                   39227: <p>Invoke the <i>success callback</i> .</p>
                   39228: </li>
                   39229: <li>
                   39230: <p>End these steps. The next step is only used when something goes
                   39231: wrong.</p>
                   39232: </li>
                   39233: <li>
                   39234: <p>Call the <i>error callback</i> with a newly constructed
                   39235: <code><a href="#sqlerror">SQLError</a></code> object that
                   39236: represents the last error to have <del class=
                   39237: "diff-old">occured</del> <ins class="diff-chg">occurred</ins> in
                   39238: this transaction. <del class="diff-old">If the error callback
                   39239: returned false, and the last error wasn't itself a failure when
                   39240: committing the transaction, then try to commit the transaction. If
                   39241: that fails, or if the callback couldn't be called (e.g. the method
                   39242: was called with only one argument), or if it didn't return false,
                   39243: then rollback</del> <ins class="diff-chg">Rollback</ins> the
                   39244: transaction. Any still-pending statements in the transaction are
                   39245: discarded.</p>
                   39246: </li>
                   39247: </ol>
                   39248: <h4 id="disk-space"><span class="secno"><ins class=
                   39249: "diff-new">4.11.3</ins></span> <ins class="diff-new">Disk
                   39250: space</ins></h4>
                   39251: <p><ins class="diff-new">User agents should limit the total amount
                   39252: of space allowed for storage areas and databases.</ins></p>
                   39253: <p><ins class="diff-new">User agents should guard against sites
                   39254: storing data in the storage areas or databases of subdomains, e.g.
                   39255: storing up to the limit in a1.example.com, a2.example.com,
                   39256: a3.example.com, etc, circumventing the main example.com storage
                   39257: limit.</ins></p>
                   39258: <p><ins class="diff-new">User agents may prompt the user when
                   39259: quotas are reached, allowing the user to grant a site more space.
                   39260: This enables sites to store many user-created documents on the
                   39261: user's computer, for instance.</ins></p>
                   39262: <p><ins class="diff-new">User agents should allow users to see how
                   39263: much space each domain is using.</ins></p>
                   39264: <p><ins class="diff-new">A mostly arbitrary limit of five megabytes
                   39265: per domain is recommended. Implementation feedback is welcome and
                   39266: will be used to update this suggestion in future.</ins></p>
                   39267: <h4 id="privacy"><span class="secno"><del class=
                   39268: "diff-old">4.11.7.</del> <ins class="diff-chg">4.11.4</ins></span>
                   39269: Privacy</h4>
                   39270: <h5 id="user-tracking"><span class="secno"><ins class=
                   39271: "diff-new">4.11.4.1.</ins></span> <ins class="diff-new">User
                   39272: tracking</ins></h5>
                   39273: <p><ins class="diff-new">A third-party advertiser (or any entity
                   39274: capable of getting content distributed to multiple sites) could use
                   39275: a unique identifier stored in its local storage area or in its
                   39276: client-side database to track a user across multiple sessions,
                   39277: building a profile of the user's interests to allow for highly
                   39278: targeted advertising.</ins> In <del class="diff-old">contrast</del>
                   39279: <ins class="diff-chg">conjunction</ins> with <ins class=
                   39280: "diff-new">a site that is aware of</ins> the <ins class=
                   39281: "diff-chg">user's real identity (for example an e-commerce site
                   39282: that requires authenticated credentials), this could allow
                   39283: oppressive groups to target individuals with greater accuracy than
                   39284: in a world with purely anonymous Web usage.</ins></p>
                   39285: <p><ins class="diff-chg">There are a number of techniques that can
                   39286: be used to mitigate the risk of user tracking:</ins></p>
                   39287: <ul>
                   39288: <li>
                   39289: <p><ins class="diff-chg">Blocking third-party storage: user agents
                   39290: may restrict access to the</ins> <code title=
                   39291: "dom-localStorage"><del class="diff-old">globalStorage</del>
                   39292: <a href="#localstorage"><ins class=
                   39293: "diff-chg">localStorage</ins></a></code> <del class=
                   39294: "diff-old">feature, which intentionally allows</del> <ins class=
                   39295: "diff-chg">and database objects to scripts originating at the
                   39296: domain of the top-level document of the</ins> <a href=
                   39297: "#browsing1"><ins class="diff-chg">browsing context</ins></a>
                   39298: ,<ins class="diff-chg">for instance denying access to the API for
                   39299: pages from other domains running in</ins> <code><a href=
                   39300: "#iframe"><ins class="diff-chg">iframe</ins></a></code> <ins class=
                   39301: "diff-chg">s.</ins></p>
                   39302: </li>
                   39303: <li>
                   39304: <p><ins class="diff-chg">Expiring stored data: user agents may
                   39305: automatically delete stored data after a period of time.</ins></p>
                   39306: <p><ins class="diff-chg">For example, a user agent could treat
                   39307: third-party local storage areas as session-only storage, deleting
                   39308: the</ins> data <ins class="diff-new">once the user had closed all
                   39309: the</ins> <span><ins class="diff-new">browsing
                   39310: contexts</ins></span> <ins class="diff-new">that could access
                   39311: it.</ins></p>
                   39312: <p><ins class="diff-new">This can restrict the ability of a
                   39313: site</ins> to <ins class="diff-new">track a user, as the site would
                   39314: then only</ins> be <del class="diff-old">accessed</del> <ins class=
                   39315: "diff-chg">able to track the user</ins> across multiple <del class=
                   39316: "diff-old">domains, protocols, and ports (albeit</del> <ins class=
                   39317: "diff-chg">sessions when he authenticates with the site itself
                   39318: (e.g. by making a purchase or logging</ins> in <ins class=
                   39319: "diff-new">to</ins> a <del class="diff-old">controlled
                   39320: fashion),</del> <ins class="diff-chg">service).</ins></p>
                   39321: <p><ins class="diff-chg">However,</ins> this <ins class=
                   39322: "diff-new">also puts the user's data at risk.</ins></p>
                   39323: </li>
                   39324: <li>
                   39325: <p><ins class="diff-new">Treating persistent storage as cookies:
                   39326: user agents should present the persistent storage and</ins>
                   39327: database <del class="diff-old">feature is limited</del> <ins class=
                   39328: "diff-chg">features</ins> to <del class="diff-old">scripts
                   39329: running</del> <ins class="diff-chg">the user in a way that does not
                   39330: distinguish them from HTTP session cookies.</ins> <a href=
                   39331: "#references"><ins class="diff-chg">[RFC2965]</ins></a></p>
                   39332: <p><ins class="diff-chg">This might encourage users to view
                   39333: persistent storage</ins> with <ins class="diff-new">healthy
                   39334: suspicion.</ins></p>
                   39335: </li>
                   39336: <li>
                   39337: <p><ins class="diff-new">Site-specific white-listing of access to
                   39338: local storage areas and databases: user agents may allow sites to
                   39339: access session storage areas in an unrestricted manner, but
                   39340: require</ins> the <del class="diff-old">same</del> <ins class=
                   39341: "diff-chg">user to authorize access to local storage areas and
                   39342: databases.</ins></p>
                   39343: </li>
                   39344: <li>
                   39345: <p><a href="#origin0"><del class="diff-old">origin</del>
                   39346: <ins class="diff-chg">Origin</ins></a> <del class=
                   39347: "diff-old">as</del> <ins class="diff-chg">-tracking of persistent
                   39348: storage data: user agents may record</ins> the <del class=
                   39349: "diff-old">database. Thus, it is expected</del> <ins class=
                   39350: "diff-chg">origins of sites</ins> that <del class="diff-old">the
                   39351: privacy implications</del> <ins class="diff-chg">contained content
                   39352: from third-party origins that caused data to</ins> be <del class=
                   39353: "diff-old">equivalent</del> <ins class="diff-chg">stored.</ins></p>
                   39354: <p><ins class="diff-chg">If this information is then used</ins> to
                   39355: <del class="diff-old">those already</del> present <ins class=
                   39356: "diff-new">the view of data currently</ins> in <del class=
                   39357: "diff-old">allowing scripts</del> <ins class="diff-chg">persistent
                   39358: storage, it would allow the user</ins> to <del class=
                   39359: "diff-old">communicate</del> <ins class="diff-chg">make informed
                   39360: decisions about which parts of the persistent storage to prune.
                   39361: Combined</ins> with <del class="diff-old">their originating
                   39362: host.</del> <ins class="diff-chg">a blacklist ("delete this data
                   39363: and prevent this domain from ever storing data again"), the user
                   39364: can restrict the use of persistent storage to sites that he
                   39365: trusts.</ins></p>
                   39366: </li>
                   39367: <li>
                   39368: <p><del class="diff-old">User</del> <ins class="diff-chg">Shared
                   39369: blacklists: user</ins> agents <del class="diff-old">are
                   39370: encouraged</del> <ins class="diff-chg">may allow users</ins> to
                   39371: <del class="diff-old">treat</del> <ins class="diff-chg">share their
                   39372: persistent storage domain blacklists.</ins></p>
                   39373: <p><ins class="diff-chg">This would allow communities to act
                   39374: together to protect their privacy.</ins></p>
                   39375: </li>
                   39376: </ul>
                   39377: <p><ins class="diff-chg">While these suggestions prevent trivial
                   39378: use of these APIs for user tracking, they do not block it
                   39379: altogether. Within a single domain, a site can continue to track
                   39380: the user during a session, and can then pass all this information
                   39381: to the third party along with any identifying information (names,
                   39382: credit card numbers, addresses) obtained by the site. If a third
                   39383: party cooperates with multiple sites to obtain such information, a
                   39384: profile can still be created.</ins></p>
                   39385: <p><ins class="diff-chg">However, user tracking is to some extent
                   39386: possible even with no cooperation from the user agent whatsoever,
                   39387: for instance by using session identifiers in URIs, a technique
                   39388: already commonly used for innocuous purposes but easily repurposed
                   39389: for user tracking (even retroactively). This information can then
                   39390: be shared with other sites, using using visitors' IP addresses and
                   39391: other user-specific data (e.g. user-agent headers and configuration
                   39392: settings) to combine separate sessions into coherent user
                   39393: profiles.</ins></p>
                   39394: <h5 id="cookie"><span class="secno"><ins class=
                   39395: "diff-chg">4.11.4.2.</ins></span> <ins class="diff-chg">Cookie
                   39396: resurrection</ins></h5>
                   39397: <p><ins class="diff-chg">If the user interface for persistent
                   39398: storage presents</ins> data <del class="diff-old">stored</del> in
                   39399: <del class="diff-old">databases</del> <ins class="diff-chg">the
1.2     ! mike     39400: persistent storage features separately from data</ins> in
        !          39401: <ins class="diff-new">HTTP session cookies, then users are likely
        !          39402: to delete data in one and not</ins> the <del class="diff-old">same
1.1       mike     39403: way</del> <ins class="diff-chg">other. This would allow sites to
                   39404: use the two features</ins> as <del class="diff-old">cookies</del>
                   39405: <ins class="diff-chg">redundant backup</ins> for <del class=
                   39406: "diff-old">the purposes</del> <ins class="diff-chg">each other,
                   39407: defeating a user's attempts to protect his privacy.</ins></p>
                   39408: <h4 id="security7"><span class="secno"><ins class=
                   39409: "diff-chg">4.11.5</ins></span> <ins class=
                   39410: "diff-chg">Security</ins></h4>
                   39411: <h5 id="dns-spoofing"><span class="secno"><ins class=
                   39412: "diff-chg">4.11.5.1.</ins></span> <ins class="diff-chg">DNS
                   39413: spoofing attacks</ins></h5>
                   39414: <p><ins class="diff-chg">Because</ins> of <del class=
                   39415: "diff-old">user interfaces,</del> <ins class="diff-chg">the
                   39416: potential for DNS spoofing attacks, one cannot guarantee that a
                   39417: host claiming</ins> to <del class="diff-old">reduce</del>
                   39418: <ins class="diff-chg">be in a certain domain really is from that
                   39419: domain. To mitigate this, pages can use SSL. Pages using SSL can be
                   39420: sure that only pages using SSL that have certificates identifying
                   39421: them as being from</ins> the <del class="diff-old">risk</del>
                   39422: <ins class="diff-chg">same domain can access their local storage
                   39423: areas and databases.</ins></p>
                   39424: <h5 id="cross-directory"><span class="secno"><ins class=
                   39425: "diff-chg">4.11.5.2.</ins></span> <ins class=
                   39426: "diff-chg">Cross-directory attacks</ins></h5>
                   39427: <p><ins class="diff-chg">Different authors sharing one host name,
                   39428: for example users hosting content on</ins> <code><ins class=
                   39429: "diff-chg">geocities.com</ins></code> ,<ins class="diff-chg">all
                   39430: share one persistent storage object and one set</ins> of
                   39431: <del class="diff-old">using this</del> <ins class=
                   39432: "diff-chg">databases. There is no</ins> feature <ins class=
                   39433: "diff-new">to restrict the access by pathname. Authors on shared
                   39434: hosts are therefore recommended to avoid using the persistent
                   39435: storage features, as it would be trivial</ins> for <del class=
                   39436: "diff-old">cookie resurrection.</del> <ins class="diff-chg">other
                   39437: authors to read from and write to the same storage area or
                   39438: database.</ins></p>
                   39439: <p class="note"><ins class="diff-chg">Even if a path-restriction
                   39440: feature was made available, the usual DOM scripting security model
                   39441: would make it trivial to bypass this protection and access the data
                   39442: from any path.</ins></p>
                   39443: <h5 id="implementation"><span class="secno"><del class=
                   39444: "diff-old">4.11.8.</del> <ins class=
                   39445: "diff-chg">4.11.5.3.</ins></span> <del class=
                   39446: "diff-old">Security</del> <ins class="diff-chg">Implementation
                   39447: risks</ins></h5>
                   39448: <p><ins class="diff-chg">The two primary risks when implementing
                   39449: these persistent storage features are letting hostile sites read
                   39450: information from other domains, and letting hostile sites write
                   39451: information that is then read from other domains.</ins></p>
                   39452: <p><ins class="diff-chg">Letting third-party sites read data that
                   39453: is not supposed to be read from their domain causes</ins>
                   39454: <em><ins class="diff-chg">information leakage</ins></em>
                   39455: ,<ins class="diff-chg">For example, a user's shopping wishlist on
                   39456: one domain could be used by another domain for targeted
                   39457: advertising; or a user's work-in-progress confidential documents
                   39458: stored by a word-processing site could be examined by the site of a
                   39459: competing company.</ins></p>
                   39460: <p><ins class="diff-chg">Letting third-party sites write data to
                   39461: the storage areas of other domains can result in</ins>
                   39462: <em><ins class="diff-chg">information spoofing</ins></em>
                   39463: ,<ins class="diff-chg">which is equally dangerous. For example, a
                   39464: hostile site could add items to a user's wishlist; or a hostile
                   39465: site could set a user's session identifier to a known ID that the
                   39466: hostile site can then use to track the user's actions on the victim
                   39467: site.</ins></p>
                   39468: <p><ins class="diff-chg">Thus, strictly following the</ins>
                   39469: <a href="#origin0"><ins class="diff-chg">origin</ins></a>
                   39470: <ins class="diff-chg">model described in this specification is
                   39471: important for user security.</ins></p>
                   39472: <h5 id="sql-and"><span class="secno"><del class=
                   39473: "diff-old">4.11.8.1.</del> <ins class=
                   39474: "diff-chg">4.11.5.4.</ins></span> <del class="diff-old">User</del>
                   39475: <ins class="diff-chg">SQL and user</ins> agents</h5>
                   39476: <p>User agent implementors are strongly encouraged to audit all
                   39477: their supported SQL statements for security implications. For
                   39478: example, <code title="">LOAD DATA INFILE</code> is likely to pose
                   39479: security risks and there is little reason to support it.</p>
                   39480: <p>In general, it is recommended that user agents not support
                   39481: features that control how databases are stored on disk. For
                   39482: example, there is little reason to allow Web authors to control the
                   39483: character encoding used in the disk representation of the data, as
                   39484: all data in ECMAScript is implicitly UTF-16.</p>
                   39485: <h5 id="sql-injection"><span class="secno"><del class=
                   39486: "diff-old">4.11.8.2.</del> <ins class=
                   39487: "diff-chg">4.11.5.5.</ins></span> SQL injection</h5>
                   39488: <p>Authors are strongly recommended to make use of the <code title=
                   39489: "">?</code> placeholder feature of the <code title=
                   39490: "dom-sqltransaction-executeSql"><a href=
                   39491: "#executesql">executeSql()</a></code> method, and to never
                   39492: construct SQL statements on the fly.</p>
                   39493: <h3 id="links"><span class="secno"><del class=
                   39494: "diff-old">4.12.</del> <ins class="diff-chg">4.12</ins></span>
                   39495: Links</h3>
                   39496: <h4 id="hyperlink"><span class="secno"><del class=
                   39497: "diff-old">4.12.1.</del> <ins class="diff-chg">4.12.1</ins></span>
                   39498: Hyperlink elements</h4>
                   39499: <p>The <code><a href="#a">a</a></code> , <code><a href=
                   39500: "#area">area</a></code> , and <code><a href="#link">link</a></code>
                   39501: elements can, in certain situations described in the definitions of
                   39502: those elements, represent <dfn id="hyperlinks" title=
                   39503: "hyperlink">hyperlinks</dfn> .</p>
                   39504: <p>The <dfn id="href6" title=
                   39505: "attr-hyperlink-href"><code>href</code></dfn> attribute on a
                   39506: hyperlink element must have a value that is a URI (or IRI). This
                   39507: URI is the <em>destination resource</em> of the hyperlink.</p>
                   39508: <div class="note">
                   39509: <p>The <code title="attr-hyperlink-href"><a href=
                   39510: "#href6">href</a></code> attribute on <code><a href=
                   39511: "#a">a</a></code> and <code><a href="#area">area</a></code>
                   39512: elements is not required; when those elements do not have
                   39513: <code title="attr-hyperlink-href"><a href="#href6">href</a></code>
                   39514: attributes they do not represent hyperlinks.</p>
                   39515: <p>The <code title="attr-link-href"><a href=
                   39516: "#href1">href</a></code> attribute on the <code><a href=
                   39517: "#link">link</a></code> element <em>is</em> required, but whether a
                   39518: <code><a href="#link">link</a></code> element represents a
                   39519: hyperlink or not depends on the value of the <code title=
                   39520: "attr-link-rel"><a href="#rel">rel</a></code> attribute of that
                   39521: element.</p>
                   39522: </div>
                   39523: <p>The <dfn id="target3" title=
                   39524: "attr-hyperlink-target"><code>target</code></dfn> attribute, if
                   39525: present, must be a <a href="#valid9">valid browsing context name
                   39526: <ins class="diff-new">or keyword</ins></a> . User agents use this
                   39527: name when <a href="#following0">following hyperlinks</a> .</p>
                   39528: <p>The <dfn id="ping" title=
                   39529: "attr-hyperlink-ping"><code>ping</code></dfn> attribute, if
                   39530: present, gives the URIs of the resources that are interested in
                   39531: being notified if the user follows the hyperlink. The value must be
                   39532: a space separated list of one or more URIs (or IRIs). The value is
                   39533: used by the user agent when <a href="#following0">following
                   39534: hyperlinks</a> .</p>
                   39535: <p>For <code><a href="#a">a</a></code> and <code><a href=
                   39536: "#area">area</a></code> elements that represent hyperlinks, the
                   39537: relationship between the document containing the hyperlink and the
                   39538: destination resource indicated by the hyperlink is given by the
                   39539: value of the element's <dfn id="rel3" title=
                   39540: "attr-hyperlink-rel"><code>rel</code></dfn> attribute, which must
                   39541: be a <a href="#set-of">set of space-separated tokens</a> . The
                   39542: <a href="#linkTypes">allowed values and their meanings</a> are
                   39543: defined below. The <code title="attr-hyperlink-rel"><a href=
                   39544: "#rel3">rel</a></code> attribute has no default value. If the
                   39545: attribute is omitted or if none of the values in the attribute are
                   39546: <del class="diff-old">recognised</del> <ins class=
                   39547: "diff-chg">recognized</ins> by the UA, then the document has no
                   39548: particular relationship with the destination resource other than
                   39549: there being a hyperlink between the two.</p>
                   39550: <p>The <dfn id="media12" title=
                   39551: "attr-hyperlink-media"><code>media</code></dfn> attribute describes
                   39552: for which media the target document was designed. It is purely
                   39553: advisory. The value must be a valid <a href="#mq">media <del class=
                   39554: "diff-old">query.</del> <ins class="diff-chg">query</ins></a> .
                   39555: <a href="#references">[MQ]</a> The default, if the <code title=
                   39556: "attr-hyperlink-media"><a href="#media12">media</a></code>
                   39557: attribute is omitted, is <code>all</code> .</p>
                   39558: <p>The <dfn id="hreflang3" title=
                   39559: "attr-hyperlink-hreflang"><code>hreflang</code></dfn> attribute on
                   39560: hyperlink elements, if present, gives the language of the linked
                   39561: resource. It is purely advisory. The value must be a valid RFC 3066
                   39562: language code. <a href="#references">[RFC3066]</a> User agents must
                   39563: not consider this attribute authoritative — upon fetching the
                   39564: resource, user agents must <del class="diff-old">only</del> use
                   39565: <ins class="diff-new">only</ins> language information associated
                   39566: with the resource to determine its language, not metadata included
                   39567: in the link to the resource.</p>
                   39568: <p>The <dfn id="type17" title=
                   39569: "attr-hyperlink-type"><code>type</code></dfn> attribute, if
                   39570: present, gives the MIME type of the linked resource. It is purely
                   39571: advisory. The value must be a valid MIME type, optionally with
                   39572: parameters. <a href="#references">[RFC2046]</a> User agents must
                   39573: not consider the <code title="attr-hyperlink-type"><a href=
                   39574: "#type17">type</a></code> attribute authoritative — upon fetching
                   39575: the resource, user agents must not use metadata included in the
                   39576: link to the resource to determine its type.</p>
                   39577: <h4 id="following"><span class="secno"><del class=
                   39578: "diff-old">4.12.2.</del> <ins class="diff-chg">4.12.2</ins></span>
                   39579: <dfn id="following0">Following hyperlinks</dfn></h4>
                   39580: <p>When a user <em>follows a hyperlink</em> , the user agent must
                   39581: <a href="#navigate">navigate</a> a <a href="#browsing1">browsing
                   39582: context</a> to the URI of the hyperlink.</p>
                   39583: <p>The URI of the hyperlink is URI given by resolving the
                   39584: <del class="diff-old">the</del> <code title=
                   39585: "attr-hyperlink-href"><a href="#href6">href</a></code> attribute of
                   39586: that hyperlink relative to the hyperlink's element. In the case of
                   39587: server-side image maps, the URI of the hyperlink must further have
                   39588: its <var><a href="#hyperlink2">hyperlink suffix</a></var> appended
                   39589: to it.</p>
                   39590: <p>If the user indicated a specific browsing context when following
                   39591: the hyperlink, or if the user agent is configured to follow
                   39592: hyperlinks by navigating a particular browsing context, then that
                   39593: must be the browsing context that is navigated.</p>
                   39594: <p>Otherwise, if the hyperlink element is an <code><a href=
                   39595: "#a">a</a></code> or <code><a href="#area">area</a></code> element
                   39596: that has a <code title="attr-hyperlink-target"><a href=
                   39597: "#target3">target</a></code> attribute, then the browsing context
                   39598: that is navigated must be chosen by applying <a href=
                   39599: "#the-rules">the rules for <del class="diff-old">chosing</del>
                   39600: <ins class="diff-chg">choosing</ins> a browsing context given a
                   39601: browsing context name</a> , using the value of the <code title=
                   39602: "attr-hyperlink-target"><a href="#target3">target</a></code>
                   39603: attribute as the browsing context name. If these rules result in
                   39604: the creation of a new <a href="#browsing1">browsing context</a> ,
                   39605: it must be navigated with <a href="#replacement">replacement
                   39606: enabled</a> .</p>
                   39607: <p>Otherwise, if the hyperlink element is a <a href="#sidebar0"
                   39608: title="rel-sidebar-hyperlink">sidebar hyperlink</a> and the user
                   39609: agent implements a feature that can be considered a secondary
                   39610: browsing context, such a secondary browsing context may be selected
                   39611: as the browsing context to be navigated.</p>
                   39612: <p>Otherwise, if the hyperlink element is an <code><a href=
                   39613: "#a">a</a></code> or <code><a href="#area">area</a></code> element
                   39614: with no <code title="attr-hyperlink-target"><a href=
                   39615: "#target3">target</a></code> attribute, but one of the child nodes
                   39616: of <a href="#the-head0">the <code>head</code> element</a> is a
                   39617: <code><a href="#base">base</a></code> element with a <code title=
                   39618: "attr-base-target"><a href="#target">target</a></code> attribute,
                   39619: then the browsing context that is navigated must be chosen by
                   39620: applying <a href="#the-rules">the rules for <del class=
                   39621: "diff-old">chosing</del> <ins class="diff-chg">choosing</ins> a
                   39622: browsing context given a browsing context name</a> , using the
                   39623: value of the <code title="attr-base-target"><a href=
                   39624: "#target">target</a></code> attribute of the first such
                   39625: <code><a href="#base">base</a></code> element as the browsing
                   39626: context name. If these rules result in the creation of a new
                   39627: <a href="#browsing1">browsing context</a> , it must be navigated
                   39628: with <a href="#replacement">replacement enabled</a> .</p>
                   39629: <p>Otherwise, the browsing context that must be navigated is the
                   39630: same browsing context as the one which the hyperlink element itself
                   39631: is in.</p>
                   39632: <p><ins class="diff-new">The navigation must be done with the</ins>
                   39633: <a href="#browsing1"><ins class="diff-new">browsing
                   39634: context</ins></a> <ins class="diff-new">that contains the</ins>
                   39635: <code><ins class="diff-new">Document</ins></code> <ins class=
                   39636: "diff-new">object with which the hyperlink's element in question is
                   39637: associated as the</ins> <a href="#source0"><ins class=
                   39638: "diff-new">source browsing context</ins></a> .</p>
                   39639: <h5 id="hyperlink0"><span class="secno">4.12.2.1.</span> Hyperlink
                   39640: auditing</h5>
                   39641: <p>If an <code><a href="#a">a</a></code> or <code><a href=
                   39642: "#area">area</a></code> hyperlink element has a <code title=
                   39643: "attr-hyperlink-ping"><a href="#ping">ping</a></code> attribute and
                   39644: the user follows the hyperlink, the user agent must take the
                   39645: <code title="attr-hyperlink-ping"><a href="#ping">ping</a></code>
                   39646: attribute's value, <span title="split the string on spaces">split
                   39647: that string on spaces</span> , treat each resulting token as a URI
                   39648: (resolving relative URIs according to <a href=
                   39649: "#elements2">element's base <del class="diff-old">URI)</del>
                   39650: <ins class="diff-chg">URI</ins></a> <ins class="diff-chg">)</ins>
                   39651: and then should send a request <ins class="diff-new">(as described
                   39652: below)</ins> to each of the resulting URIs. This may be done in
                   39653: parallel with the primary request, and is independent of the result
                   39654: of that request.</p>
                   39655: <p>User agents should allow the user to adjust this <del class=
                   39656: "diff-old">behaviour,</del> <ins class="diff-chg">behavior,</ins>
                   39657: for example in conjunction with a setting that disables the sending
                   39658: of HTTP <code title="">Referer</code> headers. Based on the user's
                   39659: preferences, UAs may either <a href="#ignored">ignore</a> the
                   39660: <code title="attr-hyperlink-ping"><a href="#ping">ping</a></code>
                   39661: attribute altogether, or selectively ignore URIs in the list (e.g.
                   39662: ignoring any third-party URIs).</p>
                   39663: <p>For URIs that are HTTP URIs, the requests must be performed
                   39664: using the POST method (with an empty entity body in the request).
                   39665: <ins class="diff-new">All relevant cookie and HTTP authentication
                   39666: headers must be included in the request. Which other headers are
                   39667: required depends on the URIs involved.</ins></p>
                   39668: <dl class="switch">
                   39669: <dt><ins class="diff-new">If both the URI of the</ins>
                   39670: <code><ins class="diff-new">Document</ins></code> <ins class=
                   39671: "diff-new">object containing the hyperlink being audited and the
                   39672: ping URI have the</ins> <a href="#same-origin"><ins class=
                   39673: "diff-new">same origin</ins></a></dt>
                   39674: <dd><ins class="diff-new">The request must include a</ins>
                   39675: <code title=""><ins class="diff-new">Ping-From</ins></code>
                   39676: <ins class="diff-new">HTTP header with, as its value, the location
                   39677: of the document containing the hyperlink, and a</ins> <code title=
                   39678: ""><ins class="diff-new">Ping-To</ins></code> <ins class=
                   39679: "diff-new">HTTP header with, as its value, the address of the
                   39680: target of the hyperlink. The request must not include a</ins>
                   39681: <code title=""><ins class="diff-new">Referer</ins></code>
                   39682: <ins class="diff-new">HTTP header.</ins></dd>
                   39683: <dt><ins class="diff-new">Otherwise, if the origins are different,
                   39684: but the document containing the hyperlink being audited was not
                   39685: retrieved over an encrypted connection</ins></dt>
                   39686: <dd><ins class="diff-new">The request must include a</ins>
                   39687: <code title=""><ins class="diff-new">Referer</ins></code>
                   39688: <ins class="diff-new">HTTP header [sic] with, as its value, the
                   39689: location of the document containing the hyperlink, a</ins>
                   39690: <code title=""><ins class="diff-new">Ping-From</ins></code>
                   39691: <ins class="diff-new">HTTP header with the same value, and a</ins>
                   39692: <code title=""><ins class="diff-new">Ping-To</ins></code>
                   39693: <ins class="diff-new">HTTP header with, as its value, the address
                   39694: of the target of the hyperlink.</ins></dd>
                   39695: <dt><ins class="diff-new">Otherwise, the origins are different and
                   39696: the document containing the hyperlink being audited was retrieved
                   39697: over an encrypted connection</ins></dt>
1.2     ! mike     39698: <dd><ins class="diff-new">The request must include a</ins>
        !          39699: <code title=""><ins class="diff-new">Ping-To</ins></code>
        !          39700: <ins class="diff-new">HTTP header with, as its value, the address
        !          39701: of the target of the hyperlink. The request must neither include
        !          39702: a</ins> <code title=""><ins class="diff-new">Referer</ins></code>
1.1       mike     39703: <ins class="diff-new">HTTP header nor include a</ins> <code title=
                   39704: ""><ins class="diff-new">Ping-From</ins></code> <ins class=
                   39705: "diff-new">HTTP header.</ins></dd>
                   39706: </dl>
                   39707: <p class="note"><ins class="diff-new">To save bandwidth,
                   39708: implementors might also wish to consider omitting optional headers
                   39709: such as</ins> <code><ins class="diff-new">Accept</ins></code>
                   39710: <ins class="diff-new">from these requests.</ins></p>
                   39711: <p>User agents must ignore any entity bodies returned in the
                   39712: responses, but must, unless otherwise specified by the user,
                   39713: <del class="diff-old">honour</del> <ins class=
                   39714: "diff-chg">honor</ins> the HTTP headers <del class=
                   39715: "diff-old">—</del> <ins class="diff-chg">(including,</ins> in
                   39716: particular, <ins class="diff-new">redirects and</ins> HTTP cookie
                   39717: <del class="diff-old">headers.</del> <ins class=
                   39718: "diff-chg">headers).</ins> <a href="#references">[RFC2965]</a>
                   39719: <del class="diff-old">To save bandwidth, implementors might wish to
                   39720: consider omitting optional headers such as Accept from these
                   39721: requests.</del></p>
                   39722: <p>When the <code title="attr-hyperlink-ping"><a href=
                   39723: "#ping">ping</a></code> attribute is present, user agents should
                   39724: clearly indicate to the user that following the hyperlink will also
                   39725: cause secondary requests to be sent in the background, possibly
                   39726: including listing the actual target URIs.</p>
                   39727: <div class="note">
                   39728: <p>The <code title="attr-hyperlink-ping"><a href=
                   39729: "#ping">ping</a></code> attribute is redundant with pre-existing
                   39730: technologies like HTTP redirects and JavaScript in allowing Web
                   39731: pages to track which off-site links are most popular or allowing
                   39732: advertisers to track click-through rates.</p>
                   39733: <p>However, the <code title="attr-hyperlink-ping"><a href=
                   39734: "#ping">ping</a></code> attribute provides these advantages to the
                   39735: user over those alternatives:</p>
                   39736: <ul>
                   39737: <li>It allows the user to see the final target URI unobscured.</li>
                   39738: <li>It allows the UA to inform the user about the out-of-band
                   39739: notifications.</li>
                   39740: <li>It allows the paranoid user to disable the notifications
                   39741: without losing the underlying link functionality.</li>
                   39742: <li>It allows the UA to <del class="diff-old">optimise</del>
                   39743: <ins class="diff-chg">optimize</ins> the use of available network
                   39744: bandwidth so that the target page loads faster.</li>
                   39745: </ul>
                   39746: <p>Thus, while it is possible to track users without this feature,
                   39747: authors are encouraged to use the <code title=
                   39748: "attr-hyperlink-ping"><a href="#ping">ping</a></code> attribute so
                   39749: that the user agent can improve the user experience.</p>
                   39750: </div>
                   39751: <h4 id="linkTypes"><span class="secno"><del class=
                   39752: "diff-old">4.12.3.</del> <ins class="diff-chg">4.12.3</ins></span>
                   39753: Link types</h4>
                   39754: <p>The following table <del class="diff-old">summarises</del>
                   39755: <ins class="diff-chg">summarizes</ins> the link types that are
                   39756: defined by this specification. This table is non-normative; the
                   39757: actual definitions for the link types are given in the next few
                   39758: sections.</p>
                   39759: <p>In this section, the term <em>referenced document</em> refers to
                   39760: the resource identified by the element representing the link, and
                   39761: the term <em>current document</em> refers to the resource within
                   39762: which the element representing the link finds itself.</p>
                   39763: <p>To determine which link types apply to a <code><a href=
                   39764: "#link">link</a></code> , <code><a href="#a">a</a></code> , or
                   39765: <code><a href="#area">area</a></code> element, the element's
                   39766: <code title="">rel</code> attribute must be <a href="#split" title=
                   39767: "split a string on spaces">split on spaces</a> . The resulting
                   39768: tokens are the link types that apply to that element.</p>
                   39769: <p>Unless otherwise specified, a keyword must not be specified more
                   39770: than once per <code title="attr-rel-hyperlink">rel</code>
                   39771: attribute.</p>
                   39772: <table>
                   39773: <thead>
                   39774: <tr>
                   39775: <th rowspan="2">Link type</th>
                   39776: <th colspan="2">Effect on...</th>
                   39777: <th rowspan="2">Brief description</th>
                   39778: </tr>
                   39779: <tr>
                   39780: <th><code><a href="#link">link</a></code></th>
                   39781: <th><code><a href="#a">a</a></code> and <code><a href=
                   39782: "#area">area</a></code></th>
                   39783: </tr>
                   39784: </thead>
                   39785: <tbody>
                   39786: <tr>
                   39787: <td><code title="rel-alternate"><a href=
                   39788: "#alternate">alternate</a></code></td>
                   39789: <td><a href="#hyperlink1" title="hyperlink link">Hyperlink</a></td>
                   39790: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39791: <td>Gives alternate representations of the current document.</td>
                   39792: </tr>
                   39793: <tr>
                   39794: <td><code title="rel-archives"><a href=
                   39795: "#archives">archives</a></code></td>
                   39796: <td><a href="#hyperlink1" title="hyperlink link">Hyperlink</a></td>
                   39797: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39798: <td>Provides a link to a collection of records, documents, or other
                   39799: materials of historical interest.</td>
                   39800: </tr>
                   39801: <tr>
                   39802: <td><code title="rel-author"><a href=
                   39803: "#author">author</a></code></td>
                   39804: <td><a href="#hyperlink1" title="hyperlink link">Hyperlink</a></td>
                   39805: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39806: <td>Gives a link to the current document's author.</td>
                   39807: </tr>
                   39808: <tr>
                   39809: <td><code title="rel-bookmark"><a href=
                   39810: "#bookmark">bookmark</a></code></td>
                   39811: <td><em>not allowed</em></td>
                   39812: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39813: <td>Gives the permalink for the nearest ancestor section.
                   39814: <del class="diff-old">contact Hyperlink Hyperlink Gives a link to
                   39815: contact information for the current document.</del></td>
                   39816: </tr>
                   39817: <tr>
                   39818: <td><code title="rel-external"><a href=
                   39819: "#external">external</a></code></td>
                   39820: <td><em>not allowed</em></td>
                   39821: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39822: <td>Indicates that the referenced document is not part of the same
                   39823: site as the current document.</td>
                   39824: </tr>
                   39825: <tr>
                   39826: <td><code title="rel-feed"><a href="#feed">feed</a></code></td>
                   39827: <td><a href="#hyperlink1" title="hyperlink link">Hyperlink</a></td>
                   39828: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39829: <td>Gives the address of a syndication feed for the current
                   39830: document.</td>
                   39831: </tr>
                   39832: <tr>
                   39833: <td><code title="rel-first"><a href="#first">first</a></code></td>
                   39834: <td><a href="#hyperlink1" title="hyperlink link">Hyperlink</a></td>
                   39835: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39836: <td>Indicates that the current document is a part of a series, and
                   39837: that the first document in the series is the referenced
                   39838: document.</td>
                   39839: </tr>
                   39840: <tr>
                   39841: <td><code title="rel-help"><a href="#help">help</a></code></td>
                   39842: <td><a href="#hyperlink1" title="hyperlink link">Hyperlink</a></td>
                   39843: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39844: <td>Provides a link to context-sensitive help.</td>
                   39845: </tr>
                   39846: <tr>
                   39847: <td><code title="rel-icon"><a href="#icon3">icon</a></code></td>
                   39848: <td><a href="#links1" title="external resource link">External
                   39849: Resource</a></td>
                   39850: <td><em>not allowed</em></td>
                   39851: <td>Imports an icon to represent the current document.</td>
                   39852: </tr>
                   39853: <tr>
                   39854: <td><code title="rel-index"><a href="#index0">index</a></code></td>
                   39855: <td><a href="#hyperlink1" title="hyperlink link">Hyperlink</a></td>
                   39856: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39857: <td>Gives a link to the document that provides a table of contents
                   39858: or index listing the current document.</td>
                   39859: </tr>
                   39860: <tr>
                   39861: <td><code title="rel-last"><a href="#last">last</a></code></td>
                   39862: <td><a href="#hyperlink1" title="hyperlink link">Hyperlink</a></td>
                   39863: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39864: <td>Indicates that the current document is a part of a series, and
                   39865: that the last document in the series is the referenced
                   39866: document.</td>
                   39867: </tr>
                   39868: <tr>
                   39869: <td><code title="rel-license"><a href=
                   39870: "#license">license</a></code></td>
                   39871: <td><a href="#hyperlink1" title="hyperlink link">Hyperlink</a></td>
                   39872: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39873: <td>Indicates that the current document is covered by the copyright
                   39874: license described by the referenced document.</td>
                   39875: </tr>
                   39876: <tr>
                   39877: <td><code title="rel-next"><a href="#next">next</a></code></td>
                   39878: <td><a href="#hyperlink1" title="hyperlink link">Hyperlink</a></td>
                   39879: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39880: <td>Indicates that the current document is a part of a series, and
                   39881: that the next document in the series is the referenced
                   39882: document.</td>
                   39883: </tr>
                   39884: <tr>
                   39885: <td><code title="rel-nofollow"><a href=
                   39886: "#nofollow">nofollow</a></code></td>
                   39887: <td><em>not allowed</em></td>
                   39888: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39889: <td>Indicates that the current document's original author or
                   39890: publisher does not endorse the referenced document.</td>
                   39891: </tr>
                   39892: <tr>
                   39893: <td><code title="rel-noreferrer"><a href=
                   39894: "#noreferrer">noreferrer</a></code></td>
                   39895: <td><em>not allowed</em></td>
                   39896: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39897: <td>Requires that the user agent not send an HTTP <code title=
                   39898: "">Referer</code> header if the user follows the hyperlink.</td>
                   39899: </tr>
                   39900: <tr>
                   39901: <td><code title="rel-pingback"><a href=
                   39902: "#pingback">pingback</a></code></td>
                   39903: <td><a href="#links1" title="external resource link">External
                   39904: Resource</a></td>
                   39905: <td><em>not allowed</em></td>
                   39906: <td>Gives the address of the pingback server that handles pingbacks
                   39907: to the current document.</td>
                   39908: </tr>
                   39909: <tr>
                   39910: <td><code title="rel-prefetch"><a href=
                   39911: "#prefetch">prefetch</a></code></td>
                   39912: <td><a href="#links1" title="external resource link">External
                   39913: Resource</a></td>
                   39914: <td><em>not allowed</em></td>
                   39915: <td>Specifies that the target resource should be <del class=
                   39916: "diff-old">pre-emptively</del> <ins class=
                   39917: "diff-chg">preemptively</ins> cached.</td>
                   39918: </tr>
                   39919: <tr>
                   39920: <td><code title="rel-prev"><a href="#prev">prev</a></code></td>
                   39921: <td><a href="#hyperlink1" title="hyperlink link">Hyperlink</a></td>
                   39922: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39923: <td>Indicates that the current document is a part of a series, and
                   39924: that the previous document in the series is the referenced
                   39925: document.</td>
                   39926: </tr>
                   39927: <tr>
                   39928: <td><code title="rel-search"><a href=
                   39929: "#search0">search</a></code></td>
                   39930: <td><a href="#hyperlink1" title="hyperlink link">Hyperlink</a></td>
                   39931: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39932: <td>Gives a link to a resource that can be used to search through
                   39933: the current document and its related pages.</td>
                   39934: </tr>
                   39935: <tr>
                   39936: <td><code title="rel-stylesheet"><a href=
                   39937: "#stylesheet">stylesheet</a></code></td>
                   39938: <td><a href="#links1" title="external resource link">External
                   39939: Resource</a></td>
                   39940: <td><em>not allowed</em></td>
                   39941: <td>Imports a stylesheet.</td>
                   39942: </tr>
                   39943: <tr>
                   39944: <td><code title="rel-sidebar"><a href=
                   39945: "#sidebar">sidebar</a></code></td>
                   39946: <td><a href="#hyperlink1" title="hyperlink link">Hyperlink</a></td>
                   39947: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39948: <td>Specifies that the referenced document, if retrieved, is
                   39949: intended to be shown in the browser's sidebar (if it has one).</td>
                   39950: </tr>
                   39951: <tr>
                   39952: <td><code title="rel-tag"><a href="#tag">tag</a></code></td>
                   39953: <td><a href="#hyperlink1" title="hyperlink link">Hyperlink</a></td>
                   39954: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39955: <td>Gives a tag (identified by the given address) that applies to
                   39956: the current document.</td>
                   39957: </tr>
                   39958: <tr>
                   39959: <td><code title="rel-up"><a href="#up">up</a></code></td>
                   39960: <td><a href="#hyperlink1" title="hyperlink link">Hyperlink</a></td>
                   39961: <td><a href="#hyperlinks">Hyperlink</a></td>
                   39962: <td>Provides a link to a document giving the context for the
                   39963: current document.</td>
                   39964: </tr>
                   39965: </tbody>
                   39966: </table>
                   39967: <p>Some of the types described below list synonyms for these
                   39968: values. These are to be handled as specified by user agents, but
                   39969: must not be used in documents.</p>
                   39970: <h5 id="link-type"><span class="secno">4.12.3.1.</span> Link type "
                   39971: <dfn id="alternate" title=
                   39972: "rel-alternate"><code>alternate</code></dfn> "</h5>
                   39973: <p>The <code title="rel-alternate"><a href=
                   39974: "#alternate">alternate</a></code> keyword may be used with
                   39975: <code><a href="#link">link</a></code> , <code><a href=
                   39976: "#a">a</a></code> , and <code><a href="#area">area</a></code>
                   39977: elements. For <code><a href="#link">link</a></code> elements, if
                   39978: the <code title="attr-link-rel"><a href="#rel">rel</a></code>
                   39979: attribute does not also contain the keyword <code title=
                   39980: "rel-stylesheet"><a href="#stylesheet">stylesheet</a></code> , it
                   39981: creates a <a href="#hyperlink1" title=
                   39982: "hyperlink link">hyperlink</a> ; but if it <em>does</em> also
                   39983: <del class="diff-old">contains</del> <ins class=
                   39984: "diff-chg">contain</ins> the keyword <code title=
                   39985: "rel-stylesheet"><a href="#stylesheet">stylesheet</a></code> , the
                   39986: <code title="rel-alternate"><a href=
                   39987: "#alternate">alternate</a></code> keyword instead modifies the
                   39988: meaning of the <code title="rel-stylesheet"><a href=
                   39989: "#stylesheet">stylesheet</a></code> keyword in the way described
                   39990: for that keyword, and the rest of this subsection doesn't
                   39991: apply.</p>
                   39992: <p>The <code title="rel-alternate"><a href=
                   39993: "#alternate">alternate</a></code> keyword indicates that the
                   39994: referenced document is an alternate representation of the current
                   39995: document.</p>
                   39996: <p>The nature of the referenced document is given by the
                   39997: <code title="attr-hyperlink-media"><a href=
                   39998: "#media12">media</a></code> , <code title=
                   39999: "attr-hyperlink-hreflang"><a href="#hreflang3">hreflang</a></code>
                   40000: , and <code title="attr-hyperlink-type"><a href=
                   40001: "#type17">type</a></code> attributes.</p>
                   40002: <p>If the <code title="rel-alternate"><a href=
                   40003: "#alternate">alternate</a></code> keyword is used with the
                   40004: <code title="attr-hyperlink-media"><a href=
                   40005: "#media12">media</a></code> attribute, it indicates that the
                   40006: referenced document is intended for use with the media
                   40007: specified.</p>
                   40008: <p>If the <code title="rel-alternate"><a href=
                   40009: "#alternate">alternate</a></code> keyword is used with the
                   40010: <code title="attr-hyperlink-hreflang"><a href=
                   40011: "#hreflang3">hreflang</a></code> attribute, and that attribute's
                   40012: value differs from the <a href="#root-element">root element</a> 's
                   40013: <a href="#language">language</a> , it indicates that the referenced
                   40014: document is a translation.</p>
                   40015: <p>If the <code title="rel-alternate"><a href=
                   40016: "#alternate">alternate</a></code> keyword is used with the
                   40017: <code title="attr-hyperlink-type"><a href="#type17">type</a></code>
                   40018: attribute, it indicates that the referenced document is a
                   40019: reformulation of the current document in the specified format.</p>
                   40020: <p>The <code title="attr-hyperlink-media"><a href=
                   40021: "#media12">media</a></code> , <code title=
                   40022: "attr-hyperlink-hreflang"><a href="#hreflang3">hreflang</a></code>
                   40023: , and <code title="attr-hyperlink-type"><a href=
                   40024: "#type17">type</a></code> attributes can be combined when specified
                   40025: with the <code title="rel-alternate"><a href=
                   40026: "#alternate">alternate</a></code> keyword.</p>
                   40027: <div class="example">
                   40028: <p>For example, the following link is a French translation that
                   40029: uses the PDF format:</p>
                   40030: <pre>
                   40031: &lt;link
                   40032: rel=alternate
                   40033: type=application/pdf
                   40034: hreflang=fr
                   40035: href=manual-fr&gt;
                   40036: </pre></div>
                   40037: <p>If the <code title="rel-alternate"><a href=
                   40038: "#alternate">alternate</a></code> keyword is used with the
                   40039: <code title="attr-hyperlink-type"><a href="#type17">type</a></code>
                   40040: attribute set to the value <code title=
                   40041: "">application/rss+xml</code> or the value <code title=
                   40042: "">application/atom+xml</code> , then the user agent must treat the
                   40043: link as it would if it had the <code title="rel-feed"><a href=
                   40044: "#feed">feed</a></code> keyword specified as well.</p>
                   40045: <p>The <code title="rel-alternate"><a href=
                   40046: "#alternate">alternate</a></code> link relationship is transitive —
                   40047: that is, if a document links to two other documents with the link
                   40048: type " <code title="rel-alternate"><a href=
                   40049: "#alternate">alternate</a></code> ", then, in addition to implying
                   40050: that those documents are alternative representations of the first
                   40051: document, it is also implying that those two documents are
                   40052: alternative representations of each other.</p>
                   40053: <h5 id="link-type0"><span class="secno">4.12.3.2.</span> Link type
                   40054: " <dfn id="archives" title=
                   40055: "rel-archives"><code>archives</code></dfn> "</h5>
                   40056: <p>The <code title="rel-archives"><a href=
                   40057: "#archives">archives</a></code> keyword may be used with
                   40058: <code><a href="#link">link</a></code> , <code><a href=
                   40059: "#a">a</a></code> , and <code><a href="#area">area</a></code>
                   40060: elements. For <code><a href="#link">link</a></code> elements, it
                   40061: creates a <a href="#hyperlink1" title=
                   40062: "hyperlink link">hyperlink</a> .</p>
                   40063: <p>The <code title="rel-archives"><a href=
                   40064: "#archives">archives</a></code> keyword indicates that the
                   40065: referenced document describes a collection of records, documents,
                   40066: or other materials of historical interest.</p>
                   40067: <p class="example">A blog's index page could link to an index of
                   40068: the blog's past posts with <code title="">rel="archives"</code>
                   40069: .</p>
                   40070: <p><strong>Synonyms</strong> : For historical reasons, user agents
                   40071: must also treat the keyword " <code title="">archive</code> " like
                   40072: the <code title="rel-archives"><a href=
                   40073: "#archives">archives</a></code> keyword.</p>
                   40074: <h5 id="link-type1"><span class="secno">4.12.3.3.</span> Link type
                   40075: " <dfn id="author" title="rel-author"><code>author</code></dfn>
                   40076: "</h5>
                   40077: <p>The <code title="rel-author"><a href="#author">author</a></code>
                   40078: keyword may be used with <code><a href="#link">link</a></code> ,
                   40079: <code><a href="#a">a</a></code> , and <code><a href=
                   40080: "#area">area</a></code> elements. For <code><a href=
                   40081: "#link">link</a></code> elements, it creates a <a href=
                   40082: "#hyperlink1" title="hyperlink link">hyperlink</a> .</p>
                   40083: <p>For <code><a href="#a">a</a></code> and <code><a href=
                   40084: "#area">area</a></code> elements, the <code title=
                   40085: "rel-author"><a href="#author">author</a></code> keyword indicates
                   40086: that the referenced document provides further information about the
                   40087: author of the section that the element defining the hyperlink
                   40088: <a href="#applyToSection">applies</a> to.</p>
                   40089: <p>For <code><a href="#link">link</a></code> elements, the
                   40090: <code title="rel-author"><a href="#author">author</a></code>
                   40091: keyword indicates that the referenced document provides further
                   40092: information about the author for the page as a whole.</p>
                   40093: <p class="note">The "referenced document" can be, and often is, a
                   40094: <code title="">mailto:</code> URI giving the e-mail address of the
                   40095: author. <a href="#references">[MAILTO]</a></p>
                   40096: <p><strong>Synonyms</strong> : For historical reasons, user agents
                   40097: must also treat <code><a href="#link">link</a></code> ,
                   40098: <code><a href="#a">a</a></code> , and <code><a href=
                   40099: "#area">area</a></code> elements that have a <code title=
                   40100: "">rev</code> attribute with the value " <code>made</code> " as
                   40101: having the <code title="rel-author"><a href=
                   40102: "#author">author</a></code> keyword specified as a link
                   40103: relationship.</p>
                   40104: <h5 id="link-type2"><span class="secno">4.12.3.4.</span> Link type
                   40105: " <dfn id="bookmark" title=
                   40106: "rel-bookmark"><code>bookmark</code></dfn> "</h5>
                   40107: <p>The <code title="rel-bookmark"><a href=
                   40108: "#bookmark">bookmark</a></code> keyword may be used with
                   40109: <code><a href="#a">a</a></code> and <code><a href=
                   40110: "#area">area</a></code> elements.</p>
                   40111: <p>The <code title="rel-bookmark"><a href=
                   40112: "#bookmark">bookmark</a></code> keyword gives a permalink for the
                   40113: nearest ancestor <code><a href="#article">article</a></code>
                   40114: element of the linking element in question, or of <a href=
                   40115: "#associatedSection">the section the linking element is most
                   40116: closely associated with</a> , if there are no ancestor
                   40117: <code><a href="#article">article</a></code> elements.</p>
                   40118: <div class="example">
                   40119: <p>The following snippet has three permalinks. A user agent could
                   40120: determine which permalink applies to which part of the spec by
                   40121: looking at where the permalinks are given.</p>
                   40122: <pre>
                   40123:  ...
                   40124:  &lt;body&gt;
                   40125:   &lt;h1&gt;Example of permalinks&lt;/h1&gt;
                   40126:   &lt;div id="a"&gt;
                   40127:    &lt;h2&gt;First example&lt;/h2&gt;
                   40128:    &lt;p&gt;&lt;a href="a.html" rel="bookmark"&gt;This&lt;/a&gt; permalink applies to
                   40129:    only the content from the first H2 to the second H2. The DIV isn't
                   40130:    exactly that section, but it roughly corresponds to it.&lt;/p&gt;
                   40131:   &lt;/div&gt;
                   40132:   &lt;h2&gt;Second example&lt;/h2&gt;
                   40133:   &lt;article id="b"&gt;
                   40134:    &lt;p&gt;&lt;a href="b.html" rel="bookmark"&gt;This&lt;/a&gt; permalink applies to
                   40135:    the outer ARTICLE element (which could be, e.g., a blog post).&lt;/p&gt;
                   40136:    &lt;article id="c"&gt;
                   40137:     &lt;p&gt;&lt;a href="c.html" rel="bookmark"&gt;This&lt;/a&gt; permalink applies to
                   40138:     the inner ARTICLE element (which could be, e.g., a blog comment).&lt;/p&gt;
                   40139:    &lt;/article&gt;
                   40140:   &lt;/article&gt;
                   40141:  &lt;/body&gt;
                   40142: ...
                   40143: </pre></div>
                   40144: <h5 id="link-type3"><span class="secno">4.12.3.5.</span> Link type
                   40145: " <del class="diff-old">contact " The contact keyword may be used
                   40146: with link , a , and area elements. For link elements, it creates a
                   40147: hyperlink . For a and area elements, the contact keyword indicates
                   40148: that the referenced document provides further contact information
                   40149: for the section that the element defining the hyperlink applies to.
                   40150: User agents must treat any hyperlink in an address element as
                   40151: having the contact link type specified. For link elements, the
                   40152: contact keyword indicates that the referenced document provides
                   40153: further contact information for the page as a whole. 4.12.3.6. Link
                   40154: type "</del> <dfn id="external" title=
                   40155: "rel-external"><code>external</code></dfn> "</h5>
                   40156: <p>The <code title="rel-external"><a href=
                   40157: "#external">external</a></code> keyword may be used with
                   40158: <code><a href="#a">a</a></code> and <code><a href=
                   40159: "#area">area</a></code> elements.</p>
                   40160: <p>The <code title="rel-external"><a href=
                   40161: "#external">external</a></code> keyword indicates that the link is
                   40162: leading to a document that is not part of the site that the current
                   40163: document forms a part of.</p>
                   40164: <h5 id="link-type4"><span class="secno"><del class=
                   40165: "diff-old">4.12.3.7.</del> <ins class=
                   40166: "diff-chg">4.12.3.6.</ins></span> Link type " <dfn id="feed" title=
                   40167: "rel-feed"><code>feed</code></dfn> "</h5>
                   40168: <p>The <code title="rel-feed"><a href="#feed">feed</a></code>
                   40169: keyword may be used with <code><a href="#link">link</a></code> ,
                   40170: <code><a href="#a">a</a></code> , and <code><a href=
                   40171: "#area">area</a></code> elements. For <code><a href=
                   40172: "#link">link</a></code> elements, it creates a <a href=
                   40173: "#hyperlink1" title="hyperlink link">hyperlink</a> .</p>
                   40174: <p>The <code title="rel-feed"><a href="#feed">feed</a></code>
                   40175: keyword indicates that the referenced document is a syndication
                   40176: feed. If the <code title="rel-alternate"><a href=
                   40177: "#alternate">alternate</a></code> link type is also specified, then
                   40178: the feed is specifically the feed for the current document;
                   40179: otherwise, the feed is just a syndication feed, not necessarily
                   40180: associated with a particular Web page.</p>
                   40181: <p>The first <code><a href="#link">link</a></code> , <code><a href=
                   40182: "#a">a</a></code> , or <code><a href="#area">area</a></code>
                   40183: element in the document (in tree order) that creates a hyperlink
                   40184: with the link type <code title="rel-feed"><a href=
                   40185: "#feed">feed</a></code> must be treated as the default syndication
                   40186: feed for the purposes of feed autodiscovery.</p>
                   40187: <p class="note">The <code title="rel-feed"><a href=
                   40188: "#feed">feed</a></code> keyword is implied by the <code title=
                   40189: "rel-alternate"><a href="#alternate">alternate</a></code> link type
                   40190: in certain cases (q.v.).</p>
                   40191: <div class="example">
                   40192: <p>The following two <code><a href="#link">link</a></code> elements
                   40193: are equivalent: both give the syndication feed for the current
                   40194: page:</p>
                   40195: <pre>
                   40196: &lt;link
                   40197: rel="alternate"
                   40198: type="application/atom+xml"
                   40199: href="data.xml"&gt;
                   40200: </pre>
                   40201: <pre>
                   40202: &lt;link
                   40203: rel="feed
                   40204: alternate"
                   40205: href="data.xml"&gt;
                   40206: </pre>
                   40207: <p>The following extract offers various different syndication
                   40208: feeds:</p>
                   40209: <pre>
                   40210:  &lt;p&gt;You can access the planets database using Atom feeds:&lt;/p&gt;
                   40211:  &lt;ul&gt;
                   40212:   &lt;li&gt;&lt;a href="recently-visited-planets.xml" rel="feed"&gt;Recently Visited Planets&lt;/a&gt;&lt;/li&gt;
                   40213:   &lt;li&gt;&lt;a href="known-bad-planets.xml" rel="feed"&gt;Known Bad Planets&lt;/a&gt;&lt;/li&gt;
                   40214:   &lt;li&gt;&lt;a href="unexplored-planets.xml" rel="feed"&gt;Unexplored Planets&lt;/a&gt;&lt;/li&gt;
                   40215: &lt;/ul&gt;
                   40216: </pre></div>
                   40217: <h5 id="link-type5"><span class="secno"><del class=
                   40218: "diff-old">4.12.3.8.</del> <ins class=
                   40219: "diff-chg">4.12.3.7.</ins></span> Link type " <dfn id="help" title=
                   40220: "rel-help"><code>help</code></dfn> "</h5>
                   40221: <p>The <code title="rel-help"><a href="#help">help</a></code>
                   40222: keyword may be used with <code><a href="#link">link</a></code> ,
                   40223: <code><a href="#a">a</a></code> , and <code><a href=
                   40224: "#area">area</a></code> elements. For <code><a href=
                   40225: "#link">link</a></code> elements, it creates a <a href=
                   40226: "#hyperlink1" title="hyperlink link">hyperlink</a> .</p>
                   40227: <p>For <code><a href="#a">a</a></code> and <code><a href=
                   40228: "#area">area</a></code> elements, the <code title=
                   40229: "rel-help"><a href="#help">help</a></code> keyword indicates that
                   40230: the referenced document provides further help information for the
                   40231: parent of the element defining the hyperlink, and its children.</p>
                   40232: <div class="example">
                   40233: <p>In the following example, the form control has associated
                   40234: context-sensitive help. The user agent could use this information,
                   40235: for example, displaying the referenced document if the user presses
                   40236: the "Help" or "F1" key.</p>
                   40237: <pre>
                   40238: &lt;p&gt;
                   40239: &lt;label&gt;
                   40240: Topic:
                   40241: &lt;input
                   40242: name=topic&gt;
                   40243: &lt;a
                   40244: href="help/topic.html"
                   40245: rel="help"&gt;
                   40246: (Help)&lt;/a&gt;
                   40247: &lt;/label&gt;
                   40248: &lt;/p&gt;
                   40249: </pre></div>
                   40250: <p>For <code><a href="#link">link</a></code> elements, the
                   40251: <code title="rel-help"><a href="#help">help</a></code> keyword
                   40252: indicates that the referenced document provides help for the page
                   40253: as a whole.</p>
                   40254: <h5 id="rel-icon"><span class="secno"><del class=
                   40255: "diff-old">4.12.3.9.</del> <ins class=
                   40256: "diff-chg">4.12.3.8.</ins></span> Link type " <dfn id="icon3"
                   40257: title="rel-icon"><code>icon</code></dfn> "</h5>
                   40258: <p>The <code title="rel-icon"><a href="#icon3">icon</a></code>
                   40259: keyword may be used with <code><a href="#link">link</a></code>
                   40260: elements, for which it creates an <a href="#links1" title=
                   40261: "external resource link">external resource link</a> .</p>
                   40262: <p>The specified resource is an icon representing the page or site,
                   40263: and should be used by the user agent when representing the page in
                   40264: the user interface.</p>
                   40265: <p>Icons could be auditory icons, visual icons, or other kinds of
                   40266: icons. If multiple icons are provided, the user agent must select
                   40267: the most appropriate icon according to the <code title=
                   40268: "attr-link-type"><a href="#type"><ins class=
                   40269: "diff-new">type</ins></a></code> , <code title=
                   40270: "attr-link-media"><a href="#media0">media</a></code> , <ins class=
                   40271: "diff-new">and</ins> <code title="attr-link-sizes"><a href=
1.2     ! mike     40272: "#sizes0"><ins class="diff-new">sizes</ins></a></code> <ins class=
        !          40273: "diff-new">attributes. If there are multiple equally appropriate
        !          40274: icons, user agents must use the last one declared in</ins> <a href=
        !          40275: "#tree-order"><ins class="diff-new">tree order</ins></a>
        !          40276: .<ins class="diff-new">If the user agent tries to use an icon but
        !          40277: that icon is determined, upon closer examination, to in fact be
        !          40278: inappropriate (e.g. because it uses an unsupported format), then
        !          40279: the user agent must try the next-most-appropriate icon as
        !          40280: determined by the attributes.</ins></p>
        !          40281: <p><ins class="diff-new">There is no default type for resources
1.1       mike     40282: given by the</ins> <code title="rel-icon"><a href=
1.2     ! mike     40283: "#icon3"><ins class="diff-new">icon</ins></a></code> <ins class=
        !          40284: "diff-new">keyword.</ins></p>
        !          40285: <p><ins class="diff-new">The</ins> <dfn id="sizes0" title=
1.1       mike     40286: "attr-link-sizes"><code><ins class=
1.2     ! mike     40287: "diff-new">sizes</ins></code></dfn> <ins class="diff-new">attribute
1.1       mike     40288: gives the sizes of icons for visual media.</ins></p>
1.2     ! mike     40289: <p><ins class="diff-new">If specified, the attribute must have a
1.1       mike     40290: value that is an</ins> <a href="#unordered"><ins class=
1.2     ! mike     40291: "diff-new">unordered set of unique space-separated tokens</ins></a>
        !          40292: .<ins class="diff-new">The values must all be either</ins>
1.1       mike     40293: <code title="attr-link-sizes-any"><a href="#any"><ins class=
1.2     ! mike     40294: "diff-new">any</ins></a></code> <ins class="diff-new">or a value
1.1       mike     40295: that consists of two</ins> <a href="#valid" title=
1.2     ! mike     40296: "valid non-negative integer"><ins class="diff-new">valid
        !          40297: non-negative integers</ins></a> <ins class="diff-new">that do not
1.1       mike     40298: have a leading U+0030 DIGIT ZERO (0) character and that are
                   40299: separated by a single U+0078 LATIN SMALL LETTER X
                   40300: character.</ins></p>
1.2     ! mike     40301: <p><ins class="diff-new">The keywords represent icon
1.1       mike     40302: sizes.</ins></p>
1.2     ! mike     40303: <p><ins class="diff-new">To parse and process the attribute's
1.1       mike     40304: value, the user agent must first</ins> <a href="#split" title=
1.2     ! mike     40305: "split a string on spaces"><ins class="diff-new">split the
        !          40306: attribute's value on spaces</ins></a> ,<ins class="diff-new">and
1.1       mike     40307: must then parse each resulting keyword to determine what it
                   40308: represents.</ins></p>
1.2     ! mike     40309: <p><ins class="diff-new">The</ins> <dfn id="any" title=
        !          40310: "attr-link-sizes-any"><code><ins class="diff-new">any</ins></code>
        !          40311: <del class="diff-old">attribute.</del></dfn> <ins class=
        !          40312: "diff-chg">keyword represents that the resource contains a scalable
        !          40313: icon, e.g. as provided by an SVG image.</ins></p>
1.1       mike     40314: <p><ins class="diff-chg">Other keywords must be further parsed as
                   40315: follows to determine what they represent:</ins></p>
                   40316: <ul>
                   40317: <li>
                   40318: <p><ins class="diff-chg">If the keyword doesn't contain exactly one
                   40319: U+0078 LATIN SMALL LETTER X character, then this keyword doesn't
                   40320: represent anything. Abort these steps for that keyword.</ins></p>
                   40321: </li>
                   40322: <li>
                   40323: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   40324: "diff-chg">width string</ins></var> <ins class="diff-chg">be the
                   40325: string before the "</ins> <code title=""><ins class=
                   40326: "diff-chg">x</ins></code> <ins class="diff-chg">".</ins></p>
                   40327: </li>
                   40328: <li>
                   40329: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   40330: "diff-chg">height string</ins></var> <ins class="diff-chg">be the
                   40331: string after the "</ins> <code title=""><ins class=
                   40332: "diff-chg">x</ins></code> <ins class="diff-chg">".</ins></p>
                   40333: </li>
                   40334: <li>
                   40335: <p><ins class="diff-chg">If either</ins> <var title=""><ins class=
                   40336: "diff-chg">width string</ins></var> <ins class="diff-chg">or</ins>
                   40337: <var title=""><ins class="diff-chg">height string</ins></var>
                   40338: <ins class="diff-chg">start with a U+0030 DIGIT ZERO (0) character
                   40339: or contain any characters other than characters in the range U+0030
                   40340: DIGIT ZERO (0) to U+0039 DIGIT NINE (9), then this keyword doesn't
                   40341: represent anything. Abort these steps for that keyword.</ins></p>
                   40342: </li>
                   40343: <li>
                   40344: <p><ins class="diff-chg">Apply the</ins> <a href=
                   40345: "#rules"><ins class="diff-chg">rules for parsing non-negative
                   40346: integers</ins></a> <ins class="diff-chg">to</ins> <var title=
                   40347: ""><ins class="diff-chg">width string</ins></var> <ins class=
                   40348: "diff-chg">to obtain</ins> <var title=""><ins class=
                   40349: "diff-chg">width</ins></var> .</p>
                   40350: </li>
                   40351: <li>
                   40352: <p><ins class="diff-chg">Apply the</ins> <a href=
                   40353: "#rules"><ins class="diff-chg">rules for parsing non-negative
                   40354: integers</ins></a> <ins class="diff-chg">to</ins> <var title=
                   40355: ""><ins class="diff-chg">height string</ins></var> <ins class=
                   40356: "diff-chg">to obtain</ins> <var title=""><ins class=
                   40357: "diff-chg">height</ins></var> .</p>
                   40358: </li>
                   40359: <li>
                   40360: <p><ins class="diff-chg">The keyword represents that the resource
                   40361: contains a bitmap icon with a width of</ins> <var title=
                   40362: ""><ins class="diff-chg">width</ins></var> <ins class=
                   40363: "diff-chg">device pixels and a height of</ins> <var title=
                   40364: ""><ins class="diff-chg">height</ins></var> <ins class=
                   40365: "diff-chg">device pixels.</ins></p>
                   40366: </li>
                   40367: </ul>
                   40368: <p><ins class="diff-chg">The keywords specified on the</ins>
                   40369: <code title="attr-link-sizes"><a href="#sizes0"><ins class=
                   40370: "diff-chg">sizes</ins></a></code> <ins class="diff-chg">attribute
                   40371: must not represent icon sizes that are not actually available in
                   40372: the linked resource.</ins></p>
                   40373: <p><ins class="diff-chg">If the attribute is not specified, then
                   40374: the user agent must assume that the given icon is appropriate, but
                   40375: less appropriate than an icon of a known and appropriate
                   40376: size.</ins></p>
                   40377: <div class="example">
                   40378: <p><ins class="diff-chg">The following snippet shows the top part
                   40379: of an application with several icons.</ins></p>
                   40380: <pre>
                   40381: &lt;!DOCTYPE HTML&gt;<ins class="diff-chg">
                   40382: &lt;html&gt;
                   40383:  &lt;head&gt;
                   40384:   &lt;title&gt;lsForums — Inbox&lt;/title&gt;
                   40385:   &lt;link rel=icon href=favicon.png sizes="16x16"&gt;
                   40386:   &lt;link rel=icon href=windows.ico sizes="32x32 48x48"&gt;
                   40387:   &lt;link rel=icon href=mac.icns sizes="128x128 512x512 8192x8192 32768x32768"&gt;
                   40388:   &lt;link rel=icon href=iphone.png sizes="59x60"&gt;
                   40389:   &lt;link rel=icon href=gnome.svg sizes="any"&gt;
                   40390:   &lt;link rel=stylesheet href=lsforums.css&gt;
                   40391:   &lt;script src=lsforums.js&gt;&lt;/script&gt;
                   40392:   &lt;meta name=application-name content="lsForums"&gt;
                   40393:  &lt;/head&gt;
                   40394:  &lt;body&gt;
                   40395: ...
                   40396: </ins>
                   40397: </pre></div>
                   40398: <h5 id="link-type6"><span class="secno"><del class=
                   40399: "diff-old">4.12.3.10.</del> <ins class=
                   40400: "diff-chg">4.12.3.9.</ins></span> Link type " <dfn id="license"
                   40401: title="rel-license"><code>license</code></dfn> "</h5>
                   40402: <p>The <code title="rel-license"><a href=
                   40403: "#license">license</a></code> keyword may be used with
                   40404: <code><a href="#link">link</a></code> , <code><a href=
                   40405: "#a">a</a></code> , and <code><a href="#area">area</a></code>
                   40406: elements. For <code><a href="#link">link</a></code> elements, it
                   40407: creates a <a href="#hyperlink1" title=
                   40408: "hyperlink link">hyperlink</a> .</p>
                   40409: <p>The <code title="rel-license"><a href=
                   40410: "#license">license</a></code> keyword indicates that the referenced
                   40411: document provides the copyright license terms under which the
                   40412: current document is provided.</p>
                   40413: <p><strong>Synonyms</strong> : For historical reasons, user agents
                   40414: must also treat the keyword " <code title="">copyright</code> "
                   40415: like the <code title="rel-license"><a href=
                   40416: "#license">license</a></code> keyword.</p>
                   40417: <h5 id="link-type7"><span class="secno"><del class=
                   40418: "diff-old">4.12.3.11.</del> <ins class=
                   40419: "diff-chg">4.12.3.10.</ins></span> Link type " <dfn id="nofollow"
                   40420: title="rel-nofollow"><code>nofollow</code></dfn> "</h5>
                   40421: <p>The <code title="rel-nofollow"><a href=
                   40422: "#nofollow">nofollow</a></code> keyword may be used with
                   40423: <code><a href="#a">a</a></code> and <code><a href=
                   40424: "#area">area</a></code> elements.</p>
                   40425: <p>The <code title="rel-nofollow"><a href=
                   40426: "#nofollow">nofollow</a></code> keyword indicates that the link is
                   40427: not endorsed by the original author or publisher of the <del class=
                   40428: "diff-old">page.</del> <ins class="diff-chg">page, or that the link
                   40429: to the referenced document was included primarily because of a
                   40430: commercial relationship between people affiliated with the two
                   40431: pages.</ins></p>
                   40432: <h5 id="link-type8"><span class="secno"><del class=
                   40433: "diff-old">4.12.3.12.</del> <ins class=
                   40434: "diff-chg">4.12.3.11.</ins></span> Link type " <dfn id="noreferrer"
                   40435: title="rel-noreferrer"><code>noreferrer</code></dfn> "</h5>
                   40436: <p>The <code title="rel-noreferrer"><a href=
                   40437: "#noreferrer">noreferrer</a></code> keyword may be used with
                   40438: <code><a href="#a">a</a></code> and <code><a href=
                   40439: "#area">area</a></code> elements.</p>
                   40440: <p>If a user agent follows a link defined by an <code><a href=
                   40441: "#a">a</a></code> or <code><a href="#area">area</a></code> element
                   40442: that has the <code title="rel-noreferrer"><a href=
                   40443: "#noreferrer">noreferrer</a></code> keyword, the user agent must
                   40444: not include a <code title="">Referer</code> HTTP header (or
                   40445: equivalent for other protocols) in the request.</p>
                   40446: <h5 id="link-type9"><span class="secno"><del class=
                   40447: "diff-old">4.12.3.13.</del> <ins class=
                   40448: "diff-chg">4.12.3.12.</ins></span> Link type " <dfn id="pingback"
                   40449: title="rel-pingback"><code>pingback</code></dfn> "</h5>
                   40450: <p>The <code title="rel-pingback"><a href=
                   40451: "#pingback">pingback</a></code> keyword may be used with
                   40452: <code><a href="#link">link</a></code> elements, for which it
                   40453: creates an <a href="#links1" title=
                   40454: "external resource link">external resource link</a> .</p>
                   40455: <p>For the semantics of the <code title="rel-pingback"><a href=
                   40456: "#pingback">pingback</a></code> keyword, see the Pingback 1.0
                   40457: specification. <a href="#references">[PINGBACK]</a></p>
                   40458: <h5 id="link-type10"><span class="secno"><del class=
                   40459: "diff-old">4.12.3.14.</del> <ins class=
                   40460: "diff-chg">4.12.3.13.</ins></span> Link type " <dfn id="prefetch"
                   40461: title="rel-prefetch"><code>prefetch</code></dfn> "</h5>
                   40462: <p>The <code title="rel-prefetch"><a href=
                   40463: "#prefetch">prefetch</a></code> keyword may be used with
                   40464: <code><a href="#link">link</a></code> elements, for which it
                   40465: creates an <a href="#links1" title=
                   40466: "external resource link">external resource link</a> .</p>
                   40467: <p>The <code title="rel-prefetch"><a href=
                   40468: "#prefetch">prefetch</a></code> keyword indicates that preemptively
                   40469: fetching and caching the specified resource is likely to be
                   40470: beneficial, as it is highly likely that the user will require this
                   40471: resource.</p>
                   40472: <p><ins class="diff-chg">There is no default type for resources
                   40473: given by the</ins> <code title="rel-prefetch"><a href=
                   40474: "#prefetch"><ins class="diff-chg">prefetch</ins></a></code>
                   40475: <ins class="diff-chg">keyword.</ins></p>
                   40476: <h5 id="link-type11"><span class="secno"><del class=
                   40477: "diff-old">4.12.3.15.</del> <ins class=
                   40478: "diff-chg">4.12.3.14.</ins></span> Link type " <dfn id="search0"
                   40479: title="rel-search"><code>search</code></dfn> "</h5>
                   40480: <p>The <code title="rel-search"><a href=
                   40481: "#search0">search</a></code> keyword may be used with
                   40482: <code><a href="#link">link</a></code> , <code><a href=
                   40483: "#a">a</a></code> , and <code><a href="#area">area</a></code>
                   40484: elements. For <code><a href="#link">link</a></code> elements, it
                   40485: creates a <a href="#hyperlink1" title=
                   40486: "hyperlink link">hyperlink</a> .</p>
                   40487: <p>The <code title="rel-search"><a href=
                   40488: "#search0">search</a></code> keyword indicates that the referenced
                   40489: document provides an interface specifically for searching the
                   40490: document and its related resources.</p>
                   40491: <p class="note">OpenSearch description documents can be used with
                   40492: <code><a href="#link">link</a></code> elements and the <code title=
                   40493: "rel-search"><a href="#search0">search</a></code> link type to
                   40494: enable user agents to autodiscover search interfaces. <a href=
                   40495: "#references">[OPENSEARCH]</a></p>
                   40496: <h5 id="link-type12"><span class="secno"><del class=
                   40497: "diff-old">4.12.3.16.</del> <ins class=
                   40498: "diff-chg">4.12.3.15.</ins></span> Link type " <dfn id="stylesheet"
                   40499: title="rel-stylesheet"><code>stylesheet</code></dfn> "</h5>
                   40500: <p>The <code title="rel-stylesheet"><a href=
                   40501: "#stylesheet">stylesheet</a></code> keyword may be used with
                   40502: <code><a href="#link">link</a></code> elements, for which it
                   40503: creates an <a href="#links1" title=
                   40504: "external resource link">external resource link</a> that
                   40505: contributes to the <a href="#styling0">styling processing model</a>
                   40506: .</p>
                   40507: <p>The specified resource is a resource that describes how to
                   40508: present the document. Exactly how the resource is to be processed
                   40509: depends on the actual type of the resource.</p>
                   40510: <p>If the <code title="rel-alternate"><a href=
                   40511: "#alternate">alternate</a></code> keyword is also specified on the
                   40512: <code><a href="#link">link</a></code> element, then the link is an
                   40513: alternative stylesheet.</p>
                   40514: <p><ins class="diff-chg">The default type for resources given by
                   40515: the</ins> <code title="rel-stylesheet"><a href=
                   40516: "#stylesheet"><ins class="diff-chg">stylesheet</ins></a></code>
                   40517: <ins class="diff-chg">keyword is</ins> <code title=""><ins class=
                   40518: "diff-chg">text/css</ins></code> .</p>
                   40519: <p><strong><ins class="diff-chg">Quirk:</ins></strong> <ins class=
                   40520: "diff-chg">If the document has been set to</ins> <a href=
                   40521: "#quirks"><ins class="diff-chg">quirks mode</ins></a> <ins class=
                   40522: "diff-chg">and the</ins> <a href="#content-type8" title=
                   40523: "Content-Type"><ins class="diff-chg">Content-Type
                   40524: metadata</ins></a> <ins class="diff-chg">of the external resource
                   40525: is not a supported style sheet type, the user agent must instead
                   40526: assume it to be</ins> <code title=""><ins class=
                   40527: "diff-chg">text/css</ins></code> .</p>
                   40528: <h5 id="link-type13"><span class="secno"><del class=
                   40529: "diff-old">4.12.3.17.</del> <ins class=
                   40530: "diff-chg">4.12.3.16.</ins></span> Link type " <dfn id="sidebar"
                   40531: title="rel-sidebar"><code>sidebar</code></dfn> "</h5>
                   40532: <p>The <code title="rel-sidebar"><a href=
                   40533: "#sidebar">sidebar</a></code> keyword may be used with
                   40534: <code><a href="#link">link</a></code> , <code><a href=
                   40535: "#a">a</a></code> , and <code><a href="#area">area</a></code>
                   40536: elements. For <code><a href="#link">link</a></code> elements, it
                   40537: creates a <a href="#hyperlink1" title=
                   40538: "hyperlink link">hyperlink</a> .</p>
                   40539: <p>The <code title="rel-sidebar"><a href=
                   40540: "#sidebar">sidebar</a></code> keyword indicates that the referenced
                   40541: document, if retrieved, is intended to be shown in a <a href=
                   40542: "#secondary0">secondary browsing context</a> (if possible), instead
                   40543: of in the current <a href="#browsing1">browsing context</a> .</p>
                   40544: <p>A <a href="#hyperlinks" title="hyperlink">hyperlink element</a>
                   40545: with with the <code title="rel-sidebar"><a href=
                   40546: "#sidebar">sidebar</a></code> keyword specified is a <dfn id=
                   40547: "sidebar0" title="rel-sidebar-hyperlink">sidebar hyperlink</dfn>
                   40548: .</p>
                   40549: <h5 id="link-type14"><span class="secno"><del class=
                   40550: "diff-old">4.12.3.18.</del> <ins class=
                   40551: "diff-chg">4.12.3.17.</ins></span> Link type " <dfn id="tag" title=
                   40552: "rel-tag"><code>tag</code></dfn> "</h5>
                   40553: <p>The <code title="rel-tag"><a href="#tag">tag</a></code> keyword
                   40554: may be used with <code><a href="#link">link</a></code> ,
                   40555: <code><a href="#a">a</a></code> , and <code><a href=
                   40556: "#area">area</a></code> elements. For <code><a href=
                   40557: "#link">link</a></code> elements, it creates a <a href=
                   40558: "#hyperlink1" title="hyperlink link">hyperlink</a> .</p>
                   40559: <p>The <code title="rel-tag"><a href="#tag">tag</a></code> keyword
                   40560: indicates that the <em>tag</em> that the referenced document
                   40561: represents applies to the current document.</p>
                   40562: <h5 id="hierarchical"><span class="secno"><del class=
                   40563: "diff-old">4.12.3.19.</del> <ins class=
                   40564: "diff-chg">4.12.3.18.</ins></span> Hierarchical link types</h5>
                   40565: <p>Some documents form part of a hierarchical structure of
                   40566: documents.</p>
                   40567: <p>A hierarchical structure of documents is one where each document
                   40568: can have various subdocuments. The document of which a document is
                   40569: a subdocument is said to be the document's <em>parent</em> . A
                   40570: document with no parent forms the top of the hierarchy.</p>
                   40571: <p>A document may be part of multiple hierarchies.</p>
                   40572: <h6 id="link-type15"><span class="secno"><del class=
                   40573: "diff-old">4.12.3.19.1.</del> <ins class=
                   40574: "diff-chg">4.12.3.18.1.</ins></span> Link type " <dfn id="index0"
                   40575: title="rel-index"><code>index</code></dfn> "</h6>
                   40576: <p>The <code title="rel-index"><a href="#index0">index</a></code>
                   40577: keyword may be used with <code><a href="#link">link</a></code> ,
                   40578: <code><a href="#a">a</a></code> , and <code><a href=
                   40579: "#area">area</a></code> elements. For <code><a href=
                   40580: "#link">link</a></code> elements, it creates a <a href=
                   40581: "#hyperlink1" title="hyperlink link">hyperlink</a> .</p>
                   40582: <p>The <code title="rel-index"><a href="#index0">index</a></code>
                   40583: keyword indicates that the document is part of a hierarchical
                   40584: structure, and that the link is leading to the document that is the
                   40585: top of the hierarchy. It conveys more information when used with
                   40586: the <code title="rel-up"><a href="#up">up</a></code> keyword
                   40587: (q.v.).</p>
                   40588: <p><strong>Synonyms</strong> : For historical reasons, user agents
                   40589: must also treat the keywords " <code title="">top</code> ", "
                   40590: <code title="">contents</code> ", and " <code title="">toc</code> "
                   40591: like the <code title="rel-index"><a href="#index0">index</a></code>
                   40592: keyword.</p>
                   40593: <h6 id="link-type16"><span class="secno"><del class=
                   40594: "diff-old">4.12.3.19.2.</del> <ins class=
                   40595: "diff-chg">4.12.3.18.2.</ins></span> Link type " <dfn id="up"
                   40596: title="rel-up"><code>up</code></dfn> "</h6>
                   40597: <p>The <code title="rel-up"><a href="#up">up</a></code> keyword may
                   40598: be used with <code><a href="#link">link</a></code> , <code><a href=
                   40599: "#a">a</a></code> , and <code><a href="#area">area</a></code>
                   40600: elements. For <code><a href="#link">link</a></code> elements, it
                   40601: creates a <a href="#hyperlink1" title=
                   40602: "hyperlink link">hyperlink</a> .</p>
                   40603: <p>The <code title="rel-up"><a href="#up">up</a></code> keyword
                   40604: indicates that the document is part of a hierarchical structure,
                   40605: and that the link is leading to the document that is the parent of
                   40606: the current document.</p>
                   40607: <p>The <code title="rel-up"><a href="#up">up</a></code> keyword may
                   40608: be repeated within a <code title="attr-hyperlink-rel"><a href=
                   40609: "#rel3">rel</a></code> attribute to indicate the hierarchical
                   40610: distance from the current document to the referenced document. Each
                   40611: <del class="diff-old">occurance</del> <ins class=
                   40612: "diff-chg">occurrence</ins> of the keyword represents one further
                   40613: level. If the <code title="rel-index"><a href=
                   40614: "#index0">index</a></code> keyword is also present, then the number
                   40615: of <code title="rel-up"><a href="#up">up</a></code> keywords is the
                   40616: depth of the current page relative to the top of the hierarchy.
                   40617: <ins class="diff-new">Only one link is created for the set of one
                   40618: or more</ins> <code title="rel-up"><a href="#up"><ins class=
                   40619: "diff-new">up</ins></a></code> <ins class="diff-new">keywords and,
                   40620: if present, the</ins> <code title="rel-index"><a href=
                   40621: "#index0"><ins class="diff-new">index</ins></a></code> <ins class=
                   40622: "diff-new">keyword.</ins></p>
                   40623: <p>If the page is part of multiple hierarchies, then they should be
                   40624: described in different <a href="#paragraph" title=
                   40625: "paragraph">paragraphs</a> . User agents must scope any
                   40626: interpretation of the <code title="rel-up"><a href=
                   40627: "#up">up</a></code> and <code title="rel-index"><a href=
                   40628: "#index0">index</a></code> keywords together indicating the depth
                   40629: of the hierarchy to the <a href="#paragraph">paragraph</a> in which
                   40630: the link finds itself, if any, or to the document otherwise.</p>
                   40631: <p>When two links have both the <code title="rel-up"><a href=
                   40632: "#up">up</a></code> and <code title="rel-index"><a href=
                   40633: "#index0">index</a></code> keywords specified together in the same
                   40634: scope and contradict each other by having a different number of
                   40635: <code title="rel-up"><a href="#up">up</a></code> keywords, the link
                   40636: with the greater number of <code title="rel-up"><a href=
                   40637: "#up">up</a></code> keywords must be taken as giving the depth of
                   40638: the document.</p>
                   40639: <div class="example">
                   40640: <p>This can be used to mark up a navigation style sometimes known
                   40641: as <del class="diff-old">breadcrumbs.</del> <ins class=
                   40642: "diff-chg">bread crumbs.</ins> In the following example, the
                   40643: current page can be reached via two paths.</p>
                   40644: <pre>
                   40645: &lt;nav&gt;
                   40646:  &lt;p&gt;
                   40647:   &lt;a href="/" rel="index up up up"&gt;Main&lt;/a&gt; &gt;
                   40648:   &lt;a href="/products/" rel="up up"&gt;Products&lt;/a&gt; &gt;
                   40649:   &lt;a href="/products/dishwashers/" rel="up"&gt;Dishwashers&lt;/a&gt; &gt;
                   40650:   &lt;a&gt;Second hand&lt;/a&gt;
                   40651:  &lt;/p&gt;
                   40652:  &lt;p&gt;
                   40653:   &lt;a href="/" rel="index up up"&gt;Main&lt;/a&gt; &gt;
                   40654:   &lt;a href="/second-hand/" rel="up"&gt;Second hand&lt;/a&gt; &gt;
                   40655:   &lt;a&gt;Dishwashers&lt;/a&gt;
                   40656:  &lt;/p&gt;
                   40657: &lt;/nav&gt;
                   40658: </pre></div>
                   40659: <p class="note">The <code title="dom-a-relList"><a href=
                   40660: "#rellist0">relList</a></code> DOM attribute (e.g. on the
                   40661: <code><a href="#a">a</a></code> element) does not currently
                   40662: represent multiple <code title="rel-up"><a href="#up">up</a></code>
                   40663: keywords (the interface hides duplicates).</p>
                   40664: <h5 id="sequential0"><span class="secno"><del class=
                   40665: "diff-old">4.12.3.20.</del> <ins class=
                   40666: "diff-chg">4.12.3.19.</ins></span> Sequential link types</h5>
                   40667: <p>Some documents form part of a sequence of documents.</p>
                   40668: <p>A sequence of documents is one where each document can have a
                   40669: <em>previous sibling</em> and a <em>next sibling</em> . A document
                   40670: with no previous sibling is the start of its sequence, a document
                   40671: with no next sibling is the end of its sequence.</p>
                   40672: <p>A document may be part of multiple sequences.</p>
                   40673: <h6 id="link-type17"><span class="secno"><del class=
                   40674: "diff-old">4.12.3.20.1.</del> <ins class=
                   40675: "diff-chg">4.12.3.19.1.</ins></span> Link type " <dfn id="first"
                   40676: title="rel-first"><code>first</code></dfn> "</h6>
                   40677: <p>The <code title="rel-first"><a href="#first">first</a></code>
                   40678: keyword may be used with <code><a href="#link">link</a></code> ,
                   40679: <code><a href="#a">a</a></code> , and <code><a href=
                   40680: "#area">area</a></code> elements. For <code><a href=
                   40681: "#link">link</a></code> elements, it creates a <a href=
                   40682: "#hyperlink1" title="hyperlink link">hyperlink</a> .</p>
                   40683: <p>The <code title="rel-first"><a href="#first">first</a></code>
                   40684: keyword indicates that the document is part of a sequence, and that
                   40685: the link is leading to the document that is the first logical
                   40686: document in the sequence.</p>
                   40687: <p><strong>Synonyms</strong> : For historical reasons, user agents
                   40688: must also treat the keywords " <code title="">begin</code> " and "
                   40689: <code title="">start</code> " like the <code title=
                   40690: "rel-first"><a href="#first">first</a></code> keyword.</p>
                   40691: <h6 id="link-type18"><span class="secno"><del class=
                   40692: "diff-old">4.12.3.20.2.</del> <ins class=
                   40693: "diff-chg">4.12.3.19.2.</ins></span> Link type " <dfn id="last"
                   40694: title="rel-last"><code>last</code></dfn> "</h6>
                   40695: <p>The <code title="rel-last"><a href="#last">last</a></code>
                   40696: keyword may be used with <code><a href="#link">link</a></code> ,
                   40697: <code><a href="#a">a</a></code> , and <code><a href=
                   40698: "#area">area</a></code> elements. For <code><a href=
                   40699: "#link">link</a></code> elements, it creates a <a href=
                   40700: "#hyperlink1" title="hyperlink link">hyperlink</a> .</p>
                   40701: <p>The <code title="rel-last"><a href="#last">last</a></code>
                   40702: keyword indicates that the document is part of a sequence, and that
                   40703: the link is leading to the document that is the last logical
                   40704: document in the sequence.</p>
                   40705: <p><strong>Synonyms</strong> : For historical reasons, user agents
                   40706: must also treat the keyword " <code title="">end</code> " like the
                   40707: <code title="rel-last"><a href="#last">last</a></code> keyword.</p>
                   40708: <h6 id="link-type19"><span class="secno"><del class=
                   40709: "diff-old">4.12.3.20.3.</del> <ins class=
                   40710: "diff-chg">4.12.3.19.3.</ins></span> Link type " <dfn id="next"
                   40711: title="rel-next"><code>next</code></dfn> "</h6>
                   40712: <p>The <code title="rel-next"><a href="#next">next</a></code>
                   40713: keyword may be used with <code><a href="#link">link</a></code> ,
                   40714: <code><a href="#a">a</a></code> , and <code><a href=
                   40715: "#area">area</a></code> elements. For <code><a href=
                   40716: "#link">link</a></code> elements, it creates a <a href=
                   40717: "#hyperlink1" title="hyperlink link">hyperlink</a> .</p>
                   40718: <p>The <code title="rel-next"><a href="#next">next</a></code>
                   40719: keyword indicates that the document is part of a sequence, and that
                   40720: the link is leading to the document that is the next logical
                   40721: document in the sequence.</p>
                   40722: <h6 id="link-type20"><span class="secno"><del class=
                   40723: "diff-old">4.12.3.20.4.</del> <ins class=
                   40724: "diff-chg">4.12.3.19.4.</ins></span> Link type " <dfn id="prev"
                   40725: title="rel-prev"><code>prev</code></dfn> "</h6>
                   40726: <p>The <code title="rel-prev"><a href="#prev">prev</a></code>
                   40727: keyword may be used with <code><a href="#link">link</a></code> ,
                   40728: <code><a href="#a">a</a></code> , and <code><a href=
                   40729: "#area">area</a></code> elements. For <code><a href=
                   40730: "#link">link</a></code> elements, it creates a <a href=
                   40731: "#hyperlink1" title="hyperlink link">hyperlink</a> .</p>
                   40732: <p>The <code title="rel-prev"><a href="#prev">prev</a></code>
                   40733: keyword indicates that the document is part of a sequence, and that
                   40734: the link is leading to the document that is the previous logical
                   40735: document in the sequence.</p>
                   40736: <p><strong>Synonyms</strong> : For historical reasons, user agents
                   40737: must also treat the keyword " <code title="">previous</code> " like
                   40738: the <code title="rel-prev"><a href="#prev">prev</a></code>
                   40739: keyword.</p>
                   40740: <h5 id="other0"><span class="secno"><del class=
                   40741: "diff-old">4.12.3.21.</del> <ins class=
                   40742: "diff-chg">4.12.3.20.</ins></span> Other link types</h5>
                   40743: <p>Other than the types defined above, only types defined as
                   40744: extensions in the <a href=
                   40745: "http://wiki.whatwg.org/wiki/RelExtensions">WHATWG Wiki
                   40746: RelExtensions page</a> may be used with the <code title=
                   40747: "">rel</code> attribute on <code><a href="#link">link</a></code> ,
                   40748: <code><a href="#a">a</a></code> , and <code><a href=
                   40749: "#area">area</a></code> elements. <a href=
                   40750: "#references">[WHATWGWIKI]</a></p>
                   40751: <p>Anyone is free to edit the WHATWG Wiki RelExtensions page at any
                   40752: time to add a type. Extension types must be specified with the
                   40753: following information:</p>
                   40754: <dl>
                   40755: <dt>Keyword</dt>
                   40756: <dd>
                   40757: <p>The actual value being defined. The value should not be
                   40758: confusingly similar to any other defined value (e.g. differing only
                   40759: in case).</p>
                   40760: </dd>
                   40761: <dt>Effect on... <code><a href="#link">link</a></code></dt>
                   40762: <dd>
                   40763: <p>One of the following:</p>
                   40764: <dl>
                   40765: <dt>not allowed</dt>
                   40766: <dd>The keyword is not allowed to be specified on <code><a href=
                   40767: "#link">link</a></code> elements.</dd>
                   40768: <dt>Hyperlink</dt>
                   40769: <dd>The keyword may be specified on a <code><a href=
                   40770: "#link">link</a></code> element; it creates a <a href="#hyperlink1"
                   40771: title="hyperlink link">hyperlink link</a> .</dd>
                   40772: <dt>External Resource</dt>
                   40773: <dd>The keyword may be specified on a <code><a href=
                   40774: "#link">link</a></code> element; it creates a <a href="#links1"
                   40775: title="external resource link">external resource link</a> .</dd>
                   40776: </dl>
                   40777: </dd>
                   40778: <dt>Effect on... <code><a href="#a">a</a></code> and <code><a href=
                   40779: "#area">area</a></code></dt>
                   40780: <dd>
                   40781: <p>One of the following:</p>
                   40782: <dl>
                   40783: <dt>not allowed</dt>
                   40784: <dd>The keyword is not allowed to be specified on <code><a href=
                   40785: "#a">a</a></code> and <code><a href="#area">area</a></code>
                   40786: elements.</dd>
                   40787: <dt>Hyperlink</dt>
                   40788: <dd>The keyword may be specified on <code><a href="#a">a</a></code>
                   40789: and <code><a href="#area">area</a></code> elements.</dd>
                   40790: </dl>
                   40791: </dd>
                   40792: <dt>Brief description</dt>
                   40793: <dd>
                   40794: <p>A short description of what the keyword's meaning is.</p>
                   40795: </dd>
                   40796: <dt>Link to more details</dt>
                   40797: <dd>
                   40798: <p>A link to a more detailed description of the keyword's semantics
                   40799: and requirements. It could be another page on the Wiki, or a link
                   40800: to an external page.</p>
                   40801: </dd>
                   40802: <dt>Synonyms</dt>
                   40803: <dd>
                   40804: <p>A list of other keyword values that have exactly the same
                   40805: processing requirements. Authors must not use the values defined to
                   40806: be synonyms, they are only intended to allow user agents to support
                   40807: legacy content.</p>
                   40808: </dd>
                   40809: <dt>Status</dt>
                   40810: <dd>
                   40811: <p>One of the following:</p>
                   40812: <dl>
                   40813: <dt>Proposal</dt>
                   40814: <dd>The keyword has not received wide peer review and approval. It
                   40815: is included for completeness because pages use the keyword. Pages
                   40816: should not use the keyword.</dd>
                   40817: <dt>Accepted</dt>
                   40818: <dd>The keyword has received wide peer review and approval. It has
                   40819: a specification that unambiguously defines how to handle pages that
                   40820: use the keyword, including when they use them in incorrect ways.
                   40821: Pages may use the keyword.</dd>
                   40822: <dt>Rejected</dt>
                   40823: <dd>The keyword has received wide peer review and it has been found
                   40824: to have significant problems. Pages must not use the keyword. When
                   40825: a keyword has this status, the "Effect on... <code><a href=
                   40826: "#link">link</a></code> " and "Effect on... <code><a href=
                   40827: "#a">a</a></code> and <code><a href="#area">area</a></code> "
                   40828: information should be set to "not allowed".</dd>
                   40829: </dl>
                   40830: <p>If a keyword is added with the "proposal" status and found to be
                   40831: redundant with existing values, it should be removed and listed as
                   40832: a synonym for the existing value. If a keyword is added with the
                   40833: "proposal" status and found to be harmful, then it should be
                   40834: changed to "rejected" status, and its "Effect on..." information
                   40835: should be changed accordingly.</p>
                   40836: </dd>
                   40837: </dl>
                   40838: <p>Conformance checkers must use the information given on the
                   40839: WHATWG Wiki RelExtensions page to establish if a value not
                   40840: explicitly defined in this specification is allowed or not. When an
                   40841: author uses a new type not defined by either this specification or
                   40842: the Wiki page, conformance checkers should offer to add the value
                   40843: to the Wiki, with the details described above, with the "proposal"
                   40844: status.</p>
                   40845: <p>This specification does not define how new values will get
                   40846: approved. It is expected that the Wiki will have a community that
                   40847: addresses this.</p>
                   40848: <h3 id="interfaces"><span class="secno"><del class=
                   40849: "diff-old">4.13.</del> <ins class="diff-chg">4.13</ins></span>
                   40850: Interfaces for URI manipulation</h3>
                   40851: <p>An interface that has a complement of <dfn id=
                   40852: "uri-decomposition">URI decomposition attributes</dfn> will have
                   40853: seven attributes with the following definitions:</p>
                   40854: <pre class="idl">
                   40855:            attribute DOMString <a href="#protocol0" title=
                   40856: "dom-uda-protocol">protocol</a>;
                   40857:            attribute DOMString <a href="#host0" title=
                   40858: "dom-uda-host">host</a>;
                   40859:            attribute DOMString <a href="#hostname0" title=
                   40860: "dom-uda-hostname">hostname</a>;
                   40861:            attribute DOMString <a href="#port0" title=
                   40862: "dom-uda-port">port</a>;
                   40863:            attribute DOMString <a href="#pathname0" title=
                   40864: "dom-uda-pathname">pathname</a>;
                   40865:            attribute DOMString <a href="#search1" title=
                   40866: "dom-uda-search">search</a>;
                   40867:            attribute DOMString <a href="#hash0" title=
                   40868: "dom-uda-hash">hash</a>;
                   40869: </pre>
                   40870: <p>The attributes defined to be URI decomposition attributes must
                   40871: act as described for the attributes with the same corresponding
                   40872: names in this section.</p>
                   40873: <p>In addition, an interface with a complement of URI decomposition
                   40874: attributes will define an <dfn id="input" title=
                   40875: "concept-uda-input">input</dfn> , which is a URI that the
                   40876: attributes act on, and a <dfn id="common3" title=
                   40877: "concept-uda-setter">common setter action</dfn> , which is a set of
                   40878: steps invoked when any of the attributes' setters are invoked.</p>
                   40879: <p>The seven URI decomposition attributes have similar
                   40880: requirements.</p>
                   40881: <p>On getting, if the <a href="#input" title=
                   40882: "concept-uda-input">input</a> fulfills the condition given in the
                   40883: "getter condition" column corresponding to the attribute in the
                   40884: table below, the user agent must return the part of the <a href=
                   40885: "#input" title="concept-uda-input">input</a> URI given in the
                   40886: "component" column, with any prefixes specified in the "prefix"
                   40887: column appropriately added to the start of the string and any
                   40888: suffixes specified in the "suffix" column appropriately added to
                   40889: the end of the string. Otherwise, the attribute must return the
                   40890: empty string.</p>
                   40891: <p>On setting, the new value must first be mutated as described by
                   40892: the "setter preprocessor" column, then mutated by %-escaping any
                   40893: characters in the new value that are not valid in the relevant
                   40894: component as given by the "component" column. Then, if the
                   40895: resulting new value fulfills the condition given in the "setter
                   40896: condition" column, the user agent must make a new string
                   40897: <var title="">output</var> by replacing the component of the URI
                   40898: given by the "component" column in the <a href="#input" title=
                   40899: "concept-uda-input">input</a> URI with the new value; otherwise,
                   40900: the user agent must let <var title="">output</var> be equal to the
                   40901: <a href="#input" title="concept-uda-input">input</a> . Finally, the
                   40902: user agent must invoke the <a href="#common3" title=
                   40903: "concept-uda-setter">common setter action</a> with the value of
                   40904: <var title="">output</var> .</p>
                   40905: <p><ins class="diff-new">When replacing a component in the URI, if
                   40906: the component is part of an optional group in the URI syntax
                   40907: consisting of a character followed by the component, the component
                   40908: (including its prefix character) must be included even if the new
                   40909: value is the empty string.</ins></p>
                   40910: <p class="note"><ins class="diff-new">The previous paragraph
                   40911: applies in particular to the "</ins> <code title=
                   40912: "">:</code><ins class="diff-new">" before a &lt;port&gt; component,
                   40913: the "</ins> <code title=""><ins class="diff-new">?</ins></code>
                   40914: <ins class="diff-new">" before a &lt;query&gt; component, and the
                   40915: "</ins> <code title=""><ins class="diff-new">#</ins></code>
                   40916: <ins class="diff-new">" before a &lt;fragment&gt;
                   40917: component.</ins></p>
                   40918: <p>The rules for parsing and constructing URIs are described in RFC
                   40919: 3986 and RFC 3987. <a href="#references">[RFC3986]</a> <a href=
                   40920: "#references">[RFC3987]</a></p>
                   40921: <table>
                   40922: <thead>
                   40923: <tr>
                   40924: <th>Attribute</th>
                   40925: <th>Component</th>
                   40926: <th>Getter Condition</th>
                   40927: <th>Prefix</th>
                   40928: <th>Suffix</th>
                   40929: <th>Setter Preprocessor</th>
                   40930: <th>Setter Condition</th>
                   40931: </tr>
                   40932: </thead>
                   40933: <tbody>
                   40934: <tr>
                   40935: <td><dfn id="protocol0" title=
                   40936: "dom-uda-protocol"><code>protocol</code></dfn></td>
                   40937: <td>&lt;scheme&gt;</td>
                   40938: <td>—</td>
                   40939: <td>—</td>
                   40940: <td>U+003A COLON (" <code title="">:</code> ")</td>
                   40941: <td>Remove all trailing U+003A COLON (" <code title="">:</code> ")
                   40942: characters</td>
                   40943: <td>The new value is not the empty string</td>
                   40944: </tr>
                   40945: <tr>
                   40946: <td><dfn id="host0" title=
                   40947: "dom-uda-host"><code>host</code></dfn></td>
                   40948: <td><a href="#lthostportgt">&lt;hostport&gt;</a></td>
                   40949: <td><a href="#input" title="concept-uda-input">input</a> is
                   40950: hierarchical and uses a server-based naming authority</td>
                   40951: <td>—</td>
                   40952: <td>—</td>
                   40953: <td>—</td>
                   40954: <td>—</td>
                   40955: </tr>
                   40956: <tr>
                   40957: <td><dfn id="hostname0" title=
                   40958: "dom-uda-hostname"><code>hostname</code></dfn></td>
                   40959: <td>&lt;host&gt;/&lt;ihost&gt;</td>
                   40960: <td><a href="#input" title="concept-uda-input">input</a> is
                   40961: hierarchical and uses a server-based naming authority</td>
                   40962: <td>—</td>
                   40963: <td>—</td>
                   40964: <td>Remove all leading U+002F SOLIDUS (" <code title="">/</code> ")
                   40965: characters</td>
                   40966: <td>—</td>
                   40967: </tr>
                   40968: <tr>
                   40969: <td><dfn id="port0" title=
                   40970: "dom-uda-port"><code>port</code></dfn></td>
                   40971: <td>&lt;port&gt;</td>
                   40972: <td><a href="#input" title="concept-uda-input">input</a> is
                   40973: hierarchical and uses a server-based naming authority</td>
                   40974: <td>—</td>
                   40975: <td>—</td>
                   40976: <td>Remove any characters in the new value that are not in the
                   40977: range U+0030 DIGIT ZERO .. U+0039 DIGIT <del class="diff-old">NINE
                   40978: The new value is not</del> <ins class="diff-chg">NINE. If</ins> the
                   40979: <del class="diff-old">empty</del> <ins class=
                   40980: "diff-chg">resulting</ins> string <ins class="diff-new">is empty,
                   40981: set it to a single U+0030 DIGIT ZERO character ('0').</ins></td>
                   40982: <td><ins class="diff-new">—</ins></td>
                   40983: </tr>
                   40984: <tr>
                   40985: <td><dfn id="pathname0" title=
                   40986: "dom-uda-pathname"><code>pathname</code></dfn></td>
                   40987: <td>&lt;abs_path&gt;</td>
                   40988: <td><a href="#input" title="concept-uda-input">input</a> is
                   40989: hierarchical</td>
                   40990: <td>—</td>
                   40991: <td>—</td>
                   40992: <td>If it has no leading U+002F SOLIDUS (" <code title="">/</code>
                   40993: ") character, prepend a U+002F SOLIDUS (" <code title="">/</code>
                   40994: ") character to the new value</td>
                   40995: <td>—</td>
                   40996: </tr>
                   40997: <tr>
                   40998: <td><dfn id="search1" title=
                   40999: "dom-uda-search"><code>search</code></dfn></td>
                   41000: <td>&lt;query&gt;</td>
                   41001: <td><a href="#input" title="concept-uda-input">input</a> is
                   41002: hierarchical</td>
                   41003: <td>U+003F QUESTION MARK (" <code title="">?</code> ")</td>
                   41004: <td>—</td>
                   41005: <td>Remove one leading U+003F QUESTION MARK (" <code title=
                   41006: "">?</code> ") character, if any</td>
                   41007: <td>—</td>
                   41008: </tr>
                   41009: <tr>
                   41010: <td><dfn id="hash0" title=
                   41011: "dom-uda-hash"><code>hash</code></dfn></td>
                   41012: <td>&lt;fragment&gt;</td>
                   41013: <td>Fragment identifier is longer than zero characters</td>
                   41014: <td>U+0023 NUMBER SIGN (" <code title="">#</code> ")</td>
                   41015: <td>—</td>
                   41016: <td>Remove one leading U+0023 NUMBER SIGN (" <code title=
                   41017: "">#</code> ") character, if any</td>
                   41018: <td>—</td>
                   41019: </tr>
                   41020: </tbody>
                   41021: </table>
                   41022: <p>The <dfn id="lthostportgt">&lt;hostport&gt;</dfn> component is
                   41023: defined as being the &lt;host&gt;/&lt;ihost&gt; component, followed
                   41024: by a colon and the &lt;port&gt; component, but with the colon and
                   41025: &lt;port&gt; component omitted if the given port matches the
                   41026: default port for the protocol given by the &lt;scheme&gt;
                   41027: component.</p>
                   41028: <h2 id="editing"><span class="secno">5.</span> <dfn id=
                   41029: "editing0">Editing</dfn></h2>
                   41030: <p>This section describes various features that allow authors to
                   41031: enable users to edit documents and parts of documents
                   41032: interactively.</p>
                   41033: <h3 id="editing-intro"><span class="secno"><del class=
                   41034: "diff-old">5.1.</del> <ins class="diff-chg">5.1</ins></span>
                   41035: Introduction</h3>
                   41036: <p><em>This section is non-normative.</em></p>
                   41037: <p class="big-issue">Would be nice to explain how these features
                   41038: work together.</p>
                   41039: <h3 id="contenteditable"><span class="secno"><del class=
                   41040: "diff-old">5.2.</del> <ins class="diff-chg">5.2</ins></span> The
                   41041: <code title="attr-contenteditable"><a href=
                   41042: "#contenteditable0">contenteditable</a></code> attribute</h3>
                   41043: <p>The <dfn id="contenteditable0" title=
                   41044: "attr-contenteditable"><code>contenteditable</code></dfn> attribute
                   41045: is a common attribute. User agents must support this attribute on
                   41046: all <a href="#html-elements">HTML elements</a> .</p>
                   41047: <p>The <code title="attr-contenteditable"><a href=
                   41048: "#contenteditable0">contenteditable</a></code> attribute is an
                   41049: <a href="#enumerated">enumerated attribute</a> whose keywords are
                   41050: the empty string, <code title="">true</code> , and <code title=
                   41051: "">false</code> . The empty string and the <code title=
                   41052: "">true</code> keyword map to the <em>true</em> state. The
                   41053: <code title="">false</code> keyword maps to the <em>false</em>
                   41054: <ins class="diff-new">state. In addition, there is a third state,
                   41055: the</ins> <em><ins class="diff-new">inherit</ins></em> state, which
                   41056: is <del class="diff-old">also</del> the <em><del class=
                   41057: "diff-old">invalid</del> <ins class="diff-chg">missing</ins> value
                   41058: default <del class="diff-old">. There is no</del></em> <ins class=
                   41059: "diff-chg">(and the</ins> <em><del class="diff-old">missing</del>
                   41060: <ins class="diff-chg">invalid</ins> value default <del class=
                   41061: "diff-old">.</del></em> <ins class="diff-chg">).</ins></p>
                   41062: <p>If an <a href="#html-elements" title="HTML elements">HTML
                   41063: element</a> has a <code title="attr-contenteditable"><a href=
                   41064: "#contenteditable0">contenteditable</a></code> attribute set to the
                   41065: true state, or <ins class="diff-new">it has its</ins> <code title=
                   41066: "attr-contenteditable"><a href="#contenteditable0"><ins class=
                   41067: "diff-new">contenteditable</ins></a></code> <ins class=
                   41068: "diff-new">attribute set to the inherit state and</ins> if its
                   41069: nearest ancestor <a href="#html-elements" title=
                   41070: "HTML elements">HTML element</a> with the <code title=
                   41071: "attr-contenteditable"><a href=
                   41072: "#contenteditable0">contenteditable</a></code> attribute set
                   41073: <ins class="diff-new">to a state other than the inherit state</ins>
                   41074: has its attribute set to the true state, or if it <del class=
                   41075: "diff-old">has no</del> <ins class="diff-chg">and its</ins>
                   41076: ancestors <del class="diff-old">with the</del> <ins class=
                   41077: "diff-chg">all have their</ins> <code title=
                   41078: "attr-contenteditable"><a href=
                   41079: "#contenteditable0">contenteditable</a></code> attribute set
                   41080: <ins class="diff-new">to the inherit state</ins> but the
                   41081: <code>Document</code> has <code title=
                   41082: "dom-document-designMode"><a href=
                   41083: "#designMode">designMode</a></code> enabled, then the UA must treat
                   41084: the element as <dfn id="editable0">editable</dfn> (as described
                   41085: below).</p>
                   41086: <p>Otherwise, either the <a href="#html-elements" title=
                   41087: "HTML elements">HTML element</a> has a <code title=
                   41088: "attr-contenteditable"><a href=
                   41089: "#contenteditable0">contenteditable</a></code> attribute set to the
                   41090: false state, or its <code title="attr-contenteditable"><a href=
                   41091: "#contenteditable0"><ins class=
                   41092: "diff-new">contenteditable</ins></a></code> <ins class=
                   41093: "diff-new">attribute is set to the inherit state and its</ins>
                   41094: nearest ancestor <a href="#html-elements" title=
                   41095: "HTML elements">HTML element</a> with the <code title=
                   41096: "attr-contenteditable"><a href=
                   41097: "#contenteditable0">contenteditable</a></code> attribute set
                   41098: <del class="diff-old">is not editable , or it</del> <ins class=
                   41099: "diff-chg">to a state other than the inherit state</ins> has
                   41100: <del class="diff-old">no ancestor with</del> <ins class=
                   41101: "diff-chg">its attribute set to</ins> the <ins class=
                   41102: "diff-new">false state, or all its ancestors have their</ins>
                   41103: <code title="attr-contenteditable"><a href=
                   41104: "#contenteditable0">contenteditable</a></code> attribute set
                   41105: <ins class="diff-new">to the inherit state</ins> and the
                   41106: <code>Document</code> itself has <code title=
                   41107: "dom-document-designMode"><a href=
                   41108: "#designMode">designMode</a></code> <del class="diff-old">disabled,
                   41109: and</del> <ins class="diff-chg">disabled; either way,</ins> the
                   41110: element is <del class="diff-old">thus</del> not editable.</p>
                   41111: <p>The <dfn id="contenteditable1" title=
                   41112: "dom-contentEditable"><code>contentEditable</code></dfn> DOM
                   41113: attribute, on getting, must return the string " <code title=
                   41114: ""><del class="diff-old">inherit</del> <ins class=
                   41115: "diff-chg">true</ins></code> " if the content attribute <del class=
                   41116: "diff-old">isn't set, "</del> <ins class="diff-chg">is set to
                   41117: the</ins> true <ins class="diff-new">state,</ins> <code title=
                   41118: ""><ins class="diff-new">false</ins></code> " if the <ins class=
                   41119: "diff-new">content</ins> attribute is set <del class="diff-old">and
                   41120: has</del> <ins class="diff-chg">to</ins> the <del class=
                   41121: "diff-old">true</del> <ins class="diff-chg">false</ins> state, and
                   41122: " <code title=""><del class="diff-old">false</del> <ins class=
                   41123: "diff-chg">inherit</ins></code> " otherwise. On setting, if the new
                   41124: value is case-insensitively equal to the string " <code title=
                   41125: "">inherit</code> " then the content attribute must be removed, if
                   41126: the new value is case-insensitively equal to the string "
                   41127: <code title="">true</code> <ins class="diff-new">"</ins> then the
                   41128: content attribute must be set to the string " <code title="">true
                   41129: <del class="diff-old">,</del></code> <ins class="diff-chg">",</ins>
                   41130: if the new value is case-insensitively equal to the string "
                   41131: <code title="">false</code> <ins class="diff-new">"</ins> then the
                   41132: content attribute must be set to the string " <code title="">false
                   41133: <del class="diff-old">,</del></code> <ins class="diff-chg">",</ins>
                   41134: and otherwise the attribute setter must raise a
                   41135: <code>SYNTAX_ERR</code> exception.</p>
                   41136: <p><ins class="diff-new">The</ins> <dfn id="iscontenteditable"
                   41137: title="dom-isContentEditable"><code><ins class=
                   41138: "diff-new">isContentEditable</ins></code></dfn> <ins class=
                   41139: "diff-new">DOM attribute, on getting, must return true if the
                   41140: element is</ins> <a href="#editable0"><ins class=
                   41141: "diff-new">editable</ins></a> ,<ins class="diff-new">and false
                   41142: otherwise.</ins></p>
                   41143: <p>If an element is <a href="#editable0">editable</a> and its
                   41144: parent element is not, or if an element is <a href=
                   41145: "#editable0">editable</a> and it has no parent element, then the
                   41146: element is an <dfn id="editing1">editing host</dfn> . Editable
                   41147: elements can be nested. User agents must make editing hosts
                   41148: focusable (which <del class="diff-old">typicially</del> <ins class=
                   41149: "diff-chg">typically</ins> means they enter the <a href="#tabindex"
                   41150: title="attr-tabindex">tab order</a> ). An editing host can contain
                   41151: non-editable sections, these are handled as described below. An
                   41152: editing host can contain non-editable sections that contain further
                   41153: editing hosts.</p>
                   41154: <p>When an editing host has focus, it must have a <dfn id=
                   41155: "caret">caret position</dfn> that specifies where the current
                   41156: editing position is. It may also have a <a href="#a-selection"
                   41157: title="the selection">selection</a> .</p>
                   41158: <p class="note">How the caret and selection are represented depends
                   41159: entirely on the UA.</p>
                   41160: <h4 id="user-editing"><span class="secno"><del class=
                   41161: "diff-old">5.2.1.</del> <ins class="diff-chg">5.2.1</ins></span>
                   41162: User editing actions</h4>
                   41163: <p>There are several actions that the user agent should allow the
                   41164: user to perform while the user is interacting with an editing host.
                   41165: How exactly each action is triggered is not defined for every
                   41166: action, but when it is not defined, suggested key bindings are
                   41167: provided to guide implementors.</p>
                   41168: <dl>
                   41169: <dt>Move the caret</dt>
                   41170: <dd>
                   41171: <p>User agents must allow users to move the caret to any position
                   41172: within an editing host, even into nested editable elements. This
                   41173: could be triggered as the default action of <code title=
                   41174: "event-keydown">keydown</code> events with various key identifiers
                   41175: and as the default action of <code title=
                   41176: "event-mousedown">mousedown</code> events.</p>
                   41177: </dd>
                   41178: <dt>Change the selection</dt>
                   41179: <dd>
                   41180: <p>User agents must allow users to change <a href=
                   41181: "#a-selection">the selection</a> within an editing host, even into
                   41182: nested editable elements. <ins class="diff-new">User agents may
                   41183: prevent selections from being made in ways that cross from editable
                   41184: elements into non-editable elements (e.g. by making each
                   41185: non-editable descendant atomically selectable, but not allowing
                   41186: text selection within them).</ins> This could be triggered as the
                   41187: default action of <code title="event-keydown">keydown</code> events
                   41188: with various key identifiers and as the default action of
                   41189: <code title="event-mousedown">mousedown</code> events.</p>
                   41190: </dd>
                   41191: <dt id="contenteditable-insertText">Insert text</dt>
                   41192: <dd>
                   41193: <p>This action must be triggered as the default action of a
                   41194: <code title="event-textInput">textInput</code> event, and may be
                   41195: triggered by other commands as well. It must cause the user agent
                   41196: to insert the specified text (given by the event object's
                   41197: <code title="">data</code> attribute in the case of the
                   41198: <code title="event-textInput">textInput</code> event) at the
                   41199: caret.</p>
                   41200: <p>If the caret is positioned somewhere where <a href=
                   41201: "#phrasing0">phrasing content</a> is not allowed (e.g. inside an
                   41202: empty <code><a href="#ol">ol</a></code> element), then the user
                   41203: agent must not insert the text directly at the caret position. In
                   41204: such cases the <del class="diff-old">behaviour</del> <ins class=
                   41205: "diff-chg">behavior</ins> is UA-dependent, but user agents must
                   41206: not, in response to a request to insert text, generate a DOM that
                   41207: is less conformant than the DOM prior to the request.</p>
                   41208: <p>User agents should allow users to insert new paragraphs into
                   41209: elements that contains only content other than paragraphs.</p>
                   41210: <div class="example">
                   41211: <p>For example, given the markup:</p>
                   41212: <pre>
                   41213: &lt;section&gt;
                   41214:  &lt;dl&gt;
                   41215:   &lt;dt&gt; Ben &lt;/dt&gt;
                   41216:   &lt;dd&gt; Goat &lt;/dd&gt;
                   41217:  &lt;/dl&gt;
                   41218: &lt;/section&gt;
                   41219: </pre>
                   41220: <p>...the user agent should allow the user to insert <code><a href=
                   41221: "#p">p</a></code> elements before and after the <code><a href=
                   41222: "#dl">dl</a></code> element, as children of the <code><a href=
                   41223: "#section">section</a></code> element.</p>
                   41224: </div>
                   41225: </dd>
                   41226: <dt id="contenteditable-breakBlock">Break block</dt>
                   41227: <dd>
                   41228: <p>UAs should offer a way for the user to request that the current
                   41229: paragraph be broken at the caret, e.g. as the default action of a
                   41230: <code title="event-keydown">keydown</code> event whose identifier
                   41231: is the "Enter" key and that has no modifiers set.</p>
                   41232: <p>The exact <del class="diff-old">behaviour</del> <ins class=
                   41233: "diff-chg">behavior</ins> is UA-dependent, but user agents must
                   41234: not, in response to a request to break a paragraph, generate a DOM
                   41235: that is less conformant than the DOM prior to the request.</p>
                   41236: </dd>
                   41237: <dt id="contenteditable-br">Insert a line separator</dt>
                   41238: <dd>
                   41239: <p>UAs should offer a way for the user to request an explicit line
                   41240: break at the caret position without breaking the paragraph, e.g. as
                   41241: the default action of a <code title="event-keydown">keydown</code>
                   41242: event whose identifier is the "Enter" key and that has a shift
                   41243: modifier set. Line separators are typically found within a poem
                   41244: verse or an address. To insert a line break, the user agent must
                   41245: insert a <code><a href="#br">br</a></code> element.</p>
                   41246: <p>If the caret is positioned somewhere where <a href=
                   41247: "#phrasing0">phrasing content</a> is not allowed (e.g. in an empty
                   41248: <code><a href="#ol">ol</a></code> element), then the user agent
                   41249: must not insert the <code><a href="#br">br</a></code> element
                   41250: directly at the caret position. In such cases the <del class=
                   41251: "diff-old">behaviour</del> <ins class="diff-chg">behavior</ins> is
                   41252: UA-dependent, but user agents must not, in response to a request to
                   41253: insert a line separator, generate a DOM that is less conformant
                   41254: than the DOM prior to the request.</p>
                   41255: </dd>
                   41256: <dt id="contenteditable-delete">Delete</dt>
                   41257: <dd>
                   41258: <p>UAs should offer a way for the user to delete text and elements,
                   41259: <ins class="diff-new">including non-editable descendants,</ins>
                   41260: e.g. as the default action of <code title=
                   41261: "event-keydown">keydown</code> events whose identifiers are
                   41262: "U+0008" or "U+007F".</p>
                   41263: <p>Five edge cases in particular need to be considered carefully
                   41264: when implementing this feature: backspacing at the start of an
                   41265: element, backspacing when the caret is immediately after an
                   41266: element, forward-deleting at the end of an element,
                   41267: forward-deleting when the caret is immediately before an element,
                   41268: and deleting a <a href="#a-selection" title=
                   41269: "the selection">selection</a> whose start and end points do not
                   41270: share a common parent node.</p>
                   41271: <p>In any case, the exact <del class="diff-old">behaviour</del>
                   41272: <ins class="diff-chg">behavior</ins> is UA-dependent, but user
                   41273: agents must not, in response to a request to delete text or an
                   41274: element, generate a DOM that is less conformant than the DOM prior
                   41275: to the request.</p>
                   41276: </dd>
                   41277: <dt id="contenteditable-wrapSemantic">Insert, and wrap text in,
                   41278: semantic elements</dt>
                   41279: <dd>
                   41280: <p>UAs should offer <del class="diff-old">a way for the user to
                   41281: mark text as having stress emphasis and as being important , and
                   41282: may offer</del> the user the ability to mark text and paragraphs
                   41283: with <del class="diff-old">other semantics.</del> <ins class=
                   41284: "diff-chg">semantics that HTML can express.</ins></p>
                   41285: <p>UAs should similarly offer a way for the user to insert empty
                   41286: semantic elements <del class="diff-old">(such as, again, em ,
                   41287: strong , and others)</del> to subsequently fill by entering text
                   41288: manually.</p>
                   41289: <p>UAs should also offer a way to remove those semantics from
                   41290: marked up text, and to remove empty semantic element that have been
                   41291: inserted.</p>
                   41292: <p><ins class="diff-new">In response to a request from a user to
                   41293: mark text up in italics, user agents should use the</ins>
                   41294: <code><a href="#i"><ins class="diff-new">i</ins></a></code>
                   41295: <ins class="diff-new">element to represent the semantic. The</ins>
                   41296: <code><a href="#em"><ins class="diff-new">em</ins></a></code>
                   41297: <ins class="diff-new">element should be used only if the user agent
                   41298: is sure that the user means to indicate stress emphasis.</ins></p>
                   41299: <p><ins class="diff-new">In response to a request from a user to
                   41300: mark text up in bold, user agents should use the</ins>
                   41301: <code><a href="#b"><ins class="diff-new">b</ins></a></code>
                   41302: <ins class="diff-new">element to represent the semantic. The</ins>
                   41303: <code><a href="#strong"><ins class=
                   41304: "diff-new">strong</ins></a></code> <ins class="diff-new">element
                   41305: should be used only if the user agent is sure that the user means
                   41306: to indicate importance.</ins></p>
                   41307: <p>The exact <del class="diff-old">behaviour</del> <ins class=
                   41308: "diff-chg">behavior</ins> is UA-dependent, but user agents must
                   41309: not, in response to a request to wrap semantics around some text or
                   41310: to insert or remove a semantic element, generate a DOM that is less
                   41311: conformant than the DOM prior to the request.</p>
                   41312: </dd>
                   41313: <dt>Select and move non-editable elements nested inside editing
                   41314: hosts</dt>
                   41315: <dd>
                   41316: <p>UAs should offer a way for the user to move images and other
                   41317: non-editable parts around the content within an editing host. This
                   41318: may be done using the <a href="#drag-and">drag and drop</a>
                   41319: mechanism. User agents must not, in response to a request to move
                   41320: non-editable elements nested inside editing hosts, generate a DOM
                   41321: that is less conformant than the DOM prior to the request.</p>
                   41322: </dd>
                   41323: <dt>Edit form controls nested inside editing hosts</dt>
                   41324: <dd>
                   41325: <p>When an <a href="#editable0">editable</a> form control is
                   41326: edited, the changes must be reflected in both its current value
                   41327: <em>and</em> its default value. For <code>input</code> elements
                   41328: this means updating the <code title=
                   41329: "dom-input-defaultValue">defaultValue</code> DOM attribute as well
                   41330: as the <code title="dom-input-value">value</code> DOM attribute;
                   41331: for <code>select</code> elements it means updating the
                   41332: <code>option</code> elements' <code title=
                   41333: "dom-option-defaultSelected">defaultSelected</code> DOM attribute
                   41334: as well as the <code title="dom-option-selected">selected</code>
                   41335: DOM attribute; for <code>textarea</code> elements this means
                   41336: updating the <code title=
                   41337: "dom-textarea-defaultValue">defaultValue</code> DOM attribute as
                   41338: well as the <code title="dom-textarea-value">value</code> DOM
                   41339: attribute. (Updating the <code title="">default*</code> DOM
                   41340: attributes causes content attributes to be updated as well.)</p>
                   41341: </dd>
                   41342: </dl>
                   41343: <p>User agents may perform several commands per user request; for
                   41344: example if the user selects a block of text and hits
                   41345: <kbd><kbd>Enter</kbd></kbd> , the UA might interpret that as a
                   41346: request to delete the content of <a href="#a-selection">the
                   41347: selection</a> followed by a request to break the paragraph at that
                   41348: position.</p>
                   41349: <h4 id="making"><span class="secno"><del class=
                   41350: "diff-old">5.2.2.</del> <ins class="diff-chg">5.2.2</ins></span>
                   41351: Making entire documents editable</h4>
                   41352: <p>Documents have a <dfn id="designMode" title=
                   41353: "dom-document-designMode"><code>designMode</code></dfn> , which can
                   41354: be either enabled or disabled.</p>
                   41355: <p>The <code title="dom-document-designMode"><a href=
                   41356: "#designMode">designMode</a></code> DOM attribute on the
                   41357: <code>Document</code> object takes <del class=
                   41358: "diff-old">takes</del> two values, " <code title="">on</code> " and
                   41359: " <code title="">off</code> ". When it is set, the new value must
                   41360: be case-insensitively compared to these two values. If it matches
                   41361: the " <code title="">on</code> " value, then <code title=
                   41362: "dom-document-designMode"><a href=
                   41363: "#designMode">designMode</a></code> must be enabled, and if it
                   41364: matches the " <code title="">off</code> " value, then <code title=
                   41365: "dom-document-designMode"><a href=
                   41366: "#designMode">designMode</a></code> must be disabled. Other values
                   41367: must be ignored.</p>
                   41368: <p>When <code title="dom-document-designMode"><a href=
                   41369: "#designMode">designMode</a></code> is enabled, the DOM attribute
                   41370: must return the value " <code title="">on</code> ", and when it is
                   41371: disabled, it must return the value " <code title="">off</code>
                   41372: ".</p>
                   41373: <p>The last state set must persist until the document is destroyed
                   41374: or the state is changed. Initially, documents must have their
                   41375: <code title="dom-document-designMode"><a href=
                   41376: "#designMode">designMode</a></code> disabled.</p>
                   41377: <p>Enabling <code title="dom-document-designMode"><a href=
                   41378: "#designMode">designMode</a></code> <a href=
                   41379: "#designModeScriptBlocked">causes scripts in general to be
                   41380: disabled</a> and the document to become editable. <del class=
                   41381: "diff-old">When the Document has designMode enabled, event
                   41382: listeners registered on the document or any elements owned by the
                   41383: document must do nothing.</del></p>
                   41384: <h3 id="dnd"><span class="secno"><del class="diff-old">5.3.</del>
                   41385: <ins class="diff-chg">5.3</ins></span> <dfn id="drag-and">Drag and
                   41386: drop</dfn></h3>
                   41387: <p>This section defines an event-based drag-and-drop mechanism.</p>
                   41388: <p>This specification does not define exactly what a
                   41389: <em>drag-and-drop operation</em> actually is.</p>
                   41390: <p>On a visual medium with a pointing device, a drag operation
                   41391: could be the default action of a <code title=
                   41392: "event-mousedown">mousedown</code> event that is followed by a
                   41393: series of <code title="event-mousemove">mousemove</code> events,
                   41394: and the drop could be triggered by the mouse being released.</p>
                   41395: <p>On media without a pointing device, the user would probably have
                   41396: to explicitly indicate his intention to perform a drag-and-drop
                   41397: operation, stating what he wishes to drag and what he wishes to
                   41398: drop, respectively.</p>
                   41399: <p>However it is implemented, drag-and-drop operations must have a
                   41400: starting point (e.g. where the mouse was clicked, or the start of
                   41401: <a href="#a-selection">the selection</a> or element that was
                   41402: selected for the drag), may have any number of intermediate steps
                   41403: (elements that the mouse moves over during a drag, or elements that
                   41404: the user picks as possible drop points as he cycles through
                   41405: possibilities), and must either have an end point (the element
                   41406: above which the mouse button was released, or the element that was
                   41407: finally selected), or be canceled. The end point must be the last
                   41408: element selected as a possible drop point before the drop occurs
                   41409: (so if the operation is not canceled, there must be at least one
                   41410: element in the middle step).</p>
                   41411: <h4 id="introduction4"><span class="secno"><ins class=
                   41412: "diff-new">5.3.1</ins></span> <ins class=
                   41413: "diff-new">Introduction</ins></h4>
                   41414: <p><em><ins class="diff-new">This section is
                   41415: non-normative.</ins></em></p>
                   41416: <p class="big-issue"><ins class="diff-new">It's also currently
                   41417: non-existent.</ins></p>
                   41418: <h4 id="the-dragevent"><span class="secno"><del class=
                   41419: "diff-old">5.3.1.</del> <ins class="diff-chg">5.3.2</ins></span>
                   41420: The <code><a href="#dragevent">DragEvent</a></code> and
                   41421: <code><a href="#datatransfer0">DataTransfer</a></code>
                   41422: interfaces</h4>
                   41423: <p>The drag-and-drop processing model involves several events. They
                   41424: all use the <code><a href="#dragevent">DragEvent</a></code>
                   41425: interface.</p>
                   41426: <pre class="idl">
                   41427: interface <dfn id="dragevent">DragEvent</dfn> : UIEvent {
                   41428:   readonly attribute <a href=
                   41429: "#datatransfer0">DataTransfer</a> <a href="#datatransfer" title=
                   41430: "dom-DragEvent-dataTransfer">dataTransfer</a>;
                   41431:   void <a href="#initdragevent" title=
                   41432: "dom-DragEvent-initDragEvent">initDragEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in AbstractView viewArg, in long detailArg, in <a href="#datatransfer0">DataTransfer</a> dataTransferArg);
                   41433:   void <a href="#initdrageventns" title=
                   41434: "dom-DragEvent-initDragEventNS">initDragEventNS</a>(in DOMString namespaceURIArg, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in AbstractView viewArg, in long detailArg, in <a href="#datatransfer0">DataTransfer</a> dataTransferArg);
                   41435: };
                   41436: </pre>
                   41437: <p class="issue">We should have modifier key information in here
                   41438: too (shift/ctrl, etc), like with mouse events and like with the
                   41439: context menu event.</p>
                   41440: <p>The <dfn id="initdragevent" title=
                   41441: "dom-DragEvent-initDragEvent"><code>initDragEvent()</code></dfn>
                   41442: and <dfn id="initdrageventns" title=
                   41443: "dom-DragEvent-initDragEventNS"><code>initDragEventNS()</code></dfn>
                   41444: methods must initialise the event in a manner analogous to the
                   41445: similarly-named methods in the DOM3 Events interfaces. <a href=
                   41446: "#references">[DOM3EVENTS]</a></p>
                   41447: <p>The <dfn id="datatransfer" title=
                   41448: "dom-DragEvent-dataTransfer"><code>dataTransfer</code></dfn>
                   41449: attribute of the <code><a href="#dragevent">DragEvent</a></code>
                   41450: interface represents the context information for the event.
                   41451: <del class="diff-old">When a DragEvent object is created, a new
                   41452: DataTransfer object must be created and assigned to the
                   41453: dataTransfer context information field of the event
                   41454: object.</del></p>
                   41455: <pre class="idl">
                   41456: interface <dfn id="datatransfer0">DataTransfer</dfn> {
                   41457:            attribute DOMString <a href="#dropeffect" title=
                   41458: "dom-DataTransfer-dropEffect">dropEffect</a>;
                   41459:            attribute DOMString <a href="#effectallowed" title=
                   41460: "dom-DataTransfer-effectAllowed">effectAllowed</a>;
                   41461: <ins class="diff-new">  readonly attribute DOMStringList <a href=
                   41462: "#types" title="dom-DataTransfer-types">types</a>;
                   41463: </ins>
                   41464:   void <a href="#cleardata" title=
                   41465: "dom-DataTransfer-clearData">clearData</a>(in DOMString format);
                   41466:   void <a href="#setdata" title=
                   41467: "dom-DataTransfer-setData">setData</a>(in DOMString format, in DOMString data);
                   41468:   DOMString <a href="#getdata" title=
                   41469: "dom-DataTransfer-getData">getData</a>(in DOMString format);
                   41470:   void <a href="#setdragimage" title=
                   41471: "dom-DataTransfer-setDragImage">setDragImage</a>(in Element image, in long x, in long y);
                   41472:   void <a href="#addelement" title=
                   41473: "dom-DataTransfer-addElement">addElement</a>(in Element element);
                   41474: };
                   41475: </pre>
                   41476: <p><code><a href="#datatransfer0">DataTransfer</a></code> objects
                   41477: can conceptually contain various kinds of data.</p>
                   41478: <p>When a <code><del class="diff-old">DragEvent event object is
                   41479: initialised, the</del> <a href=
                   41480: "#datatransfer0">DataTransfer</a></code> object <del class=
                   41481: "diff-old">created for the event's dataTransfer member</del>
                   41482: <ins class="diff-chg">is created, it</ins> must be <del class=
                   41483: "diff-old">initialised</del> <ins class=
                   41484: "diff-chg">initialized</ins> as follows:</p>
                   41485: <ul>
                   41486: <li>The <code><a href="#datatransfer0">DataTransfer</a></code>
                   41487: object must initially contain no data, no elements, and have no
                   41488: associated image.</li>
                   41489: <li>The <code><a href="#datatransfer0">DataTransfer</a></code>
                   41490: object's <code title="dom-DataTransfer-effectAllowed"><a href=
                   41491: "#effectallowed">effectAllowed</a></code> attribute must be set to
                   41492: " <code title="">uninitialized</code> ".</li>
                   41493: <li>The <code title="dom-DataTransfer-dropEffect"><a href=
                   41494: "#dropeffect">dropEffect</a></code> attribute must be set to "
                   41495: <code title="">none</code> ".</li>
                   41496: </ul>
                   41497: <p>The <dfn id="dropeffect" title=
                   41498: "dom-DataTransfer-dropEffect"><code>dropEffect</code></dfn>
                   41499: attribute controls the drag-and-drop feedback that the user is
                   41500: given during a drag-and-drop operation.</p>
                   41501: <p>The attribute must ignore any attempts to set it to a value
                   41502: other than <code title="">none</code> , <code title="">copy</code>
                   41503: , <code title="">link</code> , and <code title="">move</code> . On
                   41504: getting, the attribute must return the last of those four values
                   41505: that it was set to.</p>
                   41506: <p>The <dfn id="effectallowed" title=
                   41507: "dom-DataTransfer-effectAllowed"><code>effectAllowed</code></dfn>
                   41508: attribute is used in the drag-and-drop processing model to
                   41509: initialise the <code title="dom-DataTransfer-dropEffect"><a href=
                   41510: "#dropeffect">dropEffect</a></code> attribute during the
                   41511: <code title="event-dragenter"><a href=
                   41512: "#dragenter">dragenter</a></code> and <code title=
                   41513: "event-dragover"><a href="#dragover">dragover</a></code>
                   41514: events.</p>
                   41515: <p>The attribute must ignore any attempts to set it to a value
                   41516: other than <code title="">none</code> , <code title="">copy</code>
                   41517: , <code title="">copyLink</code> , <code title="">copyMove</code> ,
                   41518: <code title="">link</code> , <code title="">linkMove</code> ,
                   41519: <code title="">move</code> , <code title="">all</code> , and
                   41520: <code title="">uninitialized</code> . On getting, the attribute
                   41521: must return the last of those values that it was set to.</p>
                   41522: <p><code><a href="#datatransfer0">DataTransfer</a></code> objects
                   41523: can hold pieces of data, each associated with a unique format.
                   41524: Formats are generally given by MIME types, with some values
                   41525: special-cased for legacy reasons.</p>
                   41526: <p>The <dfn id="cleardata" title=
                   41527: "dom-DataTransfer-clearData"><code>clearData( <var title=
                   41528: "">format</var> )</code></dfn> method must clear the <code><a href=
                   41529: "#datatransfer0">DataTransfer</a></code> object of any data
                   41530: associated with the given <var title="">format</var> . If
                   41531: <var title="">format</var> is the value " <code title=
                   41532: "">Text</code> ", then it must be treated as " <code title=
                   41533: "">text/plain</code> ". If the <var title="">format</var> is "
                   41534: <code title="">URL</code> ", then it must be treated as "
                   41535: <code title="">text/uri-list</code> ".</p>
                   41536: <p>The <dfn id="setdata" title=
                   41537: "dom-DataTransfer-setData"><code>setData( <var title=
                   41538: "">format</var> , <var title="">data</var> )</code></dfn> method
                   41539: must add <var title="">data</var> to the data stored in the
                   41540: <code><a href="#datatransfer0">DataTransfer</a></code> object,
                   41541: <del class="diff-old">labelled</del> <ins class=
                   41542: "diff-chg">labeled</ins> as being of the type <var title=
                   41543: "">format</var> . This must replace any previous data that had been
                   41544: set for that format. If <var title="">format</var> is the value "
                   41545: <code title="">Text</code> ", then it must be treated as "
                   41546: <code title="">text/plain</code> ". If the <var title=
                   41547: "">format</var> is " <code title="">URL</code> ", then it must be
                   41548: treated as " <code title="">text/uri-list</code> ".</p>
                   41549: <p>The <dfn id="getdata" title=
                   41550: "dom-DataTransfer-getData"><code>getData( <var title=
                   41551: "">format</var> )</code></dfn> method must return the data that is
                   41552: associated with the type <var title="">format</var> , if any, and
                   41553: must return the empty string otherwise. If <var title=
                   41554: "">format</var> is the value " <code title="">Text</code> ", then
                   41555: it must be treated as " <code title="">text/plain</code> ". If the
                   41556: <var title="">format</var> is " <code title="">URL</code> ", then
                   41557: the data associated with the " <code title="">text/uri-list</code>
                   41558: " format must be parsed as appropriate for <code title=
                   41559: "">text/uri-list</code> data, and the first URI from the list must
                   41560: be returned. If there is no data with that format, or if there is
                   41561: but it has no URIs, then the method must return the empty string.
                   41562: <a href="#references">[RFC2483]</a></p>
                   41563: <p>The <dfn id="types" title=
                   41564: "dom-DataTransfer-types"><code><ins class=
                   41565: "diff-new">types</ins></code></dfn> <ins class="diff-new">attribute
                   41566: must return a live</ins> <code><ins class=
                   41567: "diff-new">DOMStringList</ins></code> <ins class="diff-new">that
                   41568: contains the list of formats that are stored in the</ins>
                   41569: <code><a href="#datatransfer0"><ins class=
                   41570: "diff-new">DataTransfer</ins></a></code> <ins class=
                   41571: "diff-new">object.</ins></p>
                   41572: <p><ins class="diff-new">The</ins> <dfn id="setdragimage" title=
                   41573: "dom-DataTransfer-setDragImage"><code>setDragImage( <var title=
                   41574: "">element</var> , <var title="">x</var> , <var title="">y</var>
                   41575: )</code></dfn> method sets which element to use <a href=
                   41576: "#base-dnd-feedback">to generate the drag feedback</a> . The
                   41577: <var title="">element</var> argument can be any
                   41578: <code>Element</code> ; if it is an <code><a href=
                   41579: "#img">img</a></code> element, then the user agent should use the
                   41580: element's image (at its intrinsic size) to generate the feedback,
                   41581: otherwise the user agent should base the feedback on the given
                   41582: element (but the exact mechanism for doing so is not
                   41583: specified).</p>
                   41584: <p>The <dfn id="addelement" title=
                   41585: "dom-DataTransfer-addElement"><code>addElement( <var title=
                   41586: "">element</var> )</code></dfn> method is an alternative way of
                   41587: specifying how the user agent is to <a href=
                   41588: "#base-dnd-feedback">render the drag feedback</a> . It adds an
                   41589: element to the <code><a href=
                   41590: "#datatransfer0">DataTransfer</a></code> object.</p>
                   41591: <h4 id="events1"><span class="secno"><del class=
                   41592: "diff-old">5.3.2.</del> <ins class="diff-chg">5.3.3</ins></span>
                   41593: Events fired during a drag-and-drop action</h4>
                   41594: <p>The following events are involved in the drag-and-drop model.
                   41595: Whenever the processing model described below causes one of these
                   41596: events to be fired, the event fired must use the <code><a href=
                   41597: "#dragevent">DragEvent</a></code> interface defined above, must
                   41598: have the bubbling and cancelable <del class=
                   41599: "diff-old">behaviours</del> <ins class="diff-chg">behaviors</ins>
                   41600: given in the table below, and must have the context information set
                   41601: up as described after the table, with the <code title=
                   41602: "dom-UIEvent-view">view</code> attribute set to the view with which
                   41603: the user interacted to trigger the drag-and-drop event, and the
                   41604: <code title="dom-UIEvent-detail">detail</code> attribute set to
                   41605: zero.</p>
                   41606: <table>
                   41607: <thead>
                   41608: <tr>
                   41609: <th>Event Name</th>
                   41610: <th>Target</th>
                   41611: <th>Bubbles?</th>
                   41612: <th>Cancelable?</th>
                   41613: <th><code title="dom-DataTransfer-addElement"><a href=
                   41614: "#addelement">dataTransfer</a></code></th>
                   41615: <th><code title="dom-DataTransfer-effectAllowed"><a href=
                   41616: "#effectallowed">effectAllowed</a></code></th>
                   41617: <th><code title="dom-DataTransfer-dropEffect"><a href=
                   41618: "#dropeffect">dropEffect</a></code></th>
                   41619: <th>Default Action</th>
                   41620: </tr>
                   41621: </thead>
                   41622: <tbody>
                   41623: <tr>
                   41624: <td><dfn id="dragstart" title=
                   41625: "event-dragstart"><code>dragstart</code></dfn></td>
                   41626: <td><a href="#source2">Source node</a></td>
                   41627: <td>✓ Bubbles</td>
                   41628: <td>✓ Cancelable</td>
                   41629: <td>Contains <a href="#source2">source node</a> unless a selection
                   41630: is being dragged, in which case it is empty</td>
                   41631: <td><code title="">uninitialized</code></td>
                   41632: <td><code title="">none</code></td>
                   41633: <td>Initiate the drag-and-drop operation</td>
                   41634: </tr>
                   41635: <tr>
                   41636: <td><dfn id="drag" title="event-drag"><code>drag</code></dfn></td>
                   41637: <td><a href="#source2">Source node</a></td>
                   41638: <td>✓ Bubbles</td>
                   41639: <td>✓ Cancelable</td>
                   41640: <td>Empty</td>
                   41641: <td><a href="#effectAllowed-initialization">Same as last
                   41642: event</a></td>
                   41643: <td><code title="">none</code></td>
                   41644: <td>Continue the drag-and-drop operation</td>
                   41645: </tr>
                   41646: <tr>
                   41647: <td><dfn id="dragenter" title=
                   41648: "event-dragenter"><code>dragenter</code></dfn></td>
                   41649: <td><a href="#immediate">Immediate user selection</a> or <a href=
                   41650: "#the-body1">the body element</a></td>
                   41651: <td>✓ Bubbles</td>
                   41652: <td>✓ Cancelable</td>
                   41653: <td>Empty</td>
                   41654: <td><a href="#effectAllowed-initialization">Same as last
                   41655: event</a></td>
                   41656: <td><a href="#dropEffect-initialization">Based on
                   41657: <code>effectAllowed</code> value</a></td>
                   41658: <td>Reject <a href="#immediate">immediate user selection</a> as
                   41659: potential <a href="#current2" title="current target element">target
                   41660: element</a></td>
                   41661: </tr>
                   41662: <tr>
                   41663: <td><dfn id="dragleave" title=
                   41664: "event-dragleave"><code>dragleave</code></dfn></td>
                   41665: <td><a href="#current2" title="current target element">Previous
                   41666: target element</a></td>
                   41667: <td>✓ Bubbles</td>
                   41668: <td>—</td>
                   41669: <td>Empty</td>
                   41670: <td><a href="#effectAllowed-initialization">Same as last
                   41671: event</a></td>
                   41672: <td><code title="">none</code></td>
                   41673: <td>None</td>
                   41674: </tr>
                   41675: <tr>
                   41676: <td><dfn id="dragover" title=
                   41677: "event-dragover"><code>dragover</code></dfn></td>
                   41678: <td><a href="#current2">Current target element</a></td>
                   41679: <td>✓ Bubbles</td>
                   41680: <td>✓ Cancelable</td>
                   41681: <td>Empty</td>
                   41682: <td><a href="#effectAllowed-initialization">Same as last
                   41683: event</a></td>
                   41684: <td><a href="#dropEffect-initialization">Based on
                   41685: <code>effectAllowed</code> value</a></td>
                   41686: <td>Reset the <a href="#current3">current drag operation</a> to
                   41687: "none"</td>
                   41688: </tr>
                   41689: <tr>
                   41690: <td><dfn id="drop" title="event-drop"><code>drop</code></dfn></td>
                   41691: <td><a href="#current2">Current target element</a></td>
                   41692: <td>✓ Bubbles</td>
                   41693: <td>✓ Cancelable</td>
                   41694: <td><code>getData()</code> returns data set in <code title=
                   41695: "dom-dragstart">dragstart</code> event</td>
                   41696: <td><a href="#effectAllowed-initialization">Same as last
                   41697: event</a></td>
                   41698: <td><a href="#current3">Current drag operation</a></td>
                   41699: <td>Varies</td>
                   41700: </tr>
                   41701: <tr>
                   41702: <td><dfn id="dragend" title=
                   41703: "event-dragend"><code>dragend</code></dfn></td>
                   41704: <td><a href="#source2">Source node</a></td>
                   41705: <td>✓ Bubbles</td>
                   41706: <td>—</td>
                   41707: <td>Empty</td>
                   41708: <td><a href="#effectAllowed-initialization">Same as last
                   41709: event</a></td>
                   41710: <td><a href="#current3">Current drag operation</a></td>
                   41711: <td>Varies</td>
                   41712: </tr>
                   41713: </tbody>
                   41714: </table>
                   41715: <p>The <code title="dom-DragEvent-dataTransfer"><a href=
                   41716: "#datatransfer">dataTransfer</a></code> object's contents are empty
                   41717: except for <code title="event-dragstart"><a href=
                   41718: "#dragstart">dragstart</a></code> events and <code title=
                   41719: "event-drop"><a href="#drop">drop</a></code> events, for which the
                   41720: contents are set as described in the processing model, below.</p>
                   41721: <p id="effectAllowed-initialization">The <code title=
                   41722: "dom-DataTransfer-effectAllowed"><a href=
                   41723: "#effectallowed">effectAllowed</a></code> attribute must be set to
                   41724: " <code title="">uninitialized</code> " for <code title=
                   41725: "event-dragstart"><a href="#dragstart">dragstart</a></code> events,
                   41726: and to whatever value the field had after the last drag-and-drop
                   41727: event was fired for all other events (only counting events fired by
                   41728: the user agent for the purposes of the drag-and-drop model
                   41729: described below).</p>
                   41730: <p id="dropEffect-initialization">The <code title=
                   41731: "dom-DataTransfer-dropEffect"><a href=
                   41732: "#dropeffect">dropEffect</a></code> attribute must be set to "
                   41733: <code title="">none</code> " for <code title=
                   41734: "event-dragstart"><a href="#dragstart">dragstart</a></code> ,
                   41735: <code title="event-drag"><a href="#drag">drag</a></code> , and
                   41736: <code title="event-dragleave"><a href=
                   41737: "#dragleave">dragleave</a></code> events (except when stated
                   41738: otherwise in the algorithms given in the sections below), to the
                   41739: value corresponding to the <a href="#current3">current drag
                   41740: operation</a> for <code title="event-drop"><a href=
                   41741: "#drop">drop</a></code> and <code title="event-dragend"><a href=
                   41742: "#dragend">dragend</a></code> events, and to a value based on the
                   41743: <code title="dom-DataTransfer-effectAllowed"><a href=
                   41744: "#effectallowed">effectAllowed</a></code> attribute's value and to
                   41745: the drag-and-drop source, as given by the following table, for the
                   41746: remaining events ( <code title="event-dragenter"><a href=
                   41747: "#dragenter">dragenter</a></code> and <code title=
                   41748: "event-dragover"><a href="#dragover">dragover</a></code> ):</p>
                   41749: <table>
                   41750: <thead>
                   41751: <tr>
                   41752: <th><code title="dom-DataTransfer-effectAllowed"><a href=
                   41753: "#effectallowed">effectAllowed</a></code></th>
                   41754: <th><code title="dom-DataTransfer-dropEffect"><a href=
                   41755: "#dropeffect">dropEffect</a></code></th>
                   41756: </tr>
                   41757: </thead>
                   41758: <tbody>
                   41759: <tr>
                   41760: <td><code title="">none</code></td>
                   41761: <td><code title="">none</code></td>
                   41762: </tr>
                   41763: <tr>
                   41764: <td><code title="">copy</code> , <code title="">copyLink</code> ,
                   41765: <code title="">copyMove</code> , <code title="">all</code></td>
                   41766: <td><code title="">copy</code></td>
                   41767: </tr>
                   41768: <tr>
                   41769: <td><code title="">link</code> , <code title=
                   41770: "">linkMove</code></td>
                   41771: <td><code title="">link</code></td>
                   41772: </tr>
                   41773: <tr>
                   41774: <td><code title="">move</code></td>
                   41775: <td><code title="">move</code></td>
                   41776: </tr>
                   41777: <tr>
                   41778: <td><code title="">uninitialized</code> when what is being dragged
                   41779: is a selection from a text field</td>
                   41780: <td><code title="">move</code></td>
                   41781: </tr>
                   41782: <tr>
                   41783: <td><code title="">uninitialized</code> when what is being dragged
                   41784: is a selection</td>
                   41785: <td><code title="">copy</code></td>
                   41786: </tr>
                   41787: <tr>
                   41788: <td><code title="">uninitialized</code> when what is being dragged
                   41789: is an <code><a href="#a">a</a></code> element with an
                   41790: <code>href</code> attribute</td>
                   41791: <td><code title="">link</code></td>
                   41792: </tr>
                   41793: <tr>
                   41794: <td>Any other case</td>
                   41795: <td><code title="">copy</code></td>
                   41796: </tr>
                   41797: </tbody>
                   41798: </table>
                   41799: <h4 id="drag-and-drop"><span class="secno"><del class=
                   41800: "diff-old">5.3.3.</del> <ins class="diff-chg">5.3.4</ins></span>
                   41801: Drag-and-drop processing model</h4>
                   41802: <p>When the user attempts to begin a drag operation, the user agent
                   41803: must first determine what is being dragged. If the drag operation
                   41804: was invoked on a selection, then it is the selection that is being
                   41805: dragged. Otherwise, it is the first element, going up the ancestor
                   41806: chain, starting at the node that the user tried to drag, that has
                   41807: the DOM attribute <code title="dom-draggable"><a href=
                   41808: "#draggable0">draggable</a></code> set to true. If there is no such
                   41809: element, then nothing is being dragged, the drag-and-drop operation
                   41810: is never started, and the user agent must not continue with this
                   41811: algorithm.</p>
                   41812: <p class="note"><code><a href="#img">img</a></code> elements and
                   41813: <code><a href="#a">a</a></code> elements with an <code title=
                   41814: "attr-hyperlink-href"><a href="#href6">href</a></code> attribute
                   41815: have their <code title="dom-draggable"><a href=
                   41816: "#draggable0">draggable</a></code> attribute set to true by
                   41817: default.</p>
                   41818: <p>If the user agent determines that something can be dragged, a
                   41819: <code title="event-dragstart"><a href=
                   41820: "#dragstart">dragstart</a></code> event must then be fired.</p>
                   41821: <p>If it is a selection that is being dragged, then this event must
                   41822: be fired on the node that the user started the drag on (typically
                   41823: the text node that the user originally clicked). If the user did
                   41824: not specify a particular node, for example if the user just told
                   41825: the user agent to begin a drag of "the selection", then the event
                   41826: must be fired on the deepest node that is a common ancestor of all
                   41827: parts of the selection.</p>
                   41828: <p class="big-issue">We should look into how browsers do other
                   41829: types (e.g. Firefox apparently also adds text/html for internal
                   41830: drag and drop of a selection).</p>
                   41831: <p>If it is not a selection that is being dragged, then the event
                   41832: must be fired on the element that is being dragged.</p>
                   41833: <p>The node on which the event is fired is the <dfn id=
                   41834: "source2">source node</dfn> . Multiple events are fired on this
                   41835: node during the course of the drag-and-drop operation.</p>
                   41836: <p>If it is a selection that is being dragged, the <code title=
                   41837: "dom-DragEvent-dataTransfer"><a href=
                   41838: "#datatransfer">dataTransfer</a></code> member of the event must be
                   41839: created with no nodes. Otherwise, it must be created containing
                   41840: just the <a href="#source2">source node</a> . Script can use the
                   41841: <code title="dom-DataTransfer-addElement"><a href=
                   41842: "#addelement">addElement()</a></code> method to add further
                   41843: elements to the list of what is being dragged.</p>
                   41844: <p>If it is a selection that is being dragged, the <code title=
                   41845: "dom-DragEvent-dataTransfer"><a href=
                   41846: "#datatransfer">dataTransfer</a></code> member of the event must
                   41847: have the text of the selection added to it as the data associated
                   41848: with the <code title="">text/plain</code> format. Otherwise, if it
                   41849: is an <code><a href="#img">img</a></code> element being dragged,
                   41850: then the value of the element's <code title="dom-img-src"><a href=
                   41851: "#src0">src</a></code> DOM attribute must be added, associated with
                   41852: the <code title="">text/uri-list</code> format. Otherwise, if it is
                   41853: an <code><a href="#a">a</a></code> element being dragged, then the
                   41854: value of the element's <code title="dom-a-href"><a href=
                   41855: "#href3">href</a></code> DOM attribute must be added, associated
                   41856: with the <code title="">text/uri-list</code> format. Otherwise, no
                   41857: data is added to the object by the user agent.</p>
                   41858: <p>If the event is canceled, then the drag-and-drop operation must
                   41859: not occur; the user agent must not continue with this
                   41860: algorithm.</p>
                   41861: <p>If it is not canceled, then the drag-and-drop operation must be
                   41862: initiated.</p>
                   41863: <p class="note">Since events with no event handlers registered are,
                   41864: almost by definition, never canceled, drag-and-drop is always
                   41865: available to the user if the author does not specifically prevent
                   41866: it.</p>
                   41867: <p id="base-dnd-feedback">The drag-and-drop feedback must be
                   41868: generated from the first of the following sources that is
                   41869: available:</p>
                   41870: <ol>
                   41871: <li>The element specified in the last call to the <code title=
                   41872: "dom-DataTransfer-setDragImage"><a href=
                   41873: "#setdragimage">setDragImage()</a></code> method of the
                   41874: <code title="dom-DragEvent-dataTransfer"><a href=
                   41875: "#datatransfer">dataTransfer</a></code> object of the <code title=
                   41876: "event-dragstart"><a href="#dragstart">dragstart</a></code> event,
                   41877: if the method was called. In visual media, if this is used, the
                   41878: <var title="">x</var> and <var title="">y</var> arguments that were
                   41879: passed to that method should be used as hints for where to put the
                   41880: cursor relative to the resulting image. The values are expressed as
                   41881: distances in CSS pixels from the left side and from the top side of
                   41882: the image respectively. <a href="#references">[CSS21]</a></li>
                   41883: <li>The elements that were added to the <code title=
                   41884: "dom-DragEvent-dataTransfer"><a href=
                   41885: "#datatransfer">dataTransfer</a></code> object, both before the
                   41886: event was fired, and during the handling of the event using the
                   41887: <code title="dom-DataTransfer-addElement"><a href=
                   41888: "#addelement">addElement()</a></code> method, if any such elements
                   41889: were indeed added.</li>
                   41890: <li>The selection that the user is dragging.</li>
                   41891: </ol>
                   41892: <p>The user agent must take a note of <a href="#setdata" title=
                   41893: "dom-DataTransfer-setData">the data that was placed</a> in the
                   41894: <code title="dom-DragEvent-dataTransfer"><a href=
                   41895: "#datatransfer">dataTransfer</a></code> object. This data will be
                   41896: made available again when the <code title="event-drop"><a href=
                   41897: "#drop">drop</a></code> event is fired.</p>
                   41898: <p>From this point until the end of the drag-and-drop operation,
                   41899: device input events (e.g. mouse and keyboard events) must be
                   41900: suppressed. In addition, the user agent must track all DOM changes
                   41901: made during the drag-and-drop operation, and add them to its
                   41902: <a href="#undo">undo history</a> as one atomic operation once the
                   41903: drag-and-drop operation has ended.</p>
                   41904: <p>During the drag operation, the element directly indicated by the
                   41905: user as the drop target is called the <dfn id="immediate">immediate
                   41906: user selection</dfn> . (Only elements can be selected by the user;
                   41907: other nodes must not be made available as drop targets.) However,
                   41908: the <a href="#immediate">immediate user selection</a> is not
                   41909: necessarily the <dfn id="current2">current target element</dfn> ,
                   41910: which is the element currently selected for the drop part of the
                   41911: drag-and-drop operation. The <a href="#immediate">immediate user
                   41912: selection</a> changes as the user selects different elements
                   41913: (either by pointing at them with a pointing device, or by selecting
                   41914: them in some other way). The <a href="#current2">current target
                   41915: element</a> changes when the <a href="#immediate">immediate user
                   41916: selection</a> changes, based on the results of event handlers in
                   41917: the document, as described below.</p>
                   41918: <p>Both the <a href="#current2">current target element</a> and the
                   41919: <a href="#immediate">immediate user selection</a> can be null,
                   41920: which means no target element is selected. They can also both be
                   41921: elements in other (DOM-based) documents, or other (non-Web)
                   41922: programs altogether. (For example, a user could drag text to a
                   41923: word-processor.) The <a href="#current2">current target element</a>
                   41924: is initially null.</p>
                   41925: <p>In addition, there is also a <dfn id="current3">current drag
                   41926: operation</dfn> , which can take on the values "none", "copy",
                   41927: "link", and "move". Initially it has the value "none". It is
                   41928: updated by the user agent as described in the steps below.</p>
                   41929: <p>User agents must, every 350ms (±200ms), perform the following
                   41930: steps in sequence. (If the user agent is still performing the
                   41931: previous iteration of the sequence when the next iteration becomes
                   41932: due, the user agent must not execute the overdue iteration,
                   41933: effectively "skipping missed frames" of the drag-and-drop
                   41934: operation.)</p>
                   41935: <ol>
                   41936: <li>
                   41937: <p>First, the user agent must fire a <code title=
                   41938: "event-drag"><a href="#drag">drag</a></code> event at the <a href=
                   41939: "#source2">source node</a> . If this event is canceled, the user
                   41940: agent must set the <a href="#current3">current drag operation</a>
                   41941: to none (no drag operation).</p>
                   41942: </li>
                   41943: <li>
                   41944: <p>Next, if the <code title="event-drag"><a href=
                   41945: "#drag">drag</a></code> event was not canceled and the user has not
                   41946: ended the drag-and-drop operation, the user agent must check the
                   41947: state of the drag-and-drop operation, as follows:</p>
                   41948: <ol>
                   41949: <li>
                   41950: <p>First, if the user is indicating a different <a href=
                   41951: "#immediate">immediate user selection</a> than during the last
                   41952: iteration (or if this is the first iteration), and if this <a href=
                   41953: "#immediate">immediate user selection</a> is not the same as the
                   41954: <a href="#current2">current target element</a> , then the <a href=
                   41955: "#current2">current target element</a> must be updated, as
                   41956: follows:</p>
                   41957: <ol>
                   41958: <li>
                   41959: <p>If the new <a href="#immediate">immediate user selection</a> is
                   41960: null, or is in a non-DOM document or application, then set the
                   41961: <a href="#current2">current target element</a> to the same
                   41962: value.</p>
                   41963: </li>
                   41964: <li>
                   41965: <p>Otherwise, the user agent must fire a <code title=
                   41966: "event-dragenter"><a href="#dragenter">dragenter</a></code> event
                   41967: at the <a href="#immediate">immediate user selection</a> .</p>
                   41968: </li>
                   41969: <li>
                   41970: <p>If the event is canceled, then the <a href="#current2">current
                   41971: target element</a> must be set to the <a href=
                   41972: "#immediate">immediate user selection</a> .</p>
                   41973: </li>
                   41974: <li>
                   41975: <p>Otherwise, if the <a href="#current2">current target element</a>
                   41976: is not <a href="#the-body1">the body element</a> , the user agent
                   41977: must fire a <code title="event-dragenter"><a href=
                   41978: "#dragenter">dragenter</a></code> event at <a href="#the-body1">the
                   41979: body element</a> , and the <a href="#current2">current target
                   41980: element</a> must be set to <a href="#the-body1">the body
                   41981: element</a> , regardless of whether that event was canceled or not.
                   41982: (If <a href="#the-body1">the body element</a> is null, then the
                   41983: <a href="#current2">current target element</a> would be set to null
                   41984: too in this case, it wouldn't be set to the <code>Document</code>
                   41985: object.)</p>
                   41986: </li>
                   41987: </ol>
                   41988: </li>
                   41989: <li>
                   41990: <p>If the previous step caused the <a href="#current2">current
                   41991: target element</a> to change, and if the previous target element
                   41992: was not null or a part of a non-DOM document, the user agent must
                   41993: fire a <code title="event-dragleave"><a href=
                   41994: "#dragleave">dragleave</a></code> event at the previous target
                   41995: element.</p>
                   41996: </li>
                   41997: <li>
                   41998: <p>If the <a href="#current2">current target element</a> is a DOM
                   41999: element, the user agent must fire a <code title=
                   42000: "event-dragover"><a href="#dragover">dragover</a></code> event at
                   42001: this <a href="#current2">current target element</a> .</p>
                   42002: <p>If the <code title="event-dragover"><a href=
                   42003: "#dragover">dragover</a></code> event is <ins class=
                   42004: "diff-new">not</ins> canceled, the <a href="#current3">current drag
                   42005: operation</a> must be reset to "none".</p>
                   42006: <p>Otherwise, the <a href="#current3">current drag operation</a>
                   42007: must be set based on the values the <code title=
                   42008: "dom-DataTransfer-effectAllowed"><a href=
                   42009: "#effectallowed">effectAllowed</a></code> and <code title=
                   42010: "dom-DataTransfer-dropEffect"><a href=
                   42011: "#dropeffect">dropEffect</a></code> attributes of the <code title=
                   42012: "dom-DragEvent-dataTransfer"><a href=
                   42013: "#datatransfer">dataTransfer</a></code> object had after the event
                   42014: was handled, as per the following table:</p>
                   42015: <table>
                   42016: <thead>
                   42017: <tr>
                   42018: <th><code title="dom-DataTransfer-effectAllowed"><a href=
                   42019: "#effectallowed">effectAllowed</a></code></th>
                   42020: <th><code title="dom-DataTransfer-dropEffect"><a href=
                   42021: "#dropeffect">dropEffect</a></code></th>
                   42022: <th>Drag operation</th>
                   42023: </tr>
                   42024: </thead>
                   42025: <tbody>
                   42026: <tr>
                   42027: <td><code title="">uninitialized</code> , <code title=
                   42028: "">copy</code> , <code title="">copyLink</code> , <code title=
                   42029: "">copyMove</code> , or <code title="">all</code></td>
                   42030: <td><code title="">copy</code></td>
                   42031: <td>"copy"</td>
                   42032: </tr>
                   42033: <tr>
                   42034: <td><code title="">uninitialized</code> , <code title=
                   42035: "">link</code> , <code title="">copyLink</code> , <code title=
                   42036: "">linkMove</code> , or <code title="">all</code></td>
                   42037: <td><code title="">link</code></td>
                   42038: <td>"link"</td>
                   42039: </tr>
                   42040: <tr>
                   42041: <td><code title="">uninitialized</code> , <code title=
                   42042: "">move</code> , <code title="">copyMove</code> , <code title=
                   42043: "">linkMove</code> , or <code title="">all</code></td>
                   42044: <td><code title="">move</code></td>
                   42045: <td>"move"</td>
                   42046: </tr>
                   42047: <tr>
                   42048: <td colspan="2">Any other case</td>
                   42049: <td>"none"</td>
                   42050: </tr>
                   42051: </tbody>
                   42052: </table>
                   42053: <p>Then, regardless of whether the <code title=
                   42054: "event-dragover"><a href="#dragover">dragover</a></code> event was
                   42055: canceled or not, the drag feedback (e.g. the mouse cursor) must be
                   42056: updated to match the <a href="#current3">current drag operation</a>
                   42057: , as follows:</p>
                   42058: <table>
                   42059: <thead>
                   42060: <tr>
                   42061: <th>Drag operation</th>
                   42062: <th>Feedback</th>
                   42063: </tr>
                   42064: </thead>
                   42065: <tbody>
                   42066: <tr>
                   42067: <td>"copy"</td>
                   42068: <td>Data will be copied if dropped here.</td>
                   42069: </tr>
                   42070: <tr>
                   42071: <td>"link"</td>
                   42072: <td>Data will be linked if dropped here.</td>
                   42073: </tr>
                   42074: <tr>
                   42075: <td>"move"</td>
                   42076: <td>Data will be moved if dropped here.</td>
                   42077: </tr>
                   42078: <tr>
                   42079: <td>"none"</td>
                   42080: <td>No operation allowed, dropping here will cancel the
                   42081: drag-and-drop operation.</td>
                   42082: </tr>
                   42083: </tbody>
                   42084: </table>
                   42085: </li>
                   42086: <li>
                   42087: <p>Otherwise, if the <a href="#current2">current target element</a>
                   42088: is not a DOM element, the user agent must use platform-specific
                   42089: mechanisms to determine what drag operation is being performed
                   42090: (none, copy, link, or move). This sets the <em><a href=
                   42091: "#current3">current drag operation</a></em> .</p>
                   42092: </li>
                   42093: </ol>
                   42094: </li>
                   42095: <li>
                   42096: <p>Otherwise, if the user ended the drag-and-drop operation (e.g.
                   42097: by releasing the mouse button in a mouse-driven drag-and-drop
                   42098: interface), or if the <code title="event-drag"><a href=
                   42099: "#drag">drag</a></code> event was canceled, then this will be the
                   42100: last iteration. The user agent must execute the following steps,
                   42101: then stop looping.</p>
                   42102: <ol>
                   42103: <li>
                   42104: <p>If the <a href="#current3">current drag operation</a> is none
                   42105: (no drag operation), or, if the user ended the drag-and-drop
                   42106: operation by canceling it (e.g. by hitting the <kbd>Escape</kbd>
                   42107: key), or if the <a href="#current2">current target element</a> is
                   42108: null, then the drag operation failed. If the <a href=
                   42109: "#current2">current target element</a> is a DOM element, the user
                   42110: agent must fire a <code title="event-dragleave"><a href=
                   42111: "#dragleave">dragleave</a></code> event at it; otherwise, if it is
                   42112: not null, it must use platform-specific conventions for drag
                   42113: cancellation.</p>
                   42114: </li>
                   42115: <li>
                   42116: <p>Otherwise, the drag operation was as success. If the <a href=
                   42117: "#current2">current target element</a> is a DOM element, the user
                   42118: agent must fire a <code title="event-drop"><a href=
                   42119: "#drop">drop</a></code> event at it; otherwise, it must use
                   42120: platform-specific conventions for indicating a drop.</p>
                   42121: <p>When the target is a DOM element, the <code title=
                   42122: "dom-DataTransfer-dropEffect"><a href=
                   42123: "#dropeffect">dropEffect</a></code> attribute of the event's
                   42124: <code title="dom-DragEvent-dataTransfer"><a href=
                   42125: "#datatransfer">dataTransfer</a></code> object must be given the
                   42126: value representing the <a href="#current3">current drag
                   42127: operation</a> ( <code title="">copy</code> , <code title=
                   42128: "">link</code> , or <code title="">move</code> ), and the object
                   42129: must be set up so that the <code title=
                   42130: "dom-DataTransfer-getData"><a href="#getdata">getData()</a></code>
                   42131: method will return the data that was added during the <code title=
                   42132: "event-dragstart"><a href="#dragstart">dragstart</a></code>
                   42133: event.</p>
                   42134: <p>If the event is canceled, the <a href="#current3">current drag
                   42135: operation</a> must be set to the value of the <code title=
                   42136: "dom-DataTransfer-dropEffect"><a href=
                   42137: "#dropeffect">dropEffect</a></code> attribute of the event's
                   42138: <code title="dom-DragEvent-dataTransfer"><a href=
                   42139: "#datatransfer">dataTransfer</a></code> object as it stood after
                   42140: the event was handled.</p>
                   42141: <p>Otherwise, the event is not canceled, and the user agent must
                   42142: perform the event's default action, which depends on the exact
                   42143: target as follows:</p>
                   42144: <dl class="switch">
                   42145: <dt>If the <a href="#current2">current target element</a> is a text
                   42146: field (e.g. <code>textarea</code> , or an <code>input</code>
                   42147: element with <code title="">type="text"</code> )</dt>
                   42148: <dd>The user agent must insert the data associated with the
                   42149: <code>text/plain</code> format, if any, into the text field in a
                   42150: manner consistent with platform-specific conventions (e.g.
                   42151: inserting it at the current mouse cursor position, or inserting it
                   42152: at the end of the field).</dd>
                   42153: <dt>Otherwise</dt>
                   42154: <dd>Reset the <a href="#current3">current drag operation</a> to
                   42155: "none".</dd>
                   42156: </dl>
                   42157: </li>
                   42158: <li>
                   42159: <p>Finally, the user agent must fire a <code title=
                   42160: "event-dragend"><a href="#dragend">dragend</a></code> event at the
                   42161: <a href="#source2">source node</a> , with the <code title=
                   42162: "dom-DataTransfer-dropEffect"><a href=
                   42163: "#dropeffect">dropEffect</a></code> attribute of the event's
                   42164: <code title="dom-DragEvent-dataTransfer"><a href=
                   42165: "#datatransfer">dataTransfer</a></code> object being set to the
                   42166: value corresponding to the <a href="#current3">current drag
                   42167: operation</a> .</p>
                   42168: <p class="note">The <a href="#current3">current drag operation</a>
                   42169: can change during the processing of the <code title=
                   42170: "event-drop"><a href="#drop">drop</a></code> event, if one was
                   42171: fired.</p>
                   42172: <p>The event is not cancelable. After the event has been handled,
                   42173: the user agent must act as follows:</p>
                   42174: <dl class="switch">
                   42175: <dt>If the <a href="#current2">current target element</a> is a text
                   42176: field (e.g. <code>textarea</code> , or an <code>input</code>
                   42177: element with <code title="">type="text"</code> ), and a
                   42178: <code title="event-drop"><a href="#drop">drop</a></code> event was
                   42179: fired in the previous step, and the <a href="#current3">current
                   42180: drag operation</a> is "move", and the source of the drag-and-drop
                   42181: operation is a selection in the DOM</dt>
                   42182: <dd>The user agent should delete the range representing the dragged
                   42183: selection from the DOM.</dd>
                   42184: <dt>If the <a href="#current2">current target element</a> is a text
                   42185: field (e.g. <code>textarea</code> , or an <code>input</code>
                   42186: element with <code title="">type="text"</code> ), and a
                   42187: <code title="event-drop"><a href="#drop">drop</a></code> event was
                   42188: fired in the previous step, and the <a href="#current3">current
                   42189: drag operation</a> is "move", and the source of the drag-and-drop
                   42190: operation is a selection in a text field</dt>
                   42191: <dd>The user agent should delete the dragged selection from the
                   42192: relevant text field.</dd>
                   42193: <dt>Otherwise</dt>
                   42194: <dd>The event has no default action.</dd>
                   42195: </dl>
                   42196: </li>
                   42197: </ol>
                   42198: </li>
                   42199: </ol>
                   42200: <h5 id="when-the"><span class="secno"><del class=
                   42201: "diff-old">5.3.3.1.</del> <ins class=
                   42202: "diff-chg">5.3.4.1.</ins></span> When the drag-and-drop operation
                   42203: starts or ends in another document</h5>
                   42204: <p>The model described above is independent of which
                   42205: <code>Document</code> object the nodes involved are from; the
                   42206: events must be fired as described above and the rest of the
                   42207: processing model must be followed as described above, irrespective
                   42208: of how many documents are involved in the operation.</p>
                   42209: <h5 id="when-the0"><span class="secno"><del class=
                   42210: "diff-old">5.3.3.2.</del> <ins class=
                   42211: "diff-chg">5.3.4.2.</ins></span> When the drag-and-drop operation
                   42212: starts or ends in another application</h5>
                   42213: <p>If the drag is initiated in another application, the <a href=
                   42214: "#source2">source node</a> is not a DOM node, and the user agent
                   42215: must use platform-specific conventions instead when the
                   42216: requirements above involve the source node. User agents in this
                   42217: situation must act as if the dragged data had been added to the
                   42218: <code><a href="#datatransfer0">DataTransfer</a></code> object when
                   42219: the drag started, even though no <code title=
                   42220: "event-dragstart"><a href="#dragstart">dragstart</a></code> event
                   42221: was actually fired; user agents must similarly use
                   42222: platform-specific conventions when deciding on what drag feedback
                   42223: to use.</p>
                   42224: <p>If a drag is started in a document but ends in another
                   42225: application, then the user agent must instead replace the parts of
                   42226: the processing model relating to handling the <em>target</em>
                   42227: according to platform-specific conventions.</p>
                   42228: <p>In any case, scripts running in the context of the document must
                   42229: not be able to distinguish the case of a drag-and-drop operation
                   42230: being started or ended in another application from the case of a
                   42231: drag-and-drop operation being started or ended in another document
                   42232: from another domain.</p>
                   42233: <h4 id="the-draggable"><span class="secno"><del class=
                   42234: "diff-old">5.3.4.</del> <ins class="diff-chg">5.3.5</ins></span>
                   42235: The <dfn id="draggable" title=
                   42236: "attr-draggable"><code>draggable</code></dfn> attribute</h4>
                   42237: <p>All elements may have the <code title="attr-draggable"><a href=
                   42238: "#draggable">draggable</a></code> content attribute set. The
                   42239: <code title="attr-draggable"><a href=
                   42240: "#draggable">draggable</a></code> attribute is an <a href=
                   42241: "#enumerated">enumerated attribute</a> . It has three states. The
                   42242: first state is <em>true</em> and it has the keyword <code title=
                   42243: "">true</code> . The second state is <em>false</em> and it has the
                   42244: keyword <code title="">false</code> . The third state is
                   42245: <em>auto</em> ; it has no keywords but it is the <em>missing value
                   42246: default</em> .</p>
                   42247: <p>The <dfn id="draggable0" title=
                   42248: "dom-draggable"><code>draggable</code></dfn> DOM attribute, whose
                   42249: value depends on the content attribute's in the way described
                   42250: below, controls whether or not the element is draggable. Generally,
                   42251: only text selections are draggable, but elements whose <code title=
                   42252: "dom-draggable"><a href="#draggable0">draggable</a></code> DOM
                   42253: attribute is true become draggable as well.</p>
                   42254: <p>If an element's <code title="attr-draggable"><a href=
                   42255: "#draggable">draggable</a></code> content attribute has the state
                   42256: <em>true</em> , the <code title="dom-draggable"><a href=
                   42257: "#draggable0">draggable</a></code> DOM attribute must return
                   42258: true.</p>
                   42259: <p>Otherwise, if the element's <code title=
                   42260: "attr-draggable"><a href="#draggable">draggable</a></code> content
                   42261: attribute has the state <em>false</em> , the <code title=
                   42262: "dom-draggable"><a href="#draggable0">draggable</a></code> DOM
                   42263: attribute must return false.</p>
                   42264: <p>Otherwise, the element's <code title="attr-draggable"><a href=
                   42265: "#draggable">draggable</a></code> content attribute has the state
                   42266: <em>auto</em> . If the element is an <code><a href=
                   42267: "#img">img</a></code> element, or, if the element is an
                   42268: <code><a href="#a">a</a></code> element with an <code title=
                   42269: "attr-hyperlink-href"><a href="#href6">href</a></code> content
                   42270: attribute, the <code title="dom-draggable"><a href=
                   42271: "#draggable0">draggable</a></code> DOM attribute must return
                   42272: true.</p>
                   42273: <p>Otherwise, the <code title="dom-draggable"><a href=
                   42274: "#draggable0">draggable</a></code> DOM must return false.</p>
                   42275: <p>If the <code title="dom-draggable"><a href=
                   42276: "#draggable0">draggable</a></code> DOM attribute is set to the
                   42277: value false, the <code title="attr-draggable"><a href=
                   42278: "#draggable">draggable</a></code> content attribute must be set to
                   42279: the literal value <code title="">false</code> . If the <code title=
                   42280: "dom-draggable"><a href="#draggable0">draggable</a></code> DOM
                   42281: attribute is set to the value true, the <code title=
                   42282: "attr-draggable"><a href="#draggable">draggable</a></code> content
                   42283: attribute must be set to the literal value <code title=
                   42284: "">true</code> .</p>
                   42285: <h4 id="copy-and"><span class="secno"><del class=
                   42286: "diff-old">5.3.5.</del> <ins class="diff-chg">5.3.6</ins></span>
                   42287: Copy and paste</h4>
                   42288: <p>Copy-and-paste is a form of drag-and-drop: the "copy" part is
                   42289: equivalent to dragging content to another application (the
                   42290: "clipboard"), and the "paste" part is equivalent to dragging
                   42291: content <em>from</em> another application.</p>
                   42292: <p>Select-and-paste (a model used by mouse operations in the X
                   42293: Window System) is equivalent to a drag-and-drop operation where the
                   42294: source is the selection.</p>
                   42295: <h5 id="copy-to"><span class="secno"><del class=
                   42296: "diff-old">5.3.5.1.</del> <ins class=
                   42297: "diff-chg">5.3.6.1.</ins></span> Copy to clipboard</h5>
                   42298: <p>When the user invokes a copy operation, the user agent must act
                   42299: as if the user had invoked a drag on the current selection. If the
                   42300: drag-and-drop operation initiates, then the user agent must act as
                   42301: if the user had indicated (as the <a href="#immediate">immediate
                   42302: user selection</a> ) a hypothetical application representing the
                   42303: <del class="diff-old">clipbroad.</del> <ins class=
                   42304: "diff-chg">clipboard.</ins> Then, the user agent must act as if the
                   42305: user had ended the drag-and-drop operation without canceling it. If
                   42306: the drag-and-drop operation didn't get canceled, the user agent
                   42307: should then follow the relevant platform-specific conventions for
                   42308: copy operations (e.g. updating the clipboard).</p>
                   42309: <h5 id="cut-to"><span class="secno"><del class=
                   42310: "diff-old">5.3.5.2.</del> <ins class=
                   42311: "diff-chg">5.3.6.2.</ins></span> Cut to clipboard</h5>
                   42312: <p>When the user invokes a cut operation, the user agent must act
                   42313: as if the user had invoked a copy operation (see the previous
                   42314: section), followed, if the copy was completed successfully, by
                   42315: <a href="#contenteditable-delete">a selection delete operation</a>
                   42316: .</p>
                   42317: <h5 id="paste"><span class="secno"><del class=
                   42318: "diff-old">5.3.5.3.</del> <ins class=
                   42319: "diff-chg">5.3.6.3.</ins></span> Paste from clipboard</h5>
                   42320: <p>When the user invokes a clipboard paste operation, the user
                   42321: agent must act as if the user had invoked a drag on a hypothetical
                   42322: application representing the clipboard, setting the data associated
                   42323: with the drag as the <del class="diff-old">text from the keyboard
                   42324: (either as text/plain or text/uri-list ). If the contents of</del>
                   42325: <ins class="diff-chg">content on</ins> the clipboard <del class=
                   42326: "diff-old">cannot be represented as text or URIs, then the paste
                   42327: operation must not have any effect.</del> <ins class="diff-chg">(in
                   42328: whatever formats are available).</ins></p>
                   42329: <p>Then, the user agent must act as if the user had indicated (as
                   42330: the <a href="#immediate">immediate user selection</a> ) the element
                   42331: with the keyboard focus, and then ended the drag-and-drop operation
                   42332: without canceling it.</p>
                   42333: <h5 id="paste0"><span class="secno"><del class=
                   42334: "diff-old">5.3.5.4.</del> <ins class=
                   42335: "diff-chg">5.3.6.4.</ins></span> Paste from selection</h5>
                   42336: <p>When the user invokes a selection paste operation, the user
                   42337: agent must act as if the user had invoked a drag on the current
                   42338: selection, then indicated (as the <a href="#immediate">immediate
                   42339: user selection</a> ) the element with the keyboard focus, and then
                   42340: ended the drag-and-drop operation without canceling it. <del class=
                   42341: "diff-old">If the contents of the selection cannot be represented
                   42342: as text or URIs, then the paste operation must not have any
                   42343: effect.</del></p>
                   42344: <h4 id="security8"><span class="secno"><del class=
                   42345: "diff-old">5.3.6.</del> <ins class="diff-chg">5.3.7</ins></span>
                   42346: Security risks in the drag-and-drop model</h4>
                   42347: <p>User agents must not make the data added to the <code><a href=
                   42348: "#datatransfer0">DataTransfer</a></code> object during the
                   42349: <code title="event-dragstart"><a href=
                   42350: "#dragstart">dragstart</a></code> event available to scripts until
                   42351: the <code title="event-drop"><a href="#drop">drop</a></code> event,
                   42352: because otherwise, if a user were to drag sensitive information
                   42353: from one document to a second document, crossing a hostile third
                   42354: document in the process, the hostile document could intercept the
                   42355: data.</p>
                   42356: <p>For the same reason, user agents must <del class=
                   42357: "diff-old">only</del> consider a drop to be successful <ins class=
                   42358: "diff-new">only</ins> if the user specifically ended the drag
                   42359: operation — if any scripts end the drag operation, it must be
                   42360: considered unsuccessful (canceled) and the <code title=
                   42361: "event-drop"><a href="#drop">drop</a></code> event must not be
                   42362: fired.</p>
                   42363: <p>User agents should take care to not start drag-and-drop
                   42364: operations in response to script actions. For example, in a
                   42365: mouse-and-window environment, if a script moves a window while the
                   42366: user has his mouse button depressed, the UA would not consider that
                   42367: to start a drag. This is important because otherwise UAs could
                   42368: cause data to be dragged from sensitive sources and dropped into
                   42369: hostile documents without the user's consent.</p>
                   42370: <h3 id="undo"><span class="secno"><del class="diff-old">5.4.</del>
                   42371: <ins class="diff-chg">5.4</ins></span> <dfn id="undo-history">Undo
                   42372: history</dfn></h3>
                   42373: <p class="big-issue">There has got to be a better way of doing
                   42374: this, surely.</p>
                   42375: <p>The user agent must associate an <dfn id="undo-transaction">undo
                   42376: transaction history</dfn> with each <code><a href=
                   42377: "#htmldocument">HTMLDocument</a></code> object.</p>
                   42378: <p>The <a href="#undo-transaction">undo transaction history</a> is
                   42379: a list of entries. The entries are of two type: <a href=
                   42380: "#dom-changes">DOM changes</a> and <a href="#undo-object" title=
                   42381: "undo object">undo objects</a> .</p>
                   42382: <p>Each <dfn id="dom-changes">DOM changes</dfn> entry in the
                   42383: <a href="#undo-transaction">undo transaction history</a> consists
                   42384: of batches of one or more of the following:</p>
                   42385: <ul>
                   42386: <li>Changes to the <a href="#content">content attributes</a> of an
                   42387: <code>Element</code> node.</li>
                   42388: <li>Changes to the <a href="#dom-attributes">DOM attributes</a> of
                   42389: a <code>Node</code> .</li>
                   42390: <li>Changes to the DOM hierarchy of nodes that are descendants of
                   42391: the <code><a href="#htmldocument">HTMLDocument</a></code> object (
                   42392: <code>parentNode</code> , <code>childNodes</code> ).</li>
                   42393: </ul>
                   42394: <p><dfn id="undo-object">Undo object</dfn> entries consist of
                   42395: objects representing state that scripts running in the document are
                   42396: managing. For example, a Web mail application could use an <a href=
                   42397: "#undo-object">undo object</a> to keep track of the fact that a
                   42398: user has moved an e-mail to a particular folder, so that the user
                   42399: can undo the action and have the e-mail return to its former
                   42400: location.</p>
                   42401: <p>Broadly speaking, <a href="#dom-changes">DOM changes</a> entries
                   42402: are handled by the UA in response to user edits of form controls
                   42403: and <span>editing hosts</span> on the page, and <a href=
                   42404: "#undo-object">undo object</a> entries are handled by script in
                   42405: response to higher-level user actions (such as interactions with
                   42406: server-side state, or in the implementation of a drawing tool).</p>
                   42407: <h4 id="the-undomanager"><span class="secno"><del class=
                   42408: "diff-old">5.4.1.</del> <ins class="diff-chg">5.4.1</ins></span>
                   42409: The <code><a href="#undomanager">UndoManager</a></code>
                   42410: interface</h4>
                   42411: <div class="big-issue">
                   42412: <p>This API sucks. Seriously. It's a terrible API. Really bad. I
                   42413: hate it. Here are the requirements:</p>
                   42414: <ul>
                   42415: <li>Has to cope with cases where the server has undo state already
                   42416: when the page is loaded, that can be stuffed into the undo buffer
                   42417: onload.</li>
                   42418: <li>Has to support undo/redo.</li>
                   42419: <li>Has to cope with the "undo" action being "contact the server
                   42420: and tell it to undo", rather than it being the opposite of the
                   42421: "redo" action.</li>
                   42422: <li>Has to cope with some undo states expiring from the undo
                   42423: history (e.g. server can only remember one undelete action) but
                   42424: other states not expiring (e.g. client can undo arbitrary amounts
                   42425: of local edits).</li>
                   42426: </ul>
                   42427: </div>
                   42428: <p>To manage <a href="#undo-object">undo object</a> entries in the
                   42429: <a href="#undo-transaction">undo transaction history</a> , the
                   42430: <code><a href="#undomanager">UndoManager</a></code> interface can
                   42431: be used:</p>
                   42432: <pre class="idl">
                   42433: interface <dfn id="undomanager">UndoManager</dfn> {
                   42434: <del class=
                   42435: "diff-old">  unsigned long (in DOMObject data, in DOMStrong title);
                   42436:   void (in unsigned long index);
                   42437: </del>
                   42438: <ins class="diff-chg">  unsigned long <a href="#adddata" title=
                   42439: "dom-UndoManager-add">add</a>(in DOMObject data, in DOMString title);
                   42440:   [XXX] void <a href="#remove2" title=
                   42441: "dom-UndoManager-remove">remove</a>(in unsigned long index); 
                   42442: </ins>
                   42443:   void <a href="#clearundo" title=
                   42444: "dom-UndoManager-clearUndo">clearUndo</a>();
                   42445:   void <a href="#clearredo" title=
                   42446: "dom-UndoManager-clearRedo">clearRedo</a>();
                   42447: <del class="diff-old">  DOMObject (in unsigned long index);
                   42448:   readonly attribute unsigned long ;
                   42449: </del>
                   42450: <ins class="diff-chg">  [IndexGetter] DOMObject <a href="#itemn"
                   42451: title="dom-UndoManager-item">item</a>(in unsigned long index);
                   42452:   readonly attribute unsigned long <a href="#length11" title=
                   42453: "dom-UndoManager-length">length</a>;
                   42454: </ins>
                   42455:   readonly attribute unsigned long <a href="#position0" title=
                   42456: "dom-UndoManager-position">position</a>;
                   42457: };
                   42458: </pre>
                   42459: <p>The <dfn id="undomanager0" title=
                   42460: "dom-undoManager"><code>undoManager</code></dfn> attribute of the
                   42461: <code><a href="#window">Window</a></code> interface must return the
                   42462: object implementing the <code><a href=
                   42463: "#undomanager">UndoManager</a></code> interface for that
                   42464: <code><a href="#window">Window</a></code> object's associated
                   42465: <code><a href="#htmldocument">HTMLDocument</a></code> object.</p>
                   42466: <p><del class="diff-old">In the ECMAScript DOM binding, objects
                   42467: implementing this interface must also support being dereferenced
                   42468: using the square bracket notation, such that dereferencing with an
                   42469: integer index is equivalent to invoking the item() method with that
                   42470: index (e.g. undoManager[1] returns the same as undoManager.item(1)
                   42471: ).</del> <code><a href="#undomanager">UndoManager</a></code>
                   42472: objects represent their document's <a href="#undo-transaction">undo
                   42473: transaction history</a> . Only <a href="#undo-object">undo
                   42474: object</a> entries are visible with this API, but this does not
                   42475: mean that <a href="#dom-changes">DOM changes</a> entries are absent
                   42476: from the <a href="#undo-transaction">undo transaction history</a>
                   42477: .</p>
                   42478: <p>The <dfn id="length11" title=
                   42479: "dom-UndoManager-length"><code>length</code></dfn> attribute must
                   42480: return the number of <a href="#undo-object">undo object</a> entries
                   42481: in the <a href="#undo-transaction">undo transaction history</a>
                   42482: .</p>
                   42483: <p>The <dfn id="itemn" title="dom-UndoManager-item"><code>item(
                   42484: <var title="">n</var> )</code></dfn> method must return the
                   42485: <var title="">n</var> th <a href="#undo-object">undo object</a>
                   42486: entry in the <a href="#undo-transaction">undo transaction
                   42487: history</a> .</p>
                   42488: <p>The <a href="#undo-transaction">undo transaction history</a> has
                   42489: a <dfn id="current4" title="undo position">current position</dfn> .
                   42490: This is the position between two entries in the <a href=
                   42491: "#undo-transaction">undo transaction history</a> 's list where the
                   42492: previous entry represents what needs to happen if the user invokes
                   42493: the "undo" command (the "undo" side, lower numbers), and the next
                   42494: entry represents what needs to happen if the user invokes the
                   42495: "redo" command (the "redo" side, higher numbers).</p>
                   42496: <p>The <dfn id="position0" title=
                   42497: "dom-UndoManager-position"><code>position</code></dfn> attribute
                   42498: must return the index of the <a href="#undo-object">undo object</a>
                   42499: entry nearest to the <a href="#current4">undo position</a> , on the
                   42500: "redo" side. If there are no <a href="#undo-object">undo object</a>
                   42501: entries on the "redo" side, then the attribute must return the same
                   42502: as the <code title="dom-UndoManager-length"><a href=
                   42503: "#length11">length</a></code> attribute. If there are no <a href=
                   42504: "#undo-object">undo object</a> entries on the "undo" side of the
                   42505: <a href="#current4">undo position</a> , the <code title=
                   42506: "dom-UndoManager-position"><a href="#position0">position</a></code>
                   42507: attribute returns zero.</p>
                   42508: <p class="note">Since the <a href="#undo-transaction">undo
                   42509: transaction history</a> contains both <a href="#undo-object">undo
                   42510: object</a> entries and <a href="#dom-changes">DOM changes</a>
                   42511: entries, but the <code title="dom-UndoManager-position"><a href=
                   42512: "#position0">position</a></code> attribute only returns indices
                   42513: relative to <a href="#undo-object">undo object</a> entries, it is
                   42514: possible for several "undo" or "redo" actions to be performed
                   42515: without the value of the <code title=
                   42516: "dom-UndoManager-position"><a href="#position0">position</a></code>
                   42517: attribute changing.</p>
                   42518: <p>The <dfn id="adddata" title="dom-UndoManager-add"><code>add(
                   42519: <var title="">data</var> , <var title="">title</var> )</code></dfn>
                   42520: method's <del class="diff-old">behaviour</del> <ins class=
                   42521: "diff-chg">behavior</ins> depends on the current state. Normally,
                   42522: it must insert the <var title="">data</var> object passed as an
                   42523: argument into the <a href="#undo-transaction">undo transaction
                   42524: history</a> immediately before the <a href="#current4">undo
                   42525: position</a> , optionally remembering the given <var title=
                   42526: "">title</var> to use in the UI. If the method is called <a href=
                   42527: "#undo-moving0" title="do-undo">during an undo operation</a> ,
                   42528: however, the object must instead be added immediately
                   42529: <em>after</em> the <a href="#current4">undo position</a> .</p>
                   42530: <p>If the method is called and there is neither <a href=
                   42531: "#undo-moving0" title="do-undo">an undo operation in progress</a>
                   42532: nor <a href="#redo-moving0" title="do-redo">a redo operation in
                   42533: progress</a> then any entries in the <a href=
                   42534: "#undo-transaction">undo transaction history</a> after the <a href=
                   42535: "#current4">undo position</a> must be removed (as if <code title=
                   42536: "dom-UndoManager-clearRedo"><a href=
                   42537: "#clearredo">clearRedo()</a></code> had been called).</p>
                   42538: <p class="big-issue">We could fire events when someone adds
                   42539: something to the undo history -- one event per undo object entry
                   42540: before the position (or after, during redo addition), allowing the
                   42541: script to decide if that entry should remain or not. Or something.
                   42542: Would make it potentially easier to expire server-held state when
                   42543: the server limitations come into play.</p>
                   42544: <p>The <dfn id="remove2" title=
                   42545: "dom-UndoManager-remove"><code>remove( <var title="">index</var>
                   42546: )</code></dfn> method must remove the <a href="#undo-object">undo
                   42547: object</a> entry with the specified <var title="">index</var> . If
                   42548: the index is less than zero or greater than or equal to
                   42549: <code title="dom-UndoManager-length"><a href=
                   42550: "#length11">length</a></code> then the method must raise an
                   42551: <code>INDEX_SIZE_ERR</code> exception. <a href="#dom-changes">DOM
                   42552: changes</a> entries are unaffected by this method.</p>
                   42553: <p>The <dfn id="clearundo" title=
                   42554: "dom-UndoManager-clearUndo"><code>clearUndo()</code></dfn> method
                   42555: must remove all entries in the <a href="#undo-transaction">undo
                   42556: transaction history</a> before the <a href="#current4">undo
                   42557: position</a> , be they <a href="#dom-changes">DOM changes</a>
                   42558: entries or <a href="#undo-object">undo object</a> entries.</p>
                   42559: <p>The <dfn id="clearredo" title=
                   42560: "dom-UndoManager-clearRedo"><code>clearRedo()</code></dfn> method
                   42561: must remove all entries in the <a href="#undo-transaction">undo
                   42562: transaction history</a> after the <a href="#current4">undo
                   42563: position</a> , be they <a href="#dom-changes">DOM changes</a>
                   42564: entries or <a href="#undo-object">undo object</a> entries.</p>
                   42565: <p class="big-issue">Another idea is to have a way for scripts to
                   42566: say "startBatchingDOMChangesForUndo()" and after that the changes
                   42567: to the DOM go in as if the user had done them.</p>
                   42568: <h4 id="undo-moving"><span class="secno"><del class=
                   42569: "diff-old">5.4.2.</del> <ins class="diff-chg">5.4.2</ins></span>
                   42570: <dfn id="undo-moving0" title="do-undo">Undo: moving back in the
                   42571: undo transaction history</dfn></h4>
                   42572: <p>When the user invokes an undo operation, or when the
                   42573: <code title="dom-document-execCommand"><a href=
                   42574: "#execCommand">execCommand()</a></code> method is called with the
                   42575: <code title="command-undo"><a href="#undo1">undo</a></code>
                   42576: command, the user agent must perform an undo operation.</p>
                   42577: <p>If the <a href="#current4">undo position</a> is at the start of
                   42578: the <a href="#undo-transaction">undo transaction history</a> , then
                   42579: the user agent must do nothing.</p>
                   42580: <p>If the entry immediately before the <a href="#current4">undo
                   42581: position</a> is a <a href="#dom-changes">DOM changes</a> entry,
                   42582: then the user agent must remove that <a href="#dom-changes">DOM
                   42583: changes</a> entry, reverse the DOM changes that were listed in that
                   42584: entry, and, if the changes were reversed with no problems, add a
                   42585: new <a href="#dom-changes">DOM changes</a> entry (consisting of the
                   42586: opposite of those DOM changes) to the <a href=
                   42587: "#undo-transaction">undo transaction history</a> on the other side
                   42588: of the <a href="#current4">undo position</a> .</p>
                   42589: <p>If the DOM changes cannot be undone (e.g. because the DOM state
                   42590: is no longer consistent with the changes represented in the entry),
                   42591: then the user agent must simply remove the <a href=
                   42592: "#dom-changes">DOM changes</a> entry, without doing anything
                   42593: else.</p>
                   42594: <p>If the entry immediately before the <a href="#current4">undo
                   42595: position</a> is an <a href="#undo-object">undo object</a> entry,
                   42596: then the user agent must first remove that <a href=
                   42597: "#undo-object">undo object</a> entry from the <a href=
                   42598: "#undo-transaction">undo transaction history</a> , and then must
                   42599: fire an <code title="event-undo"><a href="#undo0">undo</a></code>
                   42600: event on the <code>Document</code> object, using the <a href=
                   42601: "#undo-object">undo object</a> entry's associated undo object as
                   42602: the event's data.</p>
                   42603: <p>Any calls to <code title="dom-undoManager-add"><a href=
                   42604: "#adddata">add()</a></code> while the event is being handled will
                   42605: be used to populate the redo history, and will then be used if the
                   42606: user invokes the "redo" command to undo his undo.</p>
                   42607: <h4 id="redo-moving"><span class="secno"><del class=
                   42608: "diff-old">5.4.3.</del> <ins class="diff-chg">5.4.3</ins></span>
                   42609: <dfn id="redo-moving0" title="do-redo">Redo: moving forward in the
                   42610: undo transaction history</dfn></h4>
                   42611: <p>When the user invokes a redo operation, or when the <code title=
                   42612: "dom-document-execCommand"><a href=
                   42613: "#execCommand">execCommand()</a></code> method is called with the
                   42614: <code title="command-redo"><a href="#redo0">redo</a></code>
                   42615: command, the user agent must perform a redo operation.</p>
                   42616: <p>This is mostly the opposite of an <a href="#undo-moving0" title=
                   42617: "do-undo">undo operation</a> , but the full definition is included
                   42618: here for completeness.</p>
                   42619: <p>If the <a href="#current4">undo position</a> is at the end of
                   42620: the <a href="#undo-transaction">undo transaction history</a> , then
                   42621: the user agent must do nothing.</p>
                   42622: <p>If the entry immediately after the <a href="#current4">undo
                   42623: position</a> is a <a href="#dom-changes">DOM changes</a> entry,
                   42624: then the user agent must remove that <a href="#dom-changes">DOM
                   42625: changes</a> entry, reverse the DOM changes that were listed in that
                   42626: entry, and, if the changes were reversed with no problems, add a
                   42627: new <a href="#dom-changes">DOM changes</a> entry (consisting of the
                   42628: opposite of those DOM changes) to the <a href=
                   42629: "#undo-transaction">undo transaction history</a> on the other side
                   42630: of the <a href="#current4">undo position</a> .</p>
                   42631: <p>If the DOM changes cannot be redone (e.g. because the DOM state
                   42632: is no longer consistent with the changes represented in the entry),
                   42633: then the user agent must simply remove the <a href=
                   42634: "#dom-changes">DOM changes</a> entry, without doing anything
                   42635: else.</p>
                   42636: <p>If the entry immediately after the <a href="#current4">undo
                   42637: position</a> is an <a href="#undo-object">undo object</a> entry,
                   42638: then the user agent must first remove that <a href=
                   42639: "#undo-object">undo object</a> entry from the <a href=
                   42640: "#undo-transaction">undo transaction history</a> , and then must
                   42641: fire a <code title="event-undo"><a href="#undo0">redo</a></code>
                   42642: event on the <code>Document</code> object, using the <a href=
                   42643: "#undo-object">undo object</a> entry's associated undo object as
                   42644: the event's data.</p>
                   42645: <h4 id="the-undomanagerevent"><span class="secno"><del class=
                   42646: "diff-old">5.4.4.</del> <ins class="diff-chg">5.4.4</ins></span>
                   42647: The <code><a href="#undomanagerevent">UndoManagerEvent</a></code>
                   42648: interface and the <code title="event-undo"><a href=
                   42649: "#undo0">undo</a></code> and <code title="event-redo"><a href=
                   42650: "#redo">redo</a></code> events</h4>
                   42651: <pre class="idl">
                   42652: interface <dfn id=
                   42653: "undomanagerevent">UndoManagerEvent</dfn> : Event {
                   42654:   readonly attribute DOMObject <a href="#data3" title=
                   42655: "dom-UndoManagerEvent-data">data</a>;
                   42656:   void <a href="#initundomanagerevent" title=
                   42657: "dom-UndoManagerEvent-initUndoManagerEvent">initUndoManagerEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMObject dataArg);
                   42658:   void <span title=
                   42659: "dom-UndoManagerEvent-initUndoManagerEventNS">initUndoManagerEventNS</span>(in DOMString namespaceURIArg, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMObject dataArg);
                   42660: };
                   42661: </pre>
                   42662: <p>The <dfn id="initundomanagerevent" title=
                   42663: "dom-UndoManagerEvent-initUndoManagerEvent"><code>initUndoManagerEvent()</code></dfn>
                   42664: and <dfn id="initundomanagereventns"><code title=
                   42665: "dom-UndoManagerEvent-initUndoManagerEventNS">initUndoManagerEventNS()</code></dfn>
                   42666: methods must initialise the event in a manner analogous to the
                   42667: similarly-named methods in the DOM3 Events interfaces. <a href=
                   42668: "#references">[DOM3EVENTS]</a></p>
                   42669: <p>The <dfn id="data3" title=
                   42670: "dom-UndoManagerEvent-data"><code>data</code></dfn> attribute
                   42671: represents the <a href="#undo-object">undo object</a> for the
                   42672: event.</p>
                   42673: <p>The <dfn id="undo0" title="event-undo"><code>undo</code></dfn>
                   42674: and <dfn id="redo" title="event-redo"><code>redo</code></dfn>
                   42675: events do not bubble, cannot be canceled, and have no default
                   42676: action. When the user agent fires one of these events it must use
                   42677: the <code><a href="#undomanagerevent">UndoManagerEvent</a></code>
                   42678: interface, with the <code title=
                   42679: "dom-UndoManagerEvent-data"><a href="#data3">data</a></code> field
                   42680: containing the relevant <a href="#undo-object">undo object</a>
                   42681: .</p>
                   42682: <h4 id="implementation0"><span class="secno"><del class=
                   42683: "diff-old">5.4.5.</del> <ins class="diff-chg">5.4.5</ins></span>
                   42684: Implementation notes</h4>
                   42685: <p>How user agents present the above conceptual model to the user
                   42686: is not defined. The undo interface could be a filtered view of the
                   42687: <a href="#undo-transaction">undo transaction history</a> , it could
                   42688: manipulate the <a href="#undo-transaction">undo transaction
                   42689: history</a> in ways not described above, and so forth. For example,
                   42690: it is possible to design a UA that appears to have separate
                   42691: <a href="#undo-transaction" title="undo transaction history">undo
                   42692: transaction histories</a> for each form control; similarly, it is
                   42693: possible to design systems where the user has access to more undo
                   42694: information than is present in the <del class=
                   42695: "diff-old">offical</del> <ins class="diff-chg">official</ins> (as
                   42696: described above) <a href="#undo-transaction">undo transaction
                   42697: history</a> (such as providing a tree-based approach to document
                   42698: state). Such UI models should be based upon the single <a href=
                   42699: "#undo-transaction">undo transaction history</a> described in this
                   42700: section, however, such that to a script there is no detectable
                   42701: difference. <del class="diff-old">5.5. Command APIs The
                   42702: execCommand( commandId , doShowUI , value ) method on the
                   42703: HTMLDocument interface allows scripts to perform actions on the
                   42704: current selection or at the current caret position. Generally,
                   42705: these commands would be used to implement editor UI, for example
                   42706: having a "delete" button on a toolbar. There are three variants to
                   42707: this method, with one, two, and three arguments respectively. The
                   42708: doShowUI and value parameters, even if specified, are ignored
                   42709: unless otherwise stated. In this specification, in fact, the
                   42710: doShowUI parameter is always ignored, regardless of its value. It
                   42711: is included for historical reasons only. When any of these methods
                   42712: are invoked, user agents must act as described in the list below.
                   42713: For actions marked " editing hosts only ", if the selection is not
                   42714: entirely within an editing host , of if there is no selection and
                   42715: the caret is not inside an editing host , then the user agent must
                   42716: do nothing. If the commandId is undo The user agent must move back
                   42717: one step in its undo transaction history , restoring the associated
                   42718: state. If there is no further undo information the user agent must
                   42719: do nothing. See the undo history . If the commandId is redo The
                   42720: user agent must move forward one step in its undo transaction
                   42721: history , restoring the associated state. If there is no further
                   42722: undo (well, "redo") information the user agent must do nothing. See
                   42723: the undo history . If the commandId is selectAll The user agent
                   42724: must change the selection so that all the content in the currently
                   42725: focused editing host is selected. If no editing host is focused,
                   42726: then the content of the entire document must be selected. If the
                   42727: commandId is unselect The user agent must change the selection so
                   42728: that nothing is selected. We need some sort of way in which the
                   42729: user can make a selection without risk of script clobbering it. If
                   42730: the commandId is superscript Editing hosts only. The user agent
                   42731: must act as if the user had requested that the selection be wrapped
                   42732: in the semantics of the sup element (or unwrapped, or, if there is
                   42733: no selection, have that semantic inserted or removed — the exact
                   42734: behaviour is UA-defined). If the commandId is subscript Editing
                   42735: hosts only. The user agent must act as if the user had requested
                   42736: that the selection be wrapped in the semantics of the sub element
                   42737: (or, again, unwrapped, or have that semantic inserted or removed,
                   42738: as defined by the UA). If the commandId is formatBlock Editing
                   42739: hosts only. This command changes the semantics of the blocks
                   42740: containing the selection. If there is no selection, then, where in
                   42741: the description below refers to the selection, the user agent must
                   42742: act as if the selection was an empty range at the caret position.
                   42743: If the value parameter is not specified or has a value other than
                   42744: one of the following literal strings: &lt;address&gt; &lt;aside&gt;
                   42745: &lt;h1&gt; &lt;h2&gt; &lt;h3&gt; &lt;h4&gt; &lt;h5&gt; &lt;h6&gt;
                   42746: &lt;nav&gt; &lt;p&gt; &lt;pre&gt; ...then the user agent must do
                   42747: nothing. Otherwise, the user agent must, for every position in the
                   42748: selection, take the furthest prose content ancestor element of that
                   42749: position that contains only phrasing content , and, if that element
                   42750: is a descendant of the editing host, rename it (as if the
                   42751: Element.renameNode() method had been used) according to the value ,
                   42752: by stripping the leading &lt; character and the trailing &gt;
                   42753: character and using the rest as the new tag name, using the HTML
                   42754: namespace. If the commandId is delete Editing hosts only. The user
                   42755: agent must act as if the user had performed a backspace operation .
                   42756: If the commandId is forwardDelete Editing hosts only. The user
                   42757: agent must act as if the user had performed a forward delete
                   42758: operation . If the commandId is insertLineBreak Editing hosts only.
                   42759: The user agent must act as if the user had requested a line
                   42760: separator . If the commandId is insertParagraph Editing hosts only.
                   42761: The user agent must act as if the user had performed a break block
                   42762: editing action. If the commandId is insertText Editing hosts only.
                   42763: The user agent must act as if the user had inserted text
                   42764: corresponding to the value parameter. If the commandId is vendorID
                   42765: - customCommandID User agents may implement vendor-specific
                   42766: extensions to this API. Vendor-specific extensions to the list of
                   42767: commands should use the syntax vendorID - customCommandID so as to
                   42768: prevent clashes between extensions from different vendors and
                   42769: future additions to this specification. If the commandId is
                   42770: something else User agents must do nothing.</del></p>
                   42771: <h3 id="selection"><span class="secno"><del class=
                   42772: "diff-old">5.6.</del> <ins class="diff-chg">5.5</ins></span> The
                   42773: text selection APIs</h3>
                   42774: <p>Every <a href="#browsing1">browsing context</a> has <dfn id=
                   42775: "a-selection" title="the selection">a selection</dfn> . The
                   42776: selection can be empty, and the selection can have more than one
                   42777: range (a disjointed selection). The user should be able to change
                   42778: the selection. User agents are not required to let the user select
                   42779: more than one range, and may collapse multiple ranges in the
                   42780: selection to a single range when the user interacts with the
                   42781: selection. (But, of course, the user agent may let the user create
                   42782: selections with multiple ranges.)</p>
                   42783: <p>This one selection must be shared by all the content of the
                   42784: browsing context (though not by nested <a href="#browsing1" title=
                   42785: "browsing context">browsing contexts</a> ), including any editing
                   42786: hosts in the document. (Editing hosts that are not inside a
                   42787: document cannot have a selection.)</p>
                   42788: <p>If the selection is empty (collapsed, so that it has only one
                   42789: segment and that segment's start and end points are the same) then
                   42790: the selection's position should equal the caret position. When the
                   42791: selection is not empty, this specification does not define the
                   42792: caret position; user agents should follow platform conventions in
                   42793: deciding whether the caret is at the start of the selection, the
                   42794: end of the selection, or somewhere else.</p>
                   42795: <p>On some platforms (such as those using Wordstar editing
                   42796: conventions), the caret position is totally independent of the
                   42797: start and end of the selection, even when the selection is empty.
                   42798: On such platforms, user agents may ignore the requirement that the
                   42799: cursor position be linked to the position of the selection
                   42800: altogether.</p>
                   42801: <p>Mostly for historical reasons, in addition to the <a href=
                   42802: "#browsing1">browsing context</a> 's <a href="#a-selection" title=
                   42803: "the selection">selection</a> , each <code>textarea</code> and
                   42804: <code>input</code> element has an independent selection. These are
                   42805: the <dfn id="text-field" title="text field selection">text field
                   42806: selections</dfn> .</p>
                   42807: <p><ins class="diff-new">User agents may selectively ignore
                   42808: attempts to use the API to adjust the selection made after the user
                   42809: has modified the selection. For example, if the user has just
                   42810: selected part of a word, the user agent could ignore attempts to
                   42811: use the API call to immediately unselect the selection altogether,
                   42812: but could allow attempts to change the selection to select the
                   42813: entire word.</ins></p>
                   42814: <p><ins class="diff-new">User agents may also allow the user to
                   42815: create selections that are not exposed to the API.</ins></p>
                   42816: <p>The <code><a href="#datagrid0">datagrid</a></code> and
                   42817: <code>select</code> elements also have selections, indicating which
                   42818: items have been picked by the user. These are not discussed in this
                   42819: section.</p>
                   42820: <p class="note">This specification does not specify how selections
                   42821: are presented to the user. The Selectors specification, in
                   42822: conjunction with CSS, can be used to style text selections using
                   42823: the <code><a href="#selection1">::selection</a></code>
                   42824: pseudo-element. <a href="#references">[SELECTORS]</a> <a href=
                   42825: "#references">[CSS21]</a></p>
                   42826: <h4 id="documentSelection"><span class="secno"><del class=
                   42827: "diff-old">5.6.1.</del> <ins class="diff-chg">5.5.1</ins></span>
                   42828: APIs for the browsing context selection</h4>
                   42829: <p>The <dfn id="getselection" title=
                   42830: "dom-getSelection"><code>getSelection()</code></dfn> method on the
                   42831: <code><a href="#window">Window</a></code> interface must return the
                   42832: <code><a href="#selection1">Selection</a></code> object
                   42833: representing <a href="#a-selection">the selection</a> of that
                   42834: <code><a href="#window">Window</a></code> object's <a href=
                   42835: "#browsing1">browsing context</a> .</p>
                   42836: <p>For historical reasons, the <dfn id="getselection0" title=
                   42837: "dom-document-getSelection"><code>getSelection()</code></dfn>
                   42838: method on the <code><a href="#htmldocument">HTMLDocument</a></code>
                   42839: interface must return the same <code><a href=
                   42840: "#selection1">Selection</a></code> object. <del class=
                   42841: "diff-old">{</del></p>
                   42842: <pre>
                   42843: <ins class="diff-chg">   class=idl&gt;[<a href="#stringify0" title=
                   42844: "dom-selection-toString">Stringifies</a>] interface <dfn id=
                   42845: "selection1">Selection</dfn> {
                   42846: </ins>
                   42847:   readonly attribute Node <a href="#anchornode" title=
                   42848: "dom-selection-anchorNode">anchorNode</a>;
                   42849:   readonly attribute long <a href="#anchoroffset" title=
                   42850: "dom-selection-anchorOffset">anchorOffset</a>;
                   42851:   readonly attribute Node <a href="#focusnode" title=
                   42852: "dom-selection-focusNode">focusNode</a>;
                   42853:   readonly attribute long <a href="#focusoffset" title=
                   42854: "dom-selection-focusOffset">focusOffset</a>;
                   42855:   readonly attribute boolean <a href="#iscollapsed" title=
                   42856: "dom-selection-isCollapsed">isCollapsed</a>;
                   42857:   void <a href="#collapse" title=
                   42858: "dom-selection-collapse">collapse</a>(in Node parentNode, in long offset);
                   42859:   void <a href="#collapsetostart" title=
                   42860: "dom-selection-collapseToStart">collapseToStart</a>();
                   42861:   void <a href="#collapsetoend" title=
                   42862: "dom-selection-collapseToEnd">collapseToEnd</a>();
                   42863:   void <a href="#selectallchildren" title=
                   42864: "dom-selection-selectAllChildren">selectAllChildren</a>(in Node parentNode);
                   42865:   void <a href="#deletefromdocument" title=
                   42866: "dom-selection-deleteFromDocument">deleteFromDocument</a>();
                   42867:   readonly attribute long <a href="#rangecount" title=
                   42868: "dom-selection-rangeCount">rangeCount</a>;
                   42869:   Range <a href="#getrangeat" title=
                   42870: "dom-selection-getRangeAt">getRangeAt</a>(in long index);
                   42871:   void <a href="#addrange" title=
                   42872: "dom-selection-addRange">addRange</a>(in Range range);
                   42873:   void <a href="#removerange" title=
                   42874: "dom-selection-removeRange">removeRange</a>(in Range range);
                   42875:   void <a href="#removeallranges" title=
                   42876: "dom-selection-removeAllRanges">removeAllRanges</a>();
                   42877: <del class="diff-old">  DOMString ();
                   42878: </del>
                   42879: };
                   42880: </pre>
                   42881: <p>The <code><a href="#selection1">Selection</a></code> interface
                   42882: is represents a list of <code>Range</code> objects. The first item
                   42883: in the list has index 0, and the last item has index <var title=
                   42884: "">count</var> -1, where <var title="">count</var> is the number of
                   42885: ranges in the list. <a href="#references">[DOM2RANGE]</a></p>
                   42886: <p>All of the members of the <code><a href=
                   42887: "#selection1">Selection</a></code> interface are defined in terms
                   42888: of operations on the <code>Range</code> objects represented by this
                   42889: object. These operations can raise exceptions, as defined for the
                   42890: <code>Range</code> interface; this can therefore result in the
                   42891: members of the <code><a href="#selection1">Selection</a></code>
                   42892: interface raising exceptions as well, in addition to any explicitly
                   42893: called out below.</p>
                   42894: <p>The <dfn id="anchornode" title=
                   42895: "dom-selection-anchorNode"><code>anchorNode</code></dfn> attribute
                   42896: must return the value returned by the <code title=
                   42897: "">startContainer</code> attribute of the last <code>Range</code>
                   42898: object in the list, or null if the list is empty.</p>
                   42899: <p>The <dfn id="anchoroffset" title=
                   42900: "dom-selection-anchorOffset"><code>anchorOffset</code></dfn>
                   42901: attribute must return the value returned by the <code title=
                   42902: "">startOffset</code> attribute of the last <code>Range</code>
                   42903: object in the list, or 0 if the list is empty.</p>
                   42904: <p>The <dfn id="focusnode" title=
                   42905: "dom-selection-focusNode"><code>focusNode</code></dfn> attribute
                   42906: must return the value returned by the <code title=
                   42907: "">endContainer</code> attribute of the last <code>Range</code>
                   42908: object in the list, or null if the list is empty.</p>
                   42909: <p>The <dfn id="focusoffset" title=
                   42910: "dom-selection-focusOffset"><code>focusOffset</code></dfn>
                   42911: attribute must return the value returned by the <code title=
                   42912: "">endOffset</code> attribute of the last <code>Range</code> object
                   42913: in the list, or 0 if the list is empty.</p>
                   42914: <p>The <dfn id="iscollapsed" title=
                   42915: "dom-selection-isCollapsed"><code>isCollapsed</code></dfn>
                   42916: attribute must return true if there are zero ranges, or if there is
                   42917: exactly one range and its <code title="">collapsed</code> attribute
                   42918: is itself true. Otherwise it must return false.</p>
                   42919: <p>The <dfn id="collapse" title=
                   42920: "dom-selection-collapse"><code>collapse( <var title=
                   42921: "">parentNode</var> , <var title="">offset</var> )</code></dfn>
                   42922: method must raise a <code>WRONG_DOCUMENT_ERR</code> DOM exception
                   42923: if <var title="">parentNode</var> 's <code title=
                   42924: "">ownerDocument</code> is not the <code><a href=
                   42925: "#htmldocument">HTMLDocument</a></code> object with which the
                   42926: <code><a href="#selection1">Selection</a></code> object is
                   42927: associated. Otherwise it is, and the method must remove all the
                   42928: ranges in the <code><a href="#selection1">Selection</a></code>
                   42929: list, then create a new <code>Range</code> object, add it to the
                   42930: list, and invoke its <code title="">setStart()</code> and
                   42931: <code title="">setEnd()</code> methods with the <var title=
                   42932: "">parentNode</var> and <var title="">offset</var> values as their
                   42933: arguments.</p>
                   42934: <p>The <dfn id="collapsetostart" title=
                   42935: "dom-selection-collapseToStart"><code>collapseToStart()</code></dfn>
                   42936: method must raise an <code>INVALID_STATE_ERR</code> DOM exception
                   42937: if there are no ranges in the list. Otherwise, it must invoke the
                   42938: <code title="dom-selection-collapse"><a href=
                   42939: "#collapse">collapse()</a></code> method with the <code title=
                   42940: "">startContainer</code> and <code title="">startOffset</code>
                   42941: values of the first <code>Range</code> object in the list as the
                   42942: arguments.</p>
                   42943: <p>The <dfn id="collapsetoend" title=
                   42944: "dom-selection-collapseToEnd"><code>collapseToEnd()</code></dfn>
                   42945: method must raise an <code>INVALID_STATE_ERR</code> DOM exception
                   42946: if there are no ranges in the list. Otherwise, it must invoke the
                   42947: <code title="dom-selection-collapse"><a href=
                   42948: "#collapse">collapse()</a></code> method with the <code title=
                   42949: "">endContainer</code> and <code title="">endOffset</code> values
                   42950: of the last <code>Range</code> object in the list as the
                   42951: arguments.</p>
                   42952: <p>The <dfn id="selectallchildren" title=
                   42953: "dom-selection-selectAllChildren"><code>selectAllChildren(
                   42954: <var title="">parentNode</var> )</code></dfn> method must invoke
                   42955: the <code title="dom-selection-collapse"><a href=
                   42956: "#collapse">collapse()</a></code> method with the <var title=
                   42957: "">parentNode</var> value as the first argument and 0 as the second
                   42958: argument, and must then invoke the <code title=
                   42959: "">selectNodeContents()</code> method on the first (and only) range
                   42960: in the list with the <var title="">parentNode</var> value as the
                   42961: argument.</p>
                   42962: <p>The <dfn id="deletefromdocument" title=
                   42963: "dom-selection-deleteFromDocument"><code>deleteFromDocument()</code></dfn>
                   42964: method must invoke the <code title="">deleteContents()</code>
                   42965: method on each range in the list, if any, from first to last.</p>
                   42966: <p>The <dfn id="rangecount" title=
                   42967: "dom-selection-rangeCount"><code>rangeCount</code></dfn> attribute
                   42968: must return the number of ranges in the list.</p>
                   42969: <p>The <dfn id="getrangeat" title=
                   42970: "dom-selection-getRangeAt"><code>getRangeAt( <var title=
                   42971: "">index</var> )</code></dfn> method must return the <var title=
                   42972: "">index</var> th range in the list. If <var title="">index</var>
                   42973: is less than zero or greater or equal to the value returned by the
                   42974: <code title="dom-selection-rangeCount"><a href=
                   42975: "#rangecount">rangeCount</a></code> attribute, then the method must
                   42976: raise an <code>INDEX_SIZE_ERR</code> DOM exception.</p>
                   42977: <p>The <dfn id="addrange" title=
                   42978: "dom-selection-addRange"><code>addRange( <var title="">range</var>
                   42979: )</code></dfn> method must add the given <var title="">range</var>
                   42980: Range object to the list of selections, at the end (so the newly
                   42981: added range is the new last range). Duplicates are not prevented; a
                   42982: range may be added more than once in which case it appears in the
                   42983: list more than once, which (for example) will cause <del class=
                   42984: "diff-old">toString()</del> <a href="#stringify0" title=
                   42985: "dom-selection-toString"><ins class=
                   42986: "diff-chg">stringification</ins></a> to return the range's text
                   42987: twice.</p>
                   42988: <p>The <dfn id="removerange" title=
                   42989: "dom-selection-removeRange"><code>removeRange( <var title=
                   42990: "">range</var> )</code></dfn> method must remove the first
                   42991: occurrence of <var title="">range</var> in the list of ranges, if
                   42992: it appears at all.</p>
                   42993: <p>The <dfn id="removeallranges" title=
                   42994: "dom-selection-removeAllRanges"><code>removeAllRanges()</code></dfn>
                   42995: method must remove all the ranges from the list of ranges, such
                   42996: that the <code title="dom-selection-rangeCount"><a href=
                   42997: "#rangecount">rangeCount</a></code> attribute returns 0 after the
                   42998: <code title="dom-selection-removeAllRanges"><a href=
                   42999: "#removeallranges">removeAllRanges()</a></code> method is invoked
                   43000: (and until a new range is added to the list, either through this
                   43001: interface or via user interaction).</p>
                   43002: <p><del class="diff-old">The toString() method</del> <ins class=
                   43003: "diff-chg">Objects implementing this interface</ins> must
                   43004: <del class="diff-old">return</del> <dfn id="stringify0" title=
                   43005: "dom-selection-toString"><ins class=
                   43006: "diff-chg">stringify</ins></dfn> <ins class="diff-chg">to</ins> a
                   43007: concatenation of the results of invoking the <code title=
                   43008: "">toString()</code> method of the <code>Range</code> object on
                   43009: each of the ranges of the selection, in the order they appear in
                   43010: the list (first to last). <del class="diff-old">In language
                   43011: bindings where this is supported, objects implementing the
                   43012: Selection interface must stringify to the value returned by the
                   43013: object's toString() method.</del></p>
                   43014: <div class="example">
                   43015: <p>In the following document fragment, the emphasised parts
                   43016: indicate the selection.</p>
                   43017: <pre>
                   43018: &lt;p&gt;
                   43019: The
                   43020: cute
                   43021: girl
                   43022: likes
                   43023: <em>
                   43024: the
                   43025: </em>
                   43026: &lt;cite&gt;
                   43027: <em>
                   43028: Oxford
                   43029: English
                   43030: </em>
                   43031: Dictionary&lt;/cite&gt;.&lt;/p&gt;
                   43032: </pre>
                   43033: <p>If a script invoked <code title=
                   43034: "">window.getSelection().toString()</code> , the return value would
                   43035: be " <code>the Oxford English</code> ".</p>
                   43036: </div>
                   43037: <p class="note">The <code><a href=
                   43038: "#selection1">Selection</a></code> interface has no relation to the
                   43039: <code><a href="#datagridselection">DataGridSelection</a></code>
                   43040: interface.</p>
                   43041: <h4 id="textFieldSelection"><span class="secno"><del class=
                   43042: "diff-old">5.6.2.</del> <ins class="diff-chg">5.5.2</ins></span>
                   43043: APIs for the text field selections</h4>
                   43044: <p class="big-issue">When we define HTMLTextAreaElement and
                   43045: HTMLInputElement we will have to add the IDL given below to both of
                   43046: their IDLs.</p>
                   43047: <p>The <code>input</code> and <code>textarea</code> elements define
                   43048: four members in their DOM interfaces for handling their text
                   43049: selection:</p>
                   43050: <pre class="idl">
                   43051:   void <a href="#select1" title=
                   43052: "dom-textarea/input-select">select</a>();
                   43053:            attribute unsigned long <a href="#selectionstart" title=
                   43054: "dom-textarea/input-selectionStart">selectionStart</a>;
                   43055:            attribute unsigned long <a href="#selectionend" title=
                   43056: "dom-textarea/input-selectionEnd">selectionEnd</a>;
                   43057: void
                   43058: <a href="#setselectionrange" title=
                   43059: "dom-textarea/input-setSelectionRange">
                   43060: setSelectionRange
                   43061: </a>
                   43062: (in
                   43063: unsigned
                   43064: long
                   43065: start,
                   43066: in
                   43067: unsigned
                   43068: long
                   43069: end);
                   43070: </pre>
                   43071: <p>These methods and attributes expose and control the selection of
                   43072: <code>input</code> and <code>textarea</code> text fields.</p>
                   43073: <p>The <dfn id="select1" title=
                   43074: "dom-textarea/input-select"><code>select()</code></dfn> method must
                   43075: cause the contents of the text field to be fully selected.</p>
                   43076: <p>The <dfn id="selectionstart" title=
                   43077: "dom-textarea/input-selectionStart"><code>selectionStart</code></dfn>
                   43078: attribute must, on getting, return the offset (in logical order) to
                   43079: the character that immediately follows the start of the selection.
                   43080: If there is no selection, then it must return the offset (in
                   43081: logical order) to the character that immediately follows the text
                   43082: entry cursor.</p>
                   43083: <p>On setting, it must act as if the <code title=
                   43084: "dom-textarea/input-setSelectionRange"><a href=
                   43085: "#setselectionrange">setSelectionRange()</a></code> method had been
                   43086: called, with the new value as the first argument, and the current
                   43087: value of the <code title="dom-textarea/input-selectionEnd"><a href=
                   43088: "#selectionend">selectionEnd</a></code> attribute as the second
                   43089: argument, unless the current value of the <code title=
                   43090: "dom-textarea/input-selectionEnd"><a href=
                   43091: "#selectionend">selectionEnd</a></code> is less than the new value,
                   43092: in which case the second argument must also be the new value.</p>
                   43093: <p>The <dfn id="selectionend" title=
                   43094: "dom-textarea/input-selectionEnd"><code>selectionEnd</code></dfn>
                   43095: attribute must, on getting, return the offset (in logical order) to
                   43096: the character that immediately follows the end of the selection. If
                   43097: there is no selection, then it must return the offset (in logical
                   43098: order) to the character that immediately follows the text entry
                   43099: cursor.</p>
                   43100: <p>On setting, it must act as if the <code title=
                   43101: "dom-textarea/input-setSelectionRange"><a href=
                   43102: "#setselectionrange">setSelectionRange()</a></code> method had been
                   43103: called, with the current value of the <code title=
                   43104: "dom-textarea/input-selectionStart"><a href=
                   43105: "#selectionstart">selectionStart</a></code> attribute as the first
                   43106: argument, and new value as the second argument.</p>
                   43107: <p>The <dfn id="setselectionrange" title=
                   43108: "dom-textarea/input-setSelectionRange"><code>setSelectionRange(
                   43109: <var title="">start</var> , <var title="">end</var> )</code></dfn>
                   43110: method must set the selection of the text field to the sequence of
                   43111: characters starting with the character at the <var title=
                   43112: "">start</var> th position (in logical order) and ending with the
                   43113: character at the <span>( <var title="">end</var> -1)</span> th
                   43114: position. Arguments greater than the length of the value in the
                   43115: text field must be treated as pointing at the end of the text
                   43116: field. If <var title="">end</var> is less than or equal to
                   43117: <var title="">start</var> then the start of the selection and the
                   43118: end of the selection must both be placed immediately before the
                   43119: character with offset <var title="">end</var> . In UAs where there
                   43120: is no concept of an empty selection, this must set the cursor to be
                   43121: just before the character with offset <var title="">end</var> .</p>
                   43122: <div class="example">
                   43123: <p>To obtain the currently selected text, the following JavaScript
                   43124: suffices:</p>
                   43125: <pre>
                   43126: var
                   43127: selectionText
                   43128: =
                   43129: control.value.substring(control.selectionStart,
                   43130: control.selectionEnd);
                   43131: </pre>
                   43132: <p>...where <var title="">control</var> is the <code>input</code>
                   43133: or <code>textarea</code> element.</p>
                   43134: </div>
                   43135: <p>Characters with no visible rendering, such as U+200D ZERO WIDTH
                   43136: JOINER, still count as characters. Thus, for instance, the
                   43137: selection can include just an invisible character, and the text
                   43138: insertion cursor can be placed to one side or another of such a
                   43139: character.</p>
                   43140: <p>When these methods and attributes are used with
                   43141: <code>input</code> elements that are not displaying simple text
                   43142: fields, they must raise an <code>INVALID_STATE_ERR</code>
                   43143: exception.</p>
                   43144: <h3 id="command"><span class="secno"><ins class=
                   43145: "diff-new">5.6</ins></span> <ins class="diff-new">Command
                   43146: APIs</ins></h3>
                   43147: <p><ins class="diff-new">The</ins> <dfn id="execCommand" title=
                   43148: "dom-document-execCommand"><code><ins class=
                   43149: "diff-new">execCommand(</ins> <var title=""><ins class=
                   43150: "diff-new">commandId</ins></var> ,<var title=""><ins class=
                   43151: "diff-new">showUI</ins></var> ,<var title=""><ins class=
                   43152: "diff-new">value</ins></var> <ins class=
                   43153: "diff-new">)</ins></code></dfn> <ins class="diff-new">method on
                   43154: the</ins> <code><a href="#htmldocument"><ins class=
                   43155: "diff-new">HTMLDocument</ins></a></code> <ins class=
                   43156: "diff-new">interface allows scripts to perform actions on the</ins>
                   43157: <a href="#a-selection" title="the selection"><ins class=
                   43158: "diff-new">current selection</ins></a> <ins class="diff-new">or at
                   43159: the current caret position. Generally, these commands would be used
                   43160: to implement editor UI, for example having a "delete" button on a
                   43161: toolbar.</ins></p>
                   43162: <p><ins class="diff-new">There are three variants to this method,
                   43163: with one, two, and three arguments respectively. The</ins>
                   43164: <var title=""><ins class="diff-new">showUI</ins></var> <ins class=
                   43165: "diff-new">and</ins> <var title=""><ins class=
                   43166: "diff-new">value</ins></var> <ins class="diff-new">parameters, even
                   43167: if specified, are ignored unless otherwise stated.</ins></p>
                   43168: <p><ins class="diff-new">When</ins> <code title=
                   43169: "dom-document-execCommand"><a href="#execCommand"><ins class=
                   43170: "diff-new">execCommand()</ins></a></code> <ins class="diff-new">is
                   43171: invoked, the user agent must follow the following steps:</ins></p>
                   43172: <ol>
                   43173: <li><ins class="diff-new">If the given</ins> <var title=
                   43174: ""><ins class="diff-new">commandId</ins></var> <ins class=
                   43175: "diff-new">maps to an entry in the list below whose "Enabled When"
                   43176: entry has a condition that is currently false, do nothing; abort
                   43177: these steps.</ins></li>
                   43178: <li><ins class="diff-new">Otherwise, execute the "Action" listed
                   43179: below for the given</ins> <var title=""><ins class=
                   43180: "diff-new">commandId</ins></var> .</li>
                   43181: </ol>
                   43182: <p><ins class="diff-new">A document is</ins> <dfn id=
                   43183: "ready"><ins class="diff-new">ready for editing host
                   43184: commands</ins></dfn> <ins class="diff-new">if it has a selection
                   43185: that is entirely within an</ins> <a href="#editing1"><ins class=
                   43186: "diff-new">editing host</ins></a> ,<ins class="diff-new">or if it
                   43187: has no selection but its caret is inside an</ins> <a href=
                   43188: "#editing1"><ins class="diff-new">editing host</ins></a> .</p>
                   43189: <p><ins class="diff-new">The</ins> <dfn id="querycommandenabled"
                   43190: title="dom-document-queryCommandEnabled"><code><ins class=
                   43191: "diff-new">queryCommandEnabled(</ins> <var title=""><ins class=
                   43192: "diff-new">commandId</ins></var> <ins class=
                   43193: "diff-new">)</ins></code></dfn> <ins class="diff-new">method, when
                   43194: invoked, must return true if the condition listed below under
                   43195: "Enabled When" for the given</ins> <var title=""><ins class=
                   43196: "diff-new">commandId</ins></var> <ins class="diff-new">is true, and
                   43197: false otherwise.</ins></p>
                   43198: <p><ins class="diff-new">The</ins> <dfn id="querycommandindeterm"
                   43199: title="dom-document-queryCommandIndeterm"><code><ins class=
                   43200: "diff-new">queryCommandIndeterm(</ins> <var title=""><ins class=
                   43201: "diff-new">commandId</ins></var> <ins class=
                   43202: "diff-new">)</ins></code></dfn> <ins class="diff-new">method, when
                   43203: invoked, must return true if the condition listed below under
                   43204: "Indeterminate When" for the given</ins> <var title=""><ins class=
                   43205: "diff-new">commandId</ins></var> <ins class="diff-new">is true, and
                   43206: false otherwise.</ins></p>
                   43207: <p><ins class="diff-new">The</ins> <dfn id="querycommandstate"
                   43208: title="dom-document-queryCommandState"><code><ins class=
                   43209: "diff-new">queryCommandState(</ins> <var title=""><ins class=
                   43210: "diff-new">commandId</ins></var> <ins class=
                   43211: "diff-new">)</ins></code></dfn> <ins class="diff-new">method, when
                   43212: invoked, must return the value expressed below under "State" for
                   43213: the given</ins> <var title=""><ins class=
                   43214: "diff-new">commandId</ins></var> .</p>
                   43215: <p><ins class="diff-new">The</ins> <dfn id="querycommandsupported"
                   43216: title="dom-document-queryCommandSupported"><code><ins class=
                   43217: "diff-new">queryCommandSupported(</ins> <var title=""><ins class=
                   43218: "diff-new">commandId</ins></var> <ins class=
                   43219: "diff-new">)</ins></code></dfn> <ins class="diff-new">method, when
                   43220: invoked, must return true if the given</ins> <var title=
                   43221: ""><ins class="diff-new">commandId</ins></var> <ins class=
                   43222: "diff-new">is in the list below, and false otherwise.</ins></p>
                   43223: <p><ins class="diff-new">The</ins> <dfn id="querycommandvalue"
                   43224: title="dom-document-queryCommandValue"><code><ins class=
                   43225: "diff-new">queryCommandValue(</ins> <var title=""><ins class=
                   43226: "diff-new">commandId</ins></var> <ins class=
                   43227: "diff-new">)</ins></code></dfn> <ins class="diff-new">method, when
                   43228: invoked, must return the value expressed below under "Value" for
                   43229: the given</ins> <var title=""><ins class=
                   43230: "diff-new">commandId</ins></var> .</p>
                   43231: <p><ins class="diff-new">The possible values for</ins> <var title=
                   43232: ""><ins class="diff-new">commandId</ins></var> ,<ins class=
                   43233: "diff-new">and their corresponding meanings, are as follows. These
                   43234: values are case-insensitive.</ins></p>
                   43235: <dl>
                   43236: <dt><dfn id="bold" title="command-bold"><code><ins class=
                   43237: "diff-new">bold</ins></code></dfn></dt>
                   43238: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43239: <ins class="diff-new">The user agent must act as if the user had
                   43240: requested that the selection</ins> <a href=
                   43241: "#contenteditable-wrapSemantic"><ins class="diff-new">be wrapped in
                   43242: the semantics</ins></a> <ins class="diff-new">of the</ins>
                   43243: <em title=""><code><a href="#b"><ins class=
                   43244: "diff-new">b</ins></a></code></em> <ins class="diff-new">element
                   43245: (or, again, unwrapped, or have that semantic inserted or removed,
                   43246: as defined by the UA).</ins></dd>
                   43247: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43248: <ins class="diff-new">The document is</ins> <a href=
                   43249: "#ready"><ins class="diff-new">ready for editing host
                   43250: commands</ins></a> .</dd>
                   43251: <dd><strong><ins class="diff-new">Indeterminate
                   43252: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43253: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43254: "diff-new">True if the selection, or the caret, if there is no
                   43255: selection, is, or is contained within, a</ins> <code><a href=
                   43256: "#b"><ins class="diff-new">b</ins></a></code> <ins class=
                   43257: "diff-new">element. False otherwise.</ins></dd>
                   43258: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43259: "diff-new">The string "</ins> <code title=""><ins class=
                   43260: "diff-new">true</ins></code> <ins class="diff-new">" if the
                   43261: expression given for the "State" above is true, the string "</ins>
                   43262: <code title=""><ins class="diff-new">false</ins></code> <ins class=
                   43263: "diff-new">" otherwise.</ins></dd>
                   43264: <dt><dfn id="createlink" title=
                   43265: "command-createLink"><code><ins class=
                   43266: "diff-new">createLink</ins></code></dfn></dt>
                   43267: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43268: <ins class="diff-new">The user agent must act as if the user had
                   43269: requested that the selection</ins> <a href=
                   43270: "#contenteditable-wrapSemantic"><ins class="diff-new">be wrapped in
                   43271: the semantics</ins></a> <ins class="diff-new">of the</ins>
                   43272: <em title=""><code><a href="#a"><ins class=
                   43273: "diff-new">a</ins></a></code></em> <ins class="diff-new">element
                   43274: (or, again, unwrapped, or have that semantic inserted or removed,
                   43275: as defined by the UA). If the user agent creates an</ins>
                   43276: <code><a href="#a"><ins class="diff-new">a</ins></a></code>
                   43277: <ins class="diff-new">element or modifies an existing</ins>
                   43278: <code><a href="#a"><ins class="diff-new">a</ins></a></code>
                   43279: <ins class="diff-new">element, then if the</ins> <var title=
                   43280: ""><ins class="diff-new">showUI</ins></var> <ins class=
                   43281: "diff-new">argument is present and has the value false, then the
                   43282: value of the</ins> <var title=""><ins class=
                   43283: "diff-new">value</ins></var> <ins class="diff-new">argument must be
                   43284: used as the URI of the link. Otherwise, the user should be prompted
                   43285: for the URI of the link.</ins></dd>
                   43286: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43287: <ins class="diff-new">The document is</ins> <a href=
                   43288: "#ready"><ins class="diff-new">ready for editing host
                   43289: commands</ins></a> .</dd>
                   43290: <dd><strong><ins class="diff-new">Indeterminate
                   43291: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43292: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43293: "diff-new">Always false.</ins></dd>
                   43294: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43295: "diff-new">Always the string "</ins> <code title=""><ins class=
                   43296: "diff-new">false</ins></code> <ins class="diff-new">".</ins></dd>
                   43297: <dt><dfn id="delete" title="command-delete"><code><ins class=
                   43298: "diff-new">delete</ins></code></dfn></dt>
                   43299: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43300: <ins class="diff-new">The user agent must act as if the user had
                   43301: performed</ins> <a href="#contenteditable-delete"><ins class=
                   43302: "diff-new">a backspace operation</ins></a> .</dd>
                   43303: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43304: <ins class="diff-new">The document is</ins> <a href=
                   43305: "#ready"><ins class="diff-new">ready for editing host
                   43306: commands</ins></a> .</dd>
                   43307: <dd><strong><ins class="diff-new">Indeterminate
                   43308: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43309: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43310: "diff-new">Always false.</ins></dd>
                   43311: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43312: "diff-new">Always the string "</ins> <code title=""><ins class=
                   43313: "diff-new">false</ins></code> <ins class="diff-new">".</ins></dd>
                   43314: <dt><dfn id="formatblock" title=
                   43315: "command-formatBlock"><code><ins class=
                   43316: "diff-new">formatBlock</ins></code></dfn></dt>
                   43317: <dd>
                   43318: <p><strong><ins class="diff-new">Action:</ins></strong> <ins class=
                   43319: "diff-new">The user agent must run the following steps:</ins></p>
                   43320: <ol>
                   43321: <li>
                   43322: <p><ins class="diff-new">If the</ins> <var title=""><ins class=
                   43323: "diff-new">value</ins></var> <ins class="diff-new">argument wasn't
                   43324: specified, abort these steps without doing anything.</ins></p>
                   43325: </li>
                   43326: <li>
                   43327: <p><ins class="diff-new">If the</ins> <var title=""><ins class=
                   43328: "diff-new">value</ins></var> <ins class="diff-new">argument has a
                   43329: leading U+003C LESS-THAN SIGN character ('&lt;') and a trailing
                   43330: U+003E GREATER-THAN SIGN character ('&gt; '), then remove the first
                   43331: and last characters from</ins> <var title=""><ins class=
                   43332: "diff-new">value</ins></var> .</p>
                   43333: </li>
                   43334: <li>
                   43335: <p><ins class="diff-new">If</ins> <var title=""><ins class=
                   43336: "diff-new">value</ins></var> <ins class="diff-new">is (now) a
                   43337: case-insensitive match for the tag name of an element defined by
                   43338: this specification that is defined to be a</ins> <span><ins class=
                   43339: "diff-new">prose element</ins></span> <ins class="diff-new">but not
                   43340: a</ins> <span><ins class="diff-new">phrasing element</ins></span>
                   43341: ,<ins class="diff-new">then, for every position in the selection,
                   43342: take the furthest</ins> <a href="#flow-content0"><ins class=
                   43343: "diff-new">flow content</ins></a> <ins class="diff-new">ancestor
                   43344: element of that position that contains only</ins> <a href=
                   43345: "#phrasing0"><ins class="diff-new">phrasing content</ins></a>
                   43346: ,<ins class="diff-new">and, if that element is</ins> <a href=
                   43347: "#editable0"><ins class="diff-new">editable</ins></a> ,<ins class=
                   43348: "diff-new">and has a content model that allows it to contain</ins>
                   43349: <span><ins class="diff-new">prose content</ins></span> <ins class=
                   43350: "diff-new">other than</ins> <a href="#phrasing0"><ins class=
                   43351: "diff-new">phrasing content</ins></a> ,<ins class="diff-new">and
                   43352: has a parent element whose content model allows that parent to
                   43353: contain any</ins> <span><ins class="diff-new">prose
                   43354: content</ins></span> ,<ins class="diff-new">rename the element (as
                   43355: if the</ins> <code title=""><ins class=
                   43356: "diff-new">Element.renameNode()</ins></code> <ins class=
                   43357: "diff-new">method had been used) to</ins> <var title=""><ins class=
                   43358: "diff-new">value</ins></var> ,<ins class="diff-new">using the HTML
                   43359: namespace.</ins></p>
                   43360: <p><ins class="diff-new">If there is no selection, then, where in
                   43361: the description above refers to the selection, the user agent must
                   43362: act as if the selection was an empty range (with just one position)
                   43363: at the caret position.</ins></p>
                   43364: </li>
                   43365: </ol>
                   43366: </dd>
                   43367: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43368: <ins class="diff-new">The document is</ins> <a href=
                   43369: "#ready"><ins class="diff-new">ready for editing host
                   43370: commands</ins></a> .</dd>
                   43371: <dd><strong><ins class="diff-new">Indeterminate
                   43372: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43373: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43374: "diff-new">Always false.</ins></dd>
                   43375: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43376: "diff-new">Always the string "</ins> <code title=""><ins class=
                   43377: "diff-new">false</ins></code> <ins class="diff-new">".</ins></dd>
                   43378: <dt><dfn id="forwarddelete" title=
                   43379: "command-forwardDelete"><code><ins class=
                   43380: "diff-new">forwardDelete</ins></code></dfn></dt>
                   43381: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43382: <ins class="diff-new">The user agent must act as if the user had
                   43383: performed</ins> <a href="#contenteditable-delete"><ins class=
                   43384: "diff-new">a forward delete operation</ins></a> .</dd>
                   43385: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43386: <ins class="diff-new">The document is</ins> <a href=
                   43387: "#ready"><ins class="diff-new">ready for editing host
                   43388: commands</ins></a> .</dd>
                   43389: <dd><strong><ins class="diff-new">Indeterminate
                   43390: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43391: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43392: "diff-new">Always false.</ins></dd>
                   43393: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43394: "diff-new">Always the string "</ins> <code title=""><ins class=
                   43395: "diff-new">false</ins></code> <ins class="diff-new">".</ins></dd>
                   43396: <dt><dfn id="insertimage" title=
                   43397: "command-insertImage"><code><ins class=
                   43398: "diff-new">insertImage</ins></code></dfn></dt>
                   43399: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43400: <ins class="diff-new">The user agent must act as if the user had
                   43401: requested that the selection</ins> <a href=
                   43402: "#contenteditable-wrapSemantic"><ins class="diff-new">be wrapped in
                   43403: the semantics</ins></a> <ins class="diff-new">of the</ins>
                   43404: <em title=""><code><a href="#img"><ins class=
                   43405: "diff-new">img</ins></a></code></em> <ins class="diff-new">element
                   43406: (or, again, unwrapped, or have that semantic inserted or removed,
                   43407: as defined by the UA). If the user agent creates an</ins>
                   43408: <code><a href="#img"><ins class="diff-new">img</ins></a></code>
                   43409: <ins class="diff-new">element or modifies an existing</ins>
                   43410: <code><a href="#img"><ins class="diff-new">img</ins></a></code>
                   43411: <ins class="diff-new">element, then if the</ins> <var title=
                   43412: ""><ins class="diff-new">showUI</ins></var> <ins class=
                   43413: "diff-new">argument is present and has the value false, then the
                   43414: value of the</ins> <var title=""><ins class=
                   43415: "diff-new">value</ins></var> <ins class="diff-new">argument must be
                   43416: used as the URI of the image. Otherwise, the user should be
                   43417: prompted for the URI of the image.</ins></dd>
                   43418: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43419: <ins class="diff-new">The document is</ins> <a href=
                   43420: "#ready"><ins class="diff-new">ready for editing host
                   43421: commands</ins></a> .</dd>
                   43422: <dd><strong><ins class="diff-new">Indeterminate
                   43423: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43424: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43425: "diff-new">Always false.</ins></dd>
                   43426: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43427: "diff-new">Always the string "</ins> <code title=""><ins class=
                   43428: "diff-new">false</ins></code> <ins class="diff-new">".</ins></dd>
                   43429: <dt><dfn id="inserthtml" title=
                   43430: "command-insertHTML"><code><ins class=
                   43431: "diff-new">insertHTML</ins></code></dfn></dt>
                   43432: <dd>
                   43433: <p><strong><ins class="diff-new">Action:</ins></strong> <ins class=
                   43434: "diff-new">The user agent must run the following steps:</ins></p>
                   43435: <ol>
                   43436: <li>
                   43437: <p><ins class="diff-new">If the</ins> <var title=""><ins class=
                   43438: "diff-new">value</ins></var> <ins class="diff-new">argument wasn't
                   43439: specified, abort these steps without doing anything.</ins></p>
                   43440: </li>
                   43441: <li>
                   43442: <p><ins class="diff-new">If there is a selection, act as if the
                   43443: user had requested that</ins> <a href=
                   43444: "#contenteditable-delete"><ins class="diff-new">the selection be
                   43445: deleted</ins></a> .</p>
                   43446: </li>
                   43447: <li>
                   43448: <p><ins class="diff-new">Invoke the</ins> <a href=
                   43449: "#html-fragment0"><ins class="diff-new">HTML fragment parsing
                   43450: algorithm</ins></a> <ins class="diff-new">with an arbitrary
                   43451: orphan</ins> <code><a href="#body0"><ins class=
                   43452: "diff-new">body</ins></a></code> <ins class="diff-new">element as
                   43453: the</ins> <i><a href="#context0"><ins class=
                   43454: "diff-new">context</ins></a></i> <ins class="diff-new">element and
                   43455: with the</ins> <var title=""><ins class=
                   43456: "diff-new">value</ins></var> <ins class="diff-new">argument
                   43457: as</ins> <i><ins class="diff-new">input</ins></i> .</p>
                   43458: </li>
                   43459: <li>
                   43460: <p><ins class="diff-new">Insert the nodes returned by the previous
                   43461: step into the document at the location of the caret.</ins></p>
                   43462: </li>
                   43463: </ol>
                   43464: </dd>
                   43465: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43466: <ins class="diff-new">The document is</ins> <a href=
                   43467: "#ready"><ins class="diff-new">ready for editing host
                   43468: commands</ins></a> .</dd>
                   43469: <dd><strong><ins class="diff-new">Indeterminate
                   43470: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43471: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43472: "diff-new">Always false.</ins></dd>
                   43473: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43474: "diff-new">Always the string "</ins> <code title=""><ins class=
                   43475: "diff-new">false</ins></code> <ins class="diff-new">".</ins></dd>
                   43476: <dt><dfn id="insertlinebreak" title=
                   43477: "command-insertLineBreak"><code><ins class=
                   43478: "diff-new">insertLineBreak</ins></code></dfn></dt>
                   43479: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43480: <ins class="diff-new">The user agent must act as if the user
                   43481: had</ins> <a href="#contenteditable-br"><ins class=
                   43482: "diff-new">requested a line separator</ins></a> .</dd>
                   43483: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43484: <ins class="diff-new">The document is</ins> <a href=
                   43485: "#ready"><ins class="diff-new">ready for editing host
                   43486: commands</ins></a> .</dd>
                   43487: <dd><strong><ins class="diff-new">Indeterminate
                   43488: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43489: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43490: "diff-new">Always false.</ins></dd>
                   43491: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43492: "diff-new">Always the string "</ins> <code title=""><ins class=
                   43493: "diff-new">false</ins></code> <ins class="diff-new">".</ins></dd>
                   43494: <dt><dfn id="insertorderedlist" title=
                   43495: "command-insertOrderedList"><code><ins class=
                   43496: "diff-new">insertOrderedList</ins></code></dfn></dt>
                   43497: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43498: <ins class="diff-new">The user agent must act as if the user had
                   43499: requested that the selection</ins> <a href=
                   43500: "#contenteditable-wrapSemantic"><ins class="diff-new">be wrapped in
                   43501: the semantics</ins></a> <ins class="diff-new">of the</ins>
                   43502: <code><a href="#ol"><ins class="diff-new">ol</ins></a></code>
                   43503: <ins class="diff-new">element (or unwrapped, or, if there is no
                   43504: selection, have that semantic inserted or removed — the exact
                   43505: behavior is UA-defined).</ins></dd>
                   43506: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43507: <ins class="diff-new">The document is</ins> <a href=
                   43508: "#ready"><ins class="diff-new">ready for editing host
                   43509: commands</ins></a> .</dd>
                   43510: <dd><strong><ins class="diff-new">Indeterminate
                   43511: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43512: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43513: "diff-new">Always false.</ins></dd>
                   43514: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43515: "diff-new">Always the string "</ins> <code title=""><ins class=
                   43516: "diff-new">false</ins></code> <ins class="diff-new">".</ins></dd>
                   43517: <dt><dfn id="insertorderedlist0" title=
                   43518: "command-insertOrderedList"><code><ins class=
                   43519: "diff-new">insertOrderedList</ins></code></dfn></dt>
                   43520: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43521: <ins class="diff-new">The user agent must act as if the user had
                   43522: requested that the selection</ins> <a href=
                   43523: "#contenteditable-wrapSemantic"><ins class="diff-new">be wrapped in
                   43524: the semantics</ins></a> <ins class="diff-new">of the</ins>
                   43525: <code><a href="#ul"><ins class="diff-new">ul</ins></a></code>
                   43526: <ins class="diff-new">element (or unwrapped, or, if there is no
                   43527: selection, have that semantic inserted or removed — the exact
                   43528: behavior is UA-defined).</ins></dd>
                   43529: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43530: <ins class="diff-new">The document is</ins> <a href=
                   43531: "#ready"><ins class="diff-new">ready for editing host
                   43532: commands</ins></a> .</dd>
                   43533: <dd><strong><ins class="diff-new">Indeterminate
                   43534: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43535: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43536: "diff-new">Always false.</ins></dd>
                   43537: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43538: "diff-new">Always the string "</ins> <code title=""><ins class=
                   43539: "diff-new">false</ins></code> <ins class="diff-new">".</ins></dd>
                   43540: <dt><dfn id="insertparagraph" title=
                   43541: "command-insertParagraph"><code><ins class=
                   43542: "diff-new">insertParagraph</ins></code></dfn></dt>
                   43543: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43544: <ins class="diff-new">The user agent must act as if the user had
                   43545: performed a</ins> <a href="#contenteditable-breakBlock"><ins class=
                   43546: "diff-new">break block</ins></a> <ins class="diff-new">editing
                   43547: action.</ins></dd>
                   43548: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43549: <ins class="diff-new">The document is</ins> <a href=
                   43550: "#ready"><ins class="diff-new">ready for editing host
                   43551: commands</ins></a> .</dd>
                   43552: <dd><strong><ins class="diff-new">Indeterminate
                   43553: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43554: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43555: "diff-new">Always false.</ins></dd>
                   43556: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43557: "diff-new">Always the string "</ins> <code title=""><ins class=
                   43558: "diff-new">false</ins></code> <ins class="diff-new">".</ins></dd>
                   43559: <dt><dfn id="inserttext" title=
                   43560: "command-insertText"><code><ins class=
                   43561: "diff-new">insertText</ins></code></dfn></dt>
                   43562: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43563: <ins class="diff-new">The user agent must act as if the user
                   43564: had</ins> <a href="#contenteditable-insertText"><ins class=
                   43565: "diff-new">inserted text</ins></a> <ins class=
                   43566: "diff-new">corresponding to the</ins> <var title=""><ins class=
                   43567: "diff-new">value</ins></var> <ins class=
                   43568: "diff-new">parameter.</ins></dd>
                   43569: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43570: <ins class="diff-new">The document is</ins> <a href=
                   43571: "#ready"><ins class="diff-new">ready for editing host
                   43572: commands</ins></a> .</dd>
                   43573: <dd><strong><ins class="diff-new">Indeterminate
                   43574: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43575: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43576: "diff-new">Always false.</ins></dd>
                   43577: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43578: "diff-new">Always the string "</ins> <code title=""><ins class=
                   43579: "diff-new">false</ins></code> <ins class="diff-new">".</ins></dd>
                   43580: <dt><dfn id="italic" title="command-italic"><code><ins class=
                   43581: "diff-new">italic</ins></code></dfn></dt>
                   43582: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43583: <ins class="diff-new">The user agent must act as if the user had
                   43584: requested that the selection</ins> <a href=
                   43585: "#contenteditable-wrapSemantic"><ins class="diff-new">be wrapped in
                   43586: the semantics</ins></a> <ins class="diff-new">of the</ins>
                   43587: <em title=""><code><a href="#i"><ins class=
                   43588: "diff-new">i</ins></a></code></em> <ins class="diff-new">element
                   43589: (or, again, unwrapped, or have that semantic inserted or removed,
                   43590: as defined by the UA).</ins></dd>
                   43591: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43592: <ins class="diff-new">The document is</ins> <a href=
                   43593: "#ready"><ins class="diff-new">ready for editing host
                   43594: commands</ins></a> .</dd>
                   43595: <dd><strong><ins class="diff-new">Indeterminate
                   43596: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43597: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43598: "diff-new">True if the selection, or the caret, if there is no
                   43599: selection, is, or is contained within, a</ins> <code><a href=
                   43600: "#i"><ins class="diff-new">i</ins></a></code> <ins class=
                   43601: "diff-new">element. False otherwise.</ins></dd>
                   43602: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43603: "diff-new">The string "</ins> <code title=""><ins class=
                   43604: "diff-new">true</ins></code> <ins class="diff-new">" if the
                   43605: expression given for the "State" above is true, the string "</ins>
                   43606: <code title=""><ins class="diff-new">false</ins></code> <ins class=
                   43607: "diff-new">" otherwise.</ins></dd>
                   43608: <dt><dfn id="redo0" title="command-redo"><code><ins class=
                   43609: "diff-new">redo</ins></code></dfn></dt>
                   43610: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43611: <ins class="diff-new">The user agent must</ins> <a href=
                   43612: "#redo-moving0" title="do-redo"><ins class="diff-new">move forward
                   43613: one step</ins></a> <ins class="diff-new">in its</ins> <a href=
                   43614: "#undo-transaction"><ins class="diff-new">undo transaction
                   43615: history</ins></a> ,<ins class="diff-new">restoring the associated
                   43616: state. If the</ins> <a href="#current4"><ins class="diff-new">undo
                   43617: position</ins></a> <ins class="diff-new">is at the end of the</ins>
                   43618: <a href="#undo-transaction"><ins class="diff-new">undo transaction
                   43619: history</ins></a> ,<ins class="diff-new">the user agent must do
                   43620: nothing. See the</ins> <a href="#undo-history"><ins class=
                   43621: "diff-new">undo history</ins></a> .</dd>
                   43622: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43623: <ins class="diff-new">The</ins> <a href="#current4"><ins class=
                   43624: "diff-new">undo position</ins></a> <ins class="diff-new">is not at
                   43625: the end of the</ins> <a href="#undo-transaction"><ins class=
                   43626: "diff-new">undo transaction history</ins></a> .</dd>
                   43627: <dd><strong><ins class="diff-new">Indeterminate
                   43628: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43629: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43630: "diff-new">Always false.</ins></dd>
                   43631: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43632: "diff-new">Always the string "</ins> <code title=""><ins class=
                   43633: "diff-new">false</ins></code> <ins class="diff-new">".</ins></dd>
                   43634: <dt><dfn id="selectall0" title=
                   43635: "command-selectAll"><code><ins class="diff-new">selectAll</ins></code></dfn></dt>
                   43636: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43637: <ins class="diff-new">The user agent must change the selection so
                   43638: that all the content in the currently focused</ins> <a href=
                   43639: "#editing1"><ins class="diff-new">editing host</ins></a>
                   43640: <ins class="diff-new">is selected. If no</ins> <a href=
                   43641: "#editing1"><ins class="diff-new">editing host</ins></a>
                   43642: <ins class="diff-new">is focused, then the content of the entire
                   43643: document must be selected.</ins></dd>
                   43644: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43645: <ins class="diff-new">Always.</ins></dd>
                   43646: <dd><strong><ins class="diff-new">Indeterminate
                   43647: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43648: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43649: "diff-new">Always false.</ins></dd>
                   43650: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43651: "diff-new">Always the string "</ins> <code title=""><ins class=
                   43652: "diff-new">false</ins></code> <ins class="diff-new">".</ins></dd>
                   43653: <dt><dfn id="subscript" title="command-subscript"><code><ins class=
                   43654: "diff-new">subscript</ins></code></dfn></dt>
                   43655: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43656: <ins class="diff-new">The user agent must act as if the user had
                   43657: requested that the selection</ins> <a href=
                   43658: "#contenteditable-wrapSemantic"><ins class="diff-new">be wrapped in
                   43659: the semantics</ins></a> <ins class="diff-new">of the</ins>
                   43660: <em title=""><code><a href="#sub"><ins class=
                   43661: "diff-new">sub</ins></a></code></em> <ins class="diff-new">element
                   43662: (or, again, unwrapped, or have that semantic inserted or removed,
                   43663: as defined by the UA).</ins></dd>
                   43664: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43665: <ins class="diff-new">The document is</ins> <a href=
                   43666: "#ready"><ins class="diff-new">ready for editing host
                   43667: commands</ins></a> .</dd>
                   43668: <dd><strong><ins class="diff-new">Indeterminate
                   43669: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43670: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43671: "diff-new">True if the selection, or the caret, if there is no
                   43672: selection, is, or is contained within, a</ins> <code><a href=
                   43673: "#sub"><ins class="diff-new">sub</ins></a></code> <ins class=
                   43674: "diff-new">element. False otherwise.</ins></dd>
                   43675: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43676: "diff-new">The string "</ins> <code title=""><ins class=
                   43677: "diff-new">true</ins></code> <ins class="diff-new">" if the
                   43678: expression given for the "State" above is true, the string "</ins>
                   43679: <code title=""><ins class="diff-new">false</ins></code> <ins class=
                   43680: "diff-new">" otherwise.</ins></dd>
                   43681: <dt><dfn id="superscript" title=
                   43682: "command-superscript"><code><ins class=
                   43683: "diff-new">superscript</ins></code></dfn></dt>
                   43684: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43685: <ins class="diff-new">The user agent must act as if the user had
                   43686: requested that the selection</ins> <a href=
                   43687: "#contenteditable-wrapSemantic"><ins class="diff-new">be wrapped in
                   43688: the semantics</ins></a> <ins class="diff-new">of the</ins>
                   43689: <code><a href="#sup"><ins class="diff-new">sup</ins></a></code>
                   43690: <ins class="diff-new">element (or unwrapped, or, if there is no
                   43691: selection, have that semantic inserted or removed — the exact
                   43692: behavior is UA-defined).</ins></dd>
                   43693: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43694: <ins class="diff-new">The document is</ins> <a href=
                   43695: "#ready"><ins class="diff-new">ready for editing host
                   43696: commands</ins></a> .</dd>
                   43697: <dd><strong><ins class="diff-new">Indeterminate
                   43698: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43699: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43700: "diff-new">True if the selection, or the caret, if there is no
                   43701: selection, is, or is contained within, a</ins> <code><a href=
                   43702: "#sup"><ins class="diff-new">sup</ins></a></code> <ins class=
                   43703: "diff-new">element. False otherwise.</ins></dd>
                   43704: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43705: "diff-new">The string "</ins> <code title=""><ins class=
                   43706: "diff-new">true</ins></code> <ins class="diff-new">" if the
                   43707: expression given for the "State" above is true, the string "</ins>
                   43708: <code title=""><ins class="diff-new">false</ins></code> <ins class=
                   43709: "diff-new">" otherwise.</ins></dd>
                   43710: <dt><dfn id="undo1" title="command-undo"><code><ins class=
                   43711: "diff-new">undo</ins></code></dfn></dt>
                   43712: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43713: <ins class="diff-new">The user agent must</ins> <a href=
                   43714: "#undo-moving0" title="do-undo"><ins class="diff-new">move back one
                   43715: step</ins></a> <ins class="diff-new">in its</ins> <a href=
                   43716: "#undo-transaction"><ins class="diff-new">undo transaction
                   43717: history</ins></a> ,<ins class="diff-new">restoring the associated
                   43718: state. If the</ins> <a href="#current4"><ins class="diff-new">undo
                   43719: position</ins></a> <ins class="diff-new">is at the start of
                   43720: the</ins> <a href="#undo-transaction"><ins class="diff-new">undo
                   43721: transaction history</ins></a> ,<ins class="diff-new">the user agent
                   43722: must do nothing. See the</ins> <a href="#undo-history"><ins class=
                   43723: "diff-new">undo history</ins></a> .</dd>
                   43724: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43725: <ins class="diff-new">The</ins> <a href="#current4"><ins class=
                   43726: "diff-new">undo position</ins></a> <ins class="diff-new">is not at
                   43727: the start of the</ins> <a href="#undo-transaction"><ins class=
                   43728: "diff-new">undo transaction history</ins></a> .</dd>
                   43729: <dd><strong><ins class="diff-new">Indeterminate
                   43730: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43731: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43732: "diff-new">Always false.</ins></dd>
                   43733: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43734: "diff-new">Always the string "</ins> <code title=""><ins class=
                   43735: "diff-new">false</ins></code> <ins class="diff-new">".</ins></dd>
                   43736: <dt><dfn id="unlink" title="command-unlink"><code><ins class=
                   43737: "diff-new">unlink</ins></code></dfn></dt>
                   43738: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43739: <ins class="diff-new">The user agent must remove all</ins>
                   43740: <code><a href="#a"><ins class="diff-new">a</ins></a></code>
                   43741: <ins class="diff-new">elements that have</ins> <code title=
                   43742: "attr-a-href"><ins class="diff-new">href</ins></code> <ins class=
                   43743: "diff-new">attributes and that are partially or completely included
                   43744: in the current selection.</ins></dd>
                   43745: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43746: <ins class="diff-new">The document has a selection that is entirely
                   43747: within an</ins> <a href="#editing1"><ins class="diff-new">editing
                   43748: host</ins></a> .</dd>
                   43749: <dd><strong><ins class="diff-new">Indeterminate
                   43750: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43751: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43752: "diff-new">Always false.</ins></dd>
                   43753: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43754: "diff-new">Always the string "</ins> <code title=""><ins class=
                   43755: "diff-new">false</ins></code> <ins class="diff-new">".</ins></dd>
                   43756: <dt><dfn id="unselect" title="command-unselect"><code><ins class=
                   43757: "diff-new">unselect</ins></code></dfn></dt>
                   43758: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43759: <ins class="diff-new">The user agent must change the selection so
                   43760: that nothing is selected.</ins></dd>
                   43761: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43762: <ins class="diff-new">Always.</ins></dd>
                   43763: <dd><strong><ins class="diff-new">Indeterminate
                   43764: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43765: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43766: "diff-new">Always false.</ins></dd>
                   43767: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43768: "diff-new">Always the string "</ins> <code title=""><ins class=
                   43769: "diff-new">false</ins></code> <ins class="diff-new">".</ins></dd>
                   43770: <dt><code><var title=""><ins class="diff-new">vendorID</ins></var>
                   43771: <ins class="diff-new">-</ins> <var title=""><ins class=
                   43772: "diff-new">customCommandID</ins></var></code></dt>
                   43773: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43774: <ins class="diff-new">User agents may implement vendor-specific
                   43775: extensions to this API. Vendor-specific extensions to the list of
                   43776: commands should use the syntax</ins> <code><var title=
                   43777: ""><ins class="diff-new">vendorID</ins></var> <ins class=
                   43778: "diff-new">-</ins> <var title=""><ins class=
                   43779: "diff-new">customCommandID</ins></var></code> <ins class=
                   43780: "diff-new">so as to prevent clashes between extensions from
                   43781: different vendors and future additions to this
                   43782: specification.</ins></dd>
                   43783: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43784: <ins class="diff-new">UA-defined.</ins></dd>
                   43785: <dd><strong><ins class="diff-new">Indeterminate
                   43786: When:</ins></strong> <ins class="diff-new">UA-defined.</ins></dd>
                   43787: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43788: "diff-new">UA-defined.</ins></dd>
                   43789: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43790: "diff-new">UA-defined.</ins></dd>
                   43791: <dt><ins class="diff-new">Anything else</ins></dt>
                   43792: <dd><strong><ins class="diff-new">Action:</ins></strong>
                   43793: <ins class="diff-new">User agents must do nothing.</ins></dd>
                   43794: <dd><strong><ins class="diff-new">Enabled When:</ins></strong>
                   43795: <ins class="diff-new">Never.</ins></dd>
                   43796: <dd><strong><ins class="diff-new">Indeterminate
                   43797: When:</ins></strong> <ins class="diff-new">Never.</ins></dd>
                   43798: <dd><strong><ins class="diff-new">State:</ins></strong> <ins class=
                   43799: "diff-new">Always false.</ins></dd>
                   43800: <dd><strong><ins class="diff-new">Value:</ins></strong> <ins class=
                   43801: "diff-new">Always the string "</ins> <code title=""><ins class=
                   43802: "diff-new">false</ins></code> <ins class="diff-new">".</ins></dd>
                   43803: </dl>
                   43804: <h2 id="comms"><span class="secno">6.</span> Communication</h2>
                   43805: <h3 id="event1"><span class="secno"><del class=
                   43806: "diff-old">6.1.</del> <ins class="diff-chg">6.1</ins></span> Event
                   43807: definitions</h3>
                   43808: <p>Messages in <a href="#cross-document">cross-document
                   43809: messaging</a> <del class="diff-old">and, by default,</del>
                   43810: <ins class="diff-chg">and</ins> in <a href=
                   43811: "#server-sent">server-sent DOM events</a> , use the <dfn id=
                   43812: "message0" title="event-message"><code>message</code></dfn>
                   43813: event.</p>
                   43814: <p>The following interface is defined for this event:</p>
                   43815: <pre class="idl">
                   43816: interface <dfn id="messageevent">MessageEvent</dfn> : Event {
                   43817:   readonly attribute DOMString <a href="#data4" title=
                   43818: "dom-MessageEvent-data">data</a>;
                   43819: <del class="diff-old">  readonly attribute DOMString ;
                   43820:   readonly attribute DOMString ;
                   43821:   readonly attribute ;
                   43822:   void (in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg, in DOMString domainArg, in DOMString uriArg, in Window sourceArg);
                   43823:   void (in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg, in DOMString domainArg, in DOMString uriArg, in Window sourceArg);
                   43824: </del>
                   43825: <ins class="diff-chg">  readonly attribute DOMString <a href=
                   43826: "#origin1" title="dom-MessageEvent-origin">origin</a>;
                   43827:   readonly attribute DOMString <a href="#lasteventid" title=
                   43828: "dom-MessageEvent-lastEventId">lastEventId</a>;
                   43829:   readonly attribute <a href="#window">Window</a> <a href=
                   43830: "#source3" title="dom-MessageEvent-source">source</a>;
                   43831:   void <a href="#initmessageevent" title=
                   43832: "dom-MessageEvent-initMessageEvent">initMessageEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg, in DOMString originArg, in DOMString lastEventIdArg, in Window sourceArg);
                   43833:   void <a href="#initmessageeventns" title=
                   43834: "dom-MessageEvent-initMessageEventNS">initMessageEventNS</a>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg, in DOMString originArg, in DOMString lastEventIdArg, in Window sourceArg);
                   43835: </ins>
                   43836: };
                   43837: </pre>
                   43838: <p>The <dfn id="initmessageevent" title=
                   43839: "dom-MessageEvent-initMessageEvent"><code>initMessageEvent()</code></dfn>
                   43840: and <dfn id="initmessageeventns" title=
                   43841: "dom-MessageEvent-initMessageEventNS"><code>initMessageEventNS()</code></dfn>
                   43842: methods must initialise the event in a manner analogous to the
                   43843: similarly-named methods in the DOM3 Events interfaces. <a href=
                   43844: "#references">[DOM3EVENTS]</a></p>
                   43845: <p>The <dfn id="data4" title=
                   43846: "dom-MessageEvent-data"><code>data</code></dfn> attribute
                   43847: represents the message being sent.</p>
                   43848: <p>The <dfn id="origin1" title=
                   43849: "dom-MessageEvent-origin"><code><del class="diff-old">domain</del>
                   43850: <ins class="diff-chg">origin</ins></code></dfn> attribute
                   43851: represents, in <a href="#cross-document">cross-document
                   43852: messaging</a> , the <del class="diff-old">domain</del> <a href=
                   43853: "#origin0"><ins class="diff-chg">origin</ins></a> of the document
                   43854: <del class="diff-old">from which</del> <ins class="diff-chg">that
                   43855: sent</ins> the message <del class="diff-old">came.</del>
                   43856: <ins class="diff-chg">(typically the scheme, hostname, and port of
                   43857: the document, but not its path or fragment identifier).</ins></p>
                   43858: <p>The <dfn id="lasteventid" title=
                   43859: "dom-MessageEvent-lastEventId"><code><del class=
                   43860: "diff-old">uri</del> <ins class=
                   43861: "diff-chg">lastEventId</ins></code></dfn> attribute represents, in
                   43862: <del class="diff-old">cross-document messaging</del> <a href=
                   43863: "#server-sent"><ins class="diff-chg">server-sent dom
                   43864: events</ins></a> , the <del class="diff-old">address</del>
                   43865: <span><ins class="diff-chg">last event ID string</ins></span> of
                   43866: the <del class="diff-old">document from which the message
                   43867: came.</del> <ins class="diff-chg">event source.</ins></p>
                   43868: <p>The <dfn id="source3" title=
                   43869: "dom-MessageEvent-source"><code>source</code></dfn> attribute
                   43870: represents, in <a href="#cross-document">cross-document
                   43871: messaging</a> , the <code><a href="#window">Window</a></code> from
                   43872: which the message came.</p>
                   43873: <h3 id="server-sent-events"><span class="secno"><del class=
                   43874: "diff-old">6.2.</del> <ins class="diff-chg">6.2</ins></span>
                   43875: <dfn id="server-sent">Server-sent DOM events</dfn></h3>
                   43876: <p>This section describes a mechanism for allowing servers to
                   43877: dispatch DOM events into documents that expect it. The
                   43878: <code><a href="#event-source">event-source</a></code> element
                   43879: provides a simple interface to this mechanism.</p>
                   43880: <h4 id="the-remoteeventtarget"><span class="secno"><del class=
                   43881: "diff-old">6.2.1.</del> <ins class="diff-chg">6.2.1</ins></span>
                   43882: The <dfn id=
                   43883: "remoteeventtarget"><code>RemoteEventTarget</code></dfn>
                   43884: interface</h4>
                   43885: <p>Any object that implements the <code>EventTarget</code>
                   43886: interface must also implement the <code><a href=
                   43887: "#remoteeventtarget0">RemoteEventTarget</a></code> interface.</p>
                   43888: <pre class="idl">
                   43889: interface <dfn id="remoteeventtarget0">RemoteEventTarget</dfn> {
                   43890:   void <a href="#addeventsource" title=
                   43891: "dom-RemoteEventTarget-addEventSource">addEventSource</a>(in DOMString src);
                   43892:   void <a href="#removeeventsource" title=
                   43893: "dom-RemoteEventTarget-removeEventSource">removeEventSource</a>(in DOMString src);
                   43894: };
                   43895: </pre>
                   43896: <p>When the <dfn id="addeventsource" title=
                   43897: "dom-RemoteEventTarget-addEventSource"><code>addEventSource(
                   43898: <var title="">src</var> )</code></dfn> method is invoked, the user
                   43899: agent must add the URI specified in <var title="">src</var> to the
                   43900: <a href="#list-of3" title="concept-event-source-list">list of event
                   43901: sources</a> for that object. The same URI can be registered
                   43902: multiple times.</p>
                   43903: <p>When the <dfn id="removeeventsource" title=
                   43904: "dom-RemoteEventTarget-removeEventSource"><code>removeEventSource(
                   43905: <var title="">src</var> )</code></dfn> method is invoked, the user
                   43906: agent must remove the URI specified in <var title="">src</var> from
                   43907: the <a href="#list-of3" title="concept-event-source-list">list of
                   43908: event sources</a> for that object. If the same URI has been
                   43909: registered multiple times, removing it must <del class=
                   43910: "diff-old">only</del> remove <ins class="diff-new">only</ins> one
                   43911: instance of that URI for each invocation of the <code title=
                   43912: "removeEventSource">removeEventSource()</code> method.</p>
                   43913: <p>Relative URIs must be resolved relative to <span class=
                   43914: "big-issue">...</span> .</p>
                   43915: <h4 id="connecting"><span class="secno"><del class=
                   43916: "diff-old">6.2.2.</del> <ins class="diff-chg">6.2.2</ins></span>
                   43917: Connecting to an event stream</h4>
                   43918: <p>Each object implementing the <code>EventTarget</code> and
                   43919: <code><a href="#remoteeventtarget0">RemoteEventTarget</a></code>
                   43920: interfaces has a <dfn id="list-of3" title=
                   43921: "concept-event-source-list">list of event sources</dfn> that are
                   43922: registered for that object.</p>
                   43923: <p>When a new URI is added to this list, the user agent should, as
                   43924: soon as all currently executing scripts (if any) have finished
                   43925: executing, and if the specified URI isn't removed from the list
                   43926: before they do so, fetch the resource identified by that URI.</p>
                   43927: <p>When an event source is removed from the list of event sources
                   43928: for an object, if that resource is still being fetched, then the
                   43929: relevant connection must be closed.</p>
                   43930: <p>Since connections established to remote servers for such
                   43931: resources are expected to be long-lived, UAs should ensure that
                   43932: appropriate buffering is used. In particular, while line buffering
                   43933: may be safe if lines are defined to end with a single U+000A LINE
                   43934: FEED character, block buffering or line buffering with different
                   43935: expected line endings can cause delays in event dispatch.</p>
                   43936: <p><ins class="diff-new">Each event source in the list must have
                   43937: associated with it the following:</ins></p>
                   43938: <ul>
                   43939: <li><ins class="diff-new">The</ins> <dfn id="reconnection" title=
                   43940: "concept-event-stream-reconnection-time"><ins class=
                   43941: "diff-new">reconnection time</ins></dfn> ,<ins class="diff-new">in
                   43942: milliseconds. This must initially be a user-agent-defined value,
                   43943: probably in the region of a few seconds.</ins></li>
                   43944: <li><ins class="diff-new">The</ins> <dfn id="last-event" title=
                   43945: "concept-event-stream-last-event-id"><ins class="diff-new">last
                   43946: event ID string</ins></dfn> .<ins class="diff-new">This must
                   43947: initially be the empty string.</ins></li>
                   43948: </ul>
                   43949: <p>In general, the semantics of the transport protocol specified by
                   43950: the URIs for the event sources must be followed, including HTTP
                   43951: caching rules.</p>
                   43952: <p>For HTTP connections, the <code title="">Accept</code> header
                   43953: may be included; if included, it must <del class=
                   43954: "diff-old">only</del> contain <ins class="diff-new">only</ins>
                   43955: formats of event framing that are supported by the user agent (one
                   43956: of which must be <code><del class=
                   43957: "diff-old">application/x-dom-event-stream</del> <ins class=
                   43958: "diff-chg">text/event-stream</ins></code> , as described
                   43959: below).</p>
                   43960: <p>Other formats of event framing may also be supported in addition
                   43961: to <code><del class="diff-old">application/x-dom-event-stream</del>
                   43962: <ins class="diff-chg">text/event-stream</ins></code> , but this
                   43963: specification does not define how they are to be parsed or
                   43964: processed.</p>
                   43965: <p class="note">Such formats could include systems like SMS-push;
                   43966: for example servers could use <code title="">Accept</code> headers
                   43967: and HTTP redirects to an SMS-push mechanism as a kind of protocol
                   43968: negotiation to reduce network load in GSM environments.</p>
                   43969: <p>User agents should use the <code>Cache-Control: no-cache</code>
                   43970: header in requests to bypass any caches for requests of event
                   43971: sources.</p>
                   43972: <p><ins class="diff-new">If the event source's last event ID string
                   43973: is not the empty string, then a</ins> <code title=""><ins class=
                   43974: "diff-new">Last-Event-ID</ins></code> <ins class="diff-new">HTTP
                   43975: header must be included with the request, whose value is the value
                   43976: of the event source's last event ID string.</ins></p>
                   43977: <p>For connections to domains other than <a href="#domain0">the
                   43978: document's domain</a> , the semantics of the Access-Control HTTP
                   43979: header must be followed. <a href=
                   43980: "#references">[ACCESSCONTROL]</a></p>
                   43981: <p>HTTP 200 OK responses with a <a href=
                   43982: "#content-type8">Content-Type</a> header specifying the type
                   43983: <code><del class="diff-old">application/x-dom-event-stream</del>
                   43984: <ins class="diff-chg">text/event-stream</ins></code> that are
                   43985: either from <a href="#domain0">the document's domain</a> or
                   43986: explicitly allowed by the Access-Control HTTP headers must be
                   43987: processed line by line <a href="#event-stream-interpretation">as
                   43988: described below</a> .</p>
                   43989: <p>For the purposes of such successfully opened event streams only,
                   43990: user agents should ignore HTTP cache headers, and instead assume
                   43991: that the resource indicates that it does not wish to be cached.</p>
                   43992: <p>If such a resource completes loading (i.e. the entire HTTP
                   43993: response body is received or the connection itself closes), the
                   43994: user agent should request the event source resource again after a
                   43995: delay <ins class="diff-new">equal to the reconnection time</ins> of
                   43996: <del class="diff-old">approximately five seconds.</del> <ins class=
                   43997: "diff-chg">the event source.</ins></p>
                   43998: <p>HTTP 200 OK responses that have a <a href=
                   43999: "#content-type8">Content-Type</a> other than <code><del class=
                   44000: "diff-old">application/x-dom-event-stream</del> <ins class=
                   44001: "diff-chg">text/event-stream</ins></code> (or some other supported
                   44002: type), and HTTP responses whose Access-Control headers indicate
                   44003: that the resource are not to be used, must be ignored and must
                   44004: prevent the user agent from refetching the resource for that event
                   44005: source.</p>
                   44006: <p>HTTP 201 Created, 202 Accepted, 203 Non-Authoritative
                   44007: Information, and 206 Partial Content responses must be treated like
                   44008: HTTP 200 OK responses for the purposes of reopening event source
                   44009: resources. They are, however, likely to indicate an error has
                   44010: occurred somewhere and may cause the user agent to emit a
                   44011: warning.</p>
                   44012: <p>HTTP 204 No Content, and 205 Reset Content responses must be
                   44013: treated as if they were 200 OK responses with the right MIME type
                   44014: but no content, and should therefore cause the user agent to
                   44015: refetch the resource after a <del class="diff-old">short
                   44016: delay.</del> <ins class="diff-chg">delay equal to the reconnection
                   44017: time of the event source.</ins></p>
                   44018: <p>HTTP 300 Multiple Choices responses should be handled
                   44019: automatically if possible (treating the responses as if they were
                   44020: 302 Found responses pointing to the appropriate resource), and
                   44021: otherwise must be treated as HTTP 404 responses.</p>
                   44022: <p>HTTP 301 Moved Permanently responses must cause the user agent
                   44023: to reconnect using the new server specified URI instead of the
                   44024: previously specified URI for all subsequent requests for this event
                   44025: source. (It doesn't affect other event sources with the same URI
                   44026: unless they also receive 301 responses, and it doesn't affect
                   44027: future sessions, e.g. if the page is reloaded.)</p>
                   44028: <p>HTTP 302 Found, 303 See Other, and 307 Temporary Redirect
                   44029: responses must cause the user agent to connect to the new
                   44030: server-specified URI, but if the user agent needs to again request
                   44031: the resource at a later point, it must return to the previously
                   44032: specified URI for this event source.</p>
                   44033: <p>HTTP 304 Not Modified responses should be handled like HTTP 200
                   44034: OK responses, with the content coming from the user agent cache. A
                   44035: new request should then be made after a <del class=
                   44036: "diff-old">short</del> delay <ins class="diff-new">equal to the
                   44037: reconnection time</ins> of <del class="diff-old">approximately five
                   44038: seconds.</del> <ins class="diff-chg">the event source.</ins></p>
                   44039: <p>HTTP 305 Use Proxy, HTTP 401 Unauthorized, and 407 Proxy
                   44040: Authentication Required should be treated transparently as for any
                   44041: other subresource.</p>
                   44042: <p>Any other HTTP response code not listed here should cause the
                   44043: user agent to stop trying to process this event source.</p>
                   44044: <p>DNS errors must be considered fatal, and cause the user agent to
                   44045: not open any connection for that event source.</p>
                   44046: <p>For non-HTTP protocols, UAs should act in equivalent ways.</p>
                   44047: <h4 id="parsing1"><span class="secno"><del class=
                   44048: "diff-old">6.2.3.</del> <ins class="diff-chg">6.2.3</ins></span>
                   44049: Parsing an event stream</h4>
                   44050: <p>This event stream format's MIME type is <code><del class=
                   44051: "diff-old">application/x-dom-event-stream</del> <ins class=
                   44052: "diff-chg">text/event-stream</ins></code> .</p>
                   44053: <p>The event stream format is (in pseudo-BNF):</p>
                   44054: <pre>
                   44055: &lt;stream&gt;          ::= &lt;bom&gt;? &lt;event&gt;*
                   44056: <del class=
                   44057: "diff-old">&lt;event&gt;           ::= [ &lt;comment&gt; | &lt;command&gt; | &lt;field&gt; ]* &lt;newline&gt;
                   44058: &lt;comment&gt;         ::= ';' &lt;any-char&gt;* &lt;newline&gt;
                   44059: &lt;command&gt;         ::= ':' &lt;any-char&gt;* &lt;newline&gt;
                   44060: &lt;field&gt;           ::= &lt;name&gt; [ ':' &lt;space&gt;? &lt;any-char&gt;* ]? &lt;newline&gt;
                   44061: &lt;name&gt;            ::= &lt;name-start-char&gt; &lt;name-char&gt;*
                   44062: </del>
                   44063: <ins class=
                   44064: "diff-chg">&lt;event&gt;           ::= [ &lt;comment&gt; | &lt;field&gt; ]* &lt;newline&gt;
                   44065: &lt;comment&gt;         ::= &lt;colon&gt; &lt;any-char&gt;* &lt;newline&gt;
                   44066: &lt;field&gt;           ::= &lt;name-char&gt;+ [ &lt;colon&gt; &lt;space&gt;? &lt;any-char&gt;* ]? &lt;newline&gt;
                   44067: </ins>
                   44068: # characters:
                   44069: &lt;bom&gt;             ::= a single U+FEFF BYTE ORDER MARK character
                   44070: &lt;space&gt;           ::= a single U+0020 SPACE character (' ')
                   44071: &lt;newline&gt;         ::= a U+000D CARRIAGE RETURN character
                   44072:                       followed by a U+000A LINE FEED character
                   44073:                       | a single U+000D CARRIAGE RETURN character
                   44074:                       | a single U+000A LINE FEED character
                   44075:                       | the end of the file
                   44076: <del class=
                   44077: "diff-old">&lt;name-start-char&gt; ::= a single Unicode character other than
                   44078:                       ':', ';', U+000D CARRIAGE RETURN and U+000A LINE FEED
                   44079: </del>
                   44080: <ins class=
                   44081: "diff-chg">&lt;colon&gt;           ::= a single U+003A COLON character (':')
                   44082: </ins>
                   44083: &lt;name-char&gt;       ::= a single Unicode character other than
                   44084: <del class=
                   44085: "diff-old">                      ':', U+000D CARRIAGE RETURN and U+000A LINE FEED
                   44086: </del>
                   44087: <ins class=
                   44088: "diff-chg">                      U+003A COLON, U+000D CARRIAGE RETURN and U+000A LINE FEED
                   44089: </ins>
                   44090: &lt;any-char&gt;        ::= a single Unicode character other than
                   44091:                       U+000D CARRIAGE RETURN and U+000A LINE FEED
                   44092: </pre>
                   44093: <p>Event streams in this format must always be encoded as
                   44094: UTF-8.</p>
                   44095: <p>Lines must be separated by either a U+000D CARRIAGE RETURN
                   44096: U+000A LINE FEED (CRLF) character pair, a single U+000A LINE FEED
                   44097: (LF) character, or a single U+000D CARRIAGE RETURN (CR) character.
                   44098: <del class="diff-old">User agents must treat those three variants
                   44099: as equivalent line terminators.</del></p>
                   44100: <h4 id="event-stream-interpretation"><span class=
                   44101: "secno"><ins class="diff-chg">6.2.4</ins></span> <ins class=
                   44102: "diff-chg">Interpreting an event stream</ins></h4>
                   44103: <p>Bytes or sequences of bytes that are not valid UTF-8 sequences
                   44104: must be interpreted as the U+FFFD REPLACEMENT CHARACTER.</p>
                   44105: <p>One leading U+FEFF BYTE ORDER MARK character must be ignored if
                   44106: any are present.</p>
                   44107: <p>The stream must then be parsed by reading everything line by
                   44108: line, <del class="diff-old">in blocks separated by blank lines.
                   44109: Comment lines (those starting</del> with <del class=
                   44110: "diff-old">the</del> <ins class="diff-chg">a U+000D CARRIAGE RETURN
                   44111: U+000A LINE FEED (CRLF)</ins> character <del class=
                   44112: "diff-old">';')</del> <ins class="diff-chg">pair, a single U+000A
                   44113: LINE FEED (LF) character, a single U+000D CARRIAGE RETURN (CR)
                   44114: character,</ins> and <del class="diff-old">command lines (those
                   44115: starting with the character ':') must be ignored. Command lines are
                   44116: reserved for future extensions. For each non-blank, non-comment,
                   44117: non-command line, the field name must first be taken. This is
                   44118: everything on</del> the <del class="diff-old">line up to but not
                   44119: including</del> <ins class="diff-chg">end of</ins> the <del class=
                   44120: "diff-old">first colon (':') or</del> <ins class="diff-chg">file
                   44121: being</ins> the <ins class="diff-new">four ways in which a</ins>
                   44122: line <del class="diff-old">terminator, whichever comes first. Then,
                   44123: if there was</del> <ins class="diff-chg">can end.</ins></p>
                   44124: <p><ins class="diff-chg">When</ins> a <del class="diff-old">colon,
                   44125: the</del> <ins class="diff-chg">stream is parsed, a</ins>
                   44126: <var title="">data <del class="diff-old">for that line</del></var>
                   44127: <ins class="diff-chg">buffer and an</ins> <var title=""><ins class=
                   44128: "diff-chg">event name</ins></var> <ins class=
                   44129: "diff-chg">buffer</ins> must be <del class="diff-old">taken. This
                   44130: is everything after the colon, ignoring a single space after the
                   44131: colon if there is one, up</del> <ins class="diff-chg">associated
                   44132: with it. They must be initialized</ins> to the <del class=
                   44133: "diff-old">end of</del> <ins class="diff-chg">empty
                   44134: string</ins></p>
                   44135: <p><ins class="diff-chg">Lines must be processed, in</ins> the
                   44136: <del class="diff-old">line.</del> <ins class="diff-chg">order they
                   44137: are received, as follows:</ins></p>
                   44138: <dl class="switch">
                   44139: <dt>If <del class="diff-old">there was no colon</del> the
                   44140: <del class="diff-old">data</del> <ins class="diff-chg">line</ins>
                   44141: is <del class="diff-old">the</del> empty <del class=
                   44142: "diff-old">string. Examples: Field name:&nbsp;Field data This is
                   44143: a</del> <ins class="diff-chg">(a</ins> blank <del class=
                   44144: "diff-old">field 1. These two lines:&nbsp;have the same data 2.
                   44145: These two lines:have the same data 1. But these two lines:&nbsp; do
                   44146: not 2. But these two lines:&nbsp;do not</del> <ins class=
                   44147: "diff-chg">line)</ins></dt>
                   44148: <dd>
                   44149: <p><a href="#dispatchMessage"><ins class="diff-new">Dispatch the
                   44150: event</ins></a> ,<ins class="diff-new">as defined below.</ins></p>
                   44151: </dd>
                   44152: <dt>If <ins class="diff-new">the line starts with</ins> a
                   44153: <del class="diff-old">field name occurs multiple times in a
                   44154: block,</del> <ins class="diff-chg">U+003A COLON character
                   44155: (':')</ins></dt>
                   44156: <dd>
                   44157: <p><ins class="diff-chg">Ignore</ins> the <del class=
                   44158: "diff-old">value for that field in that black must consist of</del>
                   44159: <ins class="diff-chg">line.</ins></p>
                   44160: </dd>
                   44161: <dt><ins class="diff-chg">If the line contains a U+003A COLON
                   44162: character (':') character</ins></dt>
                   44163: <dd>
                   44164: <p><ins class="diff-chg">Collect</ins> the <del class=
                   44165: "diff-old">data parts for each of those lines, concatenated with
                   44166: U+000A LINE FEED</del> characters <del class="diff-old">between
                   44167: them (regardless of what</del> <ins class="diff-chg">on</ins> the
                   44168: line <del class="diff-old">terminators used in</del> <ins class=
                   44169: "diff-chg">before</ins> the <del class="diff-old">stream actually
                   44170: are).</del> <ins class="diff-chg">first U+003A COLON character
                   44171: (':'), and let</ins> <var title=""><ins class=
                   44172: "diff-chg">field</ins></var> <ins class="diff-chg">be that
                   44173: string.</ins></p>
                   44174: <p><del class="diff-old">For example,</del> <ins class=
                   44175: "diff-chg">Collect</ins> the <del class="diff-old">following block:
                   44176: Test:&nbsp;Line 1 Foo:&nbsp;&nbsp;Bar Test:&nbsp;Line 2 ...is
                   44177: treated as having two fields, one called Test with</del>
                   44178: <ins class="diff-chg">characters on</ins> the <del class=
                   44179: "diff-old">value " Line 1\nLine 2 " (where \n represents a
                   44180: newline),</del> <ins class="diff-chg">line after the first U+003A
                   44181: COLON character (':'),</ins> and <del class="diff-old">one called
                   44182: Foo</del> <ins class="diff-chg">let</ins> <var title=""><ins class=
                   44183: "diff-chg">value</ins></var> <ins class="diff-chg">be that string.
                   44184: If</ins> <var title=""><ins class="diff-chg">value</ins></var>
                   44185: <ins class="diff-chg">starts</ins> with <del class=
                   44186: "diff-old">the</del> <ins class="diff-chg">a single U+0020 SPACE
                   44187: character, remove it from</ins> <var title="">value <del class=
                   44188: "diff-old">" &nbsp;Bar " (note the leading space
                   44189: character).</del></var> .</p>
                   44190: <p><del class="diff-old">A block thus consists of all the
                   44191: name-value pairs for its fields. Command lines have no effect on
                   44192: blocks and are not considered part of a block. Since any random
                   44193: stream of characters matches the above format, there is no need to
                   44194: define any error handling.</del> <del class="diff-old">6.2.4.
                   44195: Interpreting an event stream Once</del> <a href=
                   44196: "#processField"><ins class="diff-chg">Process</ins> the <del class=
                   44197: "diff-old">fields have been parsed, they are interpreted as follows
                   44198: (these are case-sensitive exact comparisons): Event</del> field
                   44199: <del class="diff-old">This</del></a> <ins class="diff-chg">using
                   44200: the steps described below, using</ins> <var title="">field
                   44201: <del class="diff-old">gives</del></var> <ins class=
                   44202: "diff-chg">as</ins> the <ins class="diff-new">field</ins> name
                   44203: <del class="diff-old">of</del> <ins class="diff-chg">and</ins>
                   44204: <var title=""><ins class="diff-chg">value</ins></var> <ins class=
                   44205: "diff-chg">as</ins> the <del class="diff-old">event. For example,
                   44206: load , DOMActivate , updateTicker . If there is no</del> field
                   44207: <del class="diff-old">with this name, the name message must be
                   44208: used.</del> <ins class="diff-chg">value.</ins></p>
                   44209: </dd>
                   44210: <dt><del class="diff-old">Namespace field This field gives the DOM3
                   44211: namespace for the event. (For normal DOM events this would be
                   44212: null.) If it isn't specified</del> <ins class=
                   44213: "diff-chg">Otherwise,</ins> the <del class="diff-old">event
                   44214: namespace</del> <ins class="diff-chg">string</ins> is <del class=
                   44215: "diff-old">null. Class field</del> <ins class="diff-chg">not empty
                   44216: but does not contain a U+003A COLON character (':')
                   44217: character</ins></dt>
                   44218: <dd>
                   44219: <p><del class="diff-old">This field gives is</del> <a href=
                   44220: "#processField"><ins class="diff-chg">Process</ins> the <del class=
                   44221: "diff-old">interface used for</del> <ins class=
                   44222: "diff-chg">field</ins></a> <ins class="diff-chg">using</ins> the
                   44223: <del class="diff-old">event, for instance Event , UIEvent ,
                   44224: MutationEvent , KeyboardEvent , etc. For compatibility with DOM3
                   44225: Events,</del> <ins class="diff-chg">steps described below,
                   44226: using</ins> the <del class="diff-old">values UIEvents , MouseEvents
                   44227: , MutationEvents , and HTMLEvents are valid values and must be
                   44228: treated respectively</del> <ins class="diff-chg">whole line</ins>
                   44229: as <del class="diff-old">meaning</del> the <del class=
                   44230: "diff-old">interfaces UIEvent , MouseEvent , MutationEvent ,</del>
                   44231: <ins class="diff-chg">field name,</ins> and <del class=
                   44232: "diff-old">Event . (This value can therefore be used</del>
                   44233: <ins class="diff-chg">the empty string</ins> as the <del class=
                   44234: "diff-old">argument to createEvent() .)</del> <ins class=
                   44235: "diff-chg">field value.</ins></p>
                   44236: </dd>
                   44237: </dl>
                   44238: <p><del class="diff-old">If the value is not specified but the
                   44239: Namespace is null and</del> <ins class="diff-chg">Once</ins> the
                   44240: <del class="diff-old">Event field exactly matches one</del>
                   44241: <ins class="diff-chg">end</ins> of the <del class="diff-old">events
                   44242: specified by DOM3 Events in section 1.4.2 "Complete list of event
                   44243: types" , then</del> <ins class="diff-chg">file is reached,</ins>
                   44244: the <del class="diff-old">interface used</del> <ins class=
                   44245: "diff-chg">user agent</ins> must <del class="diff-old">default
                   44246: to</del> <a href="#dispatchMessage"><ins class=
                   44247: "diff-chg">dispatch</ins> the <del class="diff-old">interface
                   44248: relevant for that</del> event <del class="diff-old">type.
                   44249: [DOM3EVENTS]</del></a> <del class="diff-old">For example: Event:
                   44250: click ...would cause Class to be treated</del> <ins class=
                   44251: "diff-chg">one final time,</ins> as <del class=
                   44252: "diff-old">MouseEvent . If</del> <ins class="diff-chg">defined
                   44253: below.</ins></p>
                   44254: <p id="processField"><ins class="diff-chg">The steps to</ins>
                   44255: <dfn id="process" title=""><ins class="diff-chg">process</ins> the
                   44256: <del class="diff-old">Namespace is null</del> <ins class=
                   44257: "diff-chg">field</ins></dfn> <ins class="diff-chg">given a field
                   44258: name</ins> and <ins class="diff-new">a field value depend on</ins>
                   44259: the <del class="diff-old">Event</del> field <del class=
                   44260: "diff-old">is message (including if it was not specified
                   44261: explicitly), then</del> <ins class="diff-chg">name, as given
                   44262: in</ins> the <del class="diff-old">MessageEvent interface</del>
                   44263: <ins class="diff-chg">following list. Field names</ins> must be
                   44264: <del class="diff-old">used. Otherwise,</del> <ins class=
                   44265: "diff-chg">compared literally, with no case folding
                   44266: performed.</ins></p>
                   44267: <dl class="switch">
                   44268: <dt><ins class="diff-chg">If</ins> the <del class="diff-old">Event
                   44269: interface must be used. It</del> <ins class="diff-chg">field
                   44270: name</ins> is <del class="diff-old">quite possible to give</del>
                   44271: <ins class="diff-chg">"event"</ins></dt>
                   44272: <dd>
                   44273: <p><ins class="diff-chg">Set</ins> the <del class="diff-old">wrong
                   44274: class for an event. This is equivalent to creating an</del>
                   44275: <var title="">event <del class="diff-old">in the DOM using the DOM
                   44276: Event APIs, but using</del> <ins class="diff-chg">name</ins></var>
                   44277: <ins class="diff-chg">buffer</ins> the <del class="diff-old">wrong
                   44278: interface for it.</del> <ins class="diff-chg">to field
                   44279: value.</ins></p>
                   44280: </dd>
                   44281: <dt><del class="diff-old">Bubbles</del> <ins class="diff-chg">If
                   44282: the</ins> field <ins class="diff-new">name is "data"</ins></dt>
                   44283: <dd>
                   44284: <p><del class="diff-old">This field specifies whether</del>
                   44285: <ins class="diff-chg">If</ins> the <del class=
                   44286: "diff-old">event</del> <var title=""><ins class=
                   44287: "diff-chg">data</ins></var> <ins class="diff-chg">buffer</ins> is
                   44288: <ins class="diff-new">not the empty string, then append a single
                   44289: U+000A LINE FEED character</ins> to <del class="diff-old">bubble.
                   44290: If it is specified and has</del> the <var title=""><ins class=
                   44291: "diff-new">data</ins></var> <ins class="diff-new">buffer. Append
                   44292: the field</ins> value <del class="diff-old">No ,</del> <ins class=
                   44293: "diff-chg">to</ins> the <del class="diff-old">event must not
                   44294: bubble.</del> <var title=""><ins class="diff-chg">data</ins></var>
                   44295: <ins class="diff-chg">buffer.</ins></p>
                   44296: </dd>
                   44297: <dt>If <del class="diff-old">it</del> <ins class="diff-chg">the
                   44298: field name</ins> is <del class="diff-old">specified and has any
                   44299: other value (including no or NO ) then</del> <ins class=
                   44300: "diff-chg">"id"</ins></dt>
                   44301: <dd>
                   44302: <p><ins class="diff-chg">Set</ins> the event <del class=
                   44303: "diff-old">must bubble.</del> <ins class="diff-chg">stream's</ins>
                   44304: <a href="#last-event" title=
                   44305: "concept-event-stream-last-event-id"><ins class="diff-chg">last
                   44306: event ID</ins></a> <ins class="diff-chg">to the field
                   44307: value.</ins></p>
                   44308: </dd>
                   44309: <dt>If <del class="diff-old">it is not specified but</del> the
                   44310: <del class="diff-old">Namespace</del> field <ins class=
                   44311: "diff-new">name</ins> is <del class="diff-old">null and</del>
                   44312: <ins class="diff-chg">"retry"</ins></dt>
                   44313: <dd>
                   44314: <p><ins class="diff-chg">If</ins> the <del class=
                   44315: "diff-old">Event</del> field <del class="diff-old">exactly matches
                   44316: one</del> <ins class="diff-chg">value consists</ins> of <del class=
                   44317: "diff-old">the events specified by DOM3 Events</del> <ins class=
                   44318: "diff-chg">only characters</ins> in <del class="diff-old">section
                   44319: 1.4.2 "Complete list of event types" ,</del> <ins class=
                   44320: "diff-chg">the range U+0030 DIGIT ZERO ('0') U+0039 DIGIT NINE
                   44321: ('9'),</ins> then <ins class="diff-new">interpret</ins> the
                   44322: <del class="diff-old">event must bubble if</del> <ins class=
                   44323: "diff-chg">field value as an integer in base ten, and set</ins> the
                   44324: <del class="diff-old">DOM3 Events spec specifies that that</del>
                   44325: event <del class="diff-old">bubbles, and musn't bubble if it
                   44326: specifies it does not. [DOM3EVENTS]</del> <ins class=
                   44327: "diff-chg">stream's</ins> <a href="#reconnection" title=
                   44328: "concept-event-stream-reconnection-time"><ins class=
                   44329: "diff-chg">reconnection time</ins></a> <del class="diff-old">For
                   44330: example: Event: load ...would cause Bubbles</del> to <del class=
                   44331: "diff-old">be treated as No .</del> <ins class="diff-chg">that
                   44332: integer.</ins> Otherwise, <ins class="diff-new">ignore</ins> the
                   44333: <del class="diff-old">event must bubble.</del> <ins class=
                   44334: "diff-chg">field.</ins></p>
                   44335: </dd>
                   44336: <dt><del class="diff-old">Cancelable field</del> <ins class=
                   44337: "diff-chg">Otherwise</ins></dt>
                   44338: <dd>
                   44339: <p><del class="diff-old">This</del> <ins class="diff-chg">The</ins>
                   44340: field <del class="diff-old">specifies whether the event can have
                   44341: its default action prevented. If it</del> is <del class=
                   44342: "diff-old">specified and has</del> <ins class=
                   44343: "diff-chg">ignored.</ins></p>
                   44344: </dd>
                   44345: </dl>
                   44346: <p id="dispatchMessage"><ins class="diff-chg">When</ins> the
                   44347: <del class="diff-old">value No ,</del> <ins class="diff-chg">user
                   44348: agent is required to</ins> <dfn id="dispatch" title=""><ins class=
                   44349: "diff-chg">dispatch</ins> the event</dfn> , <ins class=
                   44350: "diff-new">then the user agent</ins> must <del class="diff-old">not
                   44351: be cancelable.</del> <ins class="diff-chg">act as
                   44352: follows:</ins></p>
                   44353: <ol>
                   44354: <li>
                   44355: <p>If <del class="diff-old">it</del> <ins class=
                   44356: "diff-chg">the</ins> <var title=""><ins class=
                   44357: "diff-chg">data</ins></var> <ins class="diff-chg">buffer</ins> is
                   44358: <del class="diff-old">specified</del> <ins class="diff-chg">an
                   44359: empty string, set the</ins> <var title=""><ins class=
                   44360: "diff-chg">data</ins></var> <ins class="diff-chg">buffer</ins> and
                   44361: <del class="diff-old">has any other value (including no or NO )
                   44362: then</del> the <var title="">event <del class="diff-old">must be
                   44363: cancelable.</del> <ins class="diff-chg">name</ins></var>
                   44364: <ins class="diff-chg">buffer to the empty string and abort these
                   44365: steps.</ins></p>
                   44366: </li>
                   44367: <li>
                   44368: <p>If <del class="diff-old">it</del> <ins class=
                   44369: "diff-chg">the</ins> <var title=""><ins class="diff-chg">event
                   44370: name</ins></var> <ins class="diff-chg">buffer</ins> is not
                   44371: <del class="diff-old">specified, but</del> the <del class=
                   44372: "diff-old">Namespace field</del> <ins class="diff-chg">empty string
                   44373: but</ins> is <del class="diff-old">null and the Event field exactly
                   44374: matches one of the events specified by DOM3 Events in section 1.4.2
                   44375: "Complete list of event types"</del> <ins class="diff-chg">also not
                   44376: a valid</ins> <a href=
                   44377: "http://www.w3.org/TR/REC-xml-names/#NT-NCName"><ins class=
                   44378: "diff-chg">NCName</ins></a> , <del class="diff-old">then</del>
                   44379: <ins class="diff-chg">set</ins> the <var title=""><ins class=
                   44380: "diff-new">data</ins></var> <ins class="diff-new">buffer and
                   44381: the</ins> <var title="">event <del class="diff-old">must be
                   44382: cancelable if</del> <ins class="diff-chg">name</ins></var>
                   44383: <ins class="diff-chg">buffer to</ins> the <del class=
                   44384: "diff-old">DOM3 Events specification specifies that it is,</del>
                   44385: <ins class="diff-chg">empty string</ins> and <del class=
                   44386: "diff-old">must not be cancelable otherwise. [DOM3EVENTS] For
                   44387: example: Event: load ...would cause Cancelable to be treated as No
                   44388: .</del> <ins class="diff-chg">abort these steps.</ins></p>
                   44389: </li>
                   44390: <li>
                   44391: <p>Otherwise, <del class="diff-old">the</del> <ins class=
                   44392: "diff-chg">create an</ins> event <del class="diff-old">must be
                   44393: cancelable.</del> <ins class="diff-chg">that uses the</ins>
                   44394: <code><a href="#messageevent"><ins class=
                   44395: "diff-chg">MessageEvent</ins></a> <del class=
                   44396: "diff-old">Target</del></code> <del class="diff-old">field This
                   44397: field gives the node that</del> <ins class="diff-chg">interface,
                   44398: with</ins> the event <del class="diff-old">is to be dispatched on.
                   44399: If the object for</del> <ins class="diff-chg">name</ins>
                   44400: <code title="event-message"><a href="#message0"><ins class=
                   44401: "diff-chg">message</ins></a></code> , which <del class=
                   44402: "diff-old">the event source is being processed is</del> <ins class=
                   44403: "diff-chg">does</ins> not <del class="diff-old">a Node, but the
                   44404: Target field is nonetheless specified, then the event must be
                   44405: dropped. Otherwise, if field</del> <ins class=
                   44406: "diff-chg">bubble,</ins> is <del class="diff-old">specified</del>
                   44407: <ins class="diff-chg">cancelable,</ins> and <del class=
                   44408: "diff-old">its value starts with a #</del> <ins class=
                   44409: "diff-chg">has no default action. The</ins> <code title=
                   44410: "dom-MessageEvent-data"><a href="#data4"><ins class=
                   44411: "diff-chg">data</ins></a></code> <del class="diff-old">character,
                   44412: then</del> <ins class="diff-chg">attribute must be set to</ins> the
                   44413: <del class="diff-old">remainder</del> <ins class=
                   44414: "diff-chg">value</ins> of the <del class="diff-old">value
                   44415: represents an ID, and</del> <var title=""><ins class=
                   44416: "diff-chg">data</ins></var> <ins class="diff-chg">buffer,</ins> the
                   44417: <del class="diff-old">event</del> <code title=
                   44418: "dom-MessageEvent-origin"><a href="#origin1"><ins class=
                   44419: "diff-chg">origin</ins></a></code> <ins class=
                   44420: "diff-chg">attribute</ins> must be <del class="diff-old">dispatched
                   44421: on the same node as would be obtained by the getElementById()
                   44422: method on</del> <ins class="diff-chg">set to</ins> the <del class=
                   44423: "diff-old">ownerDocument</del> <a href="#origin0"><ins class=
                   44424: "diff-chg">origin</ins></a> of the <del class="diff-old">node
                   44425: whose</del> event <del class="diff-old">source is being processed.
                   44426: For example, Target: #test ...would target the element with ID test
                   44427: . Otherwise, if the field is specified and its value is</del>
                   44428: <ins class="diff-chg">stream's URI,</ins> the <del class=
                   44429: "diff-old">literal string " Document</del> <code title=
                   44430: "dom-MessageEvent-lastEventId"><a href="#lasteventid"><ins class=
                   44431: "diff-chg">lastEventId</ins></a></code> <del class="diff-old">",
                   44432: then the event</del> <ins class="diff-chg">attribute</ins> must be
                   44433: <del class="diff-old">dispatched at</del> <ins class="diff-chg">set
                   44434: to</ins> the <del class="diff-old">ownerDocument</del>
                   44435: <span><ins class="diff-chg">last event ID string</ins></span> of
                   44436: the <del class="diff-old">node whose</del> event <del class=
                   44437: "diff-old">source is being processed. Otherwise, the field (whether
                   44438: specified or not) is ignored</del> <ins class=
                   44439: "diff-chg">source,</ins> and the <del class="diff-old">event</del>
                   44440: <code title="dom-MessageEvent-source"><a href=
                   44441: "#source3"><ins class="diff-chg">source</ins></a></code>
                   44442: <ins class="diff-chg">attribute</ins> must be <del class=
                   44443: "diff-old">dispatched at the object itself.</del> <ins class=
                   44444: "diff-chg">set to null.</ins></p>
                   44445: </li>
                   44446: <li>
                   44447: <p><del class="diff-old">Other fields depend on the interface
                   44448: specified (or possibly implied) by the Class field.</del> If the
                   44449: <del class="diff-old">specified interface has an attribute that
                   44450: exactly matches the</del> <var title=""><ins class=
                   44451: "diff-chg">event</ins> name <del class="diff-old">of the field, and
                   44452: the</del></var> <ins class="diff-chg">buffer has a</ins> value
                   44453: <del class="diff-old">of</del> <ins class="diff-chg">other
                   44454: than</ins> the <del class="diff-old">field can be converted
                   44455: (using</del> <ins class="diff-chg">empty string, change</ins> the
                   44456: type <del class="diff-old">conversions defined in ECMAScript)</del>
                   44457: <ins class="diff-chg">of the newly created event</ins> to
                   44458: <ins class="diff-new">equal</ins> the <del class=
                   44459: "diff-old">type</del> <ins class="diff-chg">value</ins> of the
                   44460: <del class="diff-old">attribute, then it must be used. Any
                   44461: attributes (other than</del> <var title=""><ins class=
                   44462: "diff-chg">event name</ins></var> <ins class=
                   44463: "diff-chg">buffer.</ins></p>
                   44464: </li>
                   44465: <li>
                   44466: <p><ins class="diff-chg">Set</ins> the <del class="diff-old">Event
                   44467: interface attributes) that do not have matching fields are
                   44468: initialised</del> <var title=""><ins class=
                   44469: "diff-chg">data</ins></var> <ins class="diff-chg">buffer and
                   44470: the</ins> <var title=""><ins class="diff-chg">event
                   44471: name</ins></var> <ins class="diff-chg">buffer</ins> to <del class=
                   44472: "diff-old">zero, null, false, or</del> the empty string.</p>
                   44473: </li>
                   44474: <li>
                   44475: <p><del class="diff-old">For example: Event: click Class:
                   44476: MouseEvent button: 2 ...would result in a 'click'</del> <ins class=
                   44477: "diff-chg">Dispatch the newly created</ins> event <del class=
                   44478: "diff-old">using</del> <ins class="diff-chg">at</ins> the
                   44479: <code><del class="diff-old">MouseEvent interface that has button
                   44480: set to 2</del> <a href="#remoteeventtarget0"><ins class=
                   44481: "diff-chg">RemoteEventTarget</ins></a></code> <del class=
                   44482: "diff-old">but screenX , screenY , etc, set</del> <ins class=
                   44483: "diff-chg">object</ins> to <del class="diff-old">0, false, or null
                   44484: as appropriate. If a field does not match any of the attributes
                   44485: on</del> <ins class="diff-chg">which</ins> the <del class=
                   44486: "diff-old">event, it must be ignored. For example: Event: keypress
                   44487: Class: MouseEvent keyIdentifier: 0 ...would result in a
                   44488: MouseEvent</del> event <del class="diff-old">with its fields all at
                   44489: their default values, with the</del> <ins class="diff-chg">stream
                   44490: is registered.</ins></p>
                   44491: </li>
                   44492: </ol>
                   44493: <p class="note"><ins class="diff-chg">If an</ins> event <del class=
                   44494: "diff-old">name being keypress . The keyIdentifier field would be
                   44495: ignored. (If the author had not included the Class field
                   44496: explicitly, it would have just worked, since the class would</del>
                   44497: <ins class="diff-chg">doesn't</ins> have <del class=
                   44498: "diff-old">defaulted as described above.) Once a blank line or the
                   44499: end of the file is reached,</del> an <ins class="diff-new">"id"
                   44500: field, but an earlier</ins> event <del class="diff-old">of the type
                   44501: and namespace given by the Event and Namespace fields respectively
                   44502: must be synthesized and dispatched to the appropriate node as
                   44503: described by</del> <ins class="diff-chg">did set</ins> the
                   44504: <del class="diff-old">fields above. No</del> event <del class=
                   44505: "diff-old">must be dispatched until a blank line has been received
                   44506: or the end of the file reached. The</del> <ins class=
                   44507: "diff-chg">source's</ins> <span><ins class="diff-chg">last</ins>
                   44508: event <del class="diff-old">must be dispatched as if using the DOM
                   44509: dispatchEvent() method. Thus, if</del> <ins class="diff-chg">ID
                   44510: string</ins></span> ,<ins class="diff-chg">then</ins> the
                   44511: <del class="diff-old">Event</del> <ins class=
                   44512: "diff-chg">event's</ins> <code title=
                   44513: "dom-MessageEvent-lastEventId"><a href="#lasteventid"><ins class=
                   44514: "diff-chg">lastEventId</ins></a></code> field <del class=
                   44515: "diff-old">was omitted, leaving the name as the empty string, or if
                   44516: the name had invalid characters, then</del> <ins class=
                   44517: "diff-chg">will be set to</ins> the <del class=
                   44518: "diff-old">dispatching</del> <ins class="diff-chg">value</ins> of
                   44519: <ins class="diff-new">whatever</ins> the <del class=
                   44520: "diff-old">event fails. Events fired from event sources do not have
                   44521: user-agent default actions.</del> <ins class="diff-chg">last seen
                   44522: "id" field was.</ins></p>
                   44523: <div class="example">
                   44524: <p>The following event stream, once followed by a blank line:</p>
                   44525: <pre>
                   44526: data: YHOO
                   44527: data: -2
                   44528: data:
                   44529: 10
                   44530: </pre>
                   44531: <p>...would cause an event <code title="event-message"><a href=
                   44532: "#message0">message</a></code> with the interface <code><a href=
                   44533: "#messageevent">MessageEvent</a></code> to be dispatched on the
                   44534: <code><a href="#event-source">event-source</a></code> element,
                   44535: <del class="diff-old">which would then bubble up the DOM, and</del>
                   44536: whose <code title="dom-MessageEvent-data"><a href=
                   44537: "#data4">data</a></code> attribute would contain the string
                   44538: <code>YHOO\n-2\n10</code> (where <code>\n</code> <del class=
                   44539: "diff-old">again</del> represents a newline).</p>
                   44540: <p>This could be used as follows:</p>
                   44541: <pre>
                   44542: &lt;event-source src="http://stocks.example.com/ticker.php"
                   44543: onmessage="var
                   44544: data
                   44545: =
                   44546: event.data.split('\n');
                   44547: updateStocks(data[0],
                   44548: data[1],
                   44549: data[2]);"&gt;
                   44550: </pre>
                   44551: <p>...where <code title="">updateStocks()</code> is a function
                   44552: defined as:</p>
                   44553: <pre>
                   44554: function
                   44555: updateStocks(symbol,
                   44556: delta,
                   44557: value)
                   44558: {
                   44559: ...
                   44560: }
                   44561: </pre>
                   44562: <p>...or some such.</p>
                   44563: </div>
                   44564: <div class="example">
                   44565: <p>The following stream contains four <del class="diff-old">blocks
                   44566: and therefore fires four events.</del> <ins class=
                   44567: "diff-chg">blocks.</ins> The first block has just a comment, and
                   44568: will fire <del class="diff-old">a message event with all the fields
                   44569: set to the empty string or null.</del> <ins class=
                   44570: "diff-chg">nothing.</ins> The second block has two fields with
                   44571: names <del class="diff-old">"load"</del> <ins class=
                   44572: "diff-chg">"data"</ins> and <del class="diff-old">"Target"</del>
                   44573: <ins class="diff-chg">"id"</ins> respectively; <del class=
                   44574: "diff-old">since there is no " load " member on</del> <ins class=
                   44575: "diff-chg">an event will be fired for this block, with</ins> the
                   44576: <del class="diff-old">MessageEvent object that field is ignored,
                   44577: leaving</del> <ins class="diff-chg">data "first event", and will
                   44578: then set</ins> the <ins class="diff-new">last</ins> event
                   44579: <del class="diff-old">as</del> <ins class="diff-chg">ID to "1" so
                   44580: that if the connection died between this block and the next, the
                   44581: server would be sent</ins> a <del class="diff-old">second
                   44582: message</del> <code title=""><ins class=
                   44583: "diff-chg">Last-Event-ID</ins></code> <ins class="diff-new">header
                   44584: with the value "1". The third block fires an</ins> event with
                   44585: <del class="diff-old">all</del> <ins class="diff-chg">data "second
                   44586: event", and also has an "id" field, this time with no value, which
                   44587: resets</ins> the <del class="diff-old">fields set</del> <ins class=
                   44588: "diff-chg">last event ID</ins> to the empty string <del class=
                   44589: "diff-old">or null, but this time</del> <ins class=
                   44590: "diff-chg">(meaning no</ins> <code title=""><ins class=
                   44591: "diff-chg">Last-Event-ID</ins></code> <ins class="diff-chg">header
                   44592: will now be sent in</ins> the event <del class="diff-old">is
                   44593: targetted at</del> <ins class="diff-chg">of a reconnection being
                   44594: attempted). Finally the last block just fires</ins> an <del class=
                   44595: "diff-old">element</del> <ins class="diff-chg">event</ins> with
                   44596: <del class="diff-old">ID "image1". The third</del> <ins class=
                   44597: "diff-chg">the data "third event". Note that the last</ins> block
                   44598: <del class="diff-old">is empty (no lines between two</del>
                   44599: <ins class="diff-chg">doesn't have to end with a</ins> blank
                   44600: <del class="diff-old">lines), and</del> <ins class=
                   44601: "diff-chg">line,</ins> the <del class="diff-old">fourth block has
                   44602: only two comments, so they both yet again fire</del> <ins class=
                   44603: "diff-chg">end of the stream is enough to trigger the dispatch of
                   44604: the last event.</ins></p>
                   44605: <pre>
                   44606: : test stream
                   44607: <del class="diff-old">message
                   44608: </del>
                   44609: <ins class="diff-chg">data: first event
                   44610: id: 1
                   44611: </ins>
                   44612: <del class="diff-old">events
                   44613: </del>
                   44614: <ins class="diff-chg">data: second event
                   44615: id
                   44616: data:
                   44617: third
                   44618: event
                   44619: </ins>
                   44620: </pre></div>
                   44621: <div class="example">
                   44622: <p><ins class="diff-chg">The following stream fires just one
                   44623: event:</ins></p>
                   44624: <pre>
                   44625: data<ins class="diff-chg">
                   44626: data
                   44627: data
                   44628: data:
                   44629: </ins>
                   44630: </pre>
                   44631: <p><ins class="diff-chg">The first and last blocks do nothing,
                   44632: since they do not contain any actual data (the</ins> <var title=
                   44633: ""><ins class="diff-chg">data</ins></var> <ins class=
                   44634: "diff-chg">buffer remains at the empty string, and so nothing gets
                   44635: dispatched). The middle block fires an event</ins> with <del class=
                   44636: "diff-old">all</del> the <del class="diff-old">fields</del>
                   44637: <ins class="diff-chg">data</ins> set to <del class="diff-old">the
                   44638: empty string or null.</del> <ins class="diff-chg">a single newline
                   44639: character.</ins></p>
                   44640: <del class="diff-old">; test load Target: #image1</del></div>
                   44641: <div class="example">
                   44642: <p><ins class="diff-chg">The following stream fires two identical
                   44643: events:</ins></p>
                   44644: <pre>
                   44645: data:test
                   44646: <del class=
                   44647: "diff-old">; if any more events follow this block, they will not be affected by
                   44648: ; the "Target" and "load" fields above.
                   44649: </del>
                   44650: <ins class="diff-chg">data: test
                   44651: </ins>
                   44652: </pre>
                   44653: <p><ins class="diff-new">This is because the space after the colon
                   44654: is ignored if present.</ins></p>
                   44655: </div>
                   44656: <h4 id="notes"><span class="secno"><del class=
                   44657: "diff-old">6.2.5.</del> <ins class="diff-chg">6.2.5</ins></span>
                   44658: Notes</h4>
                   44659: <p>Legacy proxy servers are known to, in certain cases, drop HTTP
                   44660: connections after a short timeout. To protect against such proxy
                   44661: servers, authors can include a comment line (one starting with a
                   44662: <del class="diff-old">';'</del> <ins class="diff-chg">':'</ins>
                   44663: character) every 15 seconds or so.</p>
                   44664: <p>Authors wishing to relate event source connections to each other
                   44665: or to specific documents previously served might find that relying
                   44666: on IP addresses doesn't work, as individual clients can have
                   44667: multiple IP addresses (due to having multiple proxy servers) and
                   44668: individual IP addresses can have multiple clients (due to sharing a
                   44669: proxy server). It is better to include a unique identifier in the
                   44670: document when it is served and then pass that identifier as part of
                   44671: the URI in the <code title="attr-event-source-src"><a href=
                   44672: "#src11">src</a></code> attribute of the <code><a href=
                   44673: "#event-source">event-source</a></code> element.</p>
                   44674: <p>Implementations that support HTTP's per-server connection
                   44675: limitation might run into trouble when opening multiple pages from
                   44676: a site if each page has an <code><a href=
                   44677: "#event-source">event-source</a></code> to the same domain. Authors
                   44678: can avoid this using the relatively complex mechanism of using
                   44679: unique domain names per connection, or by allowing the user to
                   44680: enable or disable the <code><a href=
                   44681: "#event-source">event-source</a></code> functionality on a per-page
                   44682: basis.</p>
                   44683: <h3 id="network"><span class="secno"><del class=
                   44684: "diff-old">6.3.</del> <ins class="diff-chg">6.3</ins></span>
                   44685: Network connections</h3>
                   44686: <p>To enable Web applications to communicate with each other in
                   44687: local area networks, and to maintain bidirectional communications
                   44688: with their originating server, this specification introduces the
                   44689: <code><a href="#connection0">Connection</a></code> interface.</p>
                   44690: <p>The <code><a href="#window">Window</a></code> interface provides
                   44691: three constructors for creating <code><a href=
                   44692: "#connection0">Connection</a></code> objects: <code title=
                   44693: "dom-TCPConnection"><a href=
                   44694: "#tcpconnection">TCPConnection()</a></code> , for creating a direct
                   44695: (possibly encrypted) link to another node on the Internet using
                   44696: TCP/IP; <code title="dom-LocalBroadcastConnection"><a href=
                   44697: "#localbroadcastconnection">LocalBroadcastConnection()</a></code> ,
                   44698: for creating a connection to any listening peer on a local network
                   44699: (which could be a local TCP/IP subnet using UDP, a Bluetooth PAN,
                   44700: or another kind of network infrastructure); and <code title=
                   44701: "dom-PeerToPeerConnection"><a href=
                   44702: "#peertopeerconnection">PeerToPeerConnection()</a></code> , for a
                   44703: direct peer-to-peer connection (which could again be over TCP/IP,
                   44704: Bluetooth, IrDA, or some other type of network).</p>
                   44705: <p class="note">This interface does not allow for raw access to the
                   44706: underlying network. For example, this interface could not be used
                   44707: to implement an IRC client without proxying messages through a
                   44708: custom server.</p>
                   44709: <h4 id="network-intro"><span class="secno"><del class=
                   44710: "diff-old">6.3.1.</del> <ins class="diff-chg">6.3.1</ins></span>
                   44711: Introduction</h4>
                   44712: <p><em>This section is non-normative.</em></p>
                   44713: <p class="big-issue">An introduction to the client-side and
                   44714: server-side of using the direct connection APIs.</p>
                   44715: <p class="big-issue">An example of a party-line implementation of a
                   44716: broadcast service, and direct peer-to-peer chat for direct local
                   44717: connections.</p>
                   44718: <h4 id="the-connection"><span class="secno"><del class=
                   44719: "diff-old">6.3.2.</del> <ins class="diff-chg">6.3.2</ins></span>
                   44720: The <code><a href="#connection0">Connection</a></code>
                   44721: interface</h4>
                   44722: <pre class="idl">
                   44723: interface <dfn id="connection0">Connection</dfn> {
                   44724:   readonly attribute DOMString <a href="#network1" title=
                   44725: "dom-Connection-network">network</a>;
                   44726:   readonly attribute DOMString <a href="#peer" title=
                   44727: "dom-Connection-peer">peer</a>;
                   44728: <del class="diff-old">  readonly attribute int ;
                   44729: </del>
                   44730: <ins class="diff-chg">  readonly attribute int <a href=
                   44731: "#readystate1" title="dom-Connection-readyState">readyState</a>;
                   44732: </ins>
                   44733:            attribute EventListener <a href="#onopen" title=
                   44734: "dom-Connection-onopen">onopen</a>;
                   44735:            attribute EventListener <a href="#onread" title=
                   44736: "dom-Connection-onread">onread</a>;
                   44737:            attribute EventListener <a href="#onclose" title=
                   44738: "dom-Connection-onclose">onclose</a>;
                   44739:   void <a href="#send" title=
                   44740: "dom-Connection-send">send</a>(in DOMString data);
                   44741:   void <a href="#disconnect" title=
                   44742: "dom-Connection-disconnect">disconnect</a>();
                   44743: };
                   44744: </pre>
                   44745: <p><code><a href="#connection0">Connection</a></code> objects must
                   44746: also implement the <code>EventTarget</code> interface. <a href=
                   44747: "#references">[DOM3EVENTS]</a></p>
                   44748: <p>When a <code><a href="#connection0">Connection</a></code> object
                   44749: is created, the UA must try to establish a connection, as described
                   44750: in the sections below describing each connection type.</p>
                   44751: <p>The <dfn id="network1" title=
                   44752: "dom-Connection-network"><code>network</code></dfn> attribute
                   44753: represents the name of the network connection (the value depends on
                   44754: the kind of connection being established). The <dfn id="peer"
                   44755: title="dom-Connection-peer"><code>peer</code></dfn> attribute
                   44756: identifies the remote host for direct (non-broadcast)
                   44757: connections.</p>
                   44758: <p>The <code title="dom-Connection-network"><a href=
                   44759: "#network1">network</a></code> attribute must be set as soon as the
                   44760: <code><a href="#connection0">Connection</a></code> object is
                   44761: created, and keeps the same value for the lifetime of the object.
                   44762: The <code title="dom-Connection-peer"><a href=
                   44763: "#peer">peer</a></code> attribute must initially be set to the
                   44764: empty string and must be updated once, when the connection is
                   44765: established, after which point it must keep the same value for the
                   44766: lifetime of the object.</p>
                   44767: <p>The <dfn id="readystate1" title=
                   44768: "dom-Connection-readyState"><code>readyState</code></dfn> attribute
                   44769: represents the state of the connection. When the object is created
                   44770: it must be set to 0. It can have the following values:</p>
                   44771: <dl>
                   44772: <dt>0 Connecting</dt>
                   44773: <dd>The connection has not yet been established.</dd>
                   44774: <dt>1 Connected</dt>
                   44775: <dd>The connection is established and communication is
                   44776: possible.</dd>
                   44777: <dt>2 Closed</dt>
                   44778: <dd>The connection has been closed.</dd>
                   44779: </dl>
                   44780: <p id="openConnection">Once a connection is established, the
                   44781: <code title="dom-Connection-readyState"><a href=
                   44782: "#readystate1">readyState</a></code> attribute's value must be
                   44783: changed to 1, and the <code title="event-connection-open"><a href=
                   44784: "#open3">open</a></code> event must be fired on the <code><a href=
                   44785: "#connection0">Connection</a></code> object.</p>
                   44786: <p>When data is received, the <code title=
                   44787: "event-connection-read"><a href="#read">read</a></code> event will
                   44788: be fired on the <code><a href="#connection0">Connection</a></code>
                   44789: object.</p>
                   44790: <p id="closeConnection">When the connection is closed, the
                   44791: <code title="dom-Connection-readyState"><a href=
                   44792: "#readystate1">readyState</a></code> attribute's value must be
                   44793: changed to 2, and the <code title="event-connection-close"><a href=
                   44794: "#close0">close</a></code> event must be fired on the
                   44795: <code><a href="#connection0">Connection</a></code> object.</p>
                   44796: <p>The <dfn id="onopen" title=
                   44797: "dom-Connection-onopen"><code>onopen</code></dfn> , <dfn id=
                   44798: "onread" title="dom-Connection-onread"><code>onread</code></dfn> ,
                   44799: and <dfn id="onclose" title=
                   44800: "dom-Connection-onclose"><code>onclose</code></dfn> attributes
                   44801: must, when set, register their new value as an event listener for
                   44802: their respective events (namely <code title=
                   44803: "event-connection-open"><a href="#open3">open</a></code> ,
                   44804: <code title="event-connection-read"><a href="#read">read</a></code>
                   44805: , and <code title="event-connection-close"><a href=
                   44806: "#close0">close</a></code> ), and unregister their previous value
                   44807: if any.</p>
                   44808: <p>The <dfn id="send" title=
                   44809: "dom-Connection-send"><code>send()</code></dfn> method transmits
                   44810: data using the connection. If the connection is not yet
                   44811: established, it must raise an <code>INVALID_STATE_ERR</code>
                   44812: exception. If the connection <em>is</em> established, then the
                   44813: <del class="diff-old">behaviour</del> <ins class=
                   44814: "diff-chg">behavior</ins> depends on the connection type, as
                   44815: described below.</p>
                   44816: <p>The <dfn id="disconnect" title=
                   44817: "dom-Connection-disconnect"><code>disconnect()</code></dfn> method
                   44818: must close the connection, if it is open. If the connection is
                   44819: already closed, it must do nothing. Closing the connection causes a
                   44820: <code title="event-connection-close"><a href=
                   44821: "#close0">close</a></code> event to be fired and the <code title=
                   44822: "dom-Connection-readyState"><a href=
                   44823: "#readystate1">readyState</a></code> attribute's value to change,
                   44824: as <a href="#closeConnection">described above</a> .</p>
                   44825: <h4 id="connection"><span class="secno"><del class=
                   44826: "diff-old">6.3.3.</del> <ins class="diff-chg">6.3.3</ins></span>
                   44827: Connection Events</h4>
                   44828: <p>All the events described in this section are events in no
                   44829: namespace, which do not bubble, are not cancelable, and have no
                   44830: default action.</p>
                   44831: <p>The <dfn id="open3" title=
                   44832: "event-connection-open"><code>open</code></dfn> event is fired when
                   44833: the connection is established. UAs must use the normal
                   44834: <code>Event</code> interface when firing this event.</p>
                   44835: <p>The <dfn id="close0" title=
                   44836: "event-connection-close"><code>close</code></dfn> event is fired
                   44837: when the connection is closed (whether by the author, calling the
                   44838: <code title="dom-Connection-disconnect"><a href=
                   44839: "#disconnect">disconnect()</a></code> method, or by the server, or
                   44840: by a network error). UAs must use the normal <code>Event</code>
                   44841: interface when firing this event as well.</p>
                   44842: <p class="note">No information regarding why the connection was
                   44843: closed is passed to the application in this version of this
                   44844: specification.</p>
                   44845: <p>The <dfn id="read" title=
                   44846: "event-connection-read"><code>read</code></dfn> event is fired when
                   44847: when data is received for a connection. UAs must use the
                   44848: <code><a href="#connectionreadevent">ConnectionReadEvent</a></code>
                   44849: interface for this event.</p>
                   44850: <pre class="idl">
                   44851: interface <dfn id=
                   44852: "connectionreadevent">ConnectionReadEvent</dfn> : Event {
                   44853:   readonly attribute DOMString <a href="#data5" title=
                   44854: "dom-ConnectionReadEvent-data">data</a>;
                   44855: <del class="diff-old">  readonly attribute DOMString ;
                   44856: </del>
                   44857: <ins class="diff-chg">  readonly attribute DOMString <a href=
                   44858: "#source4" title="dom-ConnectionReadEvent-source">source</a>;
                   44859: </ins>
                   44860:   void <a href="#initconnectionreadevent" title=
                   44861: "dom-ConnectionReadEvent-initConnectionReadEvent">initConnectionReadEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg);
                   44862:   void <a href="#initconnectionreadeventns" title=
                   44863: "dom-ConnectionReadEvent-initConnectionReadEventNS">initConnectionReadEventNS</a>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg);
                   44864: };
                   44865: </pre>
                   44866: <p>The <dfn id="initconnectionreadevent" title=
                   44867: "dom-ConnectionReadEvent-initConnectionReadEvent"><code>initConnectionReadEvent()</code></dfn>
                   44868: and <dfn id="initconnectionreadeventns" title=
                   44869: "dom-ConnectionReadEvent-initConnectionReadEventNS"><code>initConnectionReadEventNS()</code></dfn>
                   44870: methods must initialise the event in a manner analogous to the
                   44871: similarly-named methods in the DOM3 Events interfaces. <a href=
                   44872: "#references">[DOM3EVENTS]</a></p>
                   44873: <p>The <dfn id="data5" title=
                   44874: "dom-ConnectionReadEvent-data"><code>data</code></dfn> attribute
                   44875: represents the data that was transmitted from the peer.</p>
                   44876: <p>The <dfn id="source4" title=
                   44877: "dom-ConnectionReadEvent-source"><code>source</code></dfn>
                   44878: attribute represents the name of the peer. This is primarily useful
                   44879: on broadcast connections; on direct connections it is equal to the
                   44880: <code title="dom-Connection-peer"><a href="#peer">peer</a></code>
                   44881: attribute on the <code><a href="#connection0">Connection</a></code>
                   44882: object.</p>
                   44883: <p>Events that would be fired during script execution (e.g. between
                   44884: the connection object being created — and thus the connection being
                   44885: established — and the current script completing; or, during the
                   44886: execution of a <code title="event-connection-read"><a href=
                   44887: "#read">read</a></code> event handler) must be buffered, and those
                   44888: events queued up and each one individually fired after the script
                   44889: has completed.</p>
                   44890: <h4 id="tcp-connections"><span class="secno"><del class=
                   44891: "diff-old">6.3.4.</del> <ins class="diff-chg">6.3.4</ins></span>
                   44892: TCP connections</h4>
                   44893: <p>The <dfn id="tcpconnection" title=
                   44894: "dom-TCPConnection"><code>TCPConnection( <var title=
                   44895: "">subdomain</var> , <var title="">port</var> , <var title=
                   44896: "">secure</var> )</code></dfn> constructor on the <code><a href=
                   44897: "#window">Window</a></code> interface returns a new object
                   44898: implementing the <code><a href="#connection0">Connection</a></code>
                   44899: interface, set up for a direct connection to a specified host on
                   44900: the page's domain.</p>
                   44901: <p>When this constructor is invoked, the following steps must be
                   44902: followed.</p>
                   44903: <p>First, if the <del class="diff-old">domain</del> <ins class=
                   44904: "diff-chg">host</ins> part of the script's <a href=
                   44905: "#origin0">origin</a> is not a host name (e.g. it is an IP address)
                   44906: then the UA must raise a <a href="#security9">security
                   44907: exception</a> . <span class="issue">We currently don't allow
                   44908: connections to be set up back to an originating IP address, but we
                   44909: could, if the subdomain is the empty string.</span></p>
                   44910: <p>Then, if the <var title="">subdomain</var> argument is null or
                   44911: the empty string, the target host is the <del class=
                   44912: "diff-old">domain</del> <ins class="diff-chg">host</ins> part of
                   44913: the script's <a href="#origin0">origin</a> . Otherwise, the
                   44914: <var title="">subdomain</var> argument is prepended to the
                   44915: <del class="diff-old">domain</del> <ins class="diff-chg">host</ins>
                   44916: part of the script's <a href="#origin0">origin</a> with a dot
                   44917: separating the two strings, and that is the target host.</p>
                   44918: <p>If either:</p>
                   44919: <ul>
                   44920: <li>the target host is not a valid host name, or</li>
                   44921: <li>the <var title="">port</var> argument is neither equal to 80,
                   44922: nor equal to 443, nor greater than or equal to 1024 and less than
                   44923: or equal to 65535,</li>
                   44924: </ul>
                   44925: <p>...then the UA must raise a <a href="#security9">security
                   44926: exception</a> .</p>
                   44927: <p>Otherwise, the user agent must verify that the <a href=
                   44928: "#the-string0">the string representing the script's domain in IDNA
                   44929: format</a> can be obtained without errors. If it cannot, then the
                   44930: user agent must raise a <a href="#security9">security exception</a>
                   44931: .</p>
                   44932: <p>The user agent may also raise a <a href="#security9">security
                   44933: exception</a> at this time if, for some reason, permission to
                   44934: create a direct TCP connection to the relevant host is denied.
                   44935: Reasons could include the UA being instructed by the user to not
                   44936: allow direct connections, or the UA establishing (for instance
                   44937: using UPnP) that the network topology will cause connections on the
                   44938: specified port to be directed at the wrong host.</p>
                   44939: <p>If no exceptions are raised by the previous steps, then a new
                   44940: <code><a href="#connection0">Connection</a></code> object must be
                   44941: created, its <code title="dom-Connection-peer"><a href=
                   44942: "#peer">peer</a></code> attribute must be set to a string
                   44943: consisting of the name of the target host, a colon (U+003A COLON),
                   44944: and the port number as decimal digits, and its <code title=
                   44945: "dom-Connection-network"><a href="#network1">network</a></code>
                   44946: attribute must be set to the same value as the <code title=
                   44947: "dom-Connection-peer"><a href="#peer">peer</a></code>
                   44948: attribute.</p>
                   44949: <p>This object must then be returned.</p>
                   44950: <p>The user agent must then begin trying to establish a connection
                   44951: with the target host and specified port. (This typically would
                   44952: begin in the <del class="diff-old">backgound,</del> <ins class=
                   44953: "diff-chg">background,</ins> while the script continues to
                   44954: execute.)</p>
                   44955: <p>If the <var title="">secure</var> boolean argument is set to
                   44956: true, then the user agent must establish a secure connection with
                   44957: the target host and specified port using TLS or another protocol,
                   44958: negotiated with the server. <a href="#references">[RFC2246]</a> If
                   44959: this fails the user agent must act as if it had <a href=
                   44960: "#closeConnection">closed the connection</a> .</p>
                   44961: <p>Once a secure connection is established, or if the <var title=
                   44962: "">secure</var> boolean argument is not set to true, then the user
                   44963: agent must continue to connect to the server using the protocol
                   44964: described in the section entitled <a href="#clients0">clients
                   44965: connecting over TCP</a> . All data on connections made using TLS
                   44966: must be sent as "application data".</p>
                   44967: <p>Once the connection is established, the UA must act as described
                   44968: in the section entitled <a href="#sending0">sending and receiving
                   44969: data over TCP</a> .</p>
                   44970: <p>User agents should allow multiple TCP connections to be
                   44971: established per host. In particular, user agents should not apply
                   44972: per-host HTTP connection limits to connections established with the
                   44973: <code title="dom-TCPConnection"><a href=
                   44974: "#tcpconnection">TCPConnection</a></code> constructor.</p>
                   44975: <h4 id="broadcast"><span class="secno"><del class=
                   44976: "diff-old">6.3.5.</del> <ins class="diff-chg">6.3.5</ins></span>
                   44977: Broadcast connections</h4>
                   44978: <p>The <dfn id="localbroadcastconnection" title=
                   44979: "dom-LocalBroadcastConnection"><code>LocalBroadcastConnection()</code></dfn>
                   44980: constructor on the <code><a href="#window">Window</a></code>
                   44981: interface returns a new object implementing the <code><a href=
                   44982: "#connection0">Connection</a></code> interface, set up to broadcast
                   44983: on the local network.</p>
                   44984: <p>When this constructor is invoked, a new <code><a href=
                   44985: "#connection0">Connection</a></code> object must be created.</p>
                   44986: <p>The <code title="dom-Connection-network"><a href=
                   44987: "#network1">network</a></code> attribute of the object must be set
                   44988: to <a href="#the-string0">the string representing the script's
                   44989: domain in IDNA format</a> . If this string cannot be obtained, then
                   44990: the user agent must raise a <a href="#security9">security
                   44991: exception</a> exception when the constructor is called.</p>
                   44992: <p>The <code title="dom-Connection-peer"><a href=
                   44993: "#peer">peer</a></code> attribute must be set to the empty
                   44994: string.</p>
                   44995: <p>The object must then be returned, unless, for some reason,
                   44996: permission to broadcast on the local network is to be denied. In
                   44997: the latter case, a <a href="#security9">security exception</a> must
                   44998: be raised instead. User agents may deny such permission for any
                   44999: reason, for example a user preference.</p>
                   45000: <p>If the object is returned (i.e. if no exception is raised), the
                   45001: user agent must the begin broadcasting and listening on the local
                   45002: network, in the background, as described below. The user agent may
                   45003: define "the local network" in any way it considers appropriate and
                   45004: safe; for instance the user agent may ask the user which network
                   45005: (e.g. Bluetooth, IrDA, Ethernet, etc) the user would like to
                   45006: broadcast on before beginning broadcasting.</p>
                   45007: <p>UAs may broadcast and listen on multiple networks at once. For
                   45008: example, the UA could broadcast on both Bluetooth and Wifi at the
                   45009: same time.</p>
                   45010: <p>As soon as the object is returned, the connection <a href=
                   45011: "#openConnection">has been established</a> , which implies that the
                   45012: <code title="event-connection-open"><a href=
                   45013: "#open3">open</a></code> event must be fired. Broadcast connections
                   45014: are never closed.</p>
                   45015: <h5 id="broadcasting"><span class="secno">6.3.5.1.</span>
                   45016: Broadcasting over TCP/IP</h5>
                   45017: <p class="big-issue">Should we drop this altogether? Letting people
                   45018: fill the local network with garbage seems unwise.</p>
                   45019: <p class="big-issue">We need to register a UDP port for this. For
                   45020: now this spec refers to port 18080/udp.</p>
                   45021: <p class="note">Since this feature requires that the user agent
                   45022: listen to a particular port, some platforms might prevent more than
                   45023: one user agent per IP address from using this feature at any one
                   45024: time.</p>
                   45025: <p>On TCP/IP networks, broadcast connections transmit data using
                   45026: UDP over port 18080.</p>
                   45027: <p>When the <code title="dom-Connection-send"><a href="#send">send(
                   45028: <var title="">data</var> )</a></code> method is invoked on a
                   45029: <code><a href="#connection0">Connection</a></code> object that was
                   45030: created by the <code title="dom-LocalBroadcastConnection"><a href=
                   45031: "#localbroadcastconnection">LocalBroadcastConnection()</a></code>
                   45032: constructor, the user agent must follow these steps:</p>
                   45033: <ol>
                   45034: <li>Create a string consisting of the value of the <code title=
                   45035: "dom-Connection-network"><a href="#network1">network</a></code>
                   45036: attribute of the <code><a href="#connection0">Connection</a></code>
                   45037: object, a U+0020 SPACE character, a U+0002 START OF TEXT character,
                   45038: and the <var title="">data</var> argument.</li>
                   45039: <li>Encode the string as UTF-8.</li>
                   45040: <li>If the resulting byte stream is longer than 65487 bytes, raise
                   45041: an <code>INDEX_SIZE_ERR</code> DOM exception and stop.</li>
                   45042: <li>Create a UDP packet whose data is the byte stream, with the
                   45043: source and destination ports being 18080, and with appropriate
                   45044: length and checksum fields. Transmit this packet to IPv4 address
                   45045: 255.255.255.255 or IPv6 address ff02::1, as appropriate.
                   45046: <span class="note">IPv6 applications will also have to enable
                   45047: reception from this address.</span></li>
                   45048: </ol>
                   45049: <p>When a broadcast connection is opened on a TCP/IP network, the
                   45050: user agent should listen for UDP packets on port 18080.</p>
                   45051: <p>When the user agent receives a packet on port 18080, the user
                   45052: agent must attempt to decode that packet's data as UTF-8. If the
                   45053: data is not fully correct UTF-8 (i.e. if there are decoding errors)
                   45054: then the packet must be ignored. Otherwise, the user agent must
                   45055: check to see if the decoded string contains a U+0020 SPACE
                   45056: character. If it does not, then the packet must again be ignored
                   45057: (it might be a peer discovery packet from a <code title=
                   45058: "dom-PeerToPeerConnection"><a href=
                   45059: "#peertopeerconnection">PeerToPeerConnection()</a></code>
                   45060: constructor). If it does then the user agent must split the string
                   45061: at the first space character. All the characters before the space
                   45062: are then known as <var title="">d</var> , and all the characters
                   45063: after the space are known as <var title="">s</var> . If <var title=
                   45064: "">s</var> is not at least one character long, or if the first
                   45065: character of <var title="">s</var> is not a U+0002 START OF TEXT
                   45066: character, then the packet must be ignored. (This allows for future
                   45067: extension of this protocol.)</p>
                   45068: <p>Otherwise, for each <code><a href=
                   45069: "#connection0">Connection</a></code> object that was created by the
                   45070: <code title="dom-LocalBroadcastConnection"><a href=
                   45071: "#localbroadcastconnection">LocalBroadcastConnection()</a></code>
                   45072: constructor and whose <code title="dom-Connection-network"><a href=
                   45073: "#network1">network</a></code> attribute exactly matches
                   45074: <var title="">d</var> , a <code title=
                   45075: "event-connection-read"><a href="#read">read</a></code> event must
                   45076: be fired on the <code><a href="#connection0">Connection</a></code>
                   45077: object. The string <var title="">s</var> , with the first character
                   45078: removed, must be used as the <code title=
                   45079: "dom-ConnectionReadEvent-data"><a href="#data5">data</a></code> ,
                   45080: and the source IP address of the packet as the <code title=
                   45081: "dom-ConnectionReadEvent-source"><a href=
                   45082: "#source4">source</a></code> .</p>
                   45083: <p class="big-issue">Making the source IP available means that if
                   45084: two or more machines in a private network can be made to go to a
                   45085: hostile page simultaneously, the hostile page can determine the IP
                   45086: addresses used locally (i.e. on the other side of any NAT router).
                   45087: Is there some way we can keep link-local IP addresses secret while
                   45088: still allowing for applications to distinguish between multiple
                   45089: participants?</p>
                   45090: <h5 id="bluetooth-broadcast"><span class="secno">6.3.5.2.</span>
                   45091: Broadcasting over Bluetooth</h5>
                   45092: <p class="big-issue">Does anyone know enough about Bluetooth to
                   45093: write this section?</p>
                   45094: <h5 id="irda-broadcast"><span class="secno">6.3.5.3.</span>
                   45095: Broadcasting over IrDA</h5>
                   45096: <p class="big-issue">Does anyone know enough about IrDA to write
                   45097: this section?</p>
                   45098: <h4 id="peer-to-peer"><span class="secno"><del class=
                   45099: "diff-old">6.3.6.</del> <ins class="diff-chg">6.3.6</ins></span>
                   45100: Peer-to-peer connections</h4>
                   45101: <p>The <dfn id="peertopeerconnection" title=
                   45102: "dom-PeerToPeerConnection"><code>PeerToPeerConnection()</code></dfn>
                   45103: constructor on the <code><a href="#window">Window</a></code>
                   45104: interface returns a new object implementing the <code><a href=
                   45105: "#connection0">Connection</a></code> interface, set up for a direct
                   45106: connection to a user-specified host.</p>
                   45107: <p>When this constructor is invoked, a new <code><a href=
                   45108: "#connection0">Connection</a></code> object must be created.</p>
                   45109: <p>The <code title="dom-Connection-network"><a href=
                   45110: "#network1">network</a></code> attribute of the object must be set
                   45111: to <a href="#the-string0">the string representing the script's
                   45112: domain in IDNA format</a> . If this string cannot be obtained, then
                   45113: the user agent must raise a <a href="#security9">security
                   45114: exception</a> exception when the constructor is called.</p>
                   45115: <p>The <code title="dom-Connection-peer"><a href=
                   45116: "#peer">peer</a></code> attribute must be set to the empty
                   45117: string.</p>
                   45118: <p>The object must then be returned, unless, for some reason,
                   45119: permission to establish peer-to-peer connections is generally
                   45120: disallowed, for example due to administrator settings. In the
                   45121: latter case, a <a href="#security9">security exception</a> must be
                   45122: raised instead.</p>
                   45123: <p>The user agent must then, typically while the script resumes
                   45124: execution, find a remote host to establish a connection to. To do
                   45125: this it must start broadcasting and listening for peer discovery
                   45126: messages and listening for incoming connection requests on all the
                   45127: supported networks. How this is performed depends on the type of
                   45128: network and is described below.</p>
                   45129: <p>The UA should inform the user of the clients that are detected,
                   45130: and allow the user to select one to connect to. UAs may also allow
                   45131: users to explicit specify hosts that were not detected, e.g. by
                   45132: having the user enter an IP address.</p>
                   45133: <p>If an incoming connection is detected before the user specifies
                   45134: a target host, the user agent should ask the user to confirm that
                   45135: this is the host they wish to connect to. If it is, the connection
                   45136: should be accepted and the UA will act as the <em>server</em> in
                   45137: this connection. (Which UA acts as the server and which acts as the
                   45138: client is not discernible at the DOM API level.)</p>
                   45139: <p>If no incoming connection is detected and if the user specifies
                   45140: a particular target host, a connection should be established to
                   45141: that host, with the UA acting as the <em>client</em> in the
                   45142: connection.</p>
                   45143: <p>No more than one connection must be established per
                   45144: <code><a href="#connection0">Connection</a></code> object, so once
                   45145: a connection has been established, the user agent must stop
                   45146: listening for further connections (unless, or until such time as,
                   45147: another <code><a href="#connection0">Connection</a></code> object
                   45148: is being created).</p>
                   45149: <p>If at any point the user cancels the connection process or the
                   45150: remote host refuses the connection, then the user agent must act as
                   45151: if it had <a href="#closeConnection">closed the connection</a> ,
                   45152: and stop trying to connect.</p>
                   45153: <h5 id="peer-to-peer0"><span class="secno">6.3.6.1.</span>
                   45154: Peer-to-peer connections over TCP/IP</h5>
                   45155: <p class="big-issue">Should we replace this section with something
                   45156: that uses Rendez-vous/zeroconf or equivalent?</p>
                   45157: <p class="big-issue">We need to register ports for this. For now
                   45158: this spec refers to port 18080/udp and 18080/tcp.</p>
                   45159: <p class="note">Since this feature requires that the user agent
                   45160: listen to a particular port, some platforms might prevent more than
                   45161: one user agent per IP address from using this feature at any one
                   45162: time.</p>
                   45163: <p>When using TCP/IP, broadcasting peer discovery messages must be
                   45164: done by creating UDP packets every few seconds containing as their
                   45165: data the value of the connection's <code title=
                   45166: "dom-Connection-network"><a href="#network1">network</a></code>
                   45167: attribute, encoded as UTF-8, with the source and destination ports
                   45168: being set to 18080 and appropriate length and checksum fields, and
                   45169: sending these packets to address (in IPv4) 255.255.255.255 or (in
                   45170: IPv6) ff02::1, as appropriate.</p>
                   45171: <p>Listening for peer discovery messages must be done by examining
                   45172: incoming UDP packets on port 18080. <span class="note">IPv6
                   45173: applications will also have to enable reception from the ff02::1
                   45174: address.</span> If their payload is exactly byte-for-byte equal to
                   45175: a UTF-8 encoded version of the value of the connection's
                   45176: <code title="dom-Connection-network"><a href=
                   45177: "#network1">network</a></code> attribute, then the source address
                   45178: of that packet represents the address of a host that is ready to
                   45179: accept a peer-to-peer connection, and it should therefore be
                   45180: offered to the user.</p>
                   45181: <p>Incoming connection requests must be listened for on TCP port
                   45182: 18080. If an incoming connection is received, the UA must act as a
                   45183: <em>server</em> , as described in the section entitled <a href=
                   45184: "#servers0">servers accepting connections over TCP</a> .</p>
                   45185: <p>If no incoming connection requests are accepted and the user
                   45186: instead specifies a target host to connect to, the UA acts as a
                   45187: <em>client</em> : the user agent must attempt to connect to the
                   45188: user-specified host on port 18080, as described in the section
                   45189: entitled <a href="#clients0">clients connecting over TCP</a> .</p>
                   45190: <p>Once the connection is established, the UA must act as described
                   45191: in the section entitled <a href="#sending0">sending and receiving
                   45192: data over TCP</a> .</p>
                   45193: <p class="note">This specification does not include a way to
                   45194: establish <em>secure</em> (encrypted) peer-to-peer connections at
                   45195: this time. <span class="big-issue">If you can see a good way to do
                   45196: this, let me know.</span></p>
                   45197: <h5 id="bluetooth-peer"><span class="secno">6.3.6.2.</span>
                   45198: Peer-to-peer connections over Bluetooth</h5>
                   45199: <p class="big-issue">Does anyone know enough about Bluetooth to
                   45200: write this section?</p>
                   45201: <h5 id="irda-peer"><span class="secno">6.3.6.3.</span> Peer-to-peer
                   45202: connections over IrDA</h5>
                   45203: <p class="big-issue">Does anyone know enough about IrDA to write
                   45204: this section?</p>
                   45205: <h4 id="the-common"><span class="secno"><del class=
                   45206: "diff-old">6.3.7.</del> <ins class="diff-chg">6.3.7</ins></span>
                   45207: The common protocol for TCP-based connections</h4>
                   45208: <p>The same protocol is used for <code title=
                   45209: "dom-TCPConnection"><a href=
                   45210: "#tcpconnection">TCPConnection</a></code> and <code title=
                   45211: "dom-PeerToPeerConnection"><a href=
                   45212: "#peertopeerconnection">PeerToPeerConnection</a></code> connection
                   45213: types. This section describes how such connections are established
                   45214: from the client and server sides, and then describes how data is
                   45215: sent and received over such connections (which is the same for both
                   45216: clients and servers).</p>
                   45217: <h5 id="clients"><span class="secno">6.3.7.1.</span> <dfn id=
                   45218: "clients0">Clients connecting over TCP</dfn></h5>
                   45219: <p>This section defines the client-side requirements of the
                   45220: protocol used by the <code title="dom-TCPConnection"><a href=
                   45221: "#tcpconnection">TCPConnection</a></code> and <code title=
                   45222: "dom-PeerToPeerConnection"><a href=
                   45223: "#peertopeerconnection">PeerToPeerConnection</a></code> connection
                   45224: types.</p>
                   45225: <p>If a TCP connection to the specified target host and port cannot
                   45226: be established, for example because the target host is a domain
                   45227: name that cannot be resolved to an IP address, or because packets
                   45228: cannot be routed to the host, the user agent should retry creating
                   45229: the connection. If the user agent gives up trying to connect, the
                   45230: user agent must act as if it had <a href="#closeConnection">closed
                   45231: the connection</a> .</p>
                   45232: <p class="note">No information regarding the state of the
                   45233: connection is passed to the application while the connection is
                   45234: being established in this version of this specification.</p>
                   45235: <p>Once a TCP/IP connection to the remote host is established, the
                   45236: user agent must transmit the following sequence of bytes,
                   45237: represented here in hexadecimal form:</p>
                   45238: <pre>
                   45239: 0x48
                   45240: 0x65
                   45241: 0x6C
                   45242: 0x6C
                   45243: 0x6F
                   45244: 0x0A
                   45245: </pre>
                   45246: <p class="note">This represents the string "Hello" followed by a
                   45247: newline, encoded in UTF-8.</p>
                   45248: <p>The user agent must then read all the bytes sent from the remote
                   45249: host, up to the first 0x0A byte (inclusive). That string of bytes
                   45250: is then compared byte-for-byte to the following string of
                   45251: bytes:</p>
                   45252: <pre>
                   45253: 0x57
                   45254: 0x65
                   45255: 0x6C
                   45256: 0x63
                   45257: 0x6F
                   45258: 0x6E
                   45259: 0x65
                   45260: 0x0A
                   45261: </pre>
                   45262: <p class="note">This says "Welcome".</p>
                   45263: <p>If the server sent back a string in any way different to this,
                   45264: then the user agent must <a href="#closeConnection">close the
                   45265: connection</a> and give up trying to connect.</p>
                   45266: <p>Otherwise, the user agent must then take <a href=
                   45267: "#the-string0">the string representing the script's domain in IDNA
                   45268: format</a> , encode it as UTF-8, and send that to the remote host,
                   45269: followed by a 0x0A byte (a U+000A LINE FEED in UTF-8).</p>
                   45270: <p>The user agent must then read all the bytes sent from the remote
                   45271: host, up to the first 0x0A byte (inclusive). That string of bytes
                   45272: must then be compared byte-for-byte to the string that was just
                   45273: sent to the server (the one with the IDNA domain name and ending
                   45274: with a newline character). If the server sent back a string in any
                   45275: way different to this, then the user agent must <a href=
                   45276: "#closeConnection">close the connection</a> and give up trying to
                   45277: connect.</p>
                   45278: <p>Otherwise, the connection <a href="#openConnection">has been
                   45279: established</a> (and events and so forth get fired, as described
                   45280: above).</p>
                   45281: <p>If at any point during this process the connection is closed
                   45282: prematurely, then the user agent must <a href=
                   45283: "#closeConnection">close the connection</a> and give up trying to
                   45284: connect.</p>
                   45285: <h5 id="servers"><span class="secno">6.3.7.2.</span> <dfn id=
                   45286: "servers0">Servers accepting connections over TCP</dfn></h5>
                   45287: <p>This section defines the server side of the protocol described
                   45288: in the previous section. For authors, it should be used as a guide
                   45289: for how to implement servers that can communicate with Web pages
                   45290: over TCP. For UAs these are the requirements for the server part of
                   45291: <code title="dom-PeerToPeerConnection"><a href=
                   45292: "#peertopeerconnection">PeerToPeerConnection</a></code> s.</p>
                   45293: <p>Once a TCP/IP connection from a remote host is established, the
                   45294: user agent must transmit the following sequence of bytes,
                   45295: represented here in hexadecimal form:</p>
                   45296: <pre>
                   45297: 0x57
                   45298: 0x65
                   45299: 0x6C
                   45300: 0x63
                   45301: 0x6F
                   45302: 0x6E
                   45303: 0x65
                   45304: 0x0A
                   45305: </pre>
                   45306: <p class="note">This says "Welcome" and a newline in UTF-8.</p>
                   45307: <p>The user agent must then read all the bytes sent from the remote
                   45308: host, up to the first 0x0A byte (inclusive). That string of bytes
                   45309: is then compared byte-for-byte to the following string of
                   45310: bytes:</p>
                   45311: <pre>
                   45312: 0x48
                   45313: 0x65
                   45314: 0x6C
                   45315: 0x6C
                   45316: 0x6F
                   45317: 0x0A
                   45318: </pre>
                   45319: <p class="note">"Hello" and a newline.</p>
                   45320: <p>If the remote host sent back a string in any way different to
                   45321: this, then the user agent must <a href="#closeConnection">close the
                   45322: connection</a> and give up trying to connect.</p>
                   45323: <p>Otherwise, the user agent must then take <a href=
                   45324: "#the-string0">the string representing the script's domain in IDNA
                   45325: format</a> , encode it as UTF-8, and send that to the remote host,
                   45326: followed by a 0x0A byte (a U+000A LINE FEED in UTF-8).</p>
                   45327: <p>The user agent must then read all the bytes sent from the remote
                   45328: host, up to the first 0x0A byte (inclusive). That string of bytes
                   45329: must then be compared byte-for-byte to the string that was just
                   45330: sent to that host (the one with the IDNA domain name and ending
                   45331: with a newline character). If the remote host sent back a string in
                   45332: any way different to this, then the user agent must <a href=
                   45333: "#closeConnection">close the connection</a> and give up trying to
                   45334: connect.</p>
                   45335: <p>Otherwise, the connection <a href="#openConnection">has been
                   45336: established</a> (and events and so forth get fired, as described
                   45337: above).</p>
                   45338: <p class="note">For author-written servers (as opposed to the
                   45339: server side of a peer-to-peer connection), the script's domain
                   45340: would be replaced by the hostname of the server. Alternatively,
                   45341: such servers might instead wait for the client to send its domain
                   45342: string, and then simply echo it back. This would allow connections
                   45343: from pages on any domain, instead of just pages originating from
                   45344: the same host. The client compares the two strings to ensure they
                   45345: are the same before allowing the connection to be used by author
                   45346: script.</p>
                   45347: <p>If at any point during this process the connection is closed
                   45348: prematurely, then the user agent must <a href=
                   45349: "#closeConnection">close the connection</a> and give up trying to
                   45350: connect.</p>
                   45351: <h5 id="sending"><span class="secno">6.3.7.3.</span> <dfn id=
                   45352: "sending0">Sending and receiving data over TCP</dfn></h5>
                   45353: <p>When the <code title="dom-Connection-send"><a href="#send">send(
                   45354: <var title="">data</var> )</a></code> method is invoked on the
                   45355: connection's corresponding <code><a href=
                   45356: "#connection0">Connection</a></code> object, the user agent must
                   45357: take the <var title="">data</var> argument, replace any U+0000 NULL
                   45358: and U+0017 END OF TRANSMISSION BLOCK characters in it with U+FFFD
                   45359: REPLACEMENT CHARACTER characters, then transmit a U+0002 START OF
                   45360: TEXT character, this new <var title="">data</var> string and a
                   45361: single U+0017 END OF TRANSMISSION BLOCK character (in that order)
                   45362: to the remote host, all encoded as UTF-8.</p>
                   45363: <p>When the user agent receives bytes on the connection, the user
                   45364: agent must buffer received bytes until it receives a 0x17 byte (a
                   45365: U+0017 END OF TRANSMISSION BLOCK character). If the first buffered
                   45366: byte is not a 0x02 byte (a U+0002 START OF TEXT character encoded
                   45367: as UTF-8) then all the data up to the 0x17 byte, inclusive, must be
                   45368: dropped. (This allows for future extension of this protocol.)
                   45369: Otherwise, all the data from (but not including) the 0x02 byte and
                   45370: up to (but not including) the 0x17 byte must be taken, interpreted
                   45371: as a UTF-8 string, and a <code title=
                   45372: "event-connection-read"><a href="#read">read</a></code> event must
                   45373: be fired on the <code><a href="#connection0">Connection</a></code>
                   45374: object with that string as the <code title=
                   45375: "dom-ConnectionReadEvent-data"><a href="#data5">data</a></code> .
                   45376: If that string cannot be decoded as UTF-8 without errors, the
                   45377: packet should be ignored.</p>
                   45378: <p class="note">This protocol does not yet allow binary data (e.g.
                   45379: an image or <a href="#media9">media data</a> ) to be efficiently
                   45380: transmitted. A future version of this protocol might allow this by
                   45381: using the prefix character U+001F INFORMATION SEPARATOR ONE,
                   45382: followed by binary data which uses a particular byte (e.g. 0xFF) to
                   45383: encode byte 0x17 somehow (since otherwise 0x17 would be treated as
                   45384: transmission end by down-level UAs).</p>
                   45385: <h4 id="network-security"><span class="secno"><del class=
                   45386: "diff-old">6.3.8.</del> <ins class="diff-chg">6.3.8</ins></span>
                   45387: Security</h4>
                   45388: <p class="big-issue">Need to write this section.</p>
                   45389: <p class="big-issue">If you have an unencrypted page that is
                   45390: (through a man-in-the-middle attack) changed, it can access a
                   45391: secure service that is using IP authentication and then send that
                   45392: data back to the attacker. Ergo we should probably stop unencrypted
                   45393: pages from accessing encrypted services, on the principle that the
                   45394: actual level of security is zero. Then again, if we do that, we
                   45395: prevent insecure sites from using SSL as a tunneling mechanism.</p>
                   45396: <p class="big-issue">Should consider dropping the subdomain-only
                   45397: restriction. It doesn't seem to add anything, and prevents
                   45398: cross-domain chatter.</p>
                   45399: <h4 id="network-other-specs"><span class="secno"><del class=
                   45400: "diff-old">6.3.9.</del> <ins class="diff-chg">6.3.9</ins></span>
                   45401: Relationship to other standards</h4>
                   45402: <p class="big-issue">Should have a section talking about the fact
                   45403: that we blithely ignoring IANA's port assignments here.</p>
                   45404: <p class="big-issue">Should explain why we are not reusing HTTP for
                   45405: this. (HTTP is too heavy-weight for such a simple need; requiring
                   45406: authors to implement an HTTP server just to have a party line is
                   45407: too much of a barrier to entry; cannot rely on prebuilt components;
                   45408: having a simple protocol makes it much easier to do RAD; HTTP
                   45409: doesn't fit the needs and doesn't have the security model needed;
                   45410: etc)</p>
                   45411: <h3 id="crossDocumentMessages"><span class="secno"><del class=
                   45412: "diff-old">6.4.</del> <ins class="diff-chg">6.4</ins></span>
                   45413: <dfn id="cross-document">Cross-document messaging</dfn></h3>
                   45414: <p>Web browsers, for security and privacy reasons, prevent
                   45415: documents in different domains from affecting each other; that is,
                   45416: cross-site scripting is disallowed.</p>
                   45417: <p>While this is an important security feature, it prevents pages
                   45418: from different domains from communicating even when those pages are
                   45419: not hostile. This section introduces a messaging system that allows
                   45420: documents to communicate with each other regardless of their source
                   45421: domain, in a way designed to not enable cross-site scripting
                   45422: attacks.</p>
                   45423: <h4 id="processing4"><span class="secno"><del class=
                   45424: "diff-old">6.4.1.</del> <ins class="diff-chg">6.4.1</ins></span>
                   45425: Processing model</h4>
                   45426: <p>When a script invokes the <dfn id="postmessage" title=
                   45427: "dom-window-postMessage"><code>postMessage( <var title=
                   45428: "">message</var> , <var title=""><ins class=
                   45429: "diff-new">targetOrigin</ins></var> )</code></dfn> method on a
                   45430: <code><a href="#window">Window</a></code> object, the user agent
                   45431: must <del class="diff-old">create</del> <ins class=
                   45432: "diff-chg">follow these steps:</ins></p>
                   45433: <ol>
                   45434: <li>
                   45435: <p><ins class="diff-chg">If the value of the</ins> <var title=
                   45436: ""><ins class="diff-chg">targetOrigin</ins></var> <ins class=
                   45437: "diff-chg">argument is neither a single U+002A ASTERISK character
                   45438: ("*") nor a valid URI or IRI, then throw a</ins> <code><ins class=
                   45439: "diff-chg">SYNTAX_ERR</ins></code> <ins class="diff-chg">exception
                   45440: and abort the overall set of steps.</ins> <a href=
                   45441: "#references"><ins class="diff-chg">[RFC3986]</ins></a> <a href=
                   45442: "#references"><ins class="diff-chg">[RFC3987]</ins></a></p>
                   45443: </li>
                   45444: <li>
                   45445: <p><ins class="diff-chg">Return from the</ins> <code title=
                   45446: "dom-window-postMessage"><a href="#postmessage"><ins class=
                   45447: "diff-chg">postMessage()</ins></a></code> <ins class=
                   45448: "diff-chg">method, but asynchronously continue running these
                   45449: steps.</ins></p>
                   45450: </li>
                   45451: <li>
                   45452: <p><ins class="diff-chg">Wait for the</ins> <code><a href=
                   45453: "#window"><ins class="diff-chg">Window</ins></a></code> <ins class=
                   45454: "diff-chg">object on which the method was invoked to have finished
                   45455: executing any pending scripts.</ins></p>
                   45456: </li>
                   45457: <li>
                   45458: <p><ins class="diff-chg">If the</ins> <var title=""><ins class=
                   45459: "diff-chg">targetOrigin</ins></var> <ins class="diff-chg">argument
                   45460: has a value other than a single literal U+002A ASTERISK character
                   45461: ("*"), and the</ins> <a href="#active"><ins class="diff-chg">active
                   45462: document</ins></a> <ins class="diff-chg">of the</ins>
                   45463: <code><a href="#window"><ins class=
                   45464: "diff-chg">Window</ins></a></code> <ins class="diff-chg">object on
                   45465: which the method was invoked does not have the</ins> <a href=
                   45466: "#same-origin"><ins class="diff-chg">same origin</ins></a>
                   45467: <ins class="diff-chg">as</ins> <var title=""><ins class=
                   45468: "diff-chg">targetOrigin</ins></var> ,<ins class="diff-chg">then
                   45469: abort these steps silently.</ins></p>
                   45470: </li>
                   45471: <li>
                   45472: <p><ins class="diff-chg">Create</ins> an event that uses the
                   45473: <code><a href="#messageevent">MessageEvent</a></code> interface,
                   45474: with the event name <code title="event-message"><a href=
                   45475: "#message0">message</a></code> , which <del class=
                   45476: "diff-old">bubbles,</del> <ins class="diff-chg">does not
                   45477: bubble,</ins> is cancelable, and has no default action. The
                   45478: <code title="dom-MessageEvent-data"><a href=
                   45479: "#data4">data</a></code> attribute must be set to the value passed
                   45480: as the <var title="">message</var> argument to the <code title=
                   45481: "dom-window-postMessage"><a href=
                   45482: "#postmessage">postMessage()</a></code> method, the <code title=
                   45483: "dom-MessageEvent-origin"><del class="diff-old">domain</del>
                   45484: <a href="#origin1"><ins class="diff-chg">origin</ins></a></code>
                   45485: attribute must be set to the <del class="diff-old">domain</del>
                   45486: <a href="#serialization0" title=
                   45487: "serialization of an origin"><ins class=
                   45488: "diff-chg">serialization</ins></a> of the <del class=
                   45489: "diff-old">document</del> <a href="#origin0"><ins class=
                   45490: "diff-chg">origin</ins></a> <del class="diff-old">that</del>
                   45491: <ins class="diff-chg">of</ins> the script that invoked the
                   45492: <del class="diff-old">methods is associated with,</del> <ins class=
                   45493: "diff-chg">method,</ins> the <code title=
                   45494: "dom-MessageEvent-lastEventId"><del class="diff-old">uri</del>
                   45495: <a href="#lasteventid"><ins class=
                   45496: "diff-chg">lastEventId</ins></a></code> attribute must be set to
                   45497: the <del class="diff-old">URI of that document,</del> <ins class=
                   45498: "diff-chg">empty string,</ins> and the <code title=
                   45499: "dom-MessageEvent-source"><a href="#source3">source</a></code>
                   45500: attribute must be set to the <code><a href=
                   45501: "#window">Window</a></code> object of the <a href=
                   45502: "#default3">default view</a> of the <a href="#browsing1">browsing
                   45503: context <del class="diff-old">with</del></a> <ins class=
                   45504: "diff-chg">for</ins> which <del class="diff-old">that document is
                   45505: associated. Define 'domain' more exactly -- IDN vs no IDN, absence
                   45506: of ports, effect of window.document.domain on its value, etc The
                   45507: event must then be dispatched at</del> the <code>Document</code>
                   45508: object <del class="diff-old">that</del> <ins class="diff-chg">with
                   45509: which the script is associated</ins> is the <a href=
                   45510: "#active">active document</a> <del class="diff-old">of</del>
                   45511: <ins class="diff-chg">.</ins></p>
                   45512: </li>
                   45513: <li>
                   45514: <p><ins class="diff-chg">Dispatch the event created in the previous
                   45515: step at</ins> the <code><a href="#window">Window</a></code> object
                   45516: on which the method was invoked. <del class="diff-old">The
                   45517: postMessage() method must only return once the event dispatch has
                   45518: been completely processed by the target document (i.e. all three of
                   45519: the capture, target, and bubble phases have been done, and event
                   45520: listeners have been executed as appropriate).</del></p>
                   45521: </li>
                   45522: </ol>
                   45523: <p class="warning">Authors should check the <code title=
                   45524: "dom-MessageEvent-origin"><del class="diff-old">domain</del>
                   45525: <a href="#origin1"><ins class="diff-chg">origin</ins></a></code>
                   45526: attribute to ensure that messages are only accepted from domains
                   45527: that they expect to receive messages from. Otherwise, bugs in the
                   45528: author's message handling code could be exploited by hostile
                   45529: sites.</p>
                   45530: <p class="warning"><ins class="diff-new">Authors should not use the
                   45531: wildcard keyword ("*") in the</ins> <var title=""><ins class=
                   45532: "diff-new">targetOrigin</ins></var> <ins class="diff-new">argument
                   45533: in messages that contain any confidential information, as otherwise
                   45534: there is no way to guarantee that the message is only delivered to
                   45535: the recipient to which it was intended.</ins></p>
                   45536: <div class="example">
                   45537: <p>For example, if document A contains an <code><a href=
                   45538: "#object">object</a></code> element that contains document B, and
                   45539: script in document A calls <code title=
                   45540: "dom-window-postMessage"><a href=
                   45541: "#postmessage">postMessage()</a></code> on document B, then a
                   45542: message event will be fired on that element, marked as originating
                   45543: from document A. The script in document A might look like:</p>
                   45544: <pre>
                   45545: var o = document.getElementsByTagName('object')[0];
                   45546: <del class="diff-old">o.('Hello world');
                   45547: </del>
                   45548: <ins class="diff-chg">o.contentWindow.postMessage('Hello
                   45549: world',
                   45550: 'http://b.example.org/');
                   45551: </ins>
                   45552: </pre>
                   45553: <p>To register an event handler for incoming events, the script
                   45554: would use <code title="">addEventListener()</code> (or similar
                   45555: mechanisms). For example, the script in document B might look
                   45556: like:</p>
                   45557: <pre>
                   45558: document.addEventListener('message', receiver, false);
                   45559: function receiver(e) {
                   45560: <del class="diff-old">  if (e.domain == 'example.com') {
                   45561: </del>
                   45562: <ins class="diff-chg">  if (e.origin == 'http://example.com') {
                   45563: </ins>
                   45564:     if (e.data == 'Hello world') {
                   45565: <del class="diff-old">      e.source.postMessage('Hello');
                   45566: </del>
                   45567: <ins class=
                   45568: "diff-chg">      e.source.postMessage('Hello', e.origin);
                   45569: </ins>
                   45570:     } else {
                   45571:       alert(e.data);
                   45572:     }
                   45573:   }
                   45574: }
                   45575: </pre>
                   45576: <p>This script first checks the domain is the expected domain, and
                   45577: then looks at the message, which it either displays to the user, or
                   45578: responds to by sending a message back to the document which sent
                   45579: the message in the first place.</p>
                   45580: </div>
                   45581: <p class="warning">The integrity of this API is based on the
                   45582: inability for scripts of one <a href="#origin0">origin</a> to post
                   45583: arbitrary events (using <code title="">dispatchEvent()</code> or
                   45584: otherwise) to objects in other <del class="diff-old">origins.</del>
                   45585: <ins class="diff-chg">origins (those that are not the</ins>
                   45586: <a href="#same-origin" title="same origin"><ins class=
                   45587: "diff-chg">same</ins></a> <ins class="diff-chg">).</ins></p>
                   45588: <p class="note">Implementors are urged to take extra care in the
                   45589: implementation of this feature. It allows authors to transmit
                   45590: information from one domain to another domain, which is normally
                   45591: disallowed for security reasons. It also requires that UAs be
                   45592: careful to allow access to certain properties but not others.</p>
                   45593: <h2 id="repetition"><span class="secno">7.</span> Repetition
                   45594: templates</h2>
                   45595: <p class="big-issue">See <a href=
                   45596: "http://www.whatwg.org/specs/web-forms/current-work/#repeatingFormControls">
                   45597: WF2</a> for now</p>
                   45598: <h2 id="syntax"><span class="secno">8.</span> The HTML syntax</h2>
                   45599: <h3 id="writing0"><span class="secno"><del class=
                   45600: "diff-old">8.1.</del> <ins class="diff-chg">8.1</ins></span>
                   45601: Writing HTML documents</h3>
                   45602: <p><em>This section only applies to documents, authoring tools, and
                   45603: markup generators. In particular, it does not apply to conformance
                   45604: checkers; conformance checkers must use the requirements given in
                   45605: the next section ("parsing HTML documents").</em></p>
                   45606: <p>Documents must consist of the following parts, in the given
                   45607: order:</p>
                   45608: <ol>
                   45609: <li>Optionally, a single U+FEFF BYTE ORDER MARK (BOM)
                   45610: character.</li>
                   45611: <li>Any number of <a href="#comments0" title=
                   45612: "syntax-comments">comments</a> and <a href="#space" title=
                   45613: "space character">space characters</a> .</li>
                   45614: <li>A <a href="#doctype" title="syntax-doctype">DOCTYPE</a> .</li>
                   45615: <li>Any number of <a href="#comments0" title=
                   45616: "syntax-comments">comments</a> and <a href="#space" title=
                   45617: "space character">space characters</a> .</li>
                   45618: <li>The root element, in the form of an <code><a href=
                   45619: "#html">html</a></code> <a href="#elements3" title=
                   45620: "syntax-elements">element</a> .</li>
                   45621: <li>Any number of <a href="#comments0" title=
                   45622: "syntax-comments">comments</a> and <a href="#space" title=
                   45623: "space character">space characters</a> .</li>
                   45624: </ol>
                   45625: <p>The various types of content mentioned above are described in
                   45626: the next few sections.</p>
                   45627: <p>In addition, there are some restrictions on how <span>character
                   45628: encoding declarations</span> are to be <del class=
                   45629: "diff-old">serialised,</del> <ins class=
                   45630: "diff-chg">serialized,</ins> as discussed in the section on that
                   45631: topic.</p>
                   45632: <div class="note">
                   45633: <p><del class="diff-old">The U+0000 NULL character must not appear
                   45634: anywhere in a document.</del> Space characters before the root
                   45635: <code><a href="#html">html</a></code> <ins class=
                   45636: "diff-new">element, and space characters at the start of the</ins>
                   45637: <code><a href="#html"><ins class="diff-new">html</ins></a></code>
                   45638: element <ins class="diff-new">and before the</ins> <code><a href=
                   45639: "#head"><ins class="diff-new">head</ins></a></code> <ins class=
                   45640: "diff-new">element,</ins> will be dropped when the document is
                   45641: parsed; space characters <em>after</em> the root <code><a href=
                   45642: "#html">html</a></code> element will be parsed as if they were at
                   45643: the end of the <code><del class="diff-old">html</del> <a href=
                   45644: "#body0"><ins class="diff-chg">body</ins></a></code> element. Thus,
                   45645: space characters around the root element do not round-trip.</p>
                   45646: <p>It is suggested that newlines be inserted after the <del class=
                   45647: "diff-old">DOCTYPE and</del> <ins class="diff-chg">DOCTYPE,
                   45648: after</ins> any comments that <del class="diff-old">aren't in</del>
                   45649: <ins class="diff-chg">are before</ins> the root <ins class=
                   45650: "diff-new">element, after the</ins> <code><a href=
                   45651: "#html"><ins class="diff-new">html</ins></a></code> <ins class=
                   45652: "diff-new">element's start tag (if it is not</ins> <a href=
                   45653: "#omitted" title="syntax-tag-omission"><ins class=
                   45654: "diff-new">omitted</ins></a> <ins class="diff-new">), and after any
                   45655: comments that are inside the</ins> <code><a href=
                   45656: "#html"><ins class="diff-new">html</ins></a></code> <ins class=
                   45657: "diff-new">element but before the</ins> <code><a href=
                   45658: "#head"><ins class="diff-new">head</ins></a></code> element.</p>
                   45659: </div>
                   45660: <h4 id="the-doctype"><span class="secno"><del class=
                   45661: "diff-old">8.1.1.</del> <ins class="diff-chg">8.1.1</ins></span>
                   45662: The DOCTYPE</h4>
                   45663: <p>A <dfn id="doctype" title="syntax-doctype">DOCTYPE</dfn> is a
                   45664: mostly useless, but required, header.</p>
                   45665: <p class="note">DOCTYPEs are required for legacy reasons. When
                   45666: omitted, browsers tend to use a different rendering mode that is
                   45667: incompatible with some specifications. Including the DOCTYPE in a
                   45668: document ensures that the browser makes a best-effort attempt at
                   45669: following the relevant specifications.</p>
                   45670: <p>A DOCTYPE must consist of the following characters, in this
                   45671: order:</p>
                   45672: <ol class="brief">
                   45673: <li>A U+003C LESS-THAN SIGN ( <code>&lt;</code> ) character.</li>
                   45674: <li>A U+0021 EXCLAMATION MARK ( <code>!</code> ) character.</li>
                   45675: <li>A U+0044 LATIN CAPITAL LETTER D or U+0064 LATIN SMALL LETTER D
                   45676: character.</li>
                   45677: <li>A U+004F LATIN CAPITAL LETTER O or U+006F LATIN SMALL LETTER O
                   45678: character.</li>
                   45679: <li>A U+0043 LATIN CAPITAL LETTER C or U+0063 LATIN SMALL LETTER C
                   45680: character.</li>
                   45681: <li>A U+0054 LATIN CAPITAL LETTER T or U+0074 LATIN SMALL LETTER T
                   45682: character.</li>
                   45683: <li>A U+0059 LATIN CAPITAL LETTER Y or U+0079 LATIN SMALL LETTER Y
                   45684: character.</li>
                   45685: <li>A U+0050 LATIN CAPITAL LETTER P or U+0070 LATIN SMALL LETTER P
                   45686: character.</li>
                   45687: <li>A U+0045 LATIN CAPITAL LETTER E or U+0065 LATIN SMALL LETTER E
                   45688: character.</li>
                   45689: <li>One or more <a href="#space" title="space character">space
                   45690: characters</a> .</li>
                   45691: <li>A U+0048 LATIN CAPITAL LETTER H or U+0068 LATIN SMALL LETTER H
                   45692: character.</li>
                   45693: <li>A U+0054 LATIN CAPITAL LETTER T or U+0074 LATIN SMALL LETTER T
                   45694: character.</li>
                   45695: <li>A U+004D LATIN CAPITAL LETTER M or U+006D LATIN SMALL LETTER M
                   45696: character.</li>
                   45697: <li>A U+004C LATIN CAPITAL LETTER L or U+006C LATIN SMALL LETTER L
                   45698: character.</li>
                   45699: <li>Zero or more <a href="#space" title="space character">space
                   45700: characters</a> .</li>
                   45701: <li>A U+003E GREATER-THAN SIGN ( <code>&gt;</code> )
                   45702: character.</li>
                   45703: </ol>
                   45704: <p class="note">In other words, <code>&lt;!DOCTYPE HTML&gt;</code>
                   45705: , case-insensitively.</p>
                   45706: <h4 id="elements0"><span class="secno"><del class=
                   45707: "diff-old">8.1.2.</del> <ins class="diff-chg">8.1.2</ins></span>
                   45708: Elements</h4>
                   45709: <p>There are <del class="diff-old">four</del> <ins class=
                   45710: "diff-chg">five</ins> different kinds of <dfn id="elements3" title=
                   45711: "syntax-elements">elements</dfn> : void elements, CDATA elements,
                   45712: RCDATA elements, <ins class="diff-new">foreign elements,</ins> and
                   45713: normal elements.</p>
                   45714: <dl>
                   45715: <dt><dfn id="void-elements">Void elements</dfn></dt>
                   45716: <dd><code><a href="#base">base</a></code> , <code><a href=
                   45717: "#link">link</a></code> , <code><a href="#meta0">meta</a></code> ,
                   45718: <code><a href="#hr">hr</a></code> , <code><a href=
                   45719: "#br">br</a></code> , <code><a href="#img">img</a></code> ,
                   45720: <code><a href="#embed">embed</a></code> , <code><a href=
                   45721: "#param">param</a></code> , <code><a href="#area">area</a></code> ,
                   45722: <code><a href="#col">col</a></code> , <code>input</code></dd>
                   45723: <dt>CDATA elements</dt>
                   45724: <dd><code><a href="#style1">style</a></code> , <code><a href=
                   45725: "#script1">script</a></code></dd>
                   45726: <dt>RCDATA elements</dt>
                   45727: <dd><code><a href="#title1">title</a></code> ,
                   45728: <code>textarea</code></dd>
                   45729: <dt><ins class="diff-new">Foreign elements</ins></dt>
                   45730: <dd><ins class="diff-new">Elements from the</ins> <a href=
                   45731: "#mathml0"><ins class="diff-new">MathML namespace</ins></a></dd>
                   45732: <dt>Normal elements</dt>
                   45733: <dd>All other allowed <a href="#html-elements">HTML elements</a>
                   45734: are normal elements.</dd>
                   45735: </dl>
                   45736: <p><dfn id="tags" title="syntax-tags">Tags</dfn> are used to
                   45737: delimit the start and end of elements in the markup. CDATA, RCDATA,
                   45738: and normal elements have a <a href="#start6" title=
                   45739: "syntax-start-tags">start tag</a> to indicate where they begin, and
                   45740: an <a href="#end-tags0" title="syntax-end-tags">end tag</a> to
                   45741: indicate where they end. The start and end tags of certain normal
                   45742: elements can be <a href="#omitted" title=
                   45743: "syntax-tag-omission">omitted</a> , as described later. Those that
                   45744: cannot be omitted must not be omitted. Void elements only have a
                   45745: start tag; end tags must not be specified for void elements.
                   45746: <ins class="diff-new">Foreign elements must either have a start tag
                   45747: and an end tag, or a start tag that is marked as self-closing, in
                   45748: which case they must not have an end tag.</ins></p>
                   45749: <p>The contents of the element must be placed between just after
                   45750: the start tag (which <a href="#omitted" title=
                   45751: "syntax-tag-omission">might be implied, in certain cases</a> ) and
                   45752: just before the end tag (which again, <a href="#omitted" title=
                   45753: "syntax-tag-omission">might be implied in certain cases</a> ). The
                   45754: exact allowed contents of each individual element depends on the
                   45755: content model of that element, as described earlier in this
                   45756: specification. Elements must not contain content that their content
                   45757: model disallows. In addition to the restrictions placed on the
                   45758: contents by those content models, however, the <del class=
                   45759: "diff-old">four</del> <ins class="diff-chg">five</ins> types of
                   45760: elements have additional <em>syntactic</em> requirements.</p>
                   45761: <p>Void elements can't have any contents (since there's no end tag,
                   45762: no content can be put between the start tag and the end <del class=
                   45763: "diff-old">tag.)</del> <ins class="diff-chg">tag).</ins></p>
                   45764: <p>CDATA elements can have <a href="#text2" title=
                   45765: "syntax-text">text</a> , though it has <a href=
                   45766: "#cdata-rcdata-restrictions">restrictions</a> described below.</p>
                   45767: <p>RCDATA elements can have <a href="#text2" title=
                   45768: "syntax-text">text</a> and <a href="#character3" title=
                   45769: "syntax-charref">character <del class="diff-old">entity</del>
                   45770: references</a> , but the text must not contain an <a href=
                   45771: "#ambiguous" title="syntax-ambiguous-ampersand">ambiguous
                   45772: ampersand</a> . There are also <a href=
                   45773: "#cdata-rcdata-restrictions">further restrictions</a> described
                   45774: below.</p>
                   45775: <p><ins class="diff-new">Foreign elements whose start tag is marked
                   45776: as self-closing can't have any contents (since, again, as there's
                   45777: no end tag, no content can be put between the start tag and the end
                   45778: tag). Foreign elements whose start tag is</ins> <em><ins class=
                   45779: "diff-new">not</ins></em> <ins class="diff-new">marked as
                   45780: self-closing can have</ins> <a href="#text2" title=
                   45781: "syntax-text"><ins class="diff-new">text</ins></a> ,<a href=
                   45782: "#character3" title="syntax-charref"><ins class=
                   45783: "diff-new">character references</ins></a> ,<a href="#cdata0" title=
                   45784: "syntax-cdata"><ins class="diff-new">CDATA blocks</ins></a>
                   45785: ,<ins class="diff-new">other</ins> <a href="#elements3" title=
                   45786: "syntax-elements"><ins class="diff-new">elements</ins></a>
                   45787: ,<ins class="diff-new">and</ins> <a href="#comments0" title=
                   45788: "syntax-comments"><ins class="diff-new">comments</ins></a>
                   45789: ,<ins class="diff-new">but the text must not contain the character
                   45790: U+003C LESS-THAN SIGN (</ins> <code><ins class=
                   45791: "diff-new">&lt;</ins></code> <ins class="diff-new">) or an</ins>
                   45792: <a href="#ambiguous" title="syntax-ambiguous-ampersand"><ins class=
                   45793: "diff-new">ambiguous ampersand</ins></a> .</p>
                   45794: <p>Normal elements can have <a href="#text2" title=
                   45795: "syntax-text">text</a> , <a href="#character3" title=
                   45796: "syntax-charref">character <del class="diff-old">entity</del>
                   45797: references</a> , other <a href="#elements3" title=
                   45798: "syntax-elements">elements</a> , and <a href="#comments0" title=
                   45799: "syntax-comments">comments</a> , but the text must not contain the
                   45800: character U+003C LESS-THAN SIGN ( <code>&lt;</code> ) or an
                   45801: <a href="#ambiguous" title="syntax-ambiguous-ampersand">ambiguous
                   45802: ampersand</a> . Some normal elements also have <a href=
                   45803: "#element-restrictions">yet more restrictions</a> on what content
                   45804: they are allowed to hold, beyond the restrictions imposed by the
                   45805: content model and those described in this paragraph. Those
                   45806: restrictions are described below.</p>
                   45807: <p>Tags contain a <dfn id="tag-name" title="syntax-tag-name">tag
                   45808: name</dfn> , giving the element's name. HTML elements all have
                   45809: names that only use characters in the range <ins class=
                   45810: "diff-new">U+0030 DIGIT ZERO .. U+0039 DIGIT NINE,</ins> U+0061
                   45811: LATIN SMALL LETTER A .. U+007A LATIN SMALL LETTER Z, <del class=
                   45812: "diff-old">or, in uppercase,</del> U+0041 LATIN CAPITAL LETTER A ..
                   45813: U+005A LATIN CAPITAL LETTER Z, and U+002D HYPHEN-MINUS (
                   45814: <code>-</code> ). In the HTML syntax, tag names may be written with
                   45815: any mix of lower- and uppercase letters that, when converted to
                   45816: all-lowercase, matches the element's tag name; tag names are
                   45817: case-insensitive.</p>
                   45818: <h5 id="start"><span class="secno">8.1.2.1.</span> Start tags</h5>
                   45819: <p><dfn id="start6" title="syntax-start-tags">Start tags</dfn> must
                   45820: have the following format:</p>
                   45821: <ol>
                   45822: <li>The first character of a start tag must be a U+003C LESS-THAN
                   45823: SIGN ( <code>&lt;</code> ).</li>
                   45824: <li>The next few characters of a start tag must be the element's
                   45825: <a href="#tag-name" title="syntax-tag-name">tag name</a> .</li>
                   45826: <li>If there are to be any attributes in the next step, there must
                   45827: first be one or more <a href="#space" title="space character">space
                   45828: characters</a> .</li>
                   45829: <li>Then, the start tag may have a number of attributes, the
                   45830: <a href="#attributes2" title="syntax-attributes">syntax for
                   45831: which</a> is described below. Attributes may be separated from each
                   45832: other by one or more <a href="#space" title="space character">space
                   45833: characters</a> .</li>
                   45834: <li>After the attributes, there may be one or more <a href="#space"
                   45835: title="space character">space characters</a> . (Some attributes are
                   45836: required to be followed by a space. See the <a href="#attributes2"
                   45837: title="syntax-attributes">attributes section</a> below.)</li>
                   45838: <li>Then, if the element is one of the void elements, <ins class=
                   45839: "diff-new">or if the element is a foreign element,</ins> then there
                   45840: may be a single U+002F SOLIDUS ( <code>/</code> ) character. This
                   45841: character has no effect <del class="diff-old">except to
                   45842: appease</del> <ins class="diff-chg">on void elements, but on
                   45843: foreign elements it marks</ins> the <del class="diff-old">markup
                   45844: gods. As this character is therefore just a symbol of faith,
                   45845: atheists should omit it.</del> <ins class="diff-chg">start tag as
                   45846: self-closing.</ins></li>
                   45847: <li>Finally, start tags must be closed by a U+003E GREATER-THAN
                   45848: SIGN ( <code>&gt;</code> ) character.</li>
                   45849: </ol>
                   45850: <h5 id="end-tags"><span class="secno">8.1.2.2.</span> End tags</h5>
                   45851: <p><dfn id="end-tags0" title="syntax-end-tags">End tags</dfn> must
                   45852: have the following format:</p>
                   45853: <ol>
                   45854: <li>The first character of an end tag must be a U+003C LESS-THAN
                   45855: SIGN ( <code>&lt;</code> ).</li>
                   45856: <li>The second character of an end tag must be a U+002F SOLIDUS (
                   45857: <code>/</code> ).</li>
                   45858: <li>The next few characters of an end tag must be the element's
                   45859: <a href="#tag-name" title="syntax-tag-name">tag name</a> .</li>
                   45860: <li>After the tag name, there may be one or more <a href="#space"
                   45861: title="space character">space characters</a> .</li>
                   45862: <li>Finally, end tags must be closed by a U+003E GREATER-THAN SIGN
                   45863: ( <code>&gt;</code> ) character.</li>
                   45864: </ol>
                   45865: <h5 id="attributes1"><span class="secno">8.1.2.3.</span>
                   45866: Attributes</h5>
                   45867: <p><dfn id="attributes2" title="syntax-attributes">Attributes</dfn>
                   45868: for an element are expressed inside the element's start tag.</p>
                   45869: <p>Attributes have a name and a value. <dfn id="attribute" title=
                   45870: "syntax-attribute-name">Attribute names</dfn> must consist of one
                   45871: <del class="diff-old">character other than the space characters ,
                   45872: U+003E GREATER-THAN SIGN (&gt;), and U+002F SOLIDUS (/), followed
                   45873: by zero</del> or more characters other than the <a href="#space"
                   45874: title="space character">space characters</a> , <ins class=
                   45875: "diff-new">U+0000 NULL, U+0022 QUOTATION MARK ("), U+0027
                   45876: APOSTROPHE ('),</ins> U+003E GREATER-THAN SIGN (&gt;), U+002F
                   45877: SOLIDUS (/), and U+003D EQUALS SIGN <del class=
                   45878: "diff-old">(=).</del> <ins class="diff-chg">(=) characters, the
                   45879: control characters, and any characters that are not defined by
                   45880: Unicode.</ins> In the HTML syntax, attribute names may be written
                   45881: with any mix of lower- and uppercase letters that, when converted
                   45882: to all-lowercase, matches the attribute's name; attribute names are
                   45883: case-insensitive.</p>
                   45884: <p><dfn id="attribute0" title="syntax-attribute-value">Attribute
                   45885: values</dfn> are a mixture of <a href="#text2" title=
                   45886: "syntax-text">text</a> and <a href="#character3" title=
                   45887: "syntax-charref">character <del class="diff-old">entity</del>
                   45888: references</a> , except with the additional restriction that the
                   45889: text cannot contain an <a href="#ambiguous" title=
                   45890: "syntax-ambiguous-ampersand">ambiguous ampersand</a> .</p>
                   45891: <p>Attributes can be specified in four different ways:</p>
                   45892: <dl>
                   45893: <dt>Empty attribute syntax</dt>
                   45894: <dd>
                   45895: <p>Just the <a href="#attribute" title=
                   45896: "syntax-attribute-name">attribute name</a> .</p>
                   45897: <div class="example">
                   45898: <p>In the following example, the <code title=
                   45899: "attr-input-disabled">disabled</code> attribute is given with the
                   45900: empty attribute syntax:</p>
                   45901: <pre>
                   45902: &lt;input
                   45903: <em>
                   45904: disabled
                   45905: </em>
                   45906: &gt;
                   45907: </pre></div>
                   45908: <p>If an attribute using the empty attribute syntax is to be
                   45909: followed by another attribute, then there must be a <a href=
                   45910: "#space">space character</a> separating the two.</p>
                   45911: </dd>
                   45912: <dt>Unquoted attribute value syntax</dt>
                   45913: <dd>
                   45914: <p>The <a href="#attribute" title="syntax-attribute-name">attribute
                   45915: name</a> , followed by zero or more <a href="#space" title=
                   45916: "space character">space characters</a> , followed by a single
                   45917: U+003D EQUALS SIGN character, followed by zero or more <a href=
                   45918: "#space" title="space character">space characters</a> , followed by
                   45919: the <a href="#attribute0" title="syntax-attribute-value">attribute
                   45920: value</a> , which, in addition to the requirements given above for
                   45921: attribute values, must not contain any literal <a href="#space"
                   45922: title="space character">space characters <del class="diff-old">or
                   45923: U+003E GREATER-THAN SIGN ( &gt; ) characters, and must not,
                   45924: furthermore, start with either</del></a> , a <del class=
                   45925: "diff-old">literal</del> U+0022 QUOTATION MARK ( <code>"</code> )
                   45926: <del class="diff-old">character or a literal</del> <ins class=
                   45927: "diff-chg">characters,</ins> U+0027 APOSTROPHE ( <code>'</code> )
                   45928: <del class="diff-old">character.</del> <ins class=
                   45929: "diff-chg">characters, U+003D EQUALS SIGN (</ins> <code><ins class=
                   45930: "diff-chg">=</ins></code> <ins class="diff-chg">) characters, or
                   45931: U+003E GREATER-THAN SIGN (</ins> <code><ins class=
                   45932: "diff-chg">&gt;</ins></code> <ins class="diff-chg">)
                   45933: characters.</ins></p>
                   45934: <div class="example">
                   45935: <p>In the following example, the <code title=
                   45936: "attr-input-value">value</code> attribute is given with the
                   45937: unquoted attribute value syntax:</p>
                   45938: <pre>
                   45939: &lt;input
                   45940: <em>
                   45941: value=yes
                   45942: </em>
                   45943: &gt;
                   45944: </pre></div>
                   45945: <p>If an attribute using the unquoted attribute syntax is to be
                   45946: followed by another attribute or by one of the optional U+002F
                   45947: SOLIDUS ( <code>/</code> ) characters allowed in step 6 of the
                   45948: <span title="syntax-start-tag">start tag</span> syntax above, then
                   45949: there must be a <a href="#space">space character</a> separating the
                   45950: two.</p>
                   45951: </dd>
                   45952: <dt>Single-quoted attribute value syntax</dt>
                   45953: <dd>
                   45954: <p>The <a href="#attribute" title="syntax-attribute-name">attribute
                   45955: name</a> , followed by zero or more <a href="#space" title=
                   45956: "space character">space characters</a> , followed by a single
                   45957: U+003D EQUALS SIGN character, followed by zero or more <a href=
                   45958: "#space" title="space character">space characters</a> , followed by
                   45959: a single U+0027 APOSTROPHE ( <code>'</code> ) character, followed
                   45960: by the <a href="#attribute0" title=
                   45961: "syntax-attribute-value">attribute value</a> , which, in addition
                   45962: to the requirements given above for attribute values, must not
                   45963: contain any literal U+0027 APOSTROPHE ( <code>'</code> )
                   45964: characters, and finally followed by a second single U+0027
                   45965: APOSTROPHE ( <code>'</code> ) character.</p>
                   45966: <div class="example">
                   45967: <p>In the following example, the <code title=
                   45968: "attr-input-type">type</code> attribute is given with the
                   45969: single-quoted attribute value syntax:</p>
                   45970: <pre>
                   45971: &lt;input
                   45972: <em>
                   45973: type='checkbox'
                   45974: </em>
                   45975: &gt;
                   45976: </pre></div>
                   45977: <p><ins class="diff-new">If an attribute using the single-quoted
                   45978: attribute syntax is to be followed by another attribute, then there
                   45979: must be a</ins> <a href="#space"><ins class="diff-new">space
                   45980: character</ins></a> <ins class="diff-new">separating the
                   45981: two.</ins></p>
                   45982: </dd>
                   45983: <dt>Double-quoted attribute value syntax</dt>
                   45984: <dd>
                   45985: <p>The <a href="#attribute" title="syntax-attribute-name">attribute
                   45986: name</a> , followed by zero or more <a href="#space" title=
                   45987: "space character">space characters</a> , followed by a single
                   45988: U+003D EQUALS SIGN character, followed by zero or more <a href=
                   45989: "#space" title="space character">space characters</a> , followed by
                   45990: a single U+0022 QUOTATION MARK ( <code>"</code> ) character,
                   45991: followed by the <a href="#attribute0" title=
                   45992: "syntax-attribute-value">attribute value</a> , which, in addition
                   45993: to the requirements given above for attribute values, must not
                   45994: contain any literal U+0022 QUOTATION MARK ( <code>"</code> )
                   45995: characters, and finally followed by a second single U+0022
                   45996: QUOTATION MARK ( <code>"</code> ) character.</p>
                   45997: <div class="example">
                   45998: <p>In the following example, the <code title=
                   45999: "attr-input-name">name</code> attribute is given with the
                   46000: double-quoted attribute value syntax:</p>
                   46001: <pre>
                   46002: &lt;input
                   46003: <em>
                   46004: name="be
                   46005: evil"
                   46006: </em>
                   46007: &gt;
                   46008: </pre></div>
                   46009: <p><ins class="diff-new">If an attribute using the double-quoted
                   46010: attribute syntax is to be followed by another attribute, then there
                   46011: must be a</ins> <a href="#space"><ins class="diff-new">space
                   46012: character</ins></a> <ins class="diff-new">separating the
                   46013: two.</ins></p>
                   46014: </dd>
                   46015: </dl>
                   46016: <h5 id="optional"><span class="secno">8.1.2.4.</span> Optional
                   46017: tags</h5>
                   46018: <p>Certain tags can be <dfn id="omitted" title=
                   46019: "syntax-tag-omission">omitted</dfn> .</p>
                   46020: <p>An <code><a href="#html">html</a></code> element's <span title=
                   46021: "syntax-start-tag">start tag</span> may be omitted if the first
                   46022: thing inside the <code><a href="#html">html</a></code> element is
                   46023: not a <del class="diff-old">space character or a</del> <a href=
                   46024: "#comments0" title="syntax-comments">comment</a> .</p>
                   46025: <p>An <code><a href="#html">html</a></code> element's <span title=
                   46026: "syntax-end-tag">end tag</span> may be omitted if the
                   46027: <code><a href="#html">html</a></code> element is not immediately
                   46028: followed <del class="diff-old">by a space character or</del> a
                   46029: <a href="#comments0" title="syntax-comments">comment <del class=
                   46030: "diff-old">.</del></a> <ins class="diff-chg">and the element
                   46031: contains a</ins> <code><a href="#body0"><ins class=
                   46032: "diff-chg">body</ins></a></code> <ins class="diff-chg">element that
                   46033: is either not empty or whose</ins> <span title=
                   46034: "syntax-start-tag"><ins class="diff-chg">start tag</ins></span>
                   46035: <ins class="diff-chg">has not been omitted.</ins></p>
                   46036: <p>A <code><a href="#head">head</a></code> element's <span title=
                   46037: "syntax-start-tag">start tag</span> may be omitted if the first
                   46038: thing inside the <code><a href="#head">head</a></code> element is
                   46039: an element.</p>
                   46040: <p>A <code><a href="#head">head</a></code> element's <span title=
                   46041: "syntax-end-tag">end tag</span> may be omitted if the
                   46042: <code><a href="#head">head</a></code> element is not immediately
                   46043: followed by a <a href="#space">space character</a> or a <a href=
                   46044: "#comments0" title="syntax-comments">comment</a> .</p>
                   46045: <p>A <code><a href="#body0">body</a></code> element's <span title=
                   46046: "syntax-start-tag">start tag</span> may be omitted if the first
                   46047: thing inside the <code><a href="#body0">body</a></code> element is
                   46048: not a <a href="#space">space character</a> or a <a href=
                   46049: "#comments0" title="syntax-comments">comment</a> , except if the
                   46050: first thing inside the <code><a href="#body0">body</a></code>
                   46051: element is a <code><a href="#script1">script</a></code> or
1.2     ! mike     46052: <code><a href="#style1">style</a></code> <del class=
        !          46053: "diff-old">element .</del> <ins class="diff-chg">element.</ins></p>
1.1       mike     46054: <p>A <code><a href="#body0">body</a></code> element's <span title=
                   46055: "syntax-end-tag">end tag</span> may be omitted if the
                   46056: <code><a href="#body0">body</a></code> element is not immediately
                   46057: followed by a <del class="diff-old">space character or a</del>
                   46058: <a href="#comments0" title="syntax-comments">comment <del class=
                   46059: "diff-old">.</del></a> <ins class="diff-chg">and the element is
                   46060: either not empty or its</ins> <span title=
                   46061: "syntax-start-tag"><ins class="diff-chg">start tag</ins></span>
                   46062: <ins class="diff-chg">has not been omitted.</ins></p>
                   46063: <p>A <code><a href="#li">li</a></code> element's <span title=
                   46064: "syntax-end-tag">end tag</span> may be omitted if the
                   46065: <code><a href="#li">li</a></code> element is immediately followed
                   46066: by another <code><a href="#li">li</a></code> element or if there is
                   46067: no more content in the parent element.</p>
                   46068: <p>A <code><a href="#dt">dt</a></code> element's <span title=
                   46069: "syntax-end-tag">end tag</span> may be omitted if the
                   46070: <code><a href="#dt">dt</a></code> element is immediately followed
                   46071: by another <code><a href="#dt">dt</a></code> element or a
                   46072: <code><a href="#dd">dd</a></code> element.</p>
                   46073: <p>A <code><a href="#dd">dd</a></code> element's <span title=
                   46074: "syntax-end-tag">end tag</span> may be omitted if the
                   46075: <code><a href="#dd">dd</a></code> element is immediately followed
                   46076: by another <code><a href="#dd">dd</a></code> element or a
                   46077: <code><a href="#dt">dt</a></code> element, or if there is no more
                   46078: content in the parent element.</p>
                   46079: <p>A <code><a href="#p">p</a></code> element's <span title=
                   46080: "syntax-end-tag">end tag</span> may be omitted if the
                   46081: <code><a href="#p">p</a></code> element is immediately followed by
                   46082: an <code><a href="#address">address</a></code> , <code><a href=
                   46083: "#blockquote">blockquote</a></code> , <code><a href=
                   46084: "#dl">dl</a></code> , <code>fieldset</code> , <code>form</code> ,
                   46085: <code><a href="#h1">h1</a></code> , <code><a href=
                   46086: "#h2">h2</a></code> , <code><a href="#h3">h3</a></code> ,
                   46087: <code><a href="#h4">h4</a></code> , <code><a href=
                   46088: "#h5">h5</a></code> , <code><a href="#h6">h6</a></code> ,
                   46089: <code><a href="#hr">hr</a></code> , <code><a href=
                   46090: "#menu">menu</a></code> , <code><a href="#ol">ol</a></code> ,
                   46091: <code><a href="#p">p</a></code> , <code><a href=
                   46092: "#pre">pre</a></code> , <code><a href="#table">table</a></code> ,
                   46093: or <code><a href="#ul">ul</a></code> element, or if there is no
                   46094: more content in the parent element.</p>
                   46095: <p>An <code>optgroup</code> element's <span title=
                   46096: "syntax-end-tag">end tag</span> may be omitted if the
                   46097: <code>optgroup</code> element is immediately followed by another
                   46098: <code>optgroup</code> element, or if there is no more content in
                   46099: the parent element.</p>
                   46100: <p>An <code>option</code> element's <span title=
                   46101: "syntax-end-tag">end tag</span> may be omitted if the
                   46102: <code>option</code> element is immediately followed by another
                   46103: <code>option</code> element, or if there is no more content in the
                   46104: parent element.</p>
                   46105: <p>A <code><a href="#colgroup">colgroup</a></code> element's
                   46106: <span title="syntax-start-tag">start tag</span> may be omitted if
                   46107: the first thing inside the <code><a href=
                   46108: "#colgroup">colgroup</a></code> element is a <code><a href=
                   46109: "#col">col</a></code> element, and if the element is not
                   46110: immediately preceded by another <code><a href=
                   46111: "#colgroup">colgroup</a></code> element whose <span title=
                   46112: "syntax-end-tag">end tag</span> has been omitted.</p>
                   46113: <p>A <code><a href="#colgroup">colgroup</a></code> element's
                   46114: <span title="syntax-end-tag">end tag</span> may be omitted if the
                   46115: <code><a href="#colgroup">colgroup</a></code> element is not
                   46116: immediately followed by a <a href="#space">space character</a> or a
                   46117: <a href="#comments0" title="syntax-comments">comment</a> .</p>
                   46118: <p>A <code><a href="#thead0">thead</a></code> element's
                   46119: <span title="syntax-end-tag">end tag</span> may be omitted if the
                   46120: <code><a href="#thead0">thead</a></code> element is immediately
                   46121: followed by a <code><a href="#tbody">tbody</a></code> or
                   46122: <code><a href="#tfoot0">tfoot</a></code> element.</p>
                   46123: <p>A <code><a href="#tbody">tbody</a></code> element's <span title=
                   46124: "syntax-start-tag">start tag</span> may be omitted if the first
                   46125: thing inside the <code><a href="#tbody">tbody</a></code> element is
                   46126: a <code><a href="#tr">tr</a></code> element, and if the element is
                   46127: not immediately preceded by a <code><a href=
                   46128: "#tbody">tbody</a></code> , <code><a href=
                   46129: "#thead0">thead</a></code> , or <code><a href=
                   46130: "#tfoot0">tfoot</a></code> element whose <span title=
                   46131: "syntax-end-tag">end tag</span> has been omitted.</p>
                   46132: <p>A <code><a href="#tbody">tbody</a></code> element's <span title=
                   46133: "syntax-end-tag">end tag</span> may be omitted if the
                   46134: <code><a href="#tbody">tbody</a></code> element is immediately
                   46135: followed by a <code><a href="#tbody">tbody</a></code> or
                   46136: <code><a href="#tfoot0">tfoot</a></code> element, or if there is no
                   46137: more content in the parent element.</p>
                   46138: <p>A <code><a href="#tfoot0">tfoot</a></code> element's
                   46139: <span title="syntax-end-tag">end tag</span> may be omitted if the
                   46140: <code><a href="#tfoot0">tfoot</a></code> element is immediately
                   46141: followed by a <code><a href="#tbody">tbody</a></code> element, or
                   46142: if there is no more content in the parent element.</p>
                   46143: <p>A <code><a href="#tr">tr</a></code> element's <span title=
                   46144: "syntax-end-tag">end tag</span> may be omitted if the
                   46145: <code><a href="#tr">tr</a></code> element is immediately followed
                   46146: by another <code><a href="#tr">tr</a></code> element, or if there
                   46147: is no more content in the parent element.</p>
                   46148: <p>A <code><a href="#td">td</a></code> element's <span title=
                   46149: "syntax-end-tag">end tag</span> may be omitted if the
                   46150: <code><a href="#td">td</a></code> element is immediately followed
                   46151: by a <code><a href="#td">td</a></code> or <code><a href=
                   46152: "#th">th</a></code> element, or if there is no more content in the
                   46153: parent element.</p>
                   46154: <p>A <code><a href="#th">th</a></code> element's <span title=
                   46155: "syntax-end-tag">end tag</span> may be omitted if the
                   46156: <code><a href="#th">th</a></code> element is immediately followed
                   46157: by a <code><a href="#td">td</a></code> or <code><a href=
                   46158: "#th">th</a></code> element, or if there is no more content in the
                   46159: parent element.</p>
                   46160: <p><strong>However</strong> , a <span title=
                   46161: "syntax-start-tag">start tag</span> must never be omitted if it has
                   46162: any attributes.</p>
                   46163: <h5 id="element-restrictions"><span class="secno">8.1.2.5.</span>
                   46164: Restrictions on content models</h5>
                   46165: <p>For historical reasons, certain elements have extra restrictions
                   46166: beyond even the restrictions given by their content model.</p>
                   46167: <p><del class="diff-old">A p element must not contain blockquote ,
                   46168: dl , menu , ol , pre , table , or ul elements, even though these
                   46169: elements are technically allowed inside p elements according to the
                   46170: content models described in this specification. (In fact, if one of
                   46171: those elements is put inside a p element in the markup, it will
                   46172: instead imply a p element end tag before it.)</del> An
                   46173: <code>optgroup</code> element must not contain
                   46174: <code>optgroup</code> elements, even though these elements are
                   46175: technically allowed to be nested according to the content models
                   46176: described in this specification. (If an <code>optgroup</code>
                   46177: element is put inside another in the markup, it will in fact imply
                   46178: an <code>optgroup</code> end tag before it.)</p>
                   46179: <p>A <code><a href="#table">table</a></code> element must not
                   46180: contain <code><a href="#tr">tr</a></code> elements, even though
                   46181: these elements are technically allowed inside <code><a href=
                   46182: "#table">table</a></code> elements according to the content models
                   46183: described in this specification. (If a <code><a href=
                   46184: "#tr">tr</a></code> element is put inside a <code><a href=
                   46185: "#table">table</a></code> in the markup, it will in fact imply a
                   46186: <code><a href="#tbody">tbody</a></code> start tag before it.)</p>
                   46187: <p>A single U+000A LINE FEED (LF) character may be placed
                   46188: immediately after the <span title="syntax-start-tag">start
                   46189: tag</span> of <code><a href="#pre">pre</a></code> and
                   46190: <code>textarea</code> elements. This does not affect the processing
                   46191: of the element. The otherwise optional U+000A LINE FEED (LF)
                   46192: character <em>must</em> be included if the element's contents start
                   46193: with that character (because otherwise the leading newline in the
                   46194: contents would be treated like the optional newline, and
                   46195: ignored).</p>
                   46196: <div class="example">
                   46197: <p>The following two <code><a href="#pre">pre</a></code> blocks are
                   46198: equivalent:</p>
                   46199: <pre>
                   46200: &lt;pre&gt;
                   46201: Hello&lt;/pre&gt;
                   46202: </pre>
                   46203: <pre>
                   46204: &lt;pre&gt;
                   46205: <br>
                   46206: Hello&lt;/pre&gt;
                   46207: </pre></div>
                   46208: <h5 id="cdata-rcdata-restrictions"><span class=
                   46209: "secno">8.1.2.6.</span> Restrictions on the contents of CDATA and
                   46210: RCDATA elements</h5>
                   46211: <p>The text in CDATA and RCDATA elements must not contain any
                   46212: <del class="diff-old">occurences</del> <ins class=
                   46213: "diff-chg">occurrences</ins> of the string " <code title=
                   46214: "">&lt;/</code> " (U+003C LESS-THAN SIGN, U+002F SOLIDUS) followed
                   46215: by characters that case-insensitively match the tag name of the
                   46216: element followed by one of U+0009 CHARACTER TABULATION, U+000A LINE
                   46217: FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), U+0020
                   46218: SPACE, U+003E GREATER-THAN SIGN (&gt; ), or U+002F SOLIDUS (/),
                   46219: unless that string is part of an <a href="#escaping" title=
                   46220: "syntax-escape">escaping text span</a> .</p>
                   46221: <p>An <dfn id="escaping" title="syntax-escape">escaping text
                   46222: span</dfn> is a span of <a href="#text2" title=
                   46223: "syntax-text">text</a> <del class="diff-old">(in CDATA and RCDATA
                   46224: elements) and character entity references (in RCDATA
                   46225: elements)</del> that starts with an <a href="#escaping0" title=
                   46226: "syntax-escape-start">escaping text span start</a> that is not
                   46227: itself in an <a href="#escaping" title="syntax-escape">escaping
                   46228: text span</a> , and ends at the next <a href="#escaping1" title=
                   46229: "syntax-escape-end">escaping text span end</a> . <ins class=
                   46230: "diff-new">There cannot be any</ins> <a href="#character3" title=
                   46231: "syntax-charref"><ins class="diff-new">character
                   46232: references</ins></a> <ins class="diff-new">inside an</ins> <a href=
                   46233: "#escaping" title="syntax-escape"><ins class="diff-new">escaping
                   46234: text span</ins></a> .</p>
                   46235: <p>An <dfn id="escaping0" title="syntax-escape-start">escaping text
                   46236: span start</dfn> is a part of <a href="#text2" title=
                   46237: "syntax-text">text</a> that consists of the four character sequence
                   46238: " <code title="">&lt;!--</code> " (U+003C LESS-THAN SIGN, U+0021
                   46239: EXCLAMATION MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS).</p>
                   46240: <p>An <dfn id="escaping1" title="syntax-escape-end">escaping text
                   46241: span end</dfn> is a part of <a href="#text2" title=
                   46242: "syntax-text">text</a> that consists of the three character
                   46243: sequence " <code title="">--&gt;</code> " (U+002D HYPHEN-MINUS,
                   46244: U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN) whose U+003E
                   46245: GREATER-THAN SIGN (&gt;).</p>
                   46246: <p>An <a href="#escaping0" title="syntax-escape-start">escaping
                   46247: text span start</a> may share its U+002D HYPHEN-MINUS characters
                   46248: with its corresponding <a href="#escaping1" title=
                   46249: "syntax-escape-end">escaping text span end</a> .</p>
                   46250: <p>The text in CDATA and RCDATA elements must not have an <a href=
                   46251: "#escaping0" title="syntax-escape-start">escaping text span
                   46252: start</a> that is not followed by an <a href="#escaping1" title=
                   46253: "syntax-escape-end">escaping text span end</a> .</p>
                   46254: <h4 id="text0"><span class="secno"><del class=
                   46255: "diff-old">8.1.3.</del> <ins class="diff-chg">8.1.3</ins></span>
                   46256: Text</h4>
                   46257: <p><dfn id="text2" title="syntax-text">Text</dfn> is allowed inside
                   46258: elements, attributes, and comments. Text must consist of
                   46259: <del class="diff-old">valid</del> Unicode <del class=
                   46260: "diff-old">characters other than U+0000.</del> <ins class=
                   46261: "diff-chg">characters.</ins> Text <del class=
                   46262: "diff-old">should</del> <ins class="diff-chg">must not contain
                   46263: U+0000 characters. Text must not contain permanently undefined
                   46264: Unicode characters. Text must</ins> not contain control characters
                   46265: other than <a href="#space" title="space character">space
                   46266: characters</a> . Extra constraints are placed on what is and what
                   46267: is not allowed in text based on where the text is to be put, as
                   46268: described in the other sections.</p>
                   46269: <h5 id="newlines"><span class="secno">8.1.3.1.</span> Newlines</h5>
                   46270: <p><dfn id="newlines0" title="syntax-newlines">Newlines</dfn> in
                   46271: HTML may be represented either as U+000D CARRIAGE RETURN (CR)
                   46272: characters, U+000A LINE FEED (LF) characters, or pairs of U+000D
                   46273: CARRIAGE RETURN (CR), U+000A LINE FEED (LF) characters in that
                   46274: order.</p>
                   46275: <h4 id="character"><span class="secno"><del class=
                   46276: "diff-old">8.1.4.</del> <ins class="diff-chg">8.1.4</ins></span>
                   46277: Character <del class="diff-old">entity</del> references</h4>
                   46278: <p>In certain cases described in other sections, <a href="#text2"
                   46279: title="syntax-text">text</a> may be mixed with <dfn id="character3"
                   46280: title="syntax-charref">character <del class="diff-old">entity</del>
                   46281: references</dfn> . These can be used to escape characters that
                   46282: couldn't otherwise legally be included in <a href="#text2" title=
                   46283: "syntax-text">text</a> .</p>
                   46284: <p>Character <del class="diff-old">entity</del> references must
                   46285: start with a U+0026 AMPERSAND ( <code>&amp;</code> ). Following
                   46286: this, there are three possible kinds of character <del class=
                   46287: "diff-old">entity</del> references:</p>
                   46288: <dl>
                   46289: <dt>Named <del class="diff-old">entities</del> <ins class=
                   46290: "diff-chg">character references</ins></dt>
                   46291: <dd>The ampersand must be followed by one of the names given in the
                   46292: <del class="diff-old">entities</del> <a href="#named0"><ins class=
                   46293: "diff-chg">named character references</ins></a> section, using the
                   46294: same case. The name must be one that is terminated by a U+003B
                   46295: SEMICOLON ( <code title="">;</code> ) character.</dd>
                   46296: <dt>Decimal numeric <del class="diff-old">entities</del>
                   46297: <ins class="diff-chg">character reference</ins></dt>
                   46298: <dd>The ampersand must be followed by a U+0023 NUMBER SIGN (
                   46299: <code>#</code> ) character, followed by one or more digits in the
                   46300: range U+0030 DIGIT ZERO .. U+0039 DIGIT NINE, representing a
                   46301: base-ten integer that itself is a <del class="diff-old">valid</del>
                   46302: Unicode code point that is not U+0000, U+000D, in the range U+0080
                   46303: .. U+009F, or in the range 0xD800 .. 0xDFFF (surrogates). The
                   46304: digits must then be followed by a U+003B SEMICOLON character (
                   46305: <code title="">;</code> ).</dd>
                   46306: <dt>Hexadecimal numeric <del class="diff-old">entities</del>
                   46307: <ins class="diff-chg">character reference</ins></dt>
                   46308: <dd>The ampersand must be followed by a U+0023 NUMBER SIGN (
                   46309: <code>#</code> ) character, which must be followed by either a
                   46310: U+0078 LATIN SMALL LETTER X or a U+0058 LATIN CAPITAL LETTER X
                   46311: character, which must then be followed by one or more digits in the
                   46312: range U+0030 DIGIT ZERO .. U+0039 DIGIT NINE, U+0061 LATIN SMALL
                   46313: LETTER A .. U+0066 LATIN SMALL LETTER F, and U+0041 LATIN CAPITAL
                   46314: LETTER A .. U+0046 LATIN CAPITAL LETTER F, representing a
                   46315: base-sixteen integer that itself is a <del class=
                   46316: "diff-old">valid</del> Unicode code point that is not U+0000,
                   46317: U+000D, in the range U+0080 .. U+009F, or in the range 0xD800 ..
                   46318: 0xDFFF (surrogates). The digits must then be followed by a U+003B
                   46319: SEMICOLON character ( <code title="">;</code> ).</dd>
                   46320: </dl>
                   46321: <p>An <dfn id="ambiguous" title=
                   46322: "syntax-ambiguous-ampersand">ambiguous ampersand</dfn> is a U+0026
                   46323: AMPERSAND ( <code>&amp;</code> ) character that is <del class=
                   46324: "diff-old">not the last character in the file, that is not</del>
                   46325: followed by <ins class="diff-new">some</ins> <a href="#text2"
                   46326: title="syntax-text"><ins class="diff-new">text</ins></a>
                   46327: <ins class="diff-new">other than</ins> a <a href="#space">space
                   46328: character</a> , <del class="diff-old">that is not followed by</del>
                   46329: a <del class="diff-old">start tag that has not been omitted, and
                   46330: that is not followed by</del> <ins class="diff-chg">U+003C
                   46331: LESS-THAN SIGN character ('&lt;'), or</ins> another U+0026
                   46332: AMPERSAND ( <code>&amp;</code> ) character.</p>
                   46333: <h4 id="cdata"><span class="secno"><ins class=
                   46334: "diff-new">8.1.5</ins></span> <ins class="diff-new">CDATA
                   46335: blocks</ins></h4>
                   46336: <p><dfn id="cdata0" title="syntax-cdata"><ins class=
                   46337: "diff-new">CDATA blocks</ins></dfn> <ins class="diff-new">must
                   46338: start with the character sequence U+003C LESS-THAN SIGN, U+0021
                   46339: EXCLAMATION MARK, U+005B LEFT SQUARE BRACKET, U+0043 LATIN CAPITAL
                   46340: LETTER C, U+0044 LATIN CAPITAL LETTER D, U+0041 LATIN CAPITAL
                   46341: LETTER A, U+0054 LATIN CAPITAL LETTER T, U+0041 LATIN CAPITAL
                   46342: LETTER A, U+005B LEFT SQUARE BRACKET (</ins> <code title=
                   46343: ""><ins class="diff-new">&lt;![CDATA[</ins></code> <ins class=
                   46344: "diff-new">). Following this sequence, the block may have</ins>
                   46345: <a href="#text2" title="syntax-text"><ins class=
                   46346: "diff-new">text</ins></a> ,<ins class="diff-new">with the
                   46347: additional restriction that the text must not contain the three
                   46348: character sequence U+005D RIGHT SQUARE BRACKET, U+005D RIGHT SQUARE
                   46349: BRACKET, U+003E GREATER-THAN SIGN (</ins> <code title=
                   46350: ""><ins class="diff-new">]]&gt;</ins></code> <ins class=
                   46351: "diff-new">). Finally, the CDATA block must be ended by the three
                   46352: character sequence U+005D RIGHT SQUARE BRACKET, U+005D RIGHT SQUARE
                   46353: BRACKET, U+003E GREATER-THAN SIGN (</ins> <code title=
                   46354: ""><ins class="diff-new">]]&gt;</ins></code> <ins class=
                   46355: "diff-new">).</ins></p>
                   46356: <h4 id="comments"><span class="secno"><del class=
                   46357: "diff-old">8.1.5.</del> <ins class="diff-chg">8.1.6</ins></span>
                   46358: Comments</h4>
                   46359: <p><dfn id="comments0" title="syntax-comments">Comments</dfn> must
                   46360: start with the four character sequence U+003C LESS-THAN SIGN,
                   46361: U+0021 EXCLAMATION MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS (
                   46362: <code title="">&lt;!--</code> ). Following this sequence, the
                   46363: comment may have <a href="#text2" title="syntax-text">text</a> ,
                   46364: with the additional restriction that the text must not <ins class=
                   46365: "diff-new">start with a single U+003E GREATER-THAN SIGN ('&gt;')
                   46366: character, nor start with a U+002D HYPHEN-MINUS (</ins>
                   46367: <code title=""><ins class="diff-new">-</ins></code> <ins class=
                   46368: "diff-new">) character followed by a U+003E GREATER-THAN SIGN
                   46369: ('&gt;') character, nor</ins> contain two consecutive U+002D
                   46370: HYPHEN-MINUS ( <code title="">-</code> ) characters, nor end with a
                   46371: U+002D HYPHEN-MINUS ( <code title="">-</code> ) character. Finally,
                   46372: the comment must be ended by the three character sequence U+002D
                   46373: HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN (
                   46374: <code title="">--&gt;</code> ).</p>
                   46375: <h3 id="parsing"><span class="secno"><del class=
                   46376: "diff-old">8.2.</del> <ins class="diff-chg">8.2</ins></span>
                   46377: Parsing HTML documents</h3>
                   46378: <p><em>This section only applies to user agents, data mining tools,
                   46379: and conformance checkers.</em></p>
                   46380: <p>The rules for parsing <a href="#xml-documents">XML documents</a>
                   46381: (and thus <a href="#xhtml5">XHTML</a> documents) into DOM trees are
                   46382: covered by the XML and Namespaces in XML specifications, and are
                   46383: out of scope of this specification. <a href="#references">[XML]</a>
                   46384: <a href="#references">[XMLNS]</a></p>
                   46385: <p>For <a href="#html-">HTML documents</a> , user agents must use
                   46386: the parsing rules described in this section to generate the DOM
                   46387: trees. Together, these rules define what is referred to as the
                   46388: <dfn id="html-0">HTML parser</dfn> .</p>
                   46389: <div class="note">
                   46390: <p>While the HTML form of HTML5 bears a close resemblance to SGML
                   46391: and XML, it is a separate language with its own parsing rules.</p>
                   46392: <p>Some earlier versions of HTML (in particular from HTML2 to
                   46393: HTML4) were based on SGML and used SGML parsing rules. However, few
                   46394: (if any) web browsers ever implemented true SGML parsing for HTML
                   46395: documents; the only user agents to strictly handle HTML as an SGML
                   46396: application have historically been validators. The resulting
                   46397: confusion — with validators claiming documents to have one
                   46398: representation while widely deployed Web browsers interoperably
                   46399: implemented a different representation — has wasted decades of
                   46400: productivity. This version of HTML thus returns to a non-SGML
                   46401: basis.</p>
                   46402: <p>Authors interested in using SGML tools in their authoring
                   46403: pipeline are encouraged to use XML tools and the XML <del class=
                   46404: "diff-old">serialisation</del> <ins class=
                   46405: "diff-chg">serialization</ins> of HTML5.</p>
                   46406: </div>
                   46407: <p>This specification defines the parsing rules for HTML documents,
                   46408: whether they are syntactically <del class="diff-old">valid</del>
                   46409: <ins class="diff-chg">correct</ins> or not. Certain points in the
                   46410: parsing algorithm are said to be <dfn id="parse1" title=
                   46411: "parse error">parse errors</dfn> . The error handling for parse
                   46412: errors is well-defined: user agents must either act as described
                   46413: below when encountering such problems, or must abort processing at
                   46414: the first error that they encounter for which they do not wish to
                   46415: apply the rules described below.</p>
                   46416: <p>Conformance checkers must report at least one parse error
                   46417: condition to the user if one or more parse error conditions exist
                   46418: in the document and must not report parse error conditions if none
                   46419: exist in the document. Conformance checkers may report more than
                   46420: one parse error condition if more than one parse error conditions
                   46421: exist in the document. Conformance checkers are not required to
                   46422: recover from parse errors.</p>
                   46423: <p class="note">Parse errors are only errors with the
                   46424: <em>syntax</em> of HTML. In addition to checking for parse errors,
                   46425: conformance checkers will also verify that the document obeys all
                   46426: the other conformance requirements described in this
                   46427: specification.</p>
                   46428: <h4 id="overview"><span class="secno"><del class=
                   46429: "diff-old">8.2.1.</del> <ins class="diff-chg">8.2.1</ins></span>
                   46430: Overview of the parsing model</h4>
                   46431: <p>The input to the HTML parsing process consists of a stream of
                   46432: Unicode characters, which is passed through a <a href=
                   46433: "#tokenisation0">tokenisation</a> stage (lexical analysis) followed
                   46434: by a <a href="#tree-construction0">tree construction</a> stage
                   46435: (semantic analysis). The output is a <code>Document</code>
                   46436: object.</p>
                   46437: <p class="note">Implementations that <a href="#non-scripted">do not
                   46438: support scripting</a> do not have to actually create a DOM
                   46439: <code>Document</code> object, but the DOM tree in such cases is
                   46440: still used as the model for the rest of the specification.</p>
                   46441: <p>In the common case, the data handled by the tokenisation stage
                   46442: comes from the network, but <a href="#dynamic2" title=
                   46443: "dynamic markup insertion">it can also come from script</a> , e.g.
                   46444: using the <code title="dom-document-write-HTML"><a href=
                   46445: "#document.write...">document.write()</a></code> API.</p>
                   46446: <p><img alt="" src="images/parsing-model-overview.png"></p>
                   46447: <p id="nestedParsing">There is only one set of state for the
                   46448: tokeniser stage and the tree construction stage, but the tree
                   46449: construction stage is reentrant, meaning that while the tree
                   46450: construction stage is handling one token, the tokeniser might be
                   46451: resumed, causing further tokens to be emitted and processed before
                   46452: the first token's processing is complete.</p>
                   46453: <div class="example">
                   46454: <p>In the following example, the tree construction stage will be
                   46455: called upon to handle a "p" start tag token while handling the
                   46456: "script" start tag token:</p>
                   46457: <pre>
                   46458: ...
                   46459: &lt;script&gt;
                   46460:  document.write('&lt;p&gt;');
                   46461: &lt;/script&gt;
                   46462: ...
                   46463: </pre></div>
                   46464: <h4 id="the-input0"><span class="secno"><del class=
                   46465: "diff-old">8.2.2.</del> <ins class="diff-chg">8.2.2</ins></span>
                   46466: The <dfn id="input0">input stream</dfn></h4>
                   46467: <p>The stream of Unicode characters that consists the input to the
                   46468: tokenisation stage will be initially seen by the user agent as a
                   46469: stream of bytes (typically coming over the network or from the
                   46470: local file system). The bytes encode the actual characters
                   46471: according to a particular <em>character encoding</em> , which the
                   46472: user agent must use to decode the bytes into characters.</p>
                   46473: <p class="note">For XML documents, the algorithm user agents must
                   46474: use to determine the character encoding is given by the XML
                   46475: specification. This section does not apply to XML documents.
                   46476: <a href="#references">[XML]</a></p>
                   46477: <h5 id="determining"><span class="secno">8.2.2.1.</span>
                   46478: Determining the character encoding</h5>
                   46479: <p>In some cases, it might be impractical to unambiguously
                   46480: determine the encoding before parsing the document. Because of
                   46481: this, this specification provides for a two-pass mechanism with an
                   46482: optional pre-scan. Implementations are allowed, as described below,
                   46483: to apply a simplified parsing algorithm to whatever bytes they have
                   46484: available before beginning to parse the document. Then, the real
                   46485: parser is started, using a tentative encoding derived from this
                   46486: pre-parse and other out-of-band metadata. If, while the document is
                   46487: being loaded, the user agent discovers an encoding declaration that
                   46488: conflicts with this information, then the parser can get reinvoked
                   46489: to perform a parse of the document with the real encoding.</p>
                   46490: <p id="documentEncoding">User agents must use the following
                   46491: algorithm (the <dfn id="encoding0">encoding sniffing
                   46492: algorithm</dfn> ) to determine the character encoding to use when
                   46493: decoding a document in the first pass. This algorithm takes as
                   46494: input any out-of-band metadata available to the user agent (e.g.
                   46495: the <a href="#content-type8" title="Content-Type">Content-Type
                   46496: metadata</a> of the document) and all the bytes available so far,
                   46497: and returns an encoding and a <dfn id="confidence" title=
                   46498: "concept-encoding-confidence">confidence</dfn> . The confidence is
                   46499: either <i>tentative</i> or <i>certain</i> . The encoding used, and
                   46500: whether the confidence in that encoding is <i>tentative</i> or
                   46501: <i>confident</i> , is <a href="#meta-charset-during-parse">used
                   46502: during the parsing</a> to determine whether to <a href=
                   46503: "#change">change the encoding</a> .</p>
                   46504: <ol>
                   46505: <li>
                   46506: <p>If the transport layer specifies an encoding, return that
                   46507: encoding with the <a href="#confidence" title=
                   46508: "concept-encoding-confidence">confidence</a> <i>certain</i> , and
                   46509: abort these steps.</p>
                   46510: </li>
                   46511: <li>
                   46512: <p>The user agent may wait for more bytes of the resource to be
                   46513: available, either in this step or at any later step in this
                   46514: algorithm. For instance, a user agent might wait 500ms or 512
                   46515: bytes, whichever came first. In general preparsing the source to
                   46516: find the encoding improves performance, as it reduces the need to
                   46517: throw away the data structures used when parsing upon finding the
                   46518: encoding information. However, if the user agent delays too long to
                   46519: obtain data to determine the encoding, then the cost of the delay
                   46520: could outweigh any performance improvements from the preparse.</p>
                   46521: </li>
                   46522: <li>
                   46523: <p>For each of the rows in the following table, starting with the
                   46524: first one and going down, if there are as many or more bytes
                   46525: available than the number of bytes in the first column, and the
                   46526: first bytes of the file match the bytes given in the first column,
                   46527: then return the encoding given in the cell in the second column of
                   46528: that row, with the <a href="#confidence" title=
                   46529: "concept-encoding-confidence">confidence</a> <i>certain</i> , and
                   46530: abort these steps:</p>
                   46531: <table>
                   46532: <thead>
                   46533: <tr>
                   46534: <th>Bytes in Hexadecimal</th>
                   46535: <th><del class="diff-old">Description</del> <ins class=
                   46536: "diff-chg">Encoding</ins></th>
                   46537: </tr>
                   46538: </thead>
                   46539: <tbody>
                   46540: <tr>
                   46541: <td>FE FF</td>
                   46542: <td>UTF-16BE <del class="diff-old">BOM</del></td>
                   46543: </tr>
                   46544: <tr>
                   46545: <td>FF FE</td>
                   46546: <td>UTF-16LE <del class="diff-old">BOM</del></td>
                   46547: </tr>
                   46548: <tr>
                   46549: <td>EF BB BF</td>
                   46550: <td>UTF-8 <del class="diff-old">BOM</del></td>
                   46551: </tr>
                   46552: </tbody>
                   46553: </table>
                   46554: <p class="note"><ins class="diff-new">This step looks for Unicode
                   46555: Byte Order Marks (BOMs).</ins></p>
                   46556: </li>
                   46557: <li>
                   46558: <p>Otherwise, the user agent will have to search for explicit
                   46559: character encoding information in the file itself. This should
                   46560: proceed as follows:</p>
                   46561: <p>Let <var title="">position</var> be a pointer to a byte in the
                   46562: input stream, initially pointing at the first byte. If at any point
                   46563: during these substeps the user agent either runs out of bytes or
                   46564: decides that scanning further bytes would not be efficient, then
                   46565: skip to the next step of the overall character encoding detection
                   46566: algorithm. User agents may decide that scanning <em>any</em> bytes
                   46567: is not efficient, in which case these substeps are entirely
                   46568: skipped.</p>
                   46569: <p>Now, repeat the following "two" steps until the algorithm aborts
                   46570: (either because user agent aborts, as described above, or because a
                   46571: character encoding is found):</p>
                   46572: <ol>
                   46573: <li>
                   46574: <p>If <var title="">position</var> points to:</p>
                   46575: <dl class="switch">
                   46576: <dt>A sequence of bytes starting with: 0x3C 0x21 0x2D 0x2D (ASCII
                   46577: '&lt;!--')</dt>
                   46578: <dd>
                   46579: <p>Advance the <var title="">position</var> pointer so that it
                   46580: points at the first 0x3E byte which is preceded by two 0x2D bytes
                   46581: (i.e. at the end of an ASCII '--&gt; ' sequence) and comes after
                   46582: the 0x3C byte that was found. (The two 0x2D bytes can be the same
                   46583: as the those in the '&lt;!--' sequence.)</p>
                   46584: </dd>
                   46585: <dt>A sequence of bytes starting with: 0x3C, 0x4D or 0x6D, 0x45 or
                   46586: 0x65, 0x54 or 0x74, 0x41 or 0x61, and finally one of 0x09, 0x0A,
                   46587: 0x0B, 0x0C, 0x0D, <del class="diff-old">0x20</del> <ins class=
                   46588: "diff-chg">0x20, 0x2F</ins> (case-insensitive ASCII '&lt;meta'
                   46589: followed by a <del class="diff-old">space)</del> <ins class=
                   46590: "diff-chg">space or slash)</ins></dt>
                   46591: <dd>
                   46592: <ol>
                   46593: <li>
                   46594: <p>Advance the <var title="">position</var> pointer so that it
                   46595: points at the next 0x09, 0x0A, 0x0B, 0x0C, 0x0D, <ins class=
                   46596: "diff-new">0x20,</ins> or <del class="diff-old">0x20</del>
                   46597: <ins class="diff-chg">0x2F</ins> byte (the one in sequence of
                   46598: characters matched above).</p>
                   46599: </li>
                   46600: <li>
                   46601: <p><a href="#get-an" title=
                   46602: "concept-get-attributes-when-sniffing">Get an attribute</a> and its
                   46603: value. If no attribute was sniffed, then skip this inner set of
                   46604: steps, and jump to the second step in the overall "two step"
                   46605: algorithm.</p>
                   46606: </li>
                   46607: <li>
                   46608: <p><del class="diff-old">Examine the attribute's name: If it is
                   46609: 'charset'</del> If the attribute's <del class=
                   46610: "diff-old">value</del> <ins class="diff-chg">name</ins> is
                   46611: <del class="diff-old">a supported character encoding,</del>
                   46612: <ins class="diff-chg">neither "</ins> <code title=""><ins class=
                   46613: "diff-chg">charset</ins></code> <ins class="diff-chg">" nor "</ins>
                   46614: <code title=""><ins class="diff-chg">content</ins></code>
                   46615: <ins class="diff-chg">",</ins> then return <del class=
                   46616: "diff-old">the given encoding, with confidence tentative , and
                   46617: abort all</del> <ins class="diff-chg">to step 2 in</ins> these
                   46618: <ins class="diff-new">inner</ins> steps. <del class=
                   46619: "diff-old">Otherwise, do nothing with this attribute, and continue
                   46620: looking for other attributes.</del></p>
                   46621: </li>
                   46622: <li>
                   46623: <p>If <del class="diff-old">it</del> <ins class="diff-chg">the
                   46624: attribute's name</ins> is <del class="diff-old">'content'</del>
                   46625: <ins class="diff-chg">"</ins> <code title=""><ins class=
                   46626: "diff-chg">charset</ins></code> <ins class="diff-chg">", let</ins>
                   46627: <var title=""><ins class="diff-chg">charset</ins></var> <ins class=
                   46628: "diff-chg">be the attribute's value, interpreted as a character
                   46629: encoding.</ins></p>
                   46630: </li>
                   46631: <li>
                   46632: <p><del class="diff-old">The</del> <ins class="diff-chg">Otherwise,
                   46633: the</ins> attribute's <del class="diff-old">value</del> <ins class=
                   46634: "diff-chg">name</ins> is <del class="diff-old">now parsed.
                   46635: Apply</del> <ins class="diff-chg">"</ins> <code title=
                   46636: ""><ins class="diff-chg">content</ins></code> <ins class=
                   46637: "diff-chg">": apply</ins> the <a href="#algorithm4">algorithm for
                   46638: extracting an encoding from a Content-Type</a> , giving the
                   46639: attribute's value as the string to parse. If an encoding
                   46640: <del class="diff-old">was</del> <ins class="diff-chg">is</ins>
                   46641: returned, <del class="diff-old">and</del> <ins class=
                   46642: "diff-chg">let</ins> <var title=""><ins class=
                   46643: "diff-chg">charset</ins></var> <ins class="diff-chg">be that
                   46644: encoding. Otherwise, return to step 2 in these inner
                   46645: steps.</ins></p>
                   46646: </li>
                   46647: <li>
                   46648: <p><ins class="diff-chg">If</ins> <var title=""><ins class=
                   46649: "diff-chg">charset</ins></var> <ins class="diff-chg">is a UTF-16
                   46650: encoding, change</ins> it <ins class="diff-new">to UTF-8.</ins></p>
                   46651: </li>
                   46652: <li>
                   46653: <p><ins class="diff-new">If</ins> <var title=""><ins class=
                   46654: "diff-new">charset</ins></var> is <del class="diff-old">the name
                   46655: of</del> a supported character encoding, then return <del class=
                   46656: "diff-old">that</del> <ins class="diff-chg">the given</ins>
                   46657: encoding, with <del class="diff-old">the</del> <a href=
                   46658: "#confidence" title="concept-encoding-confidence">confidence</a>
                   46659: <i>tentative</i> , and abort all these steps.</p>
                   46660: </li>
                   46661: <li><del class="diff-old">Otherwise, skip this 'content' attribute
                   46662: and continue on with any other attributes. Any other name</del>
                   46663: <p><del class="diff-old">Do nothing with that attribute.
                   46664: Return</del> <ins class="diff-chg">Otherwise, return</ins> to step
                   46665: <del class="diff-old">1</del> <ins class="diff-chg">2</ins> in
                   46666: these inner steps.</p>
                   46667: </li>
                   46668: </ol>
                   46669: </dd>
                   46670: <dt>A sequence of bytes starting with a 0x3C byte (ASCII '&lt;'),
                   46671: optionally a 0x2F byte (ASCII '/'), and finally a byte in the range
                   46672: 0x41-0x5A or 0x61-0x7A (an ASCII letter)</dt>
                   46673: <dd>
                   46674: <ol>
                   46675: <li>
                   46676: <p>Advance the <var title="">position</var> pointer so that it
                   46677: points at the next 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0B (ASCII
                   46678: VT), 0x0C (ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII space),
                   46679: <ins class="diff-new">or</ins> 0x3E (ASCII '&gt; <del class=
                   46680: "diff-old">'), 0x3C (ASCII '&lt;')</del> <ins class=
                   46681: "diff-chg">')</ins> byte.</p>
                   46682: </li>
                   46683: <li>
                   46684: <p><del class="diff-old">If the pointer points to a 0x3C (ASCII
                   46685: '&lt;') byte, then return to the first step in the overall "two
                   46686: step" algorithm.</del> Repeatedly <a href="#get-an" title=
                   46687: "concept-get-attributes-when-sniffing">get an attribute</a> until
                   46688: no further attributes can be found, then jump to the second step in
                   46689: the overall "two step" algorithm.</p>
                   46690: </li>
                   46691: </ol>
                   46692: </dd>
                   46693: <dt>A sequence of bytes starting with: 0x3C 0x21 (ASCII
                   46694: '&lt;!')</dt>
                   46695: <dt>A sequence of bytes starting with: 0x3C 0x2F (ASCII
                   46696: '&lt;/')</dt>
                   46697: <dt>A sequence of bytes starting with: 0x3C 0x3F (ASCII
                   46698: '&lt;?')</dt>
                   46699: <dd>
                   46700: <p>Advance the <var title="">position</var> pointer so that it
                   46701: points at the first 0x3E byte (ASCII '&gt; ') that comes after the
                   46702: 0x3C byte that was found.</p>
                   46703: </dd>
                   46704: <dt>Any other byte</dt>
                   46705: <dd>
                   46706: <p>Do nothing with that byte.</p>
                   46707: </dd>
                   46708: </dl>
                   46709: </li>
                   46710: <li>Move <var title="">position</var> so it points at the next byte
                   46711: in the input stream, and return to the first step of this "two
                   46712: step" algorithm.</li>
                   46713: </ol>
                   46714: <p>When the above "two step" algorithm says to <dfn id="get-an"
                   46715: title="concept-get-attributes-when-sniffing">get an attribute</dfn>
                   46716: , it means doing this:</p>
                   46717: <ol>
                   46718: <li>
                   46719: <p>If the byte at <var title="">position</var> is one of 0x09
                   46720: (ASCII TAB), 0x0A (ASCII LF), 0x0B (ASCII VT), 0x0C (ASCII FF),
                   46721: 0x0D (ASCII CR), 0x20 (ASCII space), or 0x2F (ASCII '/') then
                   46722: advance <var title="">position</var> to the next byte and
                   46723: <del class="diff-old">start over. If the byte at position is 0x3C
                   46724: (ASCII '&lt;'), then move position back to the previous byte, and
                   46725: stop looking for an attribute. There isn't one.</del> <ins class=
                   46726: "diff-chg">redo this substep.</ins></p>
                   46727: </li>
                   46728: <li>
                   46729: <p>If the byte at <var title="">position</var> is 0x3E (ASCII '&gt;
                   46730: '), then <del class="diff-old">stop looking for</del> <ins class=
                   46731: "diff-chg">abort the "get</ins> an <del class=
                   46732: "diff-old">attribute.</del> <ins class="diff-chg">attribute"
                   46733: algorithm.</ins> There isn't one.</p>
                   46734: </li>
                   46735: <li>
                   46736: <p>Otherwise, the byte at <var title="">position</var> is the start
                   46737: of the attribute name. Let <var title="">attribute name</var> and
                   46738: <var title="">attribute value</var> be the empty string.</p>
                   46739: </li>
                   46740: <li>
                   46741: <p><em>Attribute name</em> : Process the byte at <var title=
                   46742: "">position</var> as follows:</p>
                   46743: <dl class="switch">
                   46744: <dt>If it is 0x3D (ASCII '='), and the <var title="">attribute
                   46745: name</var> is longer than the empty string</dt>
                   46746: <dd>Advance <var title="">position</var> to the next byte and jump
                   46747: to the step below <del class="diff-old">labelled</del> <ins class=
                   46748: "diff-chg">labeled</ins> <em>value</em> .</dd>
                   46749: <dt>If it is 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0B (ASCII VT),
                   46750: 0x0C (ASCII FF), 0x0D (ASCII CR), or 0x20 (ASCII space)</dt>
                   46751: <dd>Jump to the step below <del class="diff-old">labelled</del>
                   46752: <ins class="diff-chg">labeled</ins> <em>spaces</em> .</dd>
                   46753: <dt>If it is 0x2F (ASCII <del class="diff-old">'/'), 0x3C (ASCII
                   46754: '&lt;'),</del> <ins class="diff-chg">'/')</ins> or 0x3E (ASCII
                   46755: <del class="diff-old">'&gt;')</del> <ins class="diff-chg">'&gt;
                   46756: ')</ins></dt>
                   46757: <dd><del class="diff-old">Stop looking for</del> <ins class=
                   46758: "diff-chg">Abort the "get</ins> an <del class=
                   46759: "diff-old">attribute.</del> <ins class="diff-chg">attribute"
                   46760: algorithm.</ins> The attribute's name is the value of <var title=
                   46761: "">attribute name</var> , its value is the empty string.</dd>
                   46762: <dt>If it is in the range 0x41 (ASCII 'A') to 0x5A (ASCII 'Z')</dt>
                   46763: <dd>Append the Unicode character with codepoint <span><var title=
                   46764: "">b</var> +0x20</span> to <var title="">attribute name</var>
                   46765: (where <var title="">b</var> is the value of the byte at
                   46766: <var title="">position</var> ).</dd>
                   46767: <dt>Anything else</dt>
                   46768: <dd>Append the Unicode character with the same codepoint as the
                   46769: value of the byte at <var title="">position</var> ) to <var title=
                   46770: "">attribute name</var> . (It doesn't actually matter how bytes
                   46771: outside the ASCII range are handled here, since only ASCII
                   46772: characters can contribute to the detection of a character
                   46773: encoding.)</dd>
                   46774: </dl>
                   46775: </li>
                   46776: <li>
                   46777: <p>Advance <var title="">position</var> to the next byte and return
                   46778: to the previous step.</p>
                   46779: </li>
                   46780: <li>
                   46781: <p><em>Spaces.</em> If the byte at <var title="">position</var> is
                   46782: one of 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0B (ASCII VT), 0x0C
                   46783: (ASCII FF), 0x0D (ASCII CR), or 0x20 (ASCII space) then advance
                   46784: <var title="">position</var> to the next byte, then, repeat this
                   46785: step.</p>
                   46786: </li>
                   46787: <li>
                   46788: <p>If the byte at <var title="">position</var> is <em>not</em> 0x3D
                   46789: (ASCII '='), <del class="diff-old">stop looking for an attribute.
                   46790: Move position back to</del> <ins class="diff-chg">abort</ins> the
                   46791: <del class="diff-old">previous byte.</del> <ins class=
                   46792: "diff-chg">"get an attribute" algorithm.</ins> The attribute's name
                   46793: is the value of <var title="">attribute name</var> , its value is
                   46794: the empty string.</p>
                   46795: </li>
                   46796: <li>
                   46797: <p>Advance <var title="">position</var> past the 0x3D (ASCII '=')
                   46798: byte.</p>
                   46799: </li>
                   46800: <li>
                   46801: <p><em>Value.</em> If the byte at <var title="">position</var> is
                   46802: one of 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0B (ASCII VT), 0x0C
                   46803: (ASCII FF), 0x0D (ASCII CR), or 0x20 (ASCII space) then advance
                   46804: <var title="">position</var> to the next byte, then, repeat this
                   46805: step.</p>
                   46806: </li>
                   46807: <li>
                   46808: <p>Process the byte at <var title="">position</var> as follows:</p>
                   46809: <dl class="switch">
                   46810: <dt>If it is 0x22 (ASCII '"') or 0x27 ("'")</dt>
                   46811: <dd>
                   46812: <ol>
                   46813: <li>Let <var title="">b</var> be the value of the byte at
                   46814: <var title="">position</var> .</li>
                   46815: <li>Advance <var title="">position</var> to the next byte.</li>
                   46816: <li>If the value of the byte at <var title="">position</var> is the
                   46817: value of <var title="">b</var> , then <del class="diff-old">stop
                   46818: looking for</del> <ins class="diff-chg">advance</ins> <var title=
                   46819: ""><ins class="diff-chg">position</ins></var> <ins class=
                   46820: "diff-chg">to the next byte and abort the "get</ins> an <del class=
                   46821: "diff-old">attribute.</del> <ins class="diff-chg">attribute"
                   46822: algorithm.</ins> The attribute's name is the value of <var title=
                   46823: "">attribute name</var> , and its value is the value of <var title=
                   46824: "">attribute value</var> .</li>
                   46825: <li>Otherwise, if the value of the byte at <var title=
                   46826: "">position</var> is in the range 0x41 (ASCII 'A') to 0x5A (ASCII
                   46827: 'Z'), then append a Unicode character to <var title="">attribute
                   46828: value</var> whose codepoint is 0x20 more than the value of the byte
                   46829: at <var title="">position</var> .</li>
                   46830: <li>Otherwise, append a Unicode character to <var title=
                   46831: "">attribute value</var> whose codepoint is the same as the value
                   46832: of the byte at <var title="">position</var> .</li>
                   46833: <li>Return to the second step in these substeps.</li>
                   46834: </ol>
                   46835: </dd>
                   46836: <dt>If it is <del class="diff-old">0x3C (ASCII '&lt;'), or</del>
                   46837: 0x3E (ASCII <del class="diff-old">'&gt;')</del> <ins class=
                   46838: "diff-chg">'&gt; ')</ins></dt>
                   46839: <dd><del class="diff-old">Stop looking for</del> <ins class=
                   46840: "diff-chg">Abort the "get</ins> an <del class=
                   46841: "diff-old">attribute.</del> <ins class="diff-chg">attribute"
                   46842: algorithm.</ins> The attribute's name is the value of <var title=
                   46843: "">attribute name</var> , its value is the empty string.</dd>
                   46844: <dt>If it is in the range 0x41 (ASCII 'A') to 0x5A (ASCII 'Z')</dt>
                   46845: <dd>Append the Unicode character with codepoint <span><var title=
                   46846: "">b</var> +0x20</span> to <var title="">attribute value</var>
                   46847: (where <var title="">b</var> is the value of the byte at
                   46848: <var title="">position</var> ). <ins class="diff-new">Advance</ins>
                   46849: <var title=""><ins class="diff-new">position</ins></var>
                   46850: <ins class="diff-new">to the next byte.</ins></dd>
                   46851: <dt>Anything else</dt>
                   46852: <dd>Append the Unicode character with the same codepoint as the
                   46853: value of the byte at <var title="">position</var> ) to <var title=
                   46854: "">attribute value</var> . <ins class="diff-new">Advance</ins>
                   46855: <var title=""><ins class="diff-new">position</ins></var>
                   46856: <ins class="diff-new">to the next byte.</ins></dd>
                   46857: </dl>
                   46858: </li>
                   46859: <li>
                   46860: <p>Process the byte at <var title="">position</var> as follows:</p>
                   46861: <dl class="switch">
                   46862: <dt>If it is 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0B (ASCII VT),
                   46863: 0x0C (ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII space), <del class=
                   46864: "diff-old">0x3C (ASCII '&lt;'),</del> or 0x3E (ASCII <del class=
                   46865: "diff-old">'&gt;')</del> <ins class="diff-chg">'&gt; ')</ins></dt>
                   46866: <dd><del class="diff-old">Stop looking for</del> <ins class=
                   46867: "diff-chg">Abort the "get</ins> an <del class=
                   46868: "diff-old">attribute.</del> <ins class="diff-chg">attribute"
                   46869: algorithm.</ins> The attribute's name is the value of <var title=
                   46870: "">attribute name</var> and its value is the value of <var title=
                   46871: "">attribute value</var> .</dd>
                   46872: <dt>If it is in the range 0x41 (ASCII 'A') to 0x5A (ASCII 'Z')</dt>
                   46873: <dd>Append the Unicode character with codepoint <span><var title=
                   46874: "">b</var> +0x20</span> to <var title="">attribute value</var>
                   46875: (where <var title="">b</var> is the value of the byte at
                   46876: <var title="">position</var> ).</dd>
                   46877: <dt>Anything else</dt>
                   46878: <dd>Append the Unicode character with the same codepoint as the
                   46879: value of the byte at <var title="">position</var> ) to <var title=
                   46880: "">attribute value</var> .</dd>
                   46881: </dl>
                   46882: </li>
                   46883: <li>
                   46884: <p>Advance <var title="">position</var> to the next byte and return
                   46885: to the previous step.</p>
                   46886: </li>
                   46887: </ol>
                   46888: <p>For the sake of interoperability, user agents should not use a
                   46889: pre-scan algorithm that returns different results than the one
                   46890: described above. (But, if you do, please at least let us know, so
                   46891: that we can improve this algorithm and benefit everyone...)</p>
                   46892: </li>
                   46893: <li>
                   46894: <p>If the user agent has information on the likely encoding for
                   46895: this page, e.g. based on the encoding of the page when it was last
                   46896: visited, then return that encoding, with the <a href="#confidence"
                   46897: title="concept-encoding-confidence">confidence</a> <i>tentative</i>
                   46898: , and abort these steps.</p>
                   46899: </li>
                   46900: <li>
                   46901: <p>The user agent may attempt to autodetect the character encoding
                   46902: from applying frequency analysis or other algorithms to the data
                   46903: stream. If autodetection succeeds in determining a character
                   46904: encoding, then return that encoding, with the <a href="#confidence"
                   46905: title="concept-encoding-confidence">confidence</a> <i>tentative</i>
                   46906: , and abort these steps. <a href=
                   46907: "#references">[UNIVCHARDET]</a></p>
                   46908: </li>
                   46909: <li>
                   46910: <p>Otherwise, return an implementation-defined or user-specified
                   46911: default character encoding, with the <a href="#confidence" title=
                   46912: "concept-encoding-confidence">confidence</a> <i>tentative</i> .
                   46913: <ins class="diff-new">In non-legacy environments, the more
                   46914: comprehensive</ins> <code title=""><ins class=
                   46915: "diff-new">UTF-8</ins></code> <ins class="diff-new">encoding is
                   46916: recommended.</ins> Due to its use in legacy content, <code title=
                   46917: "">windows-1252</code> is recommended as a default in predominantly
                   46918: Western <del class="diff-old">demographics. In non-legacy
                   46919: environments, the more comprehensive UTF-8 encoding is
                   46920: recommended</del> <ins class="diff-chg">demographics</ins> instead.
                   46921: Since these encodings can in many cases be distinguished by
                   46922: inspection, a user agent may heuristically decide which to use as a
                   46923: default.</p>
                   46924: </li>
                   46925: </ol>
                   46926: <p><ins class="diff-new">The</ins> <a href=
                   46927: "#character1"><ins class="diff-new">document's character
                   46928: encoding</ins></a> <ins class="diff-new">must immediately be set to
                   46929: the value returned from this algorithm, at the same time as the
                   46930: user agent uses the returned value to select the decoder to use for
                   46931: the input stream.</ins></p>
                   46932: <h5 id="character0"><span class="secno">8.2.2.2.</span> Character
                   46933: encoding requirements</h5>
                   46934: <p>User agents must at a minimum support the UTF-8 and Windows-1252
                   46935: encodings, but may support more.</p>
                   46936: <p class="note">It is not unusual for Web browsers to support
                   46937: dozens if not upwards of a hundred distinct character
                   46938: encodings.</p>
                   46939: <p>User agents must support the preferred MIME name of every
                   46940: character encoding they support that has a preferred MIME name, and
                   46941: should support all the IANA-registered aliases. <a href=
                   46942: "#references">[IANACHARSET]</a></p>
                   46943: <p>When <ins class="diff-new">comparing a string specifying a
                   46944: character encoding with the name or alias of a character encoding
                   46945: to determine if they are equal, user agents must ignore the all
                   46946: characters in the ranges U+0009 to U+000D, U+0020 to U+002F, U+003A
                   46947: to U+0040, U+005B to U+0060, and U+007B to U+007E (all whitespace
                   46948: and punctuation characters in ASCII) in both names, and then
                   46949: perform the comparison case-insensitively.</ins></p>
                   46950: <p class="example"><ins class="diff-new">For instance, "GB_2312-80"
                   46951: and "g.b.2312(80)" are considered equivalent names.</ins></p>
                   46952: <p><ins class="diff-new">When</ins> a user agent would otherwise
                   46953: use <ins class="diff-new">an encoding given in</ins> the
                   46954: <del class="diff-old">ISO-8859-1 encoding,</del> <ins class=
                   46955: "diff-chg">first column of the following table,</ins> it must
                   46956: instead use the <ins class="diff-new">encoding given in the cell in
                   46957: the second column of the same row. Any bytes that are treated
                   46958: differently due to this encoding aliasing must be considered</ins>
                   46959: <a href="#parse1" title="parse error"><ins class="diff-new">parse
                   46960: errors</ins></a> .</p>
                   46961: <table>
                   46962: <caption><ins class="diff-new">Character encoding
                   46963: overrides</ins></caption>
                   46964: <thead>
                   46965: <tr>
                   46966: <th><ins class="diff-new">Input encoding</ins></th>
                   46967: <th><ins class="diff-new">Replacement encoding</ins></th>
                   46968: <th><ins class="diff-new">References</ins></th>
                   46969: </tr>
                   46970: </thead>
                   46971: <tbody>
                   46972: <tr>
                   46973: <td><ins class="diff-new">EUC-KR</ins></td>
                   46974: <td><ins class="diff-new">Windows-949</ins></td>
                   46975: <td><a href="#references"><ins class="diff-new">[EUCKR]</ins></a>
                   46976: <a href="#references"><ins class="diff-new">[WIN949]</ins></a></td>
                   46977: </tr>
                   46978: <tr>
                   46979: <td><ins class="diff-new">GB2312</ins></td>
                   46980: <td><ins class="diff-new">GBK</ins></td>
                   46981: <td><a href="#references"><ins class="diff-new">[GB2312]</ins></a>
                   46982: <a href="#references"><ins class="diff-new">[GBK]</ins></a></td>
                   46983: </tr>
                   46984: <tr>
                   46985: <td><ins class="diff-new">GB_2312-80</ins></td>
                   46986: <td><ins class="diff-new">GBK</ins></td>
                   46987: <td><a href="#references"><ins class="diff-new">[RFC1345]</ins></a>
                   46988: <a href="#references"><ins class="diff-new">[GBK]</ins></a></td>
                   46989: </tr>
                   46990: <tr>
                   46991: <td><ins class="diff-new">ISO-8859-1</ins></td>
                   46992: <td>Windows-1252 <del class="diff-old">encoding.</del></td>
                   46993: <td><a href="#references"><ins class="diff-chg">[RFC1345]</ins></a>
                   46994: <a href="#references"><ins class=
                   46995: "diff-chg">[WIN1252]</ins></a></td>
                   46996: </tr>
                   46997: <tr>
                   46998: <td><ins class="diff-chg">ISO-8859-9</ins></td>
                   46999: <td><ins class="diff-chg">Windows-1254</ins></td>
                   47000: <td><a href="#references"><ins class="diff-chg">[RFC1345]</ins></a>
                   47001: <a href="#references"><ins class=
                   47002: "diff-chg">[WIN1254]</ins></a></td>
                   47003: </tr>
                   47004: <tr>
                   47005: <td><ins class="diff-chg">ISO-8859-11</ins></td>
                   47006: <td><ins class="diff-chg">Windows-874</ins></td>
                   47007: <td><a href="#references"><ins class=
                   47008: "diff-chg">[ISO885911]</ins></a> <a href="#references"><ins class=
                   47009: "diff-chg">[WIN874]</ins></a></td>
                   47010: </tr>
                   47011: <tr>
                   47012: <td><ins class="diff-chg">KS_C_5601-1987</ins></td>
                   47013: <td><ins class="diff-chg">Windows-949</ins></td>
                   47014: <td><a href="#references"><ins class="diff-chg">[RFC1345]</ins></a>
                   47015: <a href="#references"><ins class="diff-chg">[WIN949]</ins></a></td>
                   47016: </tr>
                   47017: <tr>
                   47018: <td><ins class="diff-chg">TIS-620</ins></td>
                   47019: <td><ins class="diff-chg">Windows-874</ins></td>
                   47020: <td><a href="#references"><ins class="diff-chg">[TIS620]</ins></a>
                   47021: <a href="#references"><ins class="diff-chg">[WIN874]</ins></a></td>
                   47022: </tr>
                   47023: <tr>
                   47024: <td><ins class="diff-chg">x-x-big5</ins></td>
                   47025: <td><ins class="diff-chg">Big5</ins></td>
                   47026: <td><a href="#references"><ins class=
                   47027: "diff-chg">[BIG5]</ins></a></td>
                   47028: </tr>
                   47029: </tbody>
                   47030: </table>
                   47031: <p class="note"><del class="diff-old">This</del> <ins class=
                   47032: "diff-chg">The</ins> requirement <ins class="diff-new">to treat
                   47033: certain encodings as other encodings according to the table
                   47034: above</ins> is a willful violation of the W3C Character Model
                   47035: specification. <a href="#references">[CHARMOD]</a></p>
                   47036: <p>User agents must not support the CESU-8, UTF-7, BOCU-1 and SCSU
                   47037: encodings. <a href="#references">[CESU8]</a> <a href=
                   47038: "#references">[UTF7]</a> <a href="#references">[BOCU1]</a> <a href=
                   47039: "#references">[SCSU]</a></p>
                   47040: <p>Support for UTF-32 is not recommended. This encoding is rarely
                   47041: used, and frequently misimplemented.</p>
                   47042: <p class="note"><ins class="diff-new">This specification does not
                   47043: make any attempt to support UTF-32 in its algorithms; support and
                   47044: use of UTF-32 can thus lead to unexpected behavior in
                   47045: implementations of this specification.</ins></p>
                   47046: <h5 id="preprocessing"><span class="secno">8.2.2.3.</span>
                   47047: Preprocessing the input stream</h5>
                   47048: <p>Given an encoding, the bytes in the input stream must be
                   47049: converted to Unicode characters for the tokeniser, as described by
                   47050: the rules for that encoding, except that <ins class=
                   47051: "diff-new">the</ins> leading U+FEFF BYTE ORDER MARK <del class=
                   47052: "diff-old">characters</del> <ins class="diff-chg">character, if
                   47053: any,</ins> must not be stripped by the encoding <del class=
                   47054: "diff-old">layer.</del> <ins class="diff-chg">layer (it is stripped
                   47055: by the rule below).</ins></p>
                   47056: <p>Bytes or sequences of bytes in the original byte stream that
                   47057: could not be converted to Unicode characters must be converted to
                   47058: U+FFFD REPLACEMENT CHARACTER code points.</p>
                   47059: <p class="note"><ins class="diff-new">Bytes or sequences of bytes
                   47060: in the original byte stream that did not conform to the encoding
                   47061: specification (e.g. invalid UTF-8 byte sequences in a UTF-8 input
                   47062: stream) are errors that conformance checkers are expected to
                   47063: report.</ins></p>
                   47064: <p>One leading U+FEFF BYTE ORDER MARK character must be ignored if
                   47065: any are present.</p>
                   47066: <p>All U+0000 NULL characters in the input must be replaced by
                   47067: U+FFFD REPLACEMENT CHARACTERs. Any occurrences of such characters
                   47068: is a <a href="#parse1">parse error</a> .</p>
                   47069: <p><ins class="diff-new">Any occurrences of any characters in the
                   47070: ranges U+0001 to U+0008, U+000E to U+001F, U+007F to U+009F, U+D800
                   47071: to U+DFFF , U+FDD0 to U+FDDF, and characters U+FFFE, U+FFFF,
                   47072: U+1FFFE, U+1FFFF, U+2FFFE, U+2FFFF, U+3FFFE, U+3FFFF, U+4FFFE,
                   47073: U+4FFFF, U+5FFFE, U+5FFFF, U+6FFFE, U+6FFFF, U+7FFFE, U+7FFFF,
                   47074: U+8FFFE, U+8FFFF, U+9FFFE, U+9FFFF, U+AFFFE, U+AFFFF, U+BFFFE,
                   47075: U+BFFFF, U+CFFFE, U+CFFFF, U+DFFFE, U+DFFFF, U+EFFFE, U+EFFFF,
                   47076: U+FFFFE, U+FFFFF, U+10FFFE, and U+10FFFF are</ins> <a href=
                   47077: "#parse1" title="parse error"><ins class="diff-new">parse
                   47078: errors</ins></a> .<ins class="diff-new">(These are all control
                   47079: characters or permanently undefined Unicode characters.)</ins></p>
                   47080: <p>U+000D CARRIAGE RETURN (CR) characters, and U+000A LINE FEED
                   47081: (LF) characters, are treated specially. Any CR characters that are
                   47082: followed by LF characters must be removed, and any CR characters
                   47083: not followed by LF characters must be converted to LF characters.
                   47084: Thus, newlines in HTML DOMs are represented by LF characters, and
                   47085: there are never any CR characters in the input to the <a href=
                   47086: "#tokenisation0">tokenisation</a> stage.</p>
                   47087: <p>The <dfn id="next-input">next input character</dfn> is the first
                   47088: character in the input stream that has not yet been <dfn id=
                   47089: "consumed">consumed</dfn> . Initially, the <em><a href=
                   47090: "#next-input">next input character</a></em> is the first character
                   47091: in the input.</p>
                   47092: <p>The <dfn id="insertion">insertion point</dfn> is the position
                   47093: (just before a character or just before the end of the input
                   47094: stream) where content inserted using <code title=
                   47095: "dom-document-write-HTML"><a href=
                   47096: "#document.write...">document.write()</a></code> is actually
                   47097: inserted. The insertion point is relative to the position of the
                   47098: character immediately after it, it is not an absolute offset into
                   47099: the input stream. Initially, the insertion point is <del class=
                   47100: "diff-old">uninitialised.</del> <ins class=
                   47101: "diff-chg">uninitialized.</ins></p>
                   47102: <p>The "EOF" character in the tables below is a conceptual
                   47103: character representing the end of the <a href="#input0">input
                   47104: stream</a> . If the parser is a <a href=
                   47105: "#script-created">script-created parser</a> , then the end of the
                   47106: <a href="#input0">input stream</a> is reached when an <dfn id=
                   47107: "explicit0">explicit "EOF" character</dfn> (inserted by the
                   47108: <code title="dom-document-close"><a href=
                   47109: "#close">document.close()</a></code> method) is consumed.
                   47110: Otherwise, the "EOF" character is not a real character in the
                   47111: stream, but rather the lack of any further characters.</p>
                   47112: <h5 id="changing"><span class="secno">8.2.2.4.</span> Changing the
                   47113: encoding while parsing</h5>
                   47114: <p>When the parser requires the user agent to <dfn id=
                   47115: "change">change the encoding</dfn> , it must run the following
                   47116: steps. This might happen if the <a href="#encoding0">encoding
                   47117: sniffing algorithm</a> described above failed to find an encoding,
                   47118: or if it found an encoding that was not the actual encoding of the
                   47119: file.</p>
                   47120: <ol>
                   47121: <li>If the new encoding is <del class="diff-old">UTF-16,</del>
                   47122: <ins class="diff-chg">a UTF-16 encoding,</ins> change it to
                   47123: UTF-8.</li>
                   47124: <li>If the new encoding is identical or equivalent to the encoding
                   47125: that is already being used to interpret the input stream, then set
                   47126: the <a href="#confidence" title=
                   47127: "concept-encoding-confidence">confidence</a> to <i>confident</i>
                   47128: and abort these steps. This happens when the encoding information
                   47129: found in the file matches what the <a href="#encoding0">encoding
                   47130: sniffing algorithm</a> determined to be the encoding, and in the
                   47131: second pass through the parser if the first pass found that the
                   47132: encoding sniffing algorithm described in the earlier section failed
                   47133: to find the right encoding.</li>
                   47134: <li>If all the bytes up to the last byte converted by the current
                   47135: decoder have the same Unicode interpretations in both the current
                   47136: encoding and the new encoding, and if the user agent supports
                   47137: changing the converter on the fly, then the user agent may change
                   47138: to the new converter for the encoding on the fly. Set the <a href=
1.2     ! mike     47139: "#character1"><ins class="diff-new">document's character</ins>
        !          47140: encoding</a> <ins class="diff-new">and the encoding used to convert
        !          47141: the input stream</ins> to the new encoding, set the <a href=
        !          47142: "#confidence" title="concept-encoding-confidence">confidence</a> to
        !          47143: <i>confident</i> , and abort these steps.</li>
1.1       mike     47144: <li>Otherwise, <a href="#navigate">navigate</a> to the document
                   47145: again, with <a href="#replacement">replacement enabled</a> ,
                   47146: <ins class="diff-new">and using the same</ins> <a href=
                   47147: "#source0"><ins class="diff-new">source browsing context</ins></a>
                   47148: , but this time skip the <a href="#encoding0">encoding sniffing
                   47149: algorithm</a> and instead just set the encoding to the new encoding
                   47150: and the <a href="#confidence" title=
                   47151: "concept-encoding-confidence">confidence</a> to <i>confident</i> .
                   47152: Whenever possible, this should be done without actually contacting
                   47153: the network layer (the bytes should be re-parsed from memory), even
                   47154: if, e.g., the document is marked as not being cacheable.</li>
                   47155: </ol>
                   47156: <del class="diff-old">While</del>
                   47157: <h4 id="parse"><span class="secno"><ins class=
                   47158: "diff-chg">8.2.3</ins></span> <ins class="diff-chg">Parse
                   47159: state</ins></h4>
                   47160: <h5 id="the-insertion"><span class="secno"><ins class=
                   47161: "diff-chg">8.2.3.1.</ins></span> <ins class="diff-chg">The
                   47162: insertion mode</ins></h5>
                   47163: <p><ins class="diff-chg">Initially</ins> the <del class=
                   47164: "diff-old">invocation</del> <span><ins class="diff-chg">insertion
                   47165: mode</ins></span> <ins class="diff-chg">is "</ins> <a href=
                   47166: "#initial" title="insertion mode: initial"><ins class=
                   47167: "diff-chg">initial</ins></a> <ins class="diff-chg">". It can change
                   47168: to "</ins> <a href="#before4" title=
                   47169: "insertion mode: before html"><ins class="diff-chg">before
                   47170: html</ins></a> <ins class="diff-chg">", "</ins> <a href="#before5"
                   47171: title="insertion mode: before head"><ins class="diff-chg">before
                   47172: head</ins></a> <ins class="diff-chg">", "</ins> <a href="#in-head"
                   47173: title="insertion mode: in head"><ins class="diff-chg">in
                   47174: head</ins></a> <ins class="diff-chg">", "</ins> <a href="#in-head0"
                   47175: title="insertion mode: in head noscript"><ins class="diff-chg">in
                   47176: head noscript</ins></a> <ins class="diff-chg">", "</ins> <a href=
                   47177: "#after4" title="insertion mode: after head"><ins class=
                   47178: "diff-chg">after head</ins></a> <ins class="diff-chg">", "</ins>
                   47179: <a href="#in-body" title="insertion mode: in body"><ins class=
                   47180: "diff-chg">in body</ins></a> <ins class="diff-chg">", "</ins>
                   47181: <a href="#in-table" title="insertion mode: in table"><ins class=
                   47182: "diff-chg">in table</ins></a> <ins class="diff-chg">", "</ins>
                   47183: <a href="#in-caption" title=
                   47184: "insertion mode: in caption"><ins class="diff-chg">in
                   47185: caption</ins></a> <ins class="diff-chg">", "</ins> <a href=
                   47186: "#in-column" title="insertion mode: in column group"><ins class=
                   47187: "diff-chg">in column group</ins></a> <ins class="diff-chg">",
                   47188: "</ins> <a href="#in-table0" title=
                   47189: "insertion mode: in table body"><ins class="diff-chg">in table
                   47190: body</ins></a> <ins class="diff-chg">", "</ins> <a href="#in-row"
                   47191: title="insertion mode: in row"><ins class="diff-chg">in
                   47192: row</ins></a> <ins class="diff-chg">", "</ins> <a href="#in-cell"
                   47193: title="insertion mode: in cell"><ins class="diff-chg">in
                   47194: cell</ins></a> <ins class="diff-chg">", "</ins> <a href=
                   47195: "#in-select" title="insertion mode: in select"><ins class=
                   47196: "diff-chg">in select</ins></a> <ins class="diff-chg">", "</ins>
                   47197: <a href="#in-select0" title=
                   47198: "insertion mode: in select in table"><ins class="diff-chg">in
                   47199: select in table</ins></a> <ins class="diff-chg">", "</ins> <a href=
                   47200: "#in-foreign" title=
                   47201: "insertion mode: in foreign content"><ins class="diff-chg">in
                   47202: foreign content</ins></a> <ins class="diff-chg">", "</ins> <a href=
                   47203: "#after5" title="insertion mode: after body"><ins class=
                   47204: "diff-chg">after body</ins></a> <ins class="diff-chg">", "</ins>
                   47205: <a href="#in-frameset" title=
                   47206: "insertion mode: in frameset"><ins class="diff-chg">in
                   47207: frameset</ins></a> <ins class="diff-chg">", "</ins> <a href=
                   47208: "#after6" title="insertion mode: after frameset"><ins class=
                   47209: "diff-chg">after frameset</ins></a> <ins class="diff-chg">",
                   47210: "</ins> <a href="#after7" title=
                   47211: "insertion mode: after after body"><ins class="diff-chg">after
                   47212: after body</ins></a> <ins class="diff-chg">", and "</ins> <a href=
                   47213: "#after8" title="insertion mode: after after frameset"><ins class=
                   47214: "diff-chg">after after frameset</ins></a> <ins class="diff-chg">"
                   47215: during the course</ins> of <del class="diff-old">this</del>
                   47216: <ins class="diff-chg">the parsing, as described in the</ins>
                   47217: <a href="#tree-construction0"><ins class="diff-chg">tree
                   47218: construction</ins></a> <ins class="diff-chg">stage. The insertion
                   47219: mode affects how tokens are processed and whether CDATA blocks are
                   47220: supported.</ins></p>
                   47221: <p><ins class="diff-chg">Seven of these modes, namely "</ins>
                   47222: <a href="#in-head" title="insertion mode: in head"><ins class=
                   47223: "diff-chg">in head</ins></a> <ins class="diff-chg">", "</ins>
                   47224: <a href="#in-body" title="insertion mode: in body"><ins class=
                   47225: "diff-chg">in body</ins></a> <ins class="diff-chg">", "</ins>
                   47226: <a href="#in-table" title="insertion mode: in table"><ins class=
                   47227: "diff-chg">in table</ins></a> <ins class="diff-chg">", "</ins>
                   47228: <a href="#in-table0" title=
                   47229: "insertion mode: in table body"><ins class="diff-chg">in table
                   47230: body</ins></a> <ins class="diff-chg">", "</ins> <a href="#in-row"
                   47231: title="insertion mode: in row"><ins class="diff-chg">in
                   47232: row</ins></a> <ins class="diff-chg">", "</ins> <a href="#in-cell"
                   47233: title="insertion mode: in cell"><ins class="diff-chg">in
                   47234: cell</ins></a> <ins class="diff-chg">", and "</ins> <a href=
                   47235: "#in-select" title="insertion mode: in select"><ins class=
                   47236: "diff-chg">in select</ins></a> <ins class="diff-chg">", are
                   47237: special, in that the other modes defer to them at various times.
                   47238: When the</ins> algorithm <ins class="diff-new">below says that the
                   47239: user agent is to do something "</ins> <dfn id="using8"><ins class=
                   47240: "diff-new">using the rules for</ins></dfn> <ins class=
                   47241: "diff-new">the</ins> <var title=""><ins class=
                   47242: "diff-new">m</ins></var> <ins class="diff-new">insertion mode",
                   47243: where</ins> <var title=""><ins class="diff-new">m</ins></var>
                   47244: <ins class="diff-new">is one of these modes, the user agent must
                   47245: use the rules described under that</ins> <span><ins class=
                   47246: "diff-new">insertion mode</ins></span> <ins class="diff-new">'s
                   47247: section, but must leave the</ins> <span><ins class=
                   47248: "diff-new">insertion mode</ins></span> <ins class=
                   47249: "diff-new">unchanged (unless the rules in that section themselves
                   47250: switch the</ins> <span><ins class="diff-new">insertion
                   47251: mode</ins></span> <ins class="diff-new">).</ins></p>
                   47252: <p><ins class="diff-new">When the insertion mode is switched to
                   47253: "</ins> <a href="#in-foreign" title=
                   47254: "insertion mode: in foreign content"><ins class="diff-new">in
                   47255: foreign content</ins></a> <ins class="diff-new">", the</ins>
                   47256: <dfn id="secondary1"><ins class="diff-new">secondary insertion
                   47257: mode</ins></dfn> <ins class="diff-new">is also set. This secondary
1.2     ! mike     47258: mode is used within the rules for the "</ins> <a href="#in-foreign"
        !          47259: title="insertion mode: in foreign content"><ins class="diff-new">in
1.1       mike     47260: foreign content</ins></a> <ins class="diff-new">" mode to handle
1.2     ! mike     47261: HTML (i.e. not foreign) content.</ins></p>
1.1       mike     47262: <p><ins class="diff-new">When the steps below require the UA
                   47263: to</ins> <dfn id="reset"><ins class="diff-new">reset the insertion
                   47264: mode appropriately</ins></dfn> ,<ins class="diff-new">it means the
                   47265: UA must follow these steps:</ins></p>
                   47266: <ol>
                   47267: <li><ins class="diff-new">Let</ins> <var title=""><ins class=
                   47268: "diff-new">last</ins></var> <ins class="diff-new">be
                   47269: false.</ins></li>
                   47270: <li><ins class="diff-new">Let</ins> <var title=""><ins class=
                   47271: "diff-new">node</ins></var> <ins class="diff-new">be the last node
                   47272: in the</ins> <a href="#stack"><ins class="diff-new">stack of open
                   47273: elements</ins></a> .</li>
                   47274: <li><ins class="diff-new">If</ins> <var title=""><ins class=
                   47275: "diff-new">node</ins></var> <ins class="diff-new">is the first node
                   47276: in the stack of open elements, then set</ins> <var title=
                   47277: ""><ins class="diff-new">last</ins></var> <ins class="diff-new">to
                   47278: true and set</ins> <var title=""><ins class=
                   47279: "diff-new">node</ins></var> <ins class="diff-new">to the</ins>
                   47280: <var title=""><ins class="diff-new">context</ins></var> <ins class=
                   47281: "diff-new">element. (</ins> <a href="#fragment"><ins class=
                   47282: "diff-new">fragment case</ins></a> <ins class=
                   47283: "diff-new">)</ins></li>
                   47284: <li><ins class="diff-new">If</ins> <var title=""><ins class=
1.2     ! mike     47285: "diff-new">node</ins></var> <ins class="diff-new">is a</ins>
        !          47286: <code><ins class="diff-new">select</ins></code> <ins class=
        !          47287: "diff-new">element, then switch the</ins> <span><ins class=
        !          47288: "diff-new">insertion mode</ins></span> <ins class="diff-new">to
        !          47289: "</ins> <a href="#in-select" title=
        !          47290: "insertion mode: in select"><ins class="diff-new">in
        !          47291: select</ins></a> <ins class="diff-new">" and abort these steps.
        !          47292: (</ins> <a href="#fragment"><ins class="diff-new">fragment
        !          47293: case</ins></a> <ins class="diff-new">)</ins></li>
        !          47294: <li><ins class="diff-new">If</ins> <var title=""><ins class=
        !          47295: "diff-new">node</ins></var> <ins class="diff-new">is a</ins>
        !          47296: <code><a href="#td"><ins class="diff-new">td</ins></a></code>
        !          47297: <ins class="diff-new">or</ins> <code><a href="#th"><ins class=
        !          47298: "diff-new">th</ins></a></code> <ins class="diff-new">element
        !          47299: and</ins> <var title=""><ins class="diff-new">last</ins></var> is
        !          47300: <ins class="diff-new">false, then switch the</ins>
        !          47301: <span><ins class="diff-new">insertion mode</ins></span> <ins class=
        !          47302: "diff-new">to "</ins> <a href="#in-cell" title=
        !          47303: "insertion mode: in cell"><ins class="diff-new">in cell</ins></a>
        !          47304: <ins class="diff-new">" and abort these steps.</ins></li>
        !          47305: <li><ins class="diff-new">If</ins> <var title=""><ins class=
        !          47306: "diff-new">node</ins></var> <ins class="diff-new">is a</ins>
        !          47307: <code><a href="#tr"><ins class="diff-new">tr</ins></a></code>
        !          47308: <ins class="diff-new">element, then switch the</ins>
        !          47309: <span><ins class="diff-new">insertion mode</ins></span> <ins class=
        !          47310: "diff-new">to "</ins> <a href="#in-row" title=
        !          47311: "insertion mode: in row"><ins class="diff-new">in row</ins></a>
        !          47312: <ins class="diff-new">" and abort these steps.</ins></li>
        !          47313: <li><ins class="diff-new">If</ins> <var title=""><ins class=
        !          47314: "diff-new">node</ins></var> <ins class="diff-new">is a</ins>
        !          47315: <code><a href="#tbody"><ins class="diff-new">tbody</ins></a></code>
1.1       mike     47316: ,<code><a href="#thead0"><ins class=
1.2     ! mike     47317: "diff-new">thead</ins></a></code> ,<ins class="diff-new">or</ins>
1.1       mike     47318: <code><a href="#tfoot0"><ins class=
1.2     ! mike     47319: "diff-new">tfoot</ins></a></code> <ins class="diff-new">element,
        !          47320: then switch the</ins> <span><ins class="diff-new">insertion
        !          47321: mode</ins></span> <ins class="diff-new">to "</ins> <a href=
1.1       mike     47322: "#in-table0" title="insertion mode: in table body"><ins class=
1.2     ! mike     47323: "diff-new">in table body</ins></a> <ins class="diff-new">" and
1.1       mike     47324: abort these steps.</ins></li>
1.2     ! mike     47325: <li><ins class="diff-new">If</ins> <var title=""><ins class=
        !          47326: "diff-new">node</ins></var> <ins class="diff-new">is a</ins>
1.1       mike     47327: <code><a href="#caption0"><ins class=
1.2     ! mike     47328: "diff-new">caption</ins></a></code> <ins class="diff-new">element,
        !          47329: then switch the</ins> <span><ins class="diff-new">insertion
        !          47330: mode</ins></span> <ins class="diff-new">to "</ins> <a href=
1.1       mike     47331: "#in-caption" title="insertion mode: in caption"><ins class=
1.2     ! mike     47332: "diff-new">in caption</ins></a> <ins class="diff-new">" and abort
1.1       mike     47333: these steps.</ins></li>
1.2     ! mike     47334: <li><ins class="diff-new">If</ins> <var title=""><ins class=
        !          47335: "diff-new">node</ins></var> <ins class="diff-new">is a</ins>
1.1       mike     47336: <code><a href="#colgroup"><ins class=
1.2     ! mike     47337: "diff-new">colgroup</ins></a></code> <ins class="diff-new">element,
        !          47338: then switch the</ins> <span><ins class="diff-new">insertion
        !          47339: mode</ins></span> <ins class="diff-new">to "</ins> <a href=
1.1       mike     47340: "#in-column" title="insertion mode: in column group"><ins class=
1.2     ! mike     47341: "diff-new">in column group</ins></a> <ins class="diff-new">" and
1.1       mike     47342: abort these steps. (</ins> <a href="#fragment"><ins class=
1.2     ! mike     47343: "diff-new">fragment case</ins></a> <ins class=
        !          47344: "diff-new">)</ins></li>
        !          47345: <li><ins class="diff-new">If</ins> <var title=""><ins class=
        !          47346: "diff-new">node</ins></var> <ins class="diff-new">is a</ins>
        !          47347: <code><a href="#table"><ins class="diff-new">table</ins></a></code>
        !          47348: <ins class="diff-new">element, then switch the</ins>
        !          47349: <span><ins class="diff-new">insertion mode</ins></span> <ins class=
        !          47350: "diff-new">to "</ins> <a href="#in-table" title=
        !          47351: "insertion mode: in table"><ins class="diff-new">in table</ins></a>
        !          47352: <ins class="diff-new">" and abort these steps.</ins></li>
        !          47353: <li><ins class="diff-new">If</ins> <var title=""><ins class=
        !          47354: "diff-new">node</ins></var> <ins class="diff-new">is an element
        !          47355: from the</ins> <a href="#mathml0"><ins class="diff-new">MathML
        !          47356: namespace</ins></a> ,<ins class="diff-new">then switch the</ins>
        !          47357: <span><ins class="diff-new">insertion mode</ins></span> <ins class=
        !          47358: "diff-new">to "</ins> <a href="#in-foreign" title=
        !          47359: "insertion mode: in foreign content"><ins class="diff-new">in
        !          47360: foreign content</ins></a> <ins class="diff-new">", let the</ins>
        !          47361: <a href="#secondary1"><ins class="diff-new">secondary insertion
        !          47362: mode</ins></a> <ins class="diff-new">be "</ins> <a href="#in-body"
        !          47363: title="insertion mode: in body"><ins class="diff-new">in
        !          47364: body</ins></a> <ins class="diff-new">", and abort these
1.1       mike     47365: steps.</ins></li>
1.2     ! mike     47366: <li><ins class="diff-new">If</ins> <var title=""><ins class=
        !          47367: "diff-new">node</ins></var> <ins class="diff-new">is a</ins>
        !          47368: <code><a href="#head"><ins class="diff-new">head</ins></a></code>
        !          47369: <ins class="diff-new">element, then switch the</ins>
        !          47370: <span><ins class="diff-new">insertion mode</ins></span> <ins class=
        !          47371: "diff-new">to "</ins> <a href="#in-body" title=
        !          47372: "insertion mode: in body"><ins class="diff-new">in body</ins></a>
        !          47373: <ins class="diff-new">" ("</ins> <a href="#in-body" title=
        !          47374: "insertion mode: in body"><ins class="diff-new">in body</ins></a>
        !          47375: <ins class="diff-new">"!</ins> <em>not <ins class=
        !          47376: "diff-new">"</ins> <a href="#in-head" title=
        !          47377: "insertion mode: in head"><ins class="diff-new">in head</ins></a>
        !          47378: <ins class="diff-new">"</ins></em> !)<ins class="diff-new">and
1.1       mike     47379: abort these steps. (</ins> <a href="#fragment"><ins class=
1.2     ! mike     47380: "diff-new">fragment case</ins></a> <ins class=
        !          47381: "diff-new">)</ins></li>
        !          47382: <li><ins class="diff-new">If</ins> <var title=""><ins class=
        !          47383: "diff-new">node</ins></var> <ins class="diff-new">is</ins> a
        !          47384: <del class="diff-old">parse error,</del> <code><a href=
        !          47385: "#body0"><ins class="diff-chg">body</ins></a></code> <ins class=
        !          47386: "diff-chg">element, then switch the</ins> <span><ins class=
        !          47387: "diff-chg">insertion mode</ins></span> <ins class="diff-chg">to
        !          47388: "</ins> <a href="#in-body" title=
1.1       mike     47389: "insertion mode: in body"><ins class="diff-chg">in body</ins></a>
                   47390: <ins class="diff-chg">" and abort these steps.</ins></li>
                   47391: <li><ins class="diff-chg">If</ins> <var title=""><ins class=
                   47392: "diff-chg">node</ins></var> <ins class="diff-chg">is a</ins>
                   47393: <code><ins class="diff-chg">frameset</ins></code> <ins class=
                   47394: "diff-chg">element, then switch the</ins> <span><ins class=
                   47395: "diff-chg">insertion mode</ins></span> <ins class="diff-chg">to
                   47396: "</ins> <a href="#in-frameset" title=
                   47397: "insertion mode: in frameset"><ins class="diff-chg">in
                   47398: frameset</ins></a> <ins class="diff-chg">" and abort these steps.
                   47399: (</ins> <a href="#fragment"><ins class="diff-chg">fragment
                   47400: case</ins></a> <ins class="diff-chg">)</ins></li>
                   47401: <li><ins class="diff-chg">If</ins> <var title=""><ins class=
                   47402: "diff-chg">node</ins></var> <ins class="diff-chg">is an</ins>
                   47403: <code><a href="#html"><ins class="diff-chg">html</ins></a></code>
                   47404: <ins class="diff-chg">element, then: if the</ins> <a href=
                   47405: "#head-element"><code title=""><ins class=
                   47406: "diff-chg">head</ins></code> <ins class="diff-chg">element
                   47407: pointer</ins></a> <ins class="diff-chg">is null, switch the</ins>
                   47408: <span><ins class="diff-chg">insertion mode</ins></span> <ins class=
                   47409: "diff-chg">to "</ins> <a href="#before5" title=
                   47410: "insertion mode: before head"><ins class="diff-chg">before
                   47411: head</ins></a> <ins class="diff-chg">", otherwise, switch the</ins>
                   47412: <span><ins class="diff-chg">insertion mode</ins></span> <ins class=
                   47413: "diff-chg">to "</ins> <a href="#after4" title=
                   47414: "insertion mode: after head"><ins class="diff-chg">after
                   47415: head</ins></a> <ins class="diff-chg">". In either case, abort these
                   47416: steps. (</ins> <a href="#fragment"><ins class="diff-chg">fragment
                   47417: case</ins></a> <ins class="diff-chg">)</ins></li>
                   47418: <li><ins class="diff-chg">If</ins> <var title=""><ins class=
                   47419: "diff-chg">last</ins></var> <ins class="diff-chg">is true, then
                   47420: switch the</ins> <span><ins class="diff-chg">insertion
                   47421: mode</ins></span> <ins class="diff-chg">to "</ins> <a href=
                   47422: "#in-body" title="insertion mode: in body"><ins class="diff-chg">in
                   47423: body</ins></a> <ins class="diff-chg">" and abort these steps.
                   47424: (</ins> <a href="#fragment"><ins class="diff-chg">fragment
                   47425: case</ins></a> <ins class="diff-chg">)</ins></li>
                   47426: <li><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   47427: "diff-chg">node</ins></var> <ins class="diff-chg">now be the node
                   47428: before</ins> <var title=""><ins class="diff-chg">node</ins></var>
                   47429: <ins class="diff-chg">in the</ins> <a href="#stack"><ins class=
                   47430: "diff-chg">stack of open elements</ins></a> .</li>
                   47431: <li><ins class="diff-chg">Return to step 3.</ins></li>
                   47432: </ol>
                   47433: <h5 id="the-stack"><span class="secno"><ins class=
                   47434: "diff-chg">8.2.3.2.</ins></span> <ins class="diff-chg">The stack of
                   47435: open elements</ins></h5>
                   47436: <p><ins class="diff-chg">Initially the</ins> <dfn id=
                   47437: "stack"><ins class="diff-chg">stack of open elements</ins></dfn>
                   47438: <ins class="diff-chg">is empty. The stack grows downwards; the
                   47439: topmost node on the stack is the first one added to the stack, and
                   47440: the bottommost node of the stack is the most recently added node in
                   47441: the stack (notwithstanding when the stack is manipulated in a
                   47442: random access fashion as part of</ins> <a href=
                   47443: "#adoptionAgency"><ins class="diff-chg">the handling for misnested
                   47444: tags</ins></a> <ins class="diff-chg">).</ins></p>
                   47445: <p><ins class="diff-chg">The "</ins> <a href="#before4" title=
                   47446: "insertion mode: before html"><ins class="diff-chg">before
                   47447: html</ins></a> <ins class="diff-chg">"</ins> <span><ins class=
                   47448: "diff-chg">insertion mode</ins></span> <ins class=
                   47449: "diff-chg">creates the</ins> <code><a href="#html"><ins class=
                   47450: "diff-chg">html</ins></a></code> <ins class="diff-chg">root element
                   47451: node, which is then added to the stack.</ins></p>
                   47452: <p><ins class="diff-chg">In the</ins> <a href=
                   47453: "#fragment"><ins class="diff-chg">fragment case</ins></a>
                   47454: ,<ins class="diff-chg">the</ins> <a href="#stack"><ins class=
                   47455: "diff-chg">stack of open elements</ins></a> <ins class=
                   47456: "diff-chg">is initialized to contain an</ins> <code><a href=
                   47457: "#html"><ins class="diff-chg">html</ins></a></code> <ins class=
                   47458: "diff-chg">element that is created as part of</ins> <a href=
                   47459: "#html-fragment0" title=
                   47460: "html fragment parsing algorithm"><ins class="diff-chg">that
                   47461: algorithm</ins></a> .<ins class="diff-chg">(The</ins> <a href=
                   47462: "#fragment"><ins class="diff-chg">fragment case</ins></a>
                   47463: <ins class="diff-chg">skips the "</ins> <a href="#before4" title=
                   47464: "insertion mode: before html"><ins class="diff-chg">before
                   47465: html</ins></a> <ins class="diff-chg">"</ins> <span><ins class=
                   47466: "diff-chg">insertion mode</ins></span> .)</p>
                   47467: <p><ins class="diff-chg">The</ins> <code><a href=
                   47468: "#html"><ins class="diff-chg">html</ins></a></code> <ins class=
                   47469: "diff-chg">node, however</ins> it is <del class="diff-old">still
                   47470: indicative</del> <ins class="diff-chg">created, is the topmost
                   47471: node</ins> of <del class="diff-old">non-conforming</del>
                   47472: <ins class="diff-chg">the stack. It never gets popped off the
                   47473: stack.</ins></p>
                   47474: <p><ins class="diff-chg">The</ins> <dfn id="current5"><ins class=
                   47475: "diff-chg">current node</ins></dfn> <ins class="diff-chg">is the
                   47476: bottommost node in this stack.</ins></p>
                   47477: <p><ins class="diff-chg">The</ins> <dfn id="current6"><ins class=
                   47478: "diff-chg">current table</ins></dfn> <ins class="diff-chg">is the
                   47479: last</ins> <code><a href="#table"><ins class=
                   47480: "diff-chg">table</ins></a></code> <ins class="diff-chg">element in
                   47481: the</ins> <a href="#stack"><ins class="diff-chg">stack of open
                   47482: elements</ins></a> ,<ins class="diff-chg">if there is one. If there
                   47483: is no</ins> <code><a href="#table"><ins class=
                   47484: "diff-chg">table</ins></a></code> <ins class="diff-chg">element in
                   47485: the</ins> <a href="#stack"><ins class="diff-chg">stack of open
                   47486: elements</ins></a> <ins class="diff-chg">(</ins> <a href=
                   47487: "#fragment"><ins class="diff-chg">fragment case</ins></a>
                   47488: <ins class="diff-chg">), then the</ins> <a href=
                   47489: "#current6"><ins class="diff-chg">current table</ins></a>
                   47490: <ins class="diff-chg">is the first element in the</ins> <a href=
                   47491: "#stack"><ins class="diff-chg">stack of open elements</ins></a>
                   47492: <ins class="diff-chg">(the</ins> <code><a href="#html"><ins class=
                   47493: "diff-chg">html</ins></a></code> <ins class=
                   47494: "diff-chg">element).</ins></p>
                   47495: <p><ins class="diff-chg">Elements in the stack fall into the
                   47496: following categories:</ins></p>
                   47497: <dl>
                   47498: <dt><dfn id="special"><ins class=
                   47499: "diff-chg">Special</ins></dfn></dt>
                   47500: <dd>
                   47501: <p><ins class="diff-chg">The following HTML elements have varying
                   47502: levels of special parsing rules:</ins> <code><a href=
                   47503: "#address"><ins class="diff-chg">address</ins></a></code>
                   47504: ,<code><a href="#area"><ins class="diff-chg">area</ins></a></code>
                   47505: ,<code><a href="#base"><ins class="diff-chg">base</ins></a></code>
                   47506: ,<code><ins class="diff-chg">basefont</ins></code>
                   47507: ,<code><ins class="diff-chg">bgsound</ins></code> ,<code><a href=
                   47508: "#blockquote"><ins class="diff-chg">blockquote</ins></a></code>
                   47509: ,<code><a href="#body0"><ins class="diff-chg">body</ins></a></code>
                   47510: ,<code><a href="#br"><ins class="diff-chg">br</ins></a></code>
                   47511: ,<code><ins class="diff-chg">center</ins></code> ,<code><a href=
                   47512: "#col"><ins class="diff-chg">col</ins></a></code> ,<code><a href=
                   47513: "#colgroup"><ins class="diff-chg">colgroup</ins></a></code>
                   47514: ,<code><a href="#dd"><ins class="diff-chg">dd</ins></a></code>
                   47515: ,<code><ins class="diff-chg">dir</ins></code> ,<code><a href=
                   47516: "#div"><ins class="diff-chg">div</ins></a></code> ,<code><a href=
                   47517: "#dl"><ins class="diff-chg">dl</ins></a></code> ,<code><a href=
                   47518: "#dt"><ins class="diff-chg">dt</ins></a></code> ,<code><a href=
                   47519: "#embed"><ins class="diff-chg">embed</ins></a></code>
                   47520: ,<code><ins class="diff-chg">fieldset</ins></code>
                   47521: ,<code><ins class="diff-chg">form</ins></code> ,<code><ins class=
                   47522: "diff-chg">frame</ins></code> ,<code><ins class=
                   47523: "diff-chg">frameset</ins></code> ,<code><a href="#h1"><ins class=
                   47524: "diff-chg">h1</ins></a></code> ,<code><a href="#h2"><ins class=
                   47525: "diff-chg">h2</ins></a></code> ,<code><a href="#h3"><ins class=
                   47526: "diff-chg">h3</ins></a></code> ,<code><a href="#h4"><ins class=
                   47527: "diff-chg">h4</ins></a></code> ,<code><a href="#h5"><ins class=
                   47528: "diff-chg">h5</ins></a></code> ,<code><a href="#h6"><ins class=
                   47529: "diff-chg">h6</ins></a></code> ,<code><a href="#head"><ins class=
                   47530: "diff-chg">head</ins></a></code> ,<code><a href="#hr"><ins class=
                   47531: "diff-chg">hr</ins></a></code> ,<code><a href="#iframe"><ins class=
1.2     ! mike     47532: "diff-chg">iframe</ins></a></code> ,<code><a href=
        !          47533: "#img"><ins class="diff-chg">img</ins></a></code>
1.1       mike     47534: ,<code><ins class="diff-chg">input</ins></code> ,<code><ins class=
                   47535: "diff-chg">isindex</ins></code> ,<code><a href="#li"><ins class=
                   47536: "diff-chg">li</ins></a></code> ,<code><a href="#link"><ins class=
                   47537: "diff-chg">link</ins></a></code> ,<code><ins class=
                   47538: "diff-chg">listing</ins></code> ,<code><a href="#menu"><ins class=
                   47539: "diff-chg">menu</ins></a></code> ,<code><a href=
                   47540: "#meta0"><ins class="diff-chg">meta</ins></a></code>
                   47541: ,<code><ins class="diff-chg">noembed</ins></code>
                   47542: ,<code><ins class="diff-chg">noframes</ins></code> ,<code><a href=
                   47543: "#noscript"><ins class="diff-chg">noscript</ins></a></code>
                   47544: ,<code><a href="#ol"><ins class="diff-chg">ol</ins></a></code>
                   47545: ,<code><ins class="diff-chg">optgroup</ins></code>
                   47546: ,<code><ins class="diff-chg">option</ins></code> ,<code><a href=
                   47547: "#p"><ins class="diff-chg">p</ins></a></code> ,<code><a href=
                   47548: "#param"><ins class="diff-chg">param</ins></a></code>
                   47549: ,<code><ins class="diff-chg">plaintext</ins></code> ,<code><a href=
                   47550: "#pre"><ins class="diff-chg">pre</ins></a></code> ,<code><a href=
                   47551: "#script1"><ins class="diff-chg">script</ins></a></code>
                   47552: ,<code><ins class="diff-chg">select</ins></code> ,<code><ins class=
                   47553: "diff-chg">spacer</ins></code> ,<code><a href="#style1"><ins class=
                   47554: "diff-chg">style</ins></a></code> ,<code><a href=
                   47555: "#tbody"><ins class="diff-chg">tbody</ins></a></code>
                   47556: ,<code><ins class="diff-chg">textarea</ins></code> ,<code><a href=
                   47557: "#tfoot0"><ins class="diff-chg">tfoot</ins></a></code>
                   47558: ,<code><a href="#thead0"><ins class=
                   47559: "diff-chg">thead</ins></a></code> ,<code><a href=
                   47560: "#title1"><ins class="diff-chg">title</ins></a></code>
                   47561: ,<code><a href="#tr"><ins class="diff-chg">tr</ins></a></code>
                   47562: ,<code><a href="#ul"><ins class="diff-chg">ul</ins></a></code>
                   47563: ,<ins class="diff-chg">and</ins> <code><ins class=
                   47564: "diff-chg">wbr</ins></code> .</p>
                   47565: </dd>
                   47566: <dt><dfn id="scoping"><ins class=
                   47567: "diff-chg">Scoping</ins></dfn></dt>
                   47568: <dd>
                   47569: <p><ins class="diff-chg">The following HTML elements introduce
                   47570: new</ins> <a href="#have-an" title=
                   47571: "has an element in scope"><ins class="diff-chg">scopes</ins></a>
                   47572: <ins class="diff-chg">for various parts of the parsing:</ins>
                   47573: <code><a href="#applet"><ins class=
                   47574: "diff-chg">applet</ins></a></code> ,<code><ins class=
                   47575: "diff-chg">button</ins></code> ,<code><a href=
                   47576: "#caption0"><ins class="diff-chg">caption</ins></a></code>
                   47577: ,<code><a href="#html"><ins class="diff-chg">html</ins></a></code>
                   47578: ,<code><ins class="diff-chg">marquee</ins></code> ,<code><a href=
                   47579: "#object"><ins class="diff-chg">object</ins></a></code>
                   47580: ,<code><a href="#table"><ins class=
                   47581: "diff-chg">table</ins></a></code> ,<code><a href="#td"><ins class=
                   47582: "diff-chg">td</ins></a></code> <ins class="diff-chg">and</ins>
                   47583: <code><a href="#th"><ins class="diff-chg">th</ins></a></code> .</p>
                   47584: </dd>
                   47585: <dt><dfn id="formatting"><ins class=
                   47586: "diff-chg">Formatting</ins></dfn></dt>
                   47587: <dd>
                   47588: <p><ins class="diff-chg">The following HTML elements are those that
                   47589: end up in the</ins> <a href="#list-of4"><ins class="diff-chg">list
                   47590: of active formatting elements</ins></a> :<code><a href=
                   47591: "#a"><ins class="diff-chg">a</ins></a></code> ,<code><a href=
                   47592: "#b"><ins class="diff-chg">b</ins></a></code> ,<code><ins class=
                   47593: "diff-chg">big</ins></code> ,<code><a href="#em"><ins class=
                   47594: "diff-chg">em</ins></a></code> ,<code><ins class=
                   47595: "diff-chg">font</ins></code> ,<code><a href="#i"><ins class=
                   47596: "diff-chg">i</ins></a></code> ,<code><ins class=
                   47597: "diff-chg">nobr</ins></code> ,<code><ins class=
                   47598: "diff-chg">s</ins></code> ,<code><a href="#small"><ins class=
                   47599: "diff-chg">small</ins></a></code> ,<code><ins class=
                   47600: "diff-chg">strike</ins></code> ,<code><a href="#strong"><ins class=
                   47601: "diff-chg">strong</ins></a></code> ,<code><ins class=
                   47602: "diff-chg">tt</ins></code> ,<ins class="diff-chg">and</ins>
                   47603: <code><ins class="diff-chg">u</ins></code> .</p>
                   47604: </dd>
                   47605: <dt><dfn id="phrasing1"><ins class=
                   47606: "diff-chg">Phrasing</ins></dfn></dt>
                   47607: <dd>
                   47608: <p><ins class="diff-chg">All other elements found while parsing an
                   47609: HTML document.</ins></p>
                   47610: </dd>
                   47611: </dl>
                   47612: <p class="big-issue"><ins class="diff-chg">Still need to add these
                   47613: new elements to the lists:</ins> <code><a href=
                   47614: "#event-source"><ins class="diff-chg">event-source</ins></a></code>
                   47615: ,<code><a href="#section"><ins class=
                   47616: "diff-chg">section</ins></a></code> ,<code><a href=
                   47617: "#nav"><ins class="diff-chg">nav</ins></a></code> ,<code><a href=
                   47618: "#article"><ins class="diff-chg">article</ins></a></code>
                   47619: ,<code><a href="#aside"><ins class=
                   47620: "diff-chg">aside</ins></a></code> ,<code><a href=
                   47621: "#header"><ins class="diff-chg">header</ins></a></code>
                   47622: ,<code><a href="#footer"><ins class=
                   47623: "diff-chg">footer</ins></a></code> ,<code><a href=
                   47624: "#datagrid0"><ins class="diff-chg">datagrid</ins></a></code>
                   47625: ,<code><a href="#command0"><ins class=
                   47626: "diff-chg">command</ins></a></code></p>
                   47627: <p><ins class="diff-chg">The</ins> <a href="#stack"><ins class=
                   47628: "diff-chg">stack of open elements</ins></a> <ins class=
                   47629: "diff-chg">is said to</ins> <dfn id="have-an" title=
                   47630: "has an element in scope"><ins class="diff-chg">have an element in
                   47631: scope</ins></dfn> <ins class="diff-chg">or</ins> <dfn id="have-an0"
                   47632: title="has an element in table scope"><ins class="diff-chg">have an
                   47633: element in</ins> <em><ins class="diff-chg">table
                   47634: scope</ins></em></dfn> <ins class="diff-chg">when the following
                   47635: algorithm terminates in a match state:</ins></p>
                   47636: <ol>
                   47637: <li>
                   47638: <p><ins class="diff-chg">Initialise</ins> <var title=""><ins class=
                   47639: "diff-chg">node</ins></var> <ins class="diff-chg">to be the</ins>
                   47640: <a href="#current5"><ins class="diff-chg">current node</ins></a>
                   47641: <ins class="diff-chg">(the bottommost node of the stack).</ins></p>
                   47642: </li>
                   47643: <li>
                   47644: <p><ins class="diff-chg">If</ins> <var title=""><ins class=
                   47645: "diff-chg">node</ins></var> <ins class="diff-chg">is the target
                   47646: node, terminate in a match state.</ins></p>
                   47647: </li>
                   47648: <li>
                   47649: <p><ins class="diff-chg">Otherwise, if</ins> <var title=
                   47650: ""><ins class="diff-chg">node</ins></var> <ins class="diff-chg">is
                   47651: a</ins> <code><a href="#table"><ins class=
                   47652: "diff-chg">table</ins></a></code> <ins class="diff-chg">element,
                   47653: terminate in a failure state.</ins></p>
                   47654: </li>
                   47655: <li>
                   47656: <p><ins class="diff-chg">Otherwise, if the algorithm is the "has an
                   47657: element in scope" variant (rather than the "has an element in table
                   47658: scope" variant), and</ins> <var title=""><ins class=
                   47659: "diff-chg">node</ins></var> <ins class="diff-chg">is one of the
                   47660: following, terminate in a failure state:</ins></p>
                   47661: <ul class="brief">
                   47662: <li><code><a href="#applet"><ins class=
                   47663: "diff-chg">applet</ins></a></code></li>
                   47664: <li><code><a href="#caption0"><ins class=
                   47665: "diff-chg">caption</ins></a></code></li>
                   47666: <li><code><a href="#td"><ins class=
                   47667: "diff-chg">td</ins></a></code></li>
                   47668: <li><code><a href="#th"><ins class=
                   47669: "diff-chg">th</ins></a></code></li>
                   47670: <li><code><ins class="diff-chg">button</ins></code></li>
                   47671: <li><code><ins class="diff-chg">marquee</ins></code></li>
                   47672: <li><code><a href="#object"><ins class=
                   47673: "diff-chg">object</ins></a></code></li>
                   47674: </ul>
                   47675: </li>
                   47676: <li>
                   47677: <p><ins class="diff-chg">Otherwise, if</ins> <var title=
                   47678: ""><ins class="diff-chg">node</ins></var> <ins class="diff-chg">is
                   47679: an</ins> <code><a href="#html"><ins class=
                   47680: "diff-chg">html</ins></a></code> <ins class="diff-chg">element,
                   47681: terminate in a failure state. (This can only happen if the</ins>
                   47682: <var title=""><ins class="diff-chg">node</ins></var> <ins class=
                   47683: "diff-chg">is the topmost node of the</ins> <a href=
                   47684: "#stack"><ins class="diff-chg">stack of open elements</ins></a>
                   47685: ,<ins class="diff-chg">and prevents the next step from being
                   47686: invoked if there are no more elements in the stack.)</ins></p>
                   47687: </li>
                   47688: <li>
                   47689: <p><ins class="diff-chg">Otherwise, set</ins> <var title=
                   47690: ""><ins class="diff-chg">node</ins></var> <ins class="diff-chg">to
                   47691: the previous entry in the</ins> <a href="#stack"><ins class=
                   47692: "diff-chg">stack of open elements</ins></a> <ins class=
                   47693: "diff-chg">and return to step 2. (This will never fail, since the
                   47694: loop will always terminate in the previous step if the top of the
                   47695: stack is reached.)</ins></p>
                   47696: </li>
                   47697: </ol>
                   47698: <p><ins class="diff-chg">Nothing happens if at any time any of the
                   47699: elements in the</ins> <a href="#stack"><ins class="diff-chg">stack
                   47700: of open elements</ins></a> <ins class="diff-chg">are moved to a new
                   47701: location in, or removed from, the</ins> <code><ins class=
                   47702: "diff-chg">Document</ins></code> <ins class="diff-chg">tree. In
                   47703: particular, the stack is not changed in this situation. This can
                   47704: cause, amongst other strange effects,</ins> content <ins class=
                   47705: "diff-new">to be appended to nodes that are no longer in the
                   47706: DOM.</ins></p>
                   47707: <p class="note"><ins class="diff-new">In some cases (namely,
                   47708: when</ins> <a href="#adoptionAgency"><ins class="diff-new">closing
                   47709: misnested formatting elements</ins></a> <ins class="diff-new">),
                   47710: the stack is manipulated in a random-access fashion.</ins></p>
                   47711: <h5 id="the-list"><span class="secno"><ins class=
                   47712: "diff-new">8.2.3.3.</ins></span> <ins class="diff-new">The list of
                   47713: active formatting elements</ins></h5>
                   47714: <p><ins class="diff-new">Initially the</ins> <dfn id=
                   47715: "list-of4"><ins class="diff-new">list of active formatting
                   47716: elements</ins></dfn> <ins class="diff-new">is empty. It is used to
                   47717: handle mis-nested</ins> <a href="#formatting" title=
                   47718: "formatting"><ins class="diff-new">formatting element
                   47719: tags</ins></a> .</p>
                   47720: <p><ins class="diff-new">The list contains elements in the</ins>
                   47721: <a href="#formatting"><ins class="diff-new">formatting</ins></a>
                   47722: <ins class="diff-new">category, and scope markers. The scope
                   47723: markers are inserted when entering</ins> <code><a href=
                   47724: "#applet"><ins class="diff-new">applet</ins></a></code> <ins class=
                   47725: "diff-new">elements, buttons,</ins> <code><a href=
                   47726: "#object"><ins class="diff-new">object</ins></a></code> <ins class=
                   47727: "diff-new">elements, marquees, table cells, and table captions, and
                   47728: are used to prevent formatting from "leaking" into</ins>
                   47729: <code><a href="#applet"><ins class=
                   47730: "diff-new">applet</ins></a></code> <ins class="diff-new">elements,
                   47731: buttons,</ins> <code><a href="#object"><ins class=
                   47732: "diff-new">object</ins></a></code> <ins class="diff-new">elements,
                   47733: marquees, and tables.</ins></p>
                   47734: <p><ins class="diff-new">When the steps below require the UA
                   47735: to</ins> <dfn id="reconstruct"><ins class="diff-new">reconstruct
                   47736: the active formatting elements</ins></dfn> ,<ins class=
                   47737: "diff-new">the UA must perform the following steps:</ins></p>
                   47738: <ol>
                   47739: <li><ins class="diff-new">If there are no entries in the</ins>
                   47740: <a href="#list-of4"><ins class="diff-new">list of active formatting
                   47741: elements</ins></a> ,<ins class="diff-new">then there is nothing to
                   47742: reconstruct; stop this algorithm.</ins></li>
                   47743: <li><ins class="diff-new">If the last (most recently added) entry
                   47744: in the</ins> <a href="#list-of4"><ins class="diff-new">list of
                   47745: active formatting elements</ins></a> <ins class="diff-new">is a
                   47746: marker, or if it is an element that is in the</ins> <a href=
                   47747: "#stack"><ins class="diff-new">stack of open elements</ins></a>
                   47748: ,<ins class="diff-new">then there is nothing to reconstruct; stop
                   47749: this algorithm.</ins></li>
                   47750: <li><ins class="diff-new">Let</ins> <var title=""><ins class=
                   47751: "diff-new">entry</ins></var> <ins class="diff-new">be the last
                   47752: (most recently added) element in the</ins> <a href=
                   47753: "#list-of4"><ins class="diff-new">list of active formatting
                   47754: elements</ins></a> .</li>
                   47755: <li><ins class="diff-new">If there are no entries before</ins>
                   47756: <var title=""><ins class="diff-new">entry</ins></var> <ins class=
                   47757: "diff-new">in the</ins> <a href="#list-of4"><ins class=
                   47758: "diff-new">list of active formatting elements</ins></a>
                   47759: ,<ins class="diff-new">then jump to step 8.</ins></li>
                   47760: <li><ins class="diff-new">Let</ins> <var title=""><ins class=
                   47761: "diff-new">entry</ins></var> <ins class="diff-new">be the entry one
                   47762: earlier than</ins> <var title=""><ins class=
                   47763: "diff-new">entry</ins></var> <ins class="diff-new">in the</ins>
                   47764: <a href="#list-of4"><ins class="diff-new">list of active formatting
                   47765: elements</ins></a> .</li>
                   47766: <li><ins class="diff-new">If</ins> <var title=""><ins class=
                   47767: "diff-new">entry</ins></var> <ins class="diff-new">is neither a
                   47768: marker nor an element that is also in the</ins> <a href=
                   47769: "#stack"><ins class="diff-new">stack of open elements</ins></a>
                   47770: ,<ins class="diff-new">go to step 4.</ins></li>
                   47771: <li><ins class="diff-new">Let</ins> <var title=""><ins class=
                   47772: "diff-new">entry</ins></var> <ins class="diff-new">be the element
                   47773: one later than</ins> <var title=""><ins class=
                   47774: "diff-new">entry</ins></var> <ins class="diff-new">in the</ins>
                   47775: <a href="#list-of4"><ins class="diff-new">list of active formatting
                   47776: elements</ins></a> .</li>
                   47777: <li><ins class="diff-new">Perform a shallow clone of the
                   47778: element</ins> <var title=""><ins class="diff-new">entry</ins></var>
                   47779: <ins class="diff-new">to obtain</ins> <var title=""><ins class=
                   47780: "diff-new">clone</ins></var> .<a href="#references"><ins class=
                   47781: "diff-new">[DOM3CORE]</ins></a></li>
                   47782: <li><ins class="diff-new">Append</ins> <var title=""><ins class=
                   47783: "diff-new">clone</ins></var> <ins class="diff-new">to the</ins>
                   47784: <a href="#current5"><ins class="diff-new">current node</ins></a>
                   47785: <ins class="diff-new">and push it onto the</ins> <a href=
                   47786: "#stack"><ins class="diff-new">stack of open elements</ins></a>
                   47787: <ins class="diff-new">so that it is the new</ins> <a href=
                   47788: "#current5"><ins class="diff-new">current node</ins></a> .</li>
                   47789: <li><ins class="diff-new">Replace the entry for</ins> <var title=
                   47790: ""><ins class="diff-new">entry</ins></var> <ins class="diff-new">in
                   47791: the list with an entry for</ins> <var title=""><ins class=
                   47792: "diff-new">clone</ins></var> .</li>
                   47793: <li><ins class="diff-new">If the entry for</ins> <var title=
                   47794: ""><ins class="diff-new">clone</ins></var> <ins class="diff-new">in
                   47795: the</ins> <a href="#list-of4"><ins class="diff-new">list of active
                   47796: formatting elements</ins></a> <ins class="diff-new">is not the last
                   47797: entry in the list, return to step 7.</ins></li>
                   47798: </ol>
                   47799: <p><ins class="diff-new">This has the effect of reopening all the
                   47800: formatting elements that were opened in the current body, cell, or
                   47801: caption (whichever is youngest) that haven't been explicitly
                   47802: closed.</ins></p>
                   47803: <p class="note"><ins class="diff-new">The way this specification is
                   47804: written, the</ins> <a href="#list-of4"><ins class="diff-new">list
                   47805: of active formatting elements</ins></a> <ins class=
                   47806: "diff-new">always consists of elements in chronological order with
                   47807: the least recently added element first and the most recently added
                   47808: element last (except for while steps 8 to 11 of the above algorithm
                   47809: are being executed, of course).</ins></p>
                   47810: <p><ins class="diff-new">When the steps below require the UA
                   47811: to</ins> <dfn id="clear1"><ins class="diff-new">clear the list of
                   47812: active formatting elements up to the last marker</ins></dfn>
                   47813: ,<ins class="diff-new">the UA must perform the following
                   47814: steps:</ins></p>
                   47815: <ol>
                   47816: <li><ins class="diff-new">Let</ins> <var title=""><ins class=
                   47817: "diff-new">entry</ins></var> <ins class="diff-new">be the last
                   47818: (most recently added) entry in the</ins> <a href=
                   47819: "#list-of4"><ins class="diff-new">list of active formatting
                   47820: elements</ins></a> .</li>
                   47821: <li><ins class="diff-new">Remove</ins> <var title=""><ins class=
                   47822: "diff-new">entry</ins></var> <ins class="diff-new">from the</ins>
                   47823: <a href="#list-of4"><ins class="diff-new">list of active formatting
                   47824: elements</ins></a> .</li>
                   47825: <li><ins class="diff-new">If</ins> <var title=""><ins class=
                   47826: "diff-new">entry</ins></var> <ins class="diff-new">was a marker,
                   47827: then stop the algorithm at this point. The list has been cleared up
                   47828: to the last marker.</ins></li>
                   47829: <li><ins class="diff-new">Go to step 1.</ins></li>
                   47830: </ol>
                   47831: <h5 id="the-element"><span class="secno"><ins class=
                   47832: "diff-new">8.2.3.4.</ins></span> <ins class="diff-new">The element
                   47833: pointers</ins></h5>
                   47834: <p><ins class="diff-new">Initially the</ins> <dfn id=
                   47835: "head-element"><code title=""><ins class=
                   47836: "diff-new">head</ins></code> <ins class="diff-new">element
                   47837: pointer</ins></dfn> <ins class="diff-new">and the</ins> <dfn id=
                   47838: "form-element"><code title=""><ins class=
                   47839: "diff-new">form</ins></code> <ins class="diff-new">element
                   47840: pointer</ins></dfn> <ins class="diff-new">are both null.</ins></p>
                   47841: <p><ins class="diff-new">Once a</ins> <code><a href=
                   47842: "#head"><ins class="diff-new">head</ins></a></code> <ins class=
                   47843: "diff-new">element has been parsed (whether implicitly or
                   47844: explicitly) the</ins> <a href="#head-element"><code title=
                   47845: ""><ins class="diff-new">head</ins></code> <ins class=
                   47846: "diff-new">element pointer</ins></a> <ins class="diff-new">gets set
                   47847: to point to this node.</ins></p>
                   47848: <p><ins class="diff-new">The</ins> <a href=
                   47849: "#form-element"><code title=""><ins class=
                   47850: "diff-new">form</ins></code> <ins class="diff-new">element
                   47851: pointer</ins></a> <ins class="diff-new">points to the last</ins>
                   47852: <code><ins class="diff-new">form</ins></code> <ins class=
                   47853: "diff-new">element that was opened and whose end tag has not yet
                   47854: been seen. It is used to make form controls associate with forms in
                   47855: the face of dramatically bad markup, for historical
                   47856: reasons.</ins></p>
                   47857: <h5 id="the-scripting"><span class="secno"><ins class=
                   47858: "diff-new">8.2.3.5.</ins></span> <ins class="diff-new">The
                   47859: scripting state</ins></h5>
                   47860: <p><ins class="diff-new">The</ins> <dfn id="scripting2"><ins class=
                   47861: "diff-new">scripting flag</ins></dfn> <ins class="diff-new">is set
                   47862: to "enabled" if the</ins> <code><ins class=
                   47863: "diff-new">Document</ins></code> <ins class="diff-new">with which
                   47864: the parser is associated was</ins> <a href=
                   47865: "#with-script"><ins class="diff-new">with script</ins></a>
                   47866: <ins class="diff-new">when the parser was created, and "disabled"
                   47867: otherwise.</ins></p>
                   47868: <h4 id="tokenisation"><span class="secno"><del class=
                   47869: "diff-old">8.2.3.</del> <ins class="diff-chg">8.2.4</ins></span>
                   47870: <dfn id="tokenisation0">Tokenisation</dfn></h4>
                   47871: <p>Implementations must act as if they used the following state
                   47872: machine to tokenise HTML. The state machine must start in the
                   47873: <a href="#data-state">data state</a> . Most states consume a single
                   47874: character, which may have various side-effects, and either switches
                   47875: the state machine to a new state to <em>reconsume</em> the same
                   47876: character, or switches it to a new state (to consume the next
                   47877: character), or repeats the same state (to consume the next
                   47878: character). Some states have more complicated <del class=
                   47879: "diff-old">behaviour</del> <ins class="diff-chg">behavior</ins> and
                   47880: can consume several characters before switching to another
                   47881: state.</p>
                   47882: <p>The exact <del class="diff-old">behaviour</del> <ins class=
                   47883: "diff-chg">behavior</ins> of certain states depends on a <dfn id=
                   47884: "content2">content model flag</dfn> that is set after certain
                   47885: tokens are emitted. The flag has several states: <em title=
                   47886: "">PCDATA</em> , <em title="">RCDATA</em> , <em title="">CDATA</em>
                   47887: , and <em title="">PLAINTEXT</em> . Initially it must be in the
                   47888: PCDATA state. In the RCDATA and CDATA states, a further <dfn id=
                   47889: "escape">escape flag</dfn> is used to control the <del class=
                   47890: "diff-old">behaviour</del> <ins class="diff-chg">behavior</ins> of
                   47891: the tokeniser. It is either true or false, and initially must be
                   47892: set to the false state. <ins class="diff-new">The</ins>
                   47893: <span><ins class="diff-new">insertion mode</ins></span> <ins class=
                   47894: "diff-new">and the</ins> <a href="#stack"><ins class=
                   47895: "diff-new">stack of open elements</ins></a> <ins class=
                   47896: "diff-new">also affects tokenisation.</ins></p>
                   47897: <p>The output of the tokenisation step is a series of zero or more
                   47898: of the following tokens: DOCTYPE, start tag, end tag, comment,
                   47899: character, end-of-file. DOCTYPE tokens have a name, a public
                   47900: identifier, a system identifier, and a <del class=
                   47901: "diff-old">correctness flag.</del> <i><ins class=
                   47902: "diff-chg">force-quirks flag</ins></i> . When a DOCTYPE token is
                   47903: created, its name, public identifier, and system identifier must be
                   47904: marked as <del class="diff-old">missing,</del> <ins class=
                   47905: "diff-chg">missing (which is a distinct state from the empty
                   47906: string),</ins> and the <del class="diff-old">correctness</del>
                   47907: <i><ins class="diff-chg">force-quirks</ins> flag</i> must be set to
                   47908: <i><del class="diff-old">correct</del> <ins class=
                   47909: "diff-chg">off</ins></i> (its other state is <i><del class=
                   47910: "diff-old">incorrect</del> <ins class="diff-chg">on</ins></i> ).
                   47911: Start and end tag tokens have a tag <del class=
                   47912: "diff-old">name</del> <ins class="diff-chg">name, a</ins>
                   47913: <i><ins class="diff-chg">self-closing flag</ins></i> , and a list
                   47914: of attributes, each of which has a name and a value. <ins class=
                   47915: "diff-new">When a start or end tag token is created, its</ins>
                   47916: <i><ins class="diff-new">self-closing flag</ins></i> <ins class=
                   47917: "diff-new">must be unset (its other state is that it be set), and
                   47918: its attributes list must be empty.</ins> Comment and character
                   47919: tokens have data.</p>
                   47920: <p>When a token is emitted, it must immediately be handled by the
                   47921: <a href="#tree-construction0">tree construction</a> stage. The tree
                   47922: construction stage can affect the state of the <a href=
                   47923: "#content2">content model flag</a> , and can insert additional
                   47924: characters into the stream. (For example, the <code><a href=
                   47925: "#script1">script</a></code> element can result in scripts
                   47926: executing and using the <a href="#dynamic2">dynamic markup
                   47927: insertion</a> APIs to insert characters into the stream being
                   47928: tokenised.)</p>
                   47929: <p>When <ins class="diff-new">a start tag token is emitted with
                   47930: its</ins> <i><ins class="diff-new">self-closing flag</ins></i>
                   47931: <ins class="diff-new">set, if the flag is not</ins> <dfn id=
                   47932: "acknowledged" title="acknowledge self-closing flag"><ins class=
                   47933: "diff-new">acknowledged</ins></dfn> <ins class="diff-new">when it
                   47934: is processed by the tree construction stage, that is a</ins>
                   47935: <a href="#parse1"><ins class="diff-new">parse error</ins></a> .</p>
                   47936: <p><ins class="diff-new">When</ins> an end tag token is emitted,
                   47937: the <a href="#content2">content model flag</a> must be switched to
                   47938: the PCDATA state.</p>
                   47939: <p>When an end tag token is emitted with attributes, that is a
                   47940: <a href="#parse1">parse error</a> .</p>
                   47941: <p><del class="diff-old">A permitted slash</del> <ins class=
                   47942: "diff-chg">When an end tag token</ins> is <del class="diff-old">a
                   47943: U+002F SOLIDUS character</del> <ins class="diff-chg">emitted with
                   47944: its</ins> <i><ins class="diff-chg">self-closing flag</ins></i>
                   47945: <ins class="diff-chg">set,</ins> that is <del class=
1.2     ! mike     47946: "diff-old">immediately followed by</del> a <del class=
        !          47947: "diff-old">U+003E GREATER-THAN SIGN, if, and only if, the current
        !          47948: token being processed is a start tag token whose tag name is one of
        !          47949: the following: base , link , meta , hr , br , img , embed , param ,
1.1       mike     47950: area , col , input</del> <a href="#parse1"><ins class=
                   47951: "diff-chg">parse error</ins></a> .</p>
                   47952: <p>Before each step of the tokeniser, the user agent may check to
                   47953: see if either one of the scripts in the <a href="#list-of1">list of
                   47954: scripts that will execute as soon as possible</a> or the first
                   47955: script in the <a href="#list-of0">list of scripts that will execute
                   47956: asynchronously</a> , has <span>completed loading</span> . If one
                   47957: has, then it must be <a href="#executing0" title=
                   47958: "executing a script block">executed</a> and removed from its
                   47959: list.</p>
                   47960: <p>The tokeniser state machine is as follows:</p>
                   47961: <dl>
                   47962: <dt><dfn id="data-state">Data state</dfn></dt>
                   47963: <dd>
                   47964: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   47965: <dl class="switch">
                   47966: <dt>U+0026 AMPERSAND (&amp;)</dt>
                   47967: <dd>When the <a href="#content2">content model flag</a> is set to
                   47968: one of the PCDATA or RCDATA <del class="diff-old">states:</del>
                   47969: <ins class="diff-chg">states and the</ins> <a href=
                   47970: "#escape"><ins class="diff-chg">escape flag</ins></a> <ins class=
                   47971: "diff-chg">is false:</ins> switch to the <del class=
                   47972: "diff-old">entity</del> <a href="#character4"><ins class=
                   47973: "diff-chg">character reference</ins> data state</a> .</dd>
                   47974: <dd>Otherwise: treat it as per the "anything else" entry
                   47975: below.</dd>
                   47976: <dt>U+002D HYPHEN-MINUS (-)</dt>
                   47977: <dd>
                   47978: <p>If the <a href="#content2">content model flag</a> is set to
                   47979: either the RCDATA state or the CDATA state, and the <a href=
                   47980: "#escape">escape flag</a> is false, and there are at least three
                   47981: characters before this one in the input stream, and the last four
                   47982: characters in the input stream, including this one, are U+003C
                   47983: LESS-THAN SIGN, U+0021 EXCLAMATION MARK, U+002D HYPHEN-MINUS, and
                   47984: U+002D HYPHEN-MINUS ("&lt;!--"), then set the <a href=
                   47985: "#escape">escape flag</a> to true.</p>
                   47986: <p>In any case, emit the input character as a character token. Stay
                   47987: in the <a href="#data-state">data state</a> .</p>
                   47988: </dd>
                   47989: <dt>U+003C LESS-THAN SIGN (&lt;)</dt>
                   47990: <dd>When the <a href="#content2">content model flag</a> is set to
                   47991: the PCDATA state: switch to the <a href="#tag-open">tag open
                   47992: state</a> .</dd>
                   47993: <dd>When the <a href="#content2">content model flag</a> is set to
                   47994: either the RCDATA state or the CDATA state and the <a href=
                   47995: "#escape">escape flag</a> is false: switch to the <a href=
                   47996: "#tag-open">tag open state</a> .</dd>
                   47997: <dd>Otherwise: treat it as per the "anything else" entry
                   47998: below.</dd>
                   47999: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48000: <dd>
                   48001: <p>If the <a href="#content2">content model flag</a> is set to
                   48002: either the RCDATA state or the CDATA state, and the <a href=
                   48003: "#escape">escape flag</a> is true, and the last three characters in
                   48004: the input stream including this one are U+002D HYPHEN-MINUS, U+002D
                   48005: HYPHEN-MINUS, U+003E GREATER-THAN SIGN ("--&gt;"), set the <a href=
                   48006: "#escape">escape flag</a> to false.</p>
                   48007: <p>In any case, emit the input character as a character token. Stay
                   48008: in the <a href="#data-state">data state</a> .</p>
                   48009: </dd>
                   48010: <dt>EOF</dt>
                   48011: <dd>Emit an end-of-file token.</dd>
                   48012: <dt>Anything else</dt>
                   48013: <dd>Emit the input character as a character token. Stay in the
                   48014: <a href="#data-state">data state</a> .</dd>
                   48015: </dl>
                   48016: </dd>
                   48017: <dt><del class="diff-old">Entity</del> <dfn id=
                   48018: "character4"><ins class="diff-chg">Character reference</ins> data
                   48019: state</dfn></dt>
                   48020: <dd>
                   48021: <p><em>(This cannot happen if the <a href="#content2">content model
                   48022: flag</a> is set to the CDATA state.)</em></p>
                   48023: <p>Attempt to <a href="#consume">consume <del class="diff-old">an
                   48024: entity</del> <ins class="diff-chg">a character reference</ins></a>
                   48025: ,<ins class="diff-chg">with no</ins> <a href=
                   48026: "#additional"><ins class="diff-chg">additional allowed
                   48027: character</ins></a> .</p>
                   48028: <p>If nothing is returned, emit a U+0026 AMPERSAND character
                   48029: token.</p>
                   48030: <p>Otherwise, emit the character token that was returned.</p>
                   48031: <p>Finally, switch to the <a href="#data-state">data state</a>
                   48032: .</p>
                   48033: </dd>
                   48034: <dt><dfn id="tag-open">Tag open state</dfn></dt>
                   48035: <dd>
                   48036: <p>The <del class="diff-old">behaviour</del> <ins class=
                   48037: "diff-chg">behavior</ins> of this state depends on the <a href=
                   48038: "#content2">content model flag</a> .</p>
                   48039: <dl>
                   48040: <dt>If the <a href="#content2">content model flag</a> is set to the
                   48041: RCDATA or CDATA states</dt>
                   48042: <dd>
                   48043: <p>Consume the <a href="#next-input">next input character</a> . If
                   48044: it is a U+002F SOLIDUS (/) character, switch to the <a href=
                   48045: "#close1">close tag open state</a> . Otherwise, emit a U+003C
                   48046: LESS-THAN SIGN character token and reconsume the current input
                   48047: character in the <a href="#data-state">data state</a> .</p>
                   48048: </dd>
                   48049: <dt>If the <a href="#content2">content model flag</a> is set to the
                   48050: PCDATA state</dt>
                   48051: <dd>
                   48052: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48053: <dl class="switch">
                   48054: <dt>U+0021 EXCLAMATION MARK (!)</dt>
                   48055: <dd>Switch to the <a href="#markup">markup declaration open
                   48056: state</a> .</dd>
                   48057: <dt>U+002F SOLIDUS (/)</dt>
                   48058: <dd>Switch to the <a href="#close1">close tag open state</a> .</dd>
                   48059: <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL
                   48060: LETTER Z</dt>
                   48061: <dd>Create a new start tag token, set its tag name to the lowercase
                   48062: version of the input character (add 0x0020 to the character's code
                   48063: point), then switch to the <a href="#tag-name0">tag name state</a>
                   48064: . (Don't emit the token yet; further details will be filled in
                   48065: before it is emitted.)</dd>
                   48066: <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL
                   48067: LETTER Z</dt>
                   48068: <dd>Create a new start tag token, set its tag name to the input
                   48069: character, then switch to the <a href="#tag-name0">tag name
                   48070: state</a> . (Don't emit the token yet; further details will be
                   48071: filled in before it is emitted.)</dd>
                   48072: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48073: <dd><a href="#parse1">Parse error</a> . Emit a U+003C LESS-THAN
                   48074: SIGN character token and a U+003E GREATER-THAN SIGN character
                   48075: token. Switch to the <a href="#data-state">data state</a> .</dd>
                   48076: <dt>U+003F QUESTION MARK (?)</dt>
                   48077: <dd><a href="#parse1">Parse error</a> . Switch to the <a href=
                   48078: "#bogus">bogus comment state</a> .</dd>
                   48079: <dt>Anything else</dt>
                   48080: <dd><a href="#parse1">Parse error</a> . Emit a U+003C LESS-THAN
                   48081: SIGN character token and reconsume the current input character in
                   48082: the <a href="#data-state">data state</a> .</dd>
                   48083: </dl>
                   48084: </dd>
                   48085: </dl>
                   48086: </dd>
                   48087: <dt><dfn id="close1">Close tag open state</dfn></dt>
                   48088: <dd>
                   48089: <p>If the <a href="#content2">content model flag</a> is set to the
                   48090: RCDATA or CDATA states but no start tag token has ever been emitted
                   48091: by this instance of the tokeniser ( <a href="#fragment">fragment
                   48092: case</a> ), or, if the <a href="#content2">content model flag</a>
                   48093: is set to the RCDATA or CDATA states and the next few characters do
                   48094: not match the tag name of the last start tag token emitted (case
                   48095: insensitively), or if they do but they are not immediately followed
                   48096: by one of the following characters:</p>
                   48097: <ul class="brief">
                   48098: <li>U+0009 CHARACTER TABULATION</li>
                   48099: <li>U+000A LINE FEED (LF)</li>
                   48100: <li>U+000B LINE TABULATION</li>
                   48101: <li>U+000C FORM FEED (FF)</li>
                   48102: <li>U+0020 SPACE</li>
                   48103: <li>U+003E GREATER-THAN SIGN (&gt;)</li>
                   48104: <li>U+002F SOLIDUS (/)</li>
                   48105: <li>EOF</li>
                   48106: </ul>
                   48107: <p>...then emit a U+003C LESS-THAN SIGN character token, a U+002F
                   48108: SOLIDUS character token, and switch to the <a href=
                   48109: "#data-state">data state</a> to process the <a href=
                   48110: "#next-input">next input character</a> .</p>
                   48111: <p>Otherwise, if the <a href="#content2">content model flag</a> is
                   48112: set to the PCDATA state, or if the next few characters <em>do</em>
                   48113: match that tag name, consume the <a href="#next-input">next input
                   48114: character</a> :</p>
                   48115: <dl class="switch">
                   48116: <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL
                   48117: LETTER Z</dt>
                   48118: <dd>Create a new end tag token, set its tag name to the lowercase
                   48119: version of the input character (add 0x0020 to the character's code
                   48120: point), then switch to the <a href="#tag-name0">tag name state</a>
                   48121: . (Don't emit the token yet; further details will be filled in
                   48122: before it is emitted.)</dd>
                   48123: <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL
                   48124: LETTER Z</dt>
                   48125: <dd>Create a new end tag token, set its tag name to the input
                   48126: character, then switch to the <a href="#tag-name0">tag name
                   48127: state</a> . (Don't emit the token yet; further details will be
                   48128: filled in before it is emitted.)</dd>
                   48129: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48130: <dd><a href="#parse1">Parse error</a> . Switch to the <a href=
                   48131: "#data-state">data state</a> .</dd>
                   48132: <dt>EOF</dt>
                   48133: <dd><a href="#parse1">Parse error</a> . Emit a U+003C LESS-THAN
                   48134: SIGN character token and a U+002F SOLIDUS character token.
                   48135: Reconsume the EOF character in the <a href="#data-state">data
                   48136: state</a> .</dd>
                   48137: <dt>Anything else</dt>
                   48138: <dd><a href="#parse1">Parse error</a> . Switch to the <a href=
                   48139: "#bogus">bogus comment state</a> .</dd>
                   48140: </dl>
                   48141: </dd>
                   48142: <dt><dfn id="tag-name0">Tag name state</dfn></dt>
                   48143: <dd>
                   48144: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48145: <dl class="switch">
                   48146: <dt>U+0009 CHARACTER TABULATION</dt>
                   48147: <dt>U+000A LINE FEED (LF)</dt>
                   48148: <dt>U+000B LINE TABULATION</dt>
                   48149: <dt>U+000C FORM FEED (FF)</dt>
                   48150: <dt>U+0020 SPACE</dt>
                   48151: <dd>Switch to the <a href="#before">before attribute name state</a>
                   48152: .</dd>
                   48153: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48154: <dd>Emit the current tag token. Switch to the <a href=
                   48155: "#data-state">data state</a> .</dd>
                   48156: <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL
                   48157: LETTER Z</dt>
                   48158: <dd>Append the lowercase version of the current input character
                   48159: (add 0x0020 to the character's code point) to the current tag
                   48160: token's tag name. Stay in the <a href="#tag-name0">tag name
                   48161: state</a> .</dd>
                   48162: <dt>EOF</dt>
                   48163: <dd><a href="#parse1">Parse error</a> . Emit the current tag token.
                   48164: Reconsume the EOF character in the <a href="#data-state">data
                   48165: state</a> .</dd>
                   48166: <dt>U+002F SOLIDUS (/)</dt>
                   48167: <dd><del class="diff-old">Parse error unless this is a permitted
                   48168: slash .</del> Switch to the <del class="diff-old">before attribute
                   48169: name</del> <a href="#self-closing"><ins class=
                   48170: "diff-chg">self-closing start tag</ins> state</a> .</dd>
                   48171: <dt>Anything else</dt>
                   48172: <dd>Append the current input character to the current tag token's
                   48173: tag name. Stay in the <a href="#tag-name0">tag name state</a>
                   48174: .</dd>
                   48175: </dl>
                   48176: </dd>
                   48177: <dt><dfn id="before">Before attribute name state</dfn></dt>
                   48178: <dd>
                   48179: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48180: <dl class="switch">
                   48181: <dt>U+0009 CHARACTER TABULATION</dt>
                   48182: <dt>U+000A LINE FEED (LF)</dt>
                   48183: <dt>U+000B LINE TABULATION</dt>
                   48184: <dt>U+000C FORM FEED (FF)</dt>
                   48185: <dt>U+0020 SPACE</dt>
                   48186: <dd>Stay in the <a href="#before">before attribute name state</a>
                   48187: .</dd>
                   48188: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48189: <dd>Emit the current tag token. Switch to the <a href=
                   48190: "#data-state">data state</a> .</dd>
                   48191: <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL
                   48192: LETTER Z</dt>
                   48193: <dd>Start a new attribute in the current tag token. Set that
                   48194: attribute's name to the lowercase version of the current input
                   48195: character (add 0x0020 to the character's code point), and its value
                   48196: to the empty string. Switch to the <a href="#attribute1">attribute
                   48197: name state</a> .</dd>
                   48198: <dt>U+002F SOLIDUS (/)</dt>
                   48199: <dd><ins class="diff-new">Switch to the</ins> <a href=
                   48200: "#self-closing"><ins class="diff-new">self-closing start tag
                   48201: state</ins></a> .</dd>
                   48202: <dt><ins class="diff-new">U+0022 QUOTATION MARK (")</ins></dt>
                   48203: <dt><ins class="diff-new">U+0027 APOSTROPHE (')</ins></dt>
                   48204: <dt><ins class="diff-new">U+003D EQUALS SIGN (=)</ins></dt>
                   48205: <dd><a href="#parse1">Parse error <del class="diff-old">unless this
                   48206: is a permitted slash</del></a> . <del class="diff-old">Stay
                   48207: in</del> <ins class="diff-chg">Treat it as per</ins> the
                   48208: <del class="diff-old">before attribute name state .</del>
                   48209: <ins class="diff-chg">"anything else" entry below.</ins></dd>
                   48210: <dt>EOF</dt>
                   48211: <dd><a href="#parse1">Parse error</a> . Emit the current tag token.
                   48212: Reconsume the EOF character in the <a href="#data-state">data
                   48213: state</a> .</dd>
                   48214: <dt>Anything else</dt>
                   48215: <dd>Start a new attribute in the current tag token. Set that
                   48216: attribute's name to the current input character, and its value to
                   48217: the empty string. Switch to the <a href="#attribute1">attribute
                   48218: name state</a> .</dd>
                   48219: </dl>
                   48220: </dd>
                   48221: <dt><dfn id="attribute1">Attribute name state</dfn></dt>
                   48222: <dd>
                   48223: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48224: <dl class="switch">
                   48225: <dt>U+0009 CHARACTER TABULATION</dt>
                   48226: <dt>U+000A LINE FEED (LF)</dt>
                   48227: <dt>U+000B LINE TABULATION</dt>
                   48228: <dt>U+000C FORM FEED (FF)</dt>
                   48229: <dt>U+0020 SPACE</dt>
                   48230: <dd>Switch to the <a href="#after">after attribute name state</a>
                   48231: .</dd>
                   48232: <dt>U+003D EQUALS SIGN (=)</dt>
                   48233: <dd>Switch to the <a href="#before0">before attribute value
                   48234: state</a> .</dd>
                   48235: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48236: <dd>Emit the current tag token. Switch to the <a href=
                   48237: "#data-state">data state</a> .</dd>
                   48238: <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL
                   48239: LETTER Z</dt>
                   48240: <dd>Append the lowercase version of the current input character
                   48241: (add 0x0020 to the character's code point) to the current
                   48242: attribute's name. Stay in the <a href="#attribute1">attribute name
                   48243: state</a> .</dd>
                   48244: <dt>U+002F SOLIDUS (/)</dt>
                   48245: <dd><del class="diff-old">Parse error unless this is a permitted
                   48246: slash .</del> Switch to the <del class="diff-old">before attribute
                   48247: name</del> <a href="#self-closing"><ins class=
                   48248: "diff-chg">self-closing start tag</ins> state</a> .</dd>
                   48249: <dt><ins class="diff-new">U+0022 QUOTATION MARK (")</ins></dt>
                   48250: <dt><ins class="diff-new">U+0027 APOSTROPHE (')</ins></dt>
                   48251: <dd><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   48252: .<ins class="diff-new">Treat it as per the "anything else" entry
                   48253: below.</ins></dd>
                   48254: <dt>EOF</dt>
                   48255: <dd><a href="#parse1">Parse error</a> . Emit the current tag token.
                   48256: Reconsume the EOF character in the <a href="#data-state">data
                   48257: state</a> .</dd>
                   48258: <dt>Anything else</dt>
                   48259: <dd>Append the current input character to the current attribute's
                   48260: name. Stay in the <a href="#attribute1">attribute name state</a>
                   48261: .</dd>
                   48262: </dl>
                   48263: <p>When the user agent leaves the attribute name state (and before
                   48264: emitting the tag token, if appropriate), the complete attribute's
                   48265: name must be compared to the other attributes on the same token; if
                   48266: there is already an attribute on the token with the exact same
                   48267: name, then this is a <a href="#parse1">parse error</a> and the new
                   48268: attribute must be dropped, along with the value that gets
                   48269: associated with it (if any).</p>
                   48270: </dd>
                   48271: <dt><dfn id="after">After attribute name state</dfn></dt>
                   48272: <dd>
                   48273: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48274: <dl class="switch">
                   48275: <dt>U+0009 CHARACTER TABULATION</dt>
                   48276: <dt>U+000A LINE FEED (LF)</dt>
                   48277: <dt>U+000B LINE TABULATION</dt>
                   48278: <dt>U+000C FORM FEED (FF)</dt>
                   48279: <dt>U+0020 SPACE</dt>
                   48280: <dd>Stay in the <a href="#after">after attribute name state</a>
                   48281: .</dd>
                   48282: <dt>U+003D EQUALS SIGN (=)</dt>
                   48283: <dd>Switch to the <a href="#before0">before attribute value
                   48284: state</a> .</dd>
                   48285: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48286: <dd>Emit the current tag token. Switch to the <a href=
                   48287: "#data-state">data state</a> .</dd>
                   48288: <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL
                   48289: LETTER Z</dt>
                   48290: <dd>Start a new attribute in the current tag token. Set that
                   48291: attribute's name to the lowercase version of the current input
                   48292: character (add 0x0020 to the character's code point), and its value
                   48293: to the empty string. Switch to the <a href="#attribute1">attribute
                   48294: name state</a> .</dd>
                   48295: <dt>U+002F SOLIDUS (/)</dt>
                   48296: <dd><del class="diff-old">Parse error unless this is a permitted
                   48297: slash .</del> Switch to the <del class="diff-old">before attribute
                   48298: name</del> <a href="#self-closing"><ins class=
                   48299: "diff-chg">self-closing start tag</ins> state</a> .</dd>
                   48300: <dt>EOF</dt>
                   48301: <dd><a href="#parse1">Parse error</a> . Emit the current tag token.
                   48302: Reconsume the EOF character in the <a href="#data-state">data
                   48303: state</a> .</dd>
                   48304: <dt>Anything else</dt>
                   48305: <dd>Start a new attribute in the current tag token. Set that
                   48306: attribute's name to the current input character, and its value to
                   48307: the empty string. Switch to the <a href="#attribute1">attribute
                   48308: name state</a> .</dd>
                   48309: </dl>
                   48310: </dd>
                   48311: <dt><dfn id="before0">Before attribute value state</dfn></dt>
                   48312: <dd>
                   48313: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48314: <dl class="switch">
                   48315: <dt>U+0009 CHARACTER TABULATION</dt>
                   48316: <dt>U+000A LINE FEED (LF)</dt>
                   48317: <dt>U+000B LINE TABULATION</dt>
                   48318: <dt>U+000C FORM FEED (FF)</dt>
                   48319: <dt>U+0020 SPACE</dt>
                   48320: <dd>Stay in the <a href="#before0">before attribute value state</a>
                   48321: .</dd>
                   48322: <dt>U+0022 QUOTATION MARK (")</dt>
                   48323: <dd>Switch to the <a href="#attribute2">attribute value
                   48324: (double-quoted) state</a> .</dd>
                   48325: <dt>U+0026 AMPERSAND (&amp;)</dt>
                   48326: <dd>Switch to the <a href="#attribute4">attribute value (unquoted)
                   48327: state</a> and reconsume this input character.</dd>
                   48328: <dt>U+0027 APOSTROPHE (')</dt>
                   48329: <dd>Switch to the <a href="#attribute3">attribute value
                   48330: (single-quoted) state</a> .</dd>
                   48331: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48332: <dd>Emit the current tag token. Switch to the <a href=
                   48333: "#data-state">data state</a> .</dd>
                   48334: <dt><ins class="diff-new">U+003D EQUALS SIGN (=)</ins></dt>
                   48335: <dd><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   48336: .<ins class="diff-new">Treat it as per the "anything else" entry
                   48337: below.</ins></dd>
                   48338: <dt>EOF</dt>
                   48339: <dd><a href="#parse1">Parse error</a> . Emit the current tag token.
                   48340: Reconsume the character in the <a href="#data-state">data state</a>
                   48341: .</dd>
                   48342: <dt>Anything else</dt>
                   48343: <dd>Append the current input character to the current attribute's
                   48344: value. Switch to the <a href="#attribute4">attribute value
                   48345: (unquoted) state</a> .</dd>
                   48346: </dl>
                   48347: </dd>
                   48348: <dt><dfn id="attribute2">Attribute value (double-quoted)
                   48349: state</dfn></dt>
                   48350: <dd>
                   48351: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48352: <dl class="switch">
                   48353: <dt>U+0022 QUOTATION MARK (")</dt>
                   48354: <dd>Switch to the <del class="diff-old">before</del> <a href=
                   48355: "#after0"><ins class="diff-chg">after</ins> attribute <del class=
                   48356: "diff-old">name</del> <ins class="diff-chg">value (quoted)</ins>
                   48357: state</a> .</dd>
                   48358: <dt>U+0026 AMPERSAND (&amp;)</dt>
                   48359: <dd>Switch to the <del class="diff-old">entity</del> <a href=
                   48360: "#character5"><ins class="diff-chg">character reference</ins> in
                   48361: attribute value state <del class="diff-old">.</del></a> ,
                   48362: <ins class="diff-chg">with the</ins> <a href=
                   48363: "#additional"><ins class="diff-chg">additional allowed
                   48364: character</ins></a> <ins class="diff-chg">being U+0022 QUOTATION
                   48365: MARK (").</ins></dd>
                   48366: <dt>EOF</dt>
                   48367: <dd><a href="#parse1">Parse error</a> . Emit the current tag token.
                   48368: Reconsume the character in the <a href="#data-state">data state</a>
                   48369: .</dd>
                   48370: <dt>Anything else</dt>
                   48371: <dd>Append the current input character to the current attribute's
                   48372: value. Stay in the <a href="#attribute2">attribute value
                   48373: (double-quoted) state</a> .</dd>
                   48374: </dl>
                   48375: </dd>
                   48376: <dt><dfn id="attribute3">Attribute value (single-quoted)
                   48377: state</dfn></dt>
                   48378: <dd>
                   48379: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48380: <dl class="switch">
                   48381: <dt>U+0027 APOSTROPHE (')</dt>
                   48382: <dd>Switch to the <del class="diff-old">before</del> <a href=
                   48383: "#after0"><ins class="diff-chg">after</ins> attribute <del class=
                   48384: "diff-old">name</del> <ins class="diff-chg">value (quoted)</ins>
                   48385: state</a> .</dd>
                   48386: <dt>U+0026 AMPERSAND (&amp;)</dt>
                   48387: <dd>Switch to the <del class="diff-old">entity</del> <a href=
                   48388: "#character5"><ins class="diff-chg">character reference</ins> in
                   48389: attribute value state <del class="diff-old">.</del></a> ,
                   48390: <ins class="diff-chg">with the</ins> <a href=
                   48391: "#additional"><ins class="diff-chg">additional allowed
                   48392: character</ins></a> <ins class="diff-chg">being U+0027 APOSTROPHE
                   48393: (').</ins></dd>
                   48394: <dt>EOF</dt>
                   48395: <dd><a href="#parse1">Parse error</a> . Emit the current tag token.
                   48396: Reconsume the character in the <a href="#data-state">data state</a>
                   48397: .</dd>
                   48398: <dt>Anything else</dt>
                   48399: <dd>Append the current input character to the current attribute's
                   48400: value. Stay in the <a href="#attribute3">attribute value
                   48401: (single-quoted) state</a> .</dd>
                   48402: </dl>
                   48403: </dd>
                   48404: <dt><dfn id="attribute4">Attribute value (unquoted)
                   48405: state</dfn></dt>
                   48406: <dd>
                   48407: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48408: <dl class="switch">
                   48409: <dt>U+0009 CHARACTER TABULATION</dt>
                   48410: <dt>U+000A LINE FEED (LF)</dt>
                   48411: <dt>U+000B LINE TABULATION</dt>
                   48412: <dt>U+000C FORM FEED (FF)</dt>
                   48413: <dt>U+0020 SPACE</dt>
                   48414: <dd>Switch to the <a href="#before">before attribute name state</a>
                   48415: .</dd>
                   48416: <dt>U+0026 AMPERSAND (&amp;)</dt>
                   48417: <dd>Switch to the <del class="diff-old">entity</del> <a href=
                   48418: "#character5"><ins class="diff-chg">character reference</ins> in
                   48419: attribute value state</a> , <ins class="diff-new">with no</ins>
                   48420: <a href="#additional"><ins class="diff-new">additional allowed
                   48421: character</ins></a> .</dd>
                   48422: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48423: <dd>Emit the current tag token. Switch to the <a href=
                   48424: "#data-state">data state</a> .</dd>
                   48425: <dt><ins class="diff-new">U+0022 QUOTATION MARK (")</ins></dt>
                   48426: <dt><ins class="diff-new">U+0027 APOSTROPHE (')</ins></dt>
                   48427: <dt><ins class="diff-new">U+003D EQUALS SIGN (=)</ins></dt>
                   48428: <dd><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   48429: .<ins class="diff-new">Treat it as per the "anything else" entry
                   48430: below.</ins></dd>
                   48431: <dt>EOF</dt>
                   48432: <dd><a href="#parse1">Parse error</a> . Emit the current tag token.
                   48433: Reconsume the character in the <a href="#data-state">data state</a>
                   48434: .</dd>
                   48435: <dt>Anything else</dt>
                   48436: <dd>Append the current input character to the current attribute's
                   48437: value. Stay in the <a href="#attribute4">attribute value (unquoted)
                   48438: state</a> .</dd>
                   48439: </dl>
                   48440: </dd>
                   48441: <dt><del class="diff-old">Entity</del> <dfn id=
                   48442: "character5"><ins class="diff-chg">Character reference</ins> in
                   48443: attribute value state</dfn></dt>
                   48444: <dd>
                   48445: <p>Attempt to <a href="#consume">consume <del class="diff-old">an
                   48446: entity</del> <ins class="diff-chg">a character reference</ins></a>
                   48447: .</p>
                   48448: <p>If nothing is returned, append a U+0026 AMPERSAND character to
                   48449: the current attribute's value.</p>
                   48450: <p>Otherwise, append the returned character token to the current
                   48451: attribute's value.</p>
                   48452: <p>Finally, switch back to the attribute value state that you were
                   48453: in when were switched into this state.</p>
                   48454: </dd>
                   48455: <dt><dfn id="after0"><ins class="diff-new">After attribute value
                   48456: (quoted) state</ins></dfn></dt>
                   48457: <dd>
                   48458: <p><ins class="diff-new">Consume the</ins> <a href=
                   48459: "#next-input"><ins class="diff-new">next input character</ins></a>
                   48460: :</p>
                   48461: <dl class="switch">
                   48462: <dt><ins class="diff-new">U+0009 CHARACTER TABULATION</ins></dt>
                   48463: <dt><ins class="diff-new">U+000A LINE FEED (LF)</ins></dt>
                   48464: <dt><ins class="diff-new">U+000B LINE TABULATION</ins></dt>
                   48465: <dt><ins class="diff-new">U+000C FORM FEED (FF)</ins></dt>
                   48466: <dt><ins class="diff-new">U+0020 SPACE</ins></dt>
                   48467: <dd><ins class="diff-new">Switch to the</ins> <a href=
                   48468: "#before"><ins class="diff-new">before attribute name
                   48469: state</ins></a> .</dd>
                   48470: <dt><ins class="diff-new">U+003E GREATER-THAN SIGN
                   48471: (&gt;)</ins></dt>
                   48472: <dd><ins class="diff-new">Emit the current tag token. Switch to
                   48473: the</ins> <a href="#data-state"><ins class="diff-new">data
                   48474: state</ins></a> .</dd>
                   48475: <dt><ins class="diff-new">U+002F SOLIDUS (/)</ins></dt>
                   48476: <dd><ins class="diff-new">Switch to the</ins> <a href=
                   48477: "#self-closing"><ins class="diff-new">self-closing start tag
                   48478: state</ins></a> .</dd>
                   48479: <dt><ins class="diff-new">EOF</ins></dt>
                   48480: <dd><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   48481: .<ins class="diff-new">Emit the current tag token. Reconsume the
                   48482: EOF character in the</ins> <a href="#data-state"><ins class=
                   48483: "diff-new">data state</ins></a> .</dd>
                   48484: <dt><ins class="diff-new">Anything else</ins></dt>
                   48485: <dd><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   48486: .<ins class="diff-new">Reconsume the character in the</ins>
                   48487: <a href="#before"><ins class="diff-new">before attribute name
                   48488: state</ins></a> .</dd>
                   48489: </dl>
                   48490: </dd>
                   48491: <dt><dfn id="self-closing"><ins class="diff-new">Self-closing start
                   48492: tag state</ins></dfn></dt>
                   48493: <dd>
                   48494: <p><ins class="diff-new">Consume the</ins> <a href=
                   48495: "#next-input"><ins class="diff-new">next input character</ins></a>
                   48496: :</p>
                   48497: <dl class="switch">
                   48498: <dt><ins class="diff-new">U+003E GREATER-THAN SIGN
                   48499: (&gt;)</ins></dt>
                   48500: <dd><ins class="diff-new">Set the</ins> <i><ins class=
                   48501: "diff-new">self-closing flag</ins></i> <ins class="diff-new">of the
                   48502: current tag token. Emit the current tag token. Switch to the</ins>
                   48503: <a href="#data-state"><ins class="diff-new">data state</ins></a>
                   48504: .</dd>
                   48505: <dt><ins class="diff-new">EOF</ins></dt>
                   48506: <dd><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   48507: .<ins class="diff-new">Emit the current tag token. Reconsume the
                   48508: EOF character in the</ins> <a href="#data-state"><ins class=
                   48509: "diff-new">data state</ins></a> .</dd>
                   48510: <dt><ins class="diff-new">Anything else</ins></dt>
                   48511: <dd><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   48512: .<ins class="diff-new">Reconsume the character in the</ins>
                   48513: <a href="#before"><ins class="diff-new">before attribute name
                   48514: state</ins></a> .</dd>
                   48515: </dl>
                   48516: </dd>
                   48517: <dt><dfn id="bogus">Bogus comment state</dfn></dt>
                   48518: <dd>
                   48519: <p><em>(This can only happen if the <a href="#content2">content
                   48520: model flag</a> is set to the PCDATA state.)</em></p>
                   48521: <p>Consume every character up to the first U+003E GREATER-THAN SIGN
                   48522: character (&gt;) or the end of the file (EOF), whichever comes
                   48523: first. Emit a comment token whose data is the concatenation of all
                   48524: the characters starting from and including the character that
                   48525: caused the state machine to switch into the bogus comment state, up
                   48526: to and including the last consumed character before the U+003E
                   48527: character, if any, or up to the end of the file otherwise. (If the
                   48528: comment was started by the end of the file (EOF), the token is
                   48529: empty.)</p>
                   48530: <p>Switch to the <a href="#data-state">data state</a> .</p>
                   48531: <p>If the end of the file was reached, reconsume the EOF
                   48532: character.</p>
                   48533: </dd>
                   48534: <dt><dfn id="markup">Markup declaration open state</dfn></dt>
                   48535: <dd>
                   48536: <p><em>(This can only happen if the <a href="#content2">content
                   48537: model flag</a> is set to the PCDATA state.)</em></p>
                   48538: <p>If the next two characters are both U+002D HYPHEN-MINUS (-)
                   48539: characters, consume those two characters, create a comment token
                   48540: whose data is the empty string, and switch to the <a href=
                   48541: "#comment0">comment start state</a> .</p>
                   48542: <p><del class="diff-old">Otherwise</del> <ins class=
                   48543: "diff-chg">Otherwise,</ins> if the next seven characters are a
                   48544: <span>case-insensitive</span> match for the word "DOCTYPE", then
                   48545: consume those characters and switch to the <a href=
                   48546: "#doctype0">DOCTYPE state</a> .</p>
                   48547: <p>Otherwise, <ins class="diff-new">if the</ins> <span><ins class=
                   48548: "diff-new">insertion mode</ins></span> is <ins class=
                   48549: "diff-new">"</ins> <a href="#in-foreign" title=
                   48550: "insertion mode: in foreign content"><ins class="diff-new">in
                   48551: foreign content</ins></a> <ins class="diff-new">" and the</ins>
                   48552: <a href="#current5"><ins class="diff-new">current node</ins></a> is
                   48553: <ins class="diff-new">not an element in the</ins> <a href=
                   48554: "#html-namespace0"><ins class="diff-new">HTML namespace</ins></a>
                   48555: <ins class="diff-new">and the next seven characters are</ins> a
                   48556: <span><ins class="diff-chg">case-sensitive</ins></span> <ins class=
                   48557: "diff-chg">match for the string "[CDATA[" (the five uppercase
                   48558: letters "CDATA" with a U+005B LEFT SQUARE BRACKET character before
                   48559: and after), then consume those characters and switch to the</ins>
                   48560: <a href="#cdata1"><ins class="diff-chg">CDATA block state</ins></a>
                   48561: <ins class="diff-chg">(which is unrelated to the</ins> <a href=
                   48562: "#content2"><ins class="diff-chg">content model flag</ins></a>
                   48563: <ins class="diff-chg">'s CDATA state).</ins></p>
                   48564: <p><ins class="diff-chg">Otherwise, this is a</ins> <a href=
                   48565: "#parse1">parse error</a> . Switch to the <a href="#bogus">bogus
                   48566: comment state</a> . The next character that is consumed, if any, is
                   48567: the first character that will be in the comment.</p>
                   48568: </dd>
                   48569: <dt><dfn id="comment0">Comment start state</dfn></dt>
                   48570: <dd>
                   48571: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48572: <dl class="switch">
                   48573: <dt>U+002D HYPHEN-MINUS (-)</dt>
                   48574: <dd>Switch to the <a href="#comment1">comment start dash state</a>
                   48575: .</dd>
                   48576: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48577: <dd><a href="#parse1">Parse error</a> . Emit the comment token.
                   48578: Switch to the <a href="#data-state">data state</a> .</dd>
                   48579: <dt>EOF</dt>
                   48580: <dd><a href="#parse1">Parse error</a> . Emit the comment token.
                   48581: Reconsume the EOF character in the <a href="#data-state">data
                   48582: state</a> .</dd>
                   48583: <dt>Anything else</dt>
                   48584: <dd>Append the input character to the comment token's data. Switch
                   48585: to the <a href="#comment">comment state</a> .</dd>
                   48586: </dl>
                   48587: </dd>
                   48588: <dt><dfn id="comment1">Comment start dash state</dfn></dt>
                   48589: <dd>
                   48590: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48591: <dl class="switch">
                   48592: <dt>U+002D HYPHEN-MINUS (-)</dt>
                   48593: <dd>Switch to the <a href="#comment3">comment end state</a></dd>
                   48594: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48595: <dd><a href="#parse1">Parse error</a> . Emit the comment token.
                   48596: Switch to the <a href="#data-state">data state</a> .</dd>
                   48597: <dt>EOF</dt>
                   48598: <dd><a href="#parse1">Parse error</a> . Emit the comment token.
                   48599: Reconsume the EOF character in the <a href="#data-state">data
                   48600: state</a> .</dd>
                   48601: <dt>Anything else</dt>
                   48602: <dd>Append a U+002D HYPHEN-MINUS (-) character and the input
                   48603: character to the comment token's data. Switch to the <a href=
                   48604: "#comment">comment state</a> .</dd>
                   48605: </dl>
                   48606: </dd>
                   48607: <dt><dfn id="comment">Comment state</dfn></dt>
                   48608: <dd>
                   48609: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48610: <dl class="switch">
                   48611: <dt>U+002D HYPHEN-MINUS (-)</dt>
                   48612: <dd>Switch to the <a href="#comment2">comment end dash
                   48613: state</a></dd>
                   48614: <dt>EOF</dt>
                   48615: <dd><a href="#parse1">Parse error</a> . Emit the comment token.
                   48616: Reconsume the EOF character in the <a href="#data-state">data
                   48617: state</a> .</dd>
                   48618: <dt>Anything else</dt>
                   48619: <dd>Append the input character to the comment token's data. Stay in
                   48620: the <a href="#comment">comment state</a> .</dd>
                   48621: </dl>
                   48622: </dd>
                   48623: <dt><dfn id="comment2">Comment end dash state</dfn></dt>
                   48624: <dd>
                   48625: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48626: <dl class="switch">
                   48627: <dt>U+002D HYPHEN-MINUS (-)</dt>
                   48628: <dd>Switch to the <a href="#comment3">comment end state</a></dd>
                   48629: <dt>EOF</dt>
                   48630: <dd><a href="#parse1">Parse error</a> . Emit the comment token.
                   48631: Reconsume the EOF character in the <a href="#data-state">data
                   48632: state</a> .</dd>
                   48633: <dt>Anything else</dt>
                   48634: <dd>Append a U+002D HYPHEN-MINUS (-) character and the input
                   48635: character to the comment token's data. Switch to the <a href=
                   48636: "#comment">comment state</a> .</dd>
                   48637: </dl>
                   48638: </dd>
                   48639: <dt><dfn id="comment3">Comment end state</dfn></dt>
                   48640: <dd>
                   48641: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48642: <dl class="switch">
                   48643: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48644: <dd>Emit the comment token. Switch to the <a href=
                   48645: "#data-state">data state</a> .</dd>
                   48646: <dt>U+002D HYPHEN-MINUS (-)</dt>
                   48647: <dd><a href="#parse1">Parse error</a> . Append a U+002D
                   48648: HYPHEN-MINUS (-) character to the comment token's data. Stay in the
                   48649: <a href="#comment3">comment end state</a> .</dd>
                   48650: <dt>EOF</dt>
                   48651: <dd><a href="#parse1">Parse error</a> . Emit the comment token.
                   48652: Reconsume the EOF character in the <a href="#data-state">data
                   48653: state</a> .</dd>
                   48654: <dt>Anything else</dt>
                   48655: <dd><a href="#parse1">Parse error</a> . Append two U+002D
                   48656: HYPHEN-MINUS (-) characters and the input character to the comment
                   48657: token's data. Switch to the <a href="#comment">comment state</a>
                   48658: .</dd>
                   48659: </dl>
                   48660: </dd>
                   48661: <dt><dfn id="doctype0">DOCTYPE state</dfn></dt>
                   48662: <dd>
                   48663: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48664: <dl class="switch">
                   48665: <dt>U+0009 CHARACTER TABULATION</dt>
                   48666: <dt>U+000A LINE FEED (LF)</dt>
                   48667: <dt>U+000B LINE TABULATION</dt>
                   48668: <dt>U+000C FORM FEED (FF)</dt>
                   48669: <dt>U+0020 SPACE</dt>
                   48670: <dd>Switch to the <a href="#before1">before DOCTYPE name state</a>
                   48671: .</dd>
                   48672: <dt>Anything else</dt>
                   48673: <dd><a href="#parse1">Parse error</a> . Reconsume the current
                   48674: character in the <a href="#before1">before DOCTYPE name state</a>
                   48675: .</dd>
                   48676: </dl>
                   48677: </dd>
                   48678: <dt><dfn id="before1">Before DOCTYPE name state</dfn></dt>
                   48679: <dd>
                   48680: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48681: <dl class="switch">
                   48682: <dt>U+0009 CHARACTER TABULATION</dt>
                   48683: <dt>U+000A LINE FEED (LF)</dt>
                   48684: <dt>U+000B LINE TABULATION</dt>
                   48685: <dt>U+000C FORM FEED (FF)</dt>
                   48686: <dt>U+0020 SPACE</dt>
                   48687: <dd>Stay in the <a href="#before1">before DOCTYPE name state</a>
                   48688: .</dd>
                   48689: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48690: <dd><a href="#parse1">Parse error</a> . Create a new DOCTYPE token.
                   48691: Set its <del class="diff-old">correctness</del> <i><ins class=
                   48692: "diff-chg">force-quirks</ins> flag</i> to <i><del class=
                   48693: "diff-old">incorrect</del> <ins class="diff-chg">on</ins></i> .
                   48694: Emit the token. Switch to the <a href="#data-state">data state</a>
                   48695: .</dd>
                   48696: <dt>EOF</dt>
                   48697: <dd><a href="#parse1">Parse error</a> . Create a new DOCTYPE token.
                   48698: Set its <del class="diff-old">correctness</del> <i><ins class=
                   48699: "diff-chg">force-quirks</ins> flag</i> to <i><del class=
                   48700: "diff-old">incorrect</del> <ins class="diff-chg">on</ins></i> .
                   48701: Emit the token. Reconsume the EOF character in the <a href=
                   48702: "#data-state">data state</a> .</dd>
                   48703: <dt>Anything else</dt>
                   48704: <dd>Create a new DOCTYPE token. Set the token's name <del class=
                   48705: "diff-old">name</del> to the current input character. Switch to the
                   48706: <a href="#doctype1">DOCTYPE name state</a> .</dd>
                   48707: </dl>
                   48708: </dd>
                   48709: <dt><dfn id="doctype1">DOCTYPE name state</dfn></dt>
                   48710: <dd>
                   48711: <p>First, consume the <a href="#next-input">next input
                   48712: character</a> :</p>
                   48713: <dl class="switch">
                   48714: <dt>U+0009 CHARACTER TABULATION</dt>
                   48715: <dt>U+000A LINE FEED (LF)</dt>
                   48716: <dt>U+000B LINE TABULATION</dt>
                   48717: <dt>U+000C FORM FEED (FF)</dt>
                   48718: <dt>U+0020 SPACE</dt>
                   48719: <dd>Switch to the <a href="#after1">after DOCTYPE name state</a>
                   48720: .</dd>
                   48721: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48722: <dd>Emit the current DOCTYPE token. Switch to the <a href=
                   48723: "#data-state">data state</a> .</dd>
                   48724: <dt>EOF</dt>
                   48725: <dd><a href="#parse1">Parse error</a> . Set the DOCTYPE token's
                   48726: <del class="diff-old">correctness</del> <i><ins class=
                   48727: "diff-chg">force-quirks</ins> flag</i> to <i><del class=
                   48728: "diff-old">incorrect</del> <ins class="diff-chg">on</ins></i> .
                   48729: Emit that DOCTYPE token. Reconsume the EOF character in the
                   48730: <a href="#data-state">data state</a> .</dd>
                   48731: <dt>Anything else</dt>
                   48732: <dd>Append the current input character to the current DOCTYPE
                   48733: token's name. Stay in the <a href="#doctype1">DOCTYPE name
                   48734: state</a> .</dd>
                   48735: </dl>
                   48736: </dd>
                   48737: <dt><dfn id="after1">After DOCTYPE name state</dfn></dt>
                   48738: <dd>
                   48739: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48740: <dl class="switch">
                   48741: <dt>U+0009 CHARACTER TABULATION</dt>
                   48742: <dt>U+000A LINE FEED (LF)</dt>
                   48743: <dt>U+000B LINE TABULATION</dt>
                   48744: <dt>U+000C FORM FEED (FF)</dt>
                   48745: <dt>U+0020 SPACE</dt>
                   48746: <dd>Stay in the <a href="#after1">after DOCTYPE name state</a>
                   48747: .</dd>
                   48748: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48749: <dd>Emit the current DOCTYPE token. Switch to the <a href=
                   48750: "#data-state">data state</a> .</dd>
                   48751: <dt>EOF</dt>
                   48752: <dd><a href="#parse1">Parse error</a> . Set the DOCTYPE token's
                   48753: <del class="diff-old">correctness</del> <i><ins class=
                   48754: "diff-chg">force-quirks</ins> flag</i> to <i><del class=
                   48755: "diff-old">incorrect</del> <ins class="diff-chg">on</ins></i> .
                   48756: Emit that DOCTYPE token. Reconsume the EOF character in the
                   48757: <a href="#data-state">data state</a> .</dd>
                   48758: <dt>Anything else</dt>
                   48759: <dd>
                   48760: <p>If the next six characters are a <span>case-insensitive</span>
                   48761: match for the word "PUBLIC", then consume those characters and
                   48762: switch to the <a href="#before2">before DOCTYPE public identifier
                   48763: state</a> .</p>
                   48764: <p>Otherwise, if the next six characters are a
                   48765: <span>case-insensitive</span> match for the word "SYSTEM", then
                   48766: consume those characters and switch to the <a href=
                   48767: "#before3">before DOCTYPE system identifier state</a> .</p>
                   48768: <p>Otherwise, this is the <a href="#parse1">parse error</a> .
                   48769: <ins class="diff-new">Set the DOCTYPE token's</ins> <i><ins class=
                   48770: "diff-new">force-quirks flag</ins></i> <ins class=
                   48771: "diff-new">to</ins> <i><ins class="diff-new">on</ins></i> . Switch
                   48772: to the <a href="#bogus0">bogus DOCTYPE state</a> .</p>
                   48773: </dd>
                   48774: </dl>
                   48775: </dd>
                   48776: <dt><dfn id="before2">Before DOCTYPE public identifier
                   48777: state</dfn></dt>
                   48778: <dd>
                   48779: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48780: <dl class="switch">
                   48781: <dt>U+0009 CHARACTER TABULATION</dt>
                   48782: <dt>U+000A LINE FEED (LF)</dt>
                   48783: <dt>U+000B LINE TABULATION</dt>
                   48784: <dt>U+000C FORM FEED (FF)</dt>
                   48785: <dt>U+0020 SPACE</dt>
                   48786: <dd>Stay in the <a href="#before2">before DOCTYPE public identifier
                   48787: state</a> .</dd>
                   48788: <dt>U+0022 QUOTATION MARK (")</dt>
                   48789: <dd>Set the DOCTYPE token's public identifier to the empty
                   48790: <del class="diff-old">string,</del> <ins class="diff-chg">string
                   48791: (not missing),</ins> then switch to the <a href="#doctype2">DOCTYPE
                   48792: public identifier (double-quoted) state</a> .</dd>
                   48793: <dt>U+0027 APOSTROPHE (')</dt>
                   48794: <dd>Set the DOCTYPE token's public identifier to the empty
                   48795: <del class="diff-old">string,</del> <ins class="diff-chg">string
                   48796: (not missing),</ins> then switch to the <a href="#doctype3">DOCTYPE
                   48797: public identifier (single-quoted) state</a> .</dd>
                   48798: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48799: <dd><a href="#parse1">Parse error</a> . Set the DOCTYPE token's
                   48800: <del class="diff-old">correctness</del> <i><ins class=
                   48801: "diff-chg">force-quirks</ins> flag</i> to <i><del class=
                   48802: "diff-old">incorrect</del> <ins class="diff-chg">on</ins></i> .
                   48803: Emit that DOCTYPE token. Switch to the <a href="#data-state">data
                   48804: state</a> .</dd>
                   48805: <dt>EOF</dt>
                   48806: <dd><a href="#parse1">Parse error</a> . Set the DOCTYPE token's
                   48807: <del class="diff-old">correctness</del> <i><ins class=
                   48808: "diff-chg">force-quirks</ins> flag</i> to <i><del class=
                   48809: "diff-old">incorrect</del> <ins class="diff-chg">on</ins></i> .
                   48810: Emit that DOCTYPE token. Reconsume the EOF character in the
                   48811: <a href="#data-state">data state</a> .</dd>
                   48812: <dt>Anything else</dt>
                   48813: <dd><a href="#parse1">Parse error</a> . <ins class="diff-new">Set
                   48814: the DOCTYPE token's</ins> <i><ins class="diff-new">force-quirks
                   48815: flag</ins></i> <ins class="diff-new">to</ins> <i><ins class=
                   48816: "diff-new">on</ins></i> . Switch to the <a href="#bogus0">bogus
                   48817: DOCTYPE state</a> .</dd>
                   48818: </dl>
                   48819: </dd>
                   48820: <dt><dfn id="doctype2">DOCTYPE public identifier (double-quoted)
                   48821: state</dfn></dt>
                   48822: <dd>
                   48823: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48824: <dl class="switch">
                   48825: <dt>U+0022 QUOTATION MARK (")</dt>
                   48826: <dd>Switch to the <a href="#after2">after DOCTYPE public identifier
                   48827: state</a> .</dd>
                   48828: <dt><ins class="diff-new">U+003E GREATER-THAN SIGN
                   48829: (&gt;)</ins></dt>
                   48830: <dd><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   48831: .<ins class="diff-new">Set the DOCTYPE token's</ins> <i><ins class=
                   48832: "diff-new">force-quirks flag</ins></i> <ins class=
                   48833: "diff-new">to</ins> <i><ins class="diff-new">on</ins></i>
                   48834: .<ins class="diff-new">Emit that DOCTYPE token. Switch to the</ins>
                   48835: <a href="#data-state"><ins class="diff-new">data state</ins></a>
                   48836: .</dd>
                   48837: <dt>EOF</dt>
                   48838: <dd><a href="#parse1">Parse error</a> . Set the DOCTYPE token's
                   48839: <del class="diff-old">correctness</del> <i><ins class=
                   48840: "diff-chg">force-quirks</ins> flag</i> to <i><del class=
                   48841: "diff-old">incorrect</del> <ins class="diff-chg">on</ins></i> .
                   48842: Emit that DOCTYPE token. Reconsume the EOF character in the
                   48843: <a href="#data-state">data state</a> .</dd>
                   48844: <dt>Anything else</dt>
                   48845: <dd>Append the current input character to the current DOCTYPE
                   48846: token's public identifier. Stay in the <a href="#doctype2">DOCTYPE
                   48847: public identifier (double-quoted) state</a> .</dd>
                   48848: </dl>
                   48849: </dd>
                   48850: <dt><dfn id="doctype3">DOCTYPE public identifier (single-quoted)
                   48851: state</dfn></dt>
                   48852: <dd>
                   48853: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48854: <dl class="switch">
                   48855: <dt>U+0027 APOSTROPHE (')</dt>
                   48856: <dd>Switch to the <a href="#after2">after DOCTYPE public identifier
                   48857: state</a> .</dd>
                   48858: <dt><ins class="diff-new">U+003E GREATER-THAN SIGN
                   48859: (&gt;)</ins></dt>
                   48860: <dd><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   48861: .<ins class="diff-new">Set the DOCTYPE token's</ins> <i><ins class=
                   48862: "diff-new">force-quirks flag</ins></i> <ins class=
                   48863: "diff-new">to</ins> <i><ins class="diff-new">on</ins></i>
                   48864: .<ins class="diff-new">Emit that DOCTYPE token. Switch to the</ins>
                   48865: <a href="#data-state"><ins class="diff-new">data state</ins></a>
                   48866: .</dd>
                   48867: <dt>EOF</dt>
                   48868: <dd><a href="#parse1">Parse error</a> . Set the DOCTYPE token's
                   48869: <del class="diff-old">correctness</del> <i><ins class=
                   48870: "diff-chg">force-quirks</ins> flag</i> to <i><del class=
                   48871: "diff-old">incorrect</del> <ins class="diff-chg">on</ins></i> .
                   48872: Emit that DOCTYPE token. Reconsume the EOF character in the
                   48873: <a href="#data-state">data state</a> .</dd>
                   48874: <dt>Anything else</dt>
                   48875: <dd>Append the current input character to the current DOCTYPE
                   48876: token's public identifier. Stay in the <a href="#doctype3">DOCTYPE
                   48877: public identifier (single-quoted) state</a> .</dd>
                   48878: </dl>
                   48879: </dd>
                   48880: <dt><dfn id="after2">After DOCTYPE public identifier
                   48881: state</dfn></dt>
                   48882: <dd>
                   48883: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48884: <dl class="switch">
                   48885: <dt>U+0009 CHARACTER TABULATION</dt>
                   48886: <dt>U+000A LINE FEED (LF)</dt>
                   48887: <dt>U+000B LINE TABULATION</dt>
                   48888: <dt>U+000C FORM FEED (FF)</dt>
                   48889: <dt>U+0020 SPACE</dt>
                   48890: <dd>Stay in the <a href="#after2">after DOCTYPE public identifier
                   48891: state</a> .</dd>
                   48892: <dt>U+0022 QUOTATION MARK (")</dt>
                   48893: <dd>Set the DOCTYPE token's system identifier to the empty
                   48894: <del class="diff-old">string,</del> <ins class="diff-chg">string
                   48895: (not missing),</ins> then switch to the <a href="#doctype4">DOCTYPE
                   48896: system identifier (double-quoted) state</a> .</dd>
                   48897: <dt>U+0027 APOSTROPHE (')</dt>
                   48898: <dd>Set the DOCTYPE token's system identifier to the empty
                   48899: <del class="diff-old">string,</del> <ins class="diff-chg">string
                   48900: (not missing),</ins> then switch to the <a href="#doctype5">DOCTYPE
                   48901: system identifier (single-quoted) state</a> .</dd>
                   48902: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48903: <dd>Emit the current DOCTYPE token. Switch to the <a href=
                   48904: "#data-state">data state</a> .</dd>
                   48905: <dt>EOF</dt>
                   48906: <dd><a href="#parse1">Parse error</a> . Set the DOCTYPE token's
                   48907: <del class="diff-old">correctness</del> <i><ins class=
                   48908: "diff-chg">force-quirks</ins> flag</i> to <i><del class=
                   48909: "diff-old">incorrect</del> <ins class="diff-chg">on</ins></i> .
                   48910: Emit that DOCTYPE token. Reconsume the EOF character in the
                   48911: <a href="#data-state">data state</a> .</dd>
                   48912: <dt>Anything else</dt>
                   48913: <dd><a href="#parse1">Parse error</a> . <ins class="diff-new">Set
                   48914: the DOCTYPE token's</ins> <i><ins class="diff-new">force-quirks
                   48915: flag</ins></i> <ins class="diff-new">to</ins> <i><ins class=
                   48916: "diff-new">on</ins></i> . Switch to the <a href="#bogus0">bogus
                   48917: DOCTYPE state</a> .</dd>
                   48918: </dl>
                   48919: </dd>
                   48920: <dt><dfn id="before3">Before DOCTYPE system identifier
                   48921: state</dfn></dt>
                   48922: <dd>
                   48923: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48924: <dl class="switch">
                   48925: <dt>U+0009 CHARACTER TABULATION</dt>
                   48926: <dt>U+000A LINE FEED (LF)</dt>
                   48927: <dt>U+000B LINE TABULATION</dt>
                   48928: <dt>U+000C FORM FEED (FF)</dt>
                   48929: <dt>U+0020 SPACE</dt>
                   48930: <dd>Stay in the <a href="#before3">before DOCTYPE system identifier
                   48931: state</a> .</dd>
                   48932: <dt>U+0022 QUOTATION MARK (")</dt>
                   48933: <dd>Set the DOCTYPE token's system identifier to the empty
                   48934: <del class="diff-old">string,</del> <ins class="diff-chg">string
                   48935: (not missing),</ins> then switch to the <a href="#doctype4">DOCTYPE
                   48936: system identifier (double-quoted) state</a> .</dd>
                   48937: <dt>U+0027 APOSTROPHE (')</dt>
                   48938: <dd>Set the DOCTYPE token's system identifier to the empty
                   48939: <del class="diff-old">string,</del> <ins class="diff-chg">string
                   48940: (not missing),</ins> then switch to the <a href="#doctype5">DOCTYPE
                   48941: system identifier (single-quoted) state</a> .</dd>
                   48942: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   48943: <dd><a href="#parse1">Parse error</a> . Set the DOCTYPE token's
                   48944: <del class="diff-old">correctness</del> <i><ins class=
                   48945: "diff-chg">force-quirks</ins> flag</i> to <i><del class=
                   48946: "diff-old">incorrect</del> <ins class="diff-chg">on</ins></i> .
                   48947: Emit that DOCTYPE token. Switch to the <a href="#data-state">data
                   48948: state</a> .</dd>
                   48949: <dt>EOF</dt>
                   48950: <dd><a href="#parse1">Parse error</a> . Set the DOCTYPE token's
                   48951: <del class="diff-old">correctness</del> <i><ins class=
                   48952: "diff-chg">force-quirks</ins> flag</i> to <i><del class=
                   48953: "diff-old">incorrect</del> <ins class="diff-chg">on</ins></i> .
                   48954: Emit that DOCTYPE token. Reconsume the EOF character in the
                   48955: <a href="#data-state">data state</a> .</dd>
                   48956: <dt>Anything else</dt>
                   48957: <dd><a href="#parse1">Parse error</a> . <ins class="diff-new">Set
                   48958: the DOCTYPE token's</ins> <i><ins class="diff-new">force-quirks
                   48959: flag</ins></i> <ins class="diff-new">to</ins> <i><ins class=
                   48960: "diff-new">on</ins></i> . Switch to the <a href="#bogus0">bogus
                   48961: DOCTYPE state</a> .</dd>
                   48962: </dl>
                   48963: </dd>
                   48964: <dt><dfn id="doctype4">DOCTYPE system identifier (double-quoted)
                   48965: state</dfn></dt>
                   48966: <dd>
                   48967: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48968: <dl class="switch">
                   48969: <dt>U+0022 QUOTATION MARK (")</dt>
                   48970: <dd>Switch to the <a href="#after3">after DOCTYPE system identifier
                   48971: state</a> .</dd>
                   48972: <dt><ins class="diff-new">U+003E GREATER-THAN SIGN
                   48973: (&gt;)</ins></dt>
                   48974: <dd><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   48975: .<ins class="diff-new">Set the DOCTYPE token's</ins> <i><ins class=
                   48976: "diff-new">force-quirks flag</ins></i> <ins class=
                   48977: "diff-new">to</ins> <i><ins class="diff-new">on</ins></i>
                   48978: .<ins class="diff-new">Emit that DOCTYPE token. Switch to the</ins>
                   48979: <a href="#data-state"><ins class="diff-new">data state</ins></a>
                   48980: .</dd>
                   48981: <dt>EOF</dt>
                   48982: <dd><a href="#parse1">Parse error</a> . Set the DOCTYPE token's
                   48983: <del class="diff-old">correctness</del> <i><ins class=
                   48984: "diff-chg">force-quirks</ins> flag</i> to <i><del class=
                   48985: "diff-old">incorrect</del> <ins class="diff-chg">on</ins></i> .
                   48986: Emit that DOCTYPE token. Reconsume the EOF character in the
                   48987: <a href="#data-state">data state</a> .</dd>
                   48988: <dt>Anything else</dt>
                   48989: <dd>Append the current input character to the current DOCTYPE
                   48990: token's system identifier. Stay in the <a href="#doctype4">DOCTYPE
                   48991: system identifier (double-quoted) state</a> .</dd>
                   48992: </dl>
                   48993: </dd>
                   48994: <dt><dfn id="doctype5">DOCTYPE system identifier (single-quoted)
                   48995: state</dfn></dt>
                   48996: <dd>
                   48997: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   48998: <dl class="switch">
                   48999: <dt>U+0027 APOSTROPHE (')</dt>
                   49000: <dd>Switch to the <a href="#after3">after DOCTYPE system identifier
                   49001: state</a> .</dd>
                   49002: <dt><ins class="diff-new">U+003E GREATER-THAN SIGN
                   49003: (&gt;)</ins></dt>
                   49004: <dd><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   49005: .<ins class="diff-new">Set the DOCTYPE token's</ins> <i><ins class=
                   49006: "diff-new">force-quirks flag</ins></i> <ins class=
                   49007: "diff-new">to</ins> <i><ins class="diff-new">on</ins></i>
                   49008: .<ins class="diff-new">Emit that DOCTYPE token. Switch to the</ins>
                   49009: <a href="#data-state"><ins class="diff-new">data state</ins></a>
                   49010: .</dd>
                   49011: <dt>EOF</dt>
                   49012: <dd><a href="#parse1">Parse error</a> . Set the DOCTYPE token's
                   49013: <del class="diff-old">correctness</del> <i><ins class=
                   49014: "diff-chg">force-quirks</ins> flag</i> to <i><del class=
                   49015: "diff-old">incorrect</del> <ins class="diff-chg">on</ins></i> .
                   49016: Emit that DOCTYPE token. Reconsume the EOF character in the
                   49017: <a href="#data-state">data state</a> .</dd>
                   49018: <dt>Anything else</dt>
                   49019: <dd>Append the current input character to the current DOCTYPE
                   49020: token's system identifier. Stay in the <a href="#doctype5">DOCTYPE
                   49021: system identifier (single-quoted) state</a> .</dd>
                   49022: </dl>
                   49023: </dd>
                   49024: <dt><dfn id="after3">After DOCTYPE system identifier
                   49025: state</dfn></dt>
                   49026: <dd>
                   49027: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   49028: <dl class="switch">
                   49029: <dt>U+0009 CHARACTER TABULATION</dt>
                   49030: <dt>U+000A LINE FEED (LF)</dt>
                   49031: <dt>U+000B LINE TABULATION</dt>
                   49032: <dt>U+000C FORM FEED (FF)</dt>
                   49033: <dt>U+0020 SPACE</dt>
                   49034: <dd>Stay in the <a href="#after3">after DOCTYPE system identifier
                   49035: state</a> .</dd>
                   49036: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   49037: <dd>Emit the current DOCTYPE token. Switch to the <a href=
                   49038: "#data-state">data state</a> .</dd>
                   49039: <dt>EOF</dt>
                   49040: <dd><a href="#parse1">Parse error</a> . Set the DOCTYPE token's
                   49041: <del class="diff-old">correctness</del> <i><ins class=
                   49042: "diff-chg">force-quirks</ins> flag</i> to <i><del class=
                   49043: "diff-old">incorrect</del> <ins class="diff-chg">on</ins></i> .
                   49044: Emit that DOCTYPE token. Reconsume the EOF character in the
                   49045: <a href="#data-state">data state</a> .</dd>
                   49046: <dt>Anything else</dt>
                   49047: <dd><a href="#parse1">Parse error</a> . Switch to the <a href=
                   49048: "#bogus0">bogus DOCTYPE state</a> . <ins class="diff-new">(This
                   49049: does</ins> <em><ins class="diff-new">not</ins></em> <ins class=
                   49050: "diff-new">set the DOCTYPE token's</ins> <i><ins class=
                   49051: "diff-new">force-quirks flag</ins></i> <ins class=
                   49052: "diff-new">to</ins> <i><ins class="diff-new">on</ins></i> .)</dd>
                   49053: </dl>
                   49054: </dd>
                   49055: <dt><dfn id="bogus0">Bogus DOCTYPE state</dfn></dt>
                   49056: <dd>
                   49057: <p>Consume the <a href="#next-input">next input character</a> :</p>
                   49058: <dl class="switch">
                   49059: <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
                   49060: <dd><del class="diff-old">Set the DOCTYPE token's correctness flag
                   49061: to incorrect .</del> Emit <del class="diff-old">that</del>
                   49062: <ins class="diff-chg">the</ins> DOCTYPE token. Switch to the
                   49063: <a href="#data-state">data state</a> .</dd>
                   49064: <dt>EOF</dt>
                   49065: <dd><del class="diff-old">Parse error . Set the DOCTYPE token's
                   49066: correctness flag to incorrect .</del> Emit <del class=
                   49067: "diff-old">that</del> <ins class="diff-chg">the</ins> DOCTYPE
                   49068: token. Reconsume the EOF character in the <a href=
                   49069: "#data-state">data state</a> .</dd>
                   49070: <dt>Anything else</dt>
                   49071: <dd>Stay in the <a href="#bogus0">bogus DOCTYPE state</a> .</dd>
                   49072: </dl>
                   49073: </dd>
                   49074: <dt><dfn id="cdata1"><ins class="diff-new">CDATA block
                   49075: state</ins></dfn></dt>
                   49076: <dd>
                   49077: <p><em><ins class="diff-new">(This can only happen if the</ins>
                   49078: <a href="#content2"><ins class="diff-new">content model
                   49079: flag</ins></a> <ins class="diff-new">is set to the PCDATA state,
                   49080: and is unrelated to the</ins> <a href="#content2"><ins class=
                   49081: "diff-new">content model flag</ins></a> <ins class="diff-new">'s
                   49082: CDATA state.)</ins></em></p>
                   49083: <p><ins class="diff-new">Consume every character up to the next
                   49084: occurrence of the three character sequence U+005D RIGHT SQUARE
                   49085: BRACKET U+005D RIGHT SQUARE BRACKET U+003E GREATER-THAN SIGN
                   49086: (</ins> <code title=""><ins class="diff-new">]]&gt;</ins></code>
                   49087: <ins class="diff-new">), or the end of the file (EOF), whichever
                   49088: comes first. Emit a series of text tokens consisting of all the
                   49089: characters consumed except the matching three character sequence at
                   49090: the end (if one was found before the end of the file).</ins></p>
                   49091: <p><ins class="diff-new">Switch to the</ins> <a href=
                   49092: "#data-state"><ins class="diff-new">data state</ins></a> .</p>
                   49093: <p><ins class="diff-new">If the end of the file was reached,
                   49094: reconsume the EOF character.</ins></p>
                   49095: </dd>
                   49096: </dl>
                   49097: <h5 id="tokenising"><span class="secno"><del class=
                   49098: "diff-old">8.2.3.1.</del> <ins class=
                   49099: "diff-chg">8.2.4.1.</ins></span> Tokenising <del class=
                   49100: "diff-old">entities</del> <ins class="diff-chg">character
                   49101: references</ins></h5>
                   49102: <p>This section defines how to <dfn id="consume">consume
                   49103: <del class="diff-old">an entity</del> <ins class="diff-chg">a
                   49104: character reference</ins></dfn> . This definition is used when
                   49105: parsing <del class="diff-old">entities</del> <ins class=
                   49106: "diff-chg">character references</ins> <a href="#character4" title=
                   49107: "character reference data state">in text</a> and <a href=
                   49108: "#character5" title=
                   49109: "character reference in attribute value state">in attributes</a>
                   49110: .</p>
                   49111: <p>The <del class="diff-old">behaviour</del> <ins class=
                   49112: "diff-chg">behavior</ins> depends on the identity of the next
                   49113: character (the one immediately after the U+0026 AMPERSAND
                   49114: character):</p>
                   49115: <dl class="switch">
                   49116: <dt>U+0009 CHARACTER TABULATION</dt>
                   49117: <dt>U+000A LINE FEED (LF)</dt>
                   49118: <dt>U+000B LINE TABULATION</dt>
                   49119: <dt>U+000C FORM FEED (FF)</dt>
                   49120: <dt>U+0020 SPACE</dt>
                   49121: <dt>U+003C LESS-THAN SIGN</dt>
                   49122: <dt>U+0026 AMPERSAND</dt>
                   49123: <dt>EOF</dt>
                   49124: <dt><ins class="diff-new">The</ins> <dfn id=
                   49125: "additional"><ins class="diff-new">additional allowed
                   49126: character</ins></dfn> ,<ins class="diff-new">if there is
                   49127: one</ins></dt>
                   49128: <dd>Not <del class="diff-old">an entity.</del> <ins class=
                   49129: "diff-chg">a character reference.</ins> No characters are consumed,
                   49130: and nothing is returned. (This is not an error, either.)</dd>
                   49131: <dt>U+0023 NUMBER SIGN (#)</dt>
                   49132: <dd>
                   49133: <p>Consume the U+0023 NUMBER SIGN.</p>
                   49134: <p>The <del class="diff-old">behaviour</del> <ins class=
                   49135: "diff-chg">behavior</ins> further depends on the character after
                   49136: the U+0023 NUMBER SIGN:</p>
                   49137: <dl class="switch">
                   49138: <dt>U+0078 LATIN SMALL LETTER X</dt>
                   49139: <dt>U+0058 LATIN CAPITAL LETTER X</dt>
                   49140: <dd>
                   49141: <p>Consume the X.</p>
                   49142: <p>Follow the steps below, but using the range of characters U+0030
                   49143: DIGIT ZERO through to U+0039 DIGIT NINE, U+0061 LATIN SMALL LETTER
                   49144: A through to U+0066 LATIN SMALL LETTER F, and U+0041 LATIN CAPITAL
                   49145: LETTER A, through to U+0046 LATIN CAPITAL LETTER F (in other words,
                   49146: 0-9, A-F, a-f).</p>
                   49147: <p>When it comes to interpreting the number, interpret it as a
                   49148: hexadecimal number.</p>
                   49149: </dd>
                   49150: <dt>Anything else</dt>
                   49151: <dd>
                   49152: <p>Follow the steps below, but using the range of characters U+0030
                   49153: DIGIT ZERO through to U+0039 DIGIT NINE (i.e. just 0-9).</p>
                   49154: <p>When it comes to interpreting the number, interpret it as a
                   49155: decimal number.</p>
                   49156: </dd>
                   49157: </dl>
                   49158: <p>Consume as many characters as match the range of characters
                   49159: given above.</p>
                   49160: <p>If no characters match the range, then don't consume any
                   49161: characters (and unconsume the U+0023 NUMBER SIGN character and, if
                   49162: appropriate, the X character). This is a <a href="#parse1">parse
                   49163: error</a> ; nothing is returned.</p>
                   49164: <p>Otherwise, if the next character is a U+003B SEMICOLON, consume
                   49165: that too. If it isn't, there is a <a href="#parse1">parse error</a>
                   49166: .</p>
                   49167: <p>If one or more characters match the range, then take them all
                   49168: and interpret the string of characters as a number (either
                   49169: hexadecimal or decimal as appropriate).</p>
                   49170: <p>If that number is one of the numbers in the first column of the
                   49171: following table, then this is a <a href="#parse1">parse error</a> .
                   49172: Find the row with that number in the first column, and return a
                   49173: character token for the Unicode character given in the second
                   49174: column of that row.</p>
                   49175: <table>
                   49176: <thead>
                   49177: <tr>
                   49178: <th>Number</th>
                   49179: <th colspan="2">Unicode character</th>
                   49180: </tr>
                   49181: </thead>
                   49182: <tbody>
                   49183: <tr>
                   49184: <td>0x0D</td>
                   49185: <td>U+000A</td>
                   49186: <td>LINE FEED (LF)</td>
                   49187: </tr>
                   49188: <tr>
                   49189: <td>0x80</td>
                   49190: <td>U+20AC</td>
                   49191: <td>EURO SIGN ('€')</td>
                   49192: </tr>
                   49193: <tr>
                   49194: <td>0x81</td>
                   49195: <td>U+FFFD</td>
                   49196: <td>REPLACEMENT CHARACTER</td>
                   49197: </tr>
                   49198: <tr>
                   49199: <td>0x82</td>
                   49200: <td>U+201A</td>
                   49201: <td>SINGLE LOW-9 QUOTATION MARK ('‚')</td>
                   49202: </tr>
                   49203: <tr>
                   49204: <td>0x83</td>
                   49205: <td>U+0192</td>
                   49206: <td>LATIN SMALL LETTER F WITH HOOK ('ƒ')</td>
                   49207: </tr>
                   49208: <tr>
                   49209: <td>0x84</td>
                   49210: <td>U+201E</td>
                   49211: <td>DOUBLE LOW-9 QUOTATION MARK ('„')</td>
                   49212: </tr>
                   49213: <tr>
                   49214: <td>0x85</td>
                   49215: <td>U+2026</td>
                   49216: <td>HORIZONTAL ELLIPSIS ('…')</td>
                   49217: </tr>
                   49218: <tr>
                   49219: <td>0x86</td>
                   49220: <td>U+2020</td>
                   49221: <td>DAGGER ('†')</td>
                   49222: </tr>
                   49223: <tr>
                   49224: <td>0x87</td>
                   49225: <td>U+2021</td>
                   49226: <td>DOUBLE DAGGER ('‡')</td>
                   49227: </tr>
                   49228: <tr>
                   49229: <td>0x88</td>
                   49230: <td>U+02C6</td>
                   49231: <td>MODIFIER LETTER CIRCUMFLEX ACCENT ('ˆ')</td>
                   49232: </tr>
                   49233: <tr>
                   49234: <td>0x89</td>
                   49235: <td>U+2030</td>
                   49236: <td>PER MILLE SIGN ('‰')</td>
                   49237: </tr>
                   49238: <tr>
                   49239: <td>0x8A</td>
                   49240: <td>U+0160</td>
                   49241: <td>LATIN CAPITAL LETTER S WITH CARON ('Š')</td>
                   49242: </tr>
                   49243: <tr>
                   49244: <td>0x8B</td>
                   49245: <td>U+2039</td>
                   49246: <td>SINGLE LEFT-POINTING ANGLE QUOTATION MARK ('‹')</td>
                   49247: </tr>
                   49248: <tr>
                   49249: <td>0x8C</td>
                   49250: <td>U+0152</td>
                   49251: <td>LATIN CAPITAL LIGATURE OE ('Œ')</td>
                   49252: </tr>
                   49253: <tr>
                   49254: <td>0x8D</td>
                   49255: <td>U+FFFD</td>
                   49256: <td>REPLACEMENT CHARACTER</td>
                   49257: </tr>
                   49258: <tr>
                   49259: <td>0x8E</td>
                   49260: <td>U+017D</td>
                   49261: <td>LATIN CAPITAL LETTER Z WITH CARON ('Ž')</td>
                   49262: </tr>
                   49263: <tr>
                   49264: <td>0x8F</td>
                   49265: <td>U+FFFD</td>
                   49266: <td>REPLACEMENT CHARACTER</td>
                   49267: </tr>
                   49268: <tr>
                   49269: <td>0x90</td>
                   49270: <td>U+FFFD</td>
                   49271: <td>REPLACEMENT CHARACTER</td>
                   49272: </tr>
                   49273: <tr>
                   49274: <td>0x91</td>
                   49275: <td>U+2018</td>
                   49276: <td>LEFT SINGLE QUOTATION MARK ('‘')</td>
                   49277: </tr>
                   49278: <tr>
                   49279: <td>0x92</td>
                   49280: <td>U+2019</td>
                   49281: <td>RIGHT SINGLE QUOTATION MARK ('’')</td>
                   49282: </tr>
                   49283: <tr>
                   49284: <td>0x93</td>
                   49285: <td>U+201C</td>
                   49286: <td>LEFT DOUBLE QUOTATION MARK ('“')</td>
                   49287: </tr>
                   49288: <tr>
                   49289: <td>0x94</td>
                   49290: <td>U+201D</td>
                   49291: <td>RIGHT DOUBLE QUOTATION MARK ('”')</td>
                   49292: </tr>
                   49293: <tr>
                   49294: <td>0x95</td>
                   49295: <td>U+2022</td>
                   49296: <td>BULLET ('•')</td>
                   49297: </tr>
                   49298: <tr>
                   49299: <td>0x96</td>
                   49300: <td>U+2013</td>
                   49301: <td>EN DASH ('–')</td>
                   49302: </tr>
                   49303: <tr>
                   49304: <td>0x97</td>
                   49305: <td>U+2014</td>
                   49306: <td>EM DASH ('—')</td>
                   49307: </tr>
                   49308: <tr>
                   49309: <td>0x98</td>
                   49310: <td>U+02DC</td>
                   49311: <td>SMALL TILDE ('˜')</td>
                   49312: </tr>
                   49313: <tr>
                   49314: <td>0x99</td>
                   49315: <td>U+2122</td>
                   49316: <td>TRADE MARK SIGN ('™')</td>
                   49317: </tr>
                   49318: <tr>
                   49319: <td>0x9A</td>
                   49320: <td>U+0161</td>
                   49321: <td>LATIN SMALL LETTER S WITH CARON ('š')</td>
                   49322: </tr>
                   49323: <tr>
                   49324: <td>0x9B</td>
                   49325: <td>U+203A</td>
                   49326: <td>SINGLE RIGHT-POINTING ANGLE QUOTATION MARK ('›')</td>
                   49327: </tr>
                   49328: <tr>
                   49329: <td>0x9C</td>
                   49330: <td>U+0153</td>
                   49331: <td>LATIN SMALL LIGATURE OE ('œ')</td>
                   49332: </tr>
                   49333: <tr>
                   49334: <td>0x9D</td>
                   49335: <td>U+FFFD</td>
                   49336: <td>REPLACEMENT CHARACTER</td>
                   49337: </tr>
                   49338: <tr>
                   49339: <td>0x9E</td>
                   49340: <td>U+017E</td>
                   49341: <td>LATIN SMALL LETTER Z WITH CARON ('ž')</td>
                   49342: </tr>
                   49343: <tr>
                   49344: <td>0x9F</td>
                   49345: <td>U+0178</td>
                   49346: <td>LATIN CAPITAL LETTER Y WITH DIAERESIS ('Ÿ')</td>
                   49347: </tr>
                   49348: </tbody>
                   49349: </table>
                   49350: <p>Otherwise, if the number is <del class="diff-old">zero, if the
                   49351: number is higher than 0x10FFFF, or if it's one of the surrogate
                   49352: characters (characters</del> in the range <ins class=
                   49353: "diff-new">0x0000 to 0x0008, 0x000E to 0x001F, 0x007F to
                   49354: 0x009F,</ins> 0xD800 to <del class="diff-old">0xDFFF),</del>
                   49355: <ins class="diff-chg">0xDFFF , 0xFDD0 to 0xFDDF, or is one of
                   49356: 0xFFFE, 0xFFFF, 0x1FFFE, 0x1FFFF, 0x2FFFE, 0x2FFFF, 0x3FFFE,
                   49357: 0x3FFFF, 0x4FFFE, 0x4FFFF, 0x5FFFE, 0x5FFFF, 0x6FFFE, 0x6FFFF,
                   49358: 0x7FFFE, 0x7FFFF, 0x8FFFE, 0x8FFFF, 0x9FFFE, 0x9FFFF, 0xAFFFE,
                   49359: 0xAFFFF, 0xBFFFE, 0xBFFFF, 0xCFFFE, 0xCFFFF, 0xDFFFE, 0xDFFFF,
                   49360: 0xEFFFE, 0xEFFFF, 0xFFFFE, 0xFFFFF, 0x10FFFE, or 0x10FFFF, or is
                   49361: higher than 0x10FFFF,</ins> then this is a <a href="#parse1">parse
                   49362: error</a> ; return a character token for the U+FFFD REPLACEMENT
                   49363: CHARACTER character instead.</p>
                   49364: <p>Otherwise, return a character token for the Unicode character
                   49365: whose code point is that number.</p>
                   49366: </dd>
                   49367: <dt>Anything else</dt>
                   49368: <dd>
                   49369: <p>Consume the maximum number of characters possible, with the
                   49370: consumed characters case-sensitively matching one of the
                   49371: identifiers in the first column of the <del class=
                   49372: "diff-old">entities</del> <a href="#named0"><ins class=
                   49373: "diff-chg">named character references</ins></a> table.</p>
                   49374: <p>If no match can be made, then this is a <a href="#parse1">parse
                   49375: error</a> . No characters are consumed, and nothing is
                   49376: returned.</p>
                   49377: <p>If the last character matched is not a U+003B SEMICOLON (
                   49378: <code title="">;</code> ), there is a <a href="#parse1">parse
                   49379: error</a> .</p>
                   49380: <p>If the <del class="diff-old">entity</del> <ins class=
                   49381: "diff-chg">character reference</ins> is being consumed <a href=
                   49382: "#character5" title=
                   49383: "character reference in attribute value state">as part of an
                   49384: attribute</a> , and the last character matched is not a U+003B
                   49385: SEMICOLON ( <code title="">;</code> ), and the next character is in
                   49386: the range U+0030 DIGIT ZERO to U+0039 DIGIT NINE, U+0041 LATIN
                   49387: CAPITAL LETTER A to U+005A LATIN CAPITAL LETTER Z, or U+0061 LATIN
                   49388: SMALL LETTER A to U+007A LATIN SMALL LETTER Z, then, for historical
                   49389: reasons, all the characters that were matched after the U+0026
                   49390: AMPERSAND (&amp;) must be unconsumed, and nothing is returned.</p>
                   49391: <p>Otherwise, return a character token for the character
                   49392: corresponding to the <del class="diff-old">entity</del> <ins class=
                   49393: "diff-chg">character reference</ins> name (as given by the second
                   49394: column of the <del class="diff-old">entities</del> <a href=
                   49395: "#named0"><ins class="diff-chg">named character
                   49396: references</ins></a> table).</p>
                   49397: <div class="example">
                   49398: <p>If the markup contains <code title="">I'm &amp;notit; I tell
                   49399: you</code> , the <del class="diff-old">entity</del> <ins class=
                   49400: "diff-chg">character reference</ins> is parsed as "not", as in,
                   49401: <code title="">I'm ¬it; I tell you</code> . But if the markup was
                   49402: <code title="">I'm &amp;notin; I tell you</code> , the <del class=
                   49403: "diff-old">entity</del> <ins class="diff-chg">character
                   49404: reference</ins> would be parsed as "notin;", resulting in
                   49405: <code title="">I'm ∉ I tell you</code> .</p>
                   49406: </div>
                   49407: </dd>
                   49408: </dl>
                   49409: <h4 id="tree-construction"><span class="secno"><del class=
                   49410: "diff-old">8.2.4.</del> <ins class="diff-chg">8.2.5</ins></span>
                   49411: <dfn id="tree-construction0">Tree construction</dfn></h4>
                   49412: <p>The input to the tree construction stage is a sequence of tokens
                   49413: from the <a href="#tokenisation0">tokenisation</a> stage. The tree
                   49414: construction stage is associated with a DOM <code>Document</code>
                   49415: object when a parser is created. The "output" of this stage
                   49416: consists of dynamically modifying or extending that document's DOM
                   49417: tree.</p>
                   49418: <p><del class="diff-old">Tree construction passes through several
                   49419: phases. Initially, UAs must act according to the steps described as
                   49420: being those of the initial phase .</del> This specification does
                   49421: not define when an interactive user agent has to render the
                   49422: <code>Document</code> <ins class="diff-new">so that it is</ins>
                   49423: available to the user, or when it has to begin accepting user
                   49424: input.</p>
                   49425: <p><ins class="diff-new">As each token is emitted from the
                   49426: tokeniser, the user agent must process the token according to the
                   49427: rules given in the section corresponding to the current</ins>
                   49428: <span><ins class="diff-new">insertion mode</ins></span> .</p>
                   49429: <p>When the steps below require the UA to <del class=
                   49430: "diff-old">append</del> <dfn id="insert"><ins class=
                   49431: "diff-chg">insert</ins> a character</dfn> <del class=
                   49432: "diff-old">to</del> <ins class="diff-chg">into</ins> a node,
                   49433: <ins class="diff-new">if that node has a child immediately before
                   49434: where</ins> the <del class="diff-old">UA must collect it</del>
                   49435: <ins class="diff-chg">character is to be inserted,</ins> and
                   49436: <del class="diff-old">all subsequent consecutive characters</del>
                   49437: that <del class="diff-old">would</del> <ins class="diff-chg">child
                   49438: is a</ins> <code><ins class="diff-chg">Text</ins></code>
                   49439: <ins class="diff-chg">node, then the character must</ins> be
                   49440: appended to that <del class="diff-old">node, and insert one</del>
                   49441: <code><ins class="diff-chg">Text</ins></code> <ins class=
                   49442: "diff-chg">node; otherwise, a new</ins> <code>Text</code> node
                   49443: whose data is <ins class="diff-new">just that character must be
                   49444: inserted in</ins> the <del class="diff-old">concatenation of all
                   49445: those characters.</del> <ins class="diff-chg">appropriate
                   49446: place.</ins></p>
                   49447: <p id="mutation-during-parsing">DOM mutation events must not fire
                   49448: for changes caused by the UA parsing the document. (Conceptually,
                   49449: the parser is not mutating the DOM, it is constructing it.) This
                   49450: includes the parsing of any content inserted using <code title=
                   49451: "dom-document-write-HTML"><a href=
                   49452: "#document.write...">document.write()</a></code> and <code title=
                   49453: "dom-document-writeln"><a href=
                   49454: "#document.writeln...">document.writeln()</a></code> calls.
                   49455: <a href="#references">[DOM3EVENTS]</a></p>
                   49456: <p class="note">Not all of the tag names mentioned below are
                   49457: conformant tag names in this specification; many are included to
                   49458: handle legacy content. They still form part of the algorithm that
                   49459: implementations are required to implement to claim conformance.</p>
                   49460: <p class="note">The algorithm described below places no limit on
                   49461: the depth of the DOM tree generated, or on the length of tag names,
                   49462: attribute names, attribute values, text nodes, etc. While
                   49463: <del class="diff-old">implementators</del> <ins class=
                   49464: "diff-chg">implementors</ins> are encouraged to avoid arbitrary
                   49465: limits, it is <del class="diff-old">recognised</del> <ins class=
                   49466: "diff-chg">recognized</ins> that <a href=
                   49467: "#hardwareLimitations">practical concerns</a> will likely force
                   49468: user agents to impose nesting depths.</p>
                   49469: <h5 id="creating"><span class="secno"><del class=
                   49470: "diff-old">8.2.4.1.</del> <ins class=
                   49471: "diff-chg">8.2.5.1.</ins></span> <ins class="diff-new">Creating and
                   49472: inserting elements</ins></h5>
                   49473: <p><ins class="diff-new">When the steps below require the UA
                   49474: to</ins> <dfn id="create" title=
                   49475: "create an element for the token"><ins class="diff-new">create an
                   49476: element for a token</ins></dfn> <ins class="diff-new">in a
                   49477: particular namespace, the UA must create a node implementing the
                   49478: interface appropriate for the element type corresponding to the tag
                   49479: name of the token in the given namespace (as given in the
                   49480: specification that defines that element, e.g. for an</ins>
                   49481: <code><a href="#a"><ins class="diff-chg">a</ins></a></code>
                   49482: <ins class="diff-chg">element in the</ins> <a href=
                   49483: "#html-namespace0"><ins class="diff-chg">HTML namespace</ins></a>
                   49484: ,<ins class="diff-chg">this specification defines it to be
                   49485: the</ins> <code><a href="#htmlanchorelement"><ins class=
                   49486: "diff-chg">HTMLAnchorElement</ins></a></code> <ins class=
                   49487: "diff-chg">interface), with the tag name being the name of that
                   49488: element, with the node being in the given namespace, and with the
                   49489: attributes on the node being those given in the given
                   49490: token.</ins></p>
                   49491: <p>The <del class="diff-old">initial phase</del> <ins class=
                   49492: "diff-chg">interface appropriate for an element in the</ins>
                   49493: <a href="#html-namespace0"><ins class="diff-chg">HTML
                   49494: namespace</ins></a> <ins class="diff-chg">that is not defined in
                   49495: this specification is</ins> <code><a href=
                   49496: "#htmlelement"><ins class="diff-chg">HTMLElement</ins></a></code>
                   49497: .<ins class="diff-chg">The interface appropriate for an element in
                   49498: another namespace that is not defined by that namespace's
                   49499: specification is</ins> <code><ins class=
                   49500: "diff-chg">Element</ins></code> .</p>
                   49501: <p><ins class="diff-chg">When the steps below require the UA
                   49502: to</ins> <dfn id="insert0"><ins class="diff-chg">insert an HTML
                   49503: element</ins></dfn> <ins class="diff-new">for a token, the UA must
                   49504: first</ins> <a href="#create"><ins class="diff-new">create an
                   49505: element for the token</ins></a> <ins class="diff-new">in the</ins>
                   49506: <a href="#html-namespace0"><ins class="diff-new">HTML
                   49507: namespace</ins></a> ,<ins class="diff-new">and then append this
                   49508: node to the</ins> <a href="#current5"><ins class="diff-new">current
                   49509: node</ins></a> ,<ins class="diff-new">and push it onto the</ins>
                   49510: <a href="#stack"><ins class="diff-new">stack of open
                   49511: elements</ins></a> <ins class="diff-new">so that it is the
                   49512: new</ins> <a href="#current5"><ins class="diff-new">current
                   49513: node</ins></a> .</p>
                   49514: <p><ins class="diff-new">The steps below may also require that the
                   49515: UA insert an HTML element in a particular place, in which case the
                   49516: UA must follow the same steps except that it must insert or append
                   49517: the new node in the location specified instead of appending it to
                   49518: the</ins> <a href="#current5"><ins class="diff-new">current
                   49519: node</ins></a> .<ins class="diff-new">(This happens in particular
                   49520: during the parsing of tables with invalid content.)</ins></p>
                   49521: <p><ins class="diff-new">When the steps below require the UA
                   49522: to</ins> <dfn id="insert1"><ins class="diff-new">insert a foreign
                   49523: element</ins></dfn> <ins class="diff-new">for a token, the UA must
                   49524: first</ins> <a href="#create"><ins class="diff-new">create an
                   49525: element for the token</ins></a> <ins class="diff-new">in the given
                   49526: namespace, and then append this node to the</ins> <a href=
                   49527: "#current5"><ins class="diff-new">current node</ins></a>
                   49528: ,<ins class="diff-new">and push it onto the</ins> <a href=
                   49529: "#stack"><ins class="diff-new">stack of open elements</ins></a>
                   49530: <ins class="diff-new">so that it is the new</ins> <a href=
                   49531: "#current5"><ins class="diff-new">current node</ins></a>
                   49532: .<ins class="diff-new">If the newly created element has an</ins>
                   49533: <code title=""><ins class="diff-new">xmlns</ins></code> <ins class=
                   49534: "diff-new">attribute in the</ins> <a href="#xmlns"><ins class=
                   49535: "diff-new">XMLNS namespace</ins></a> <ins class="diff-new">whose
                   49536: value is not exactly the same as the element's namespace, that is
                   49537: a</ins> <a href="#parse1"><ins class="diff-new">parse
                   49538: error</ins></a> .</p>
                   49539: <p><ins class="diff-new">When the steps below require the user
                   49540: agent to</ins> <dfn id="adjust"><ins class="diff-new">adjust
                   49541: foreign attributes</ins></dfn> <ins class="diff-new">for a token,
                   49542: then, if any of the attributes on the token match the strings given
                   49543: in the first column of the following table, let the attribute be a
                   49544: namespaced attribute, with the prefix being the string given in the
                   49545: corresponding cell in the second column, the local name being the
                   49546: string given in the corresponding cell in the third column, and the
                   49547: namespace being the namespace given in the corresponding cell in
                   49548: the fourth column. (This fixes the use of namespaced attributes, in
                   49549: particular</ins> <code title=""><ins class=
                   49550: "diff-new">xml:lang</ins></code> .)</p>
                   49551: <table>
                   49552: <thead>
                   49553: <tr>
                   49554: <th><ins class="diff-new">Attribute name</ins></th>
                   49555: <th><ins class="diff-new">Prefix</ins></th>
                   49556: <th><ins class="diff-new">Local name</ins></th>
                   49557: <th><ins class="diff-new">Namespace</ins></th>
                   49558: </tr>
                   49559: </thead>
                   49560: <tbody>
                   49561: <tr>
                   49562: <td><code title=""><ins class=
                   49563: "diff-new">xlink:actuate</ins></code></td>
                   49564: <td><code title=""><ins class="diff-new">xlink</ins></code></td>
                   49565: <td><code title=""><ins class="diff-new">actuate</ins></code></td>
                   49566: <td><a href="#xlink"><ins class="diff-new">XLink
                   49567: namespace</ins></a></td>
                   49568: </tr>
                   49569: <tr>
                   49570: <td><code title=""><ins class=
                   49571: "diff-new">xlink:arcrole</ins></code></td>
                   49572: <td><code title=""><ins class="diff-new">xlink</ins></code></td>
                   49573: <td><code title=""><ins class="diff-new">arcrole</ins></code></td>
                   49574: <td><a href="#xlink"><ins class="diff-new">XLink
                   49575: namespace</ins></a></td>
                   49576: </tr>
                   49577: <tr>
                   49578: <td><code title=""><ins class=
                   49579: "diff-new">xlink:href</ins></code></td>
                   49580: <td><code title=""><ins class="diff-new">xlink</ins></code></td>
                   49581: <td><code title=""><ins class="diff-new">href</ins></code></td>
                   49582: <td><a href="#xlink"><ins class="diff-new">XLink
                   49583: namespace</ins></a></td>
                   49584: </tr>
                   49585: <tr>
                   49586: <td><code title=""><ins class=
                   49587: "diff-new">xlink:role</ins></code></td>
                   49588: <td><code title=""><ins class="diff-new">xlink</ins></code></td>
                   49589: <td><code title=""><ins class="diff-new">role</ins></code></td>
                   49590: <td><a href="#xlink"><ins class="diff-new">XLink
                   49591: namespace</ins></a></td>
                   49592: </tr>
                   49593: <tr>
                   49594: <td><code title=""><ins class=
                   49595: "diff-new">xlink:show</ins></code></td>
                   49596: <td><code title=""><ins class="diff-new">xlink</ins></code></td>
                   49597: <td><code title=""><ins class="diff-new">show</ins></code></td>
                   49598: <td><a href="#xlink"><ins class="diff-new">XLink
                   49599: namespace</ins></a></td>
                   49600: </tr>
                   49601: <tr>
                   49602: <td><code title=""><ins class=
                   49603: "diff-new">xlink:title</ins></code></td>
                   49604: <td><code title=""><ins class="diff-new">xlink</ins></code></td>
                   49605: <td><code title=""><ins class="diff-new">title</ins></code></td>
                   49606: <td><a href="#xlink"><ins class="diff-new">XLink
                   49607: namespace</ins></a></td>
                   49608: </tr>
                   49609: <tr>
                   49610: <td><code title=""><ins class=
                   49611: "diff-new">xlink:type</ins></code></td>
                   49612: <td><code title=""><ins class="diff-new">xlink</ins></code></td>
                   49613: <td><code title=""><ins class="diff-new">type</ins></code></td>
                   49614: <td><a href="#xlink"><ins class="diff-new">XLink
                   49615: namespace</ins></a></td>
                   49616: </tr>
                   49617: <tr>
                   49618: <td><code title=""><ins class="diff-new">xml:base</ins></code></td>
                   49619: <td><code title=""><ins class="diff-new">xml</ins></code></td>
                   49620: <td><code title=""><ins class="diff-new">base</ins></code></td>
                   49621: <td><a href="#xml-namespace"><ins class="diff-new">XML
                   49622: namespace</ins></a></td>
                   49623: </tr>
                   49624: <tr>
                   49625: <td><code title=""><ins class="diff-new">xml:lang</ins></code></td>
                   49626: <td><code title=""><ins class="diff-new">xml</ins></code></td>
                   49627: <td><code title=""><ins class="diff-new">lang</ins></code></td>
                   49628: <td><a href="#xml-namespace"><ins class="diff-new">XML
                   49629: namespace</ins></a></td>
                   49630: </tr>
                   49631: <tr>
                   49632: <td><code title=""><ins class=
                   49633: "diff-new">xml:space</ins></code></td>
                   49634: <td><code title=""><ins class="diff-new">xml</ins></code></td>
                   49635: <td><code title=""><ins class="diff-new">space</ins></code></td>
                   49636: <td><a href="#xml-namespace"><ins class="diff-new">XML
                   49637: namespace</ins></a></td>
                   49638: </tr>
                   49639: <tr>
                   49640: <td><code title=""><ins class="diff-new">xmlns</ins></code></td>
                   49641: <td><ins class="diff-new">(none)</ins></td>
                   49642: <td><code title=""><ins class="diff-new">xmlns</ins></code></td>
                   49643: <td><a href="#xmlns"><ins class="diff-new">XMLNS
                   49644: namespace</ins></a></td>
                   49645: </tr>
                   49646: <tr>
                   49647: <td><code title=""><ins class=
                   49648: "diff-new">xmlns:xlink</ins></code></td>
                   49649: <td><code title=""><ins class="diff-new">xmlns</ins></code></td>
                   49650: <td><code title=""><ins class="diff-new">xlink</ins></code></td>
                   49651: <td><a href="#xmlns"><ins class="diff-new">XMLNS
                   49652: namespace</ins></a></td>
                   49653: </tr>
                   49654: </tbody>
                   49655: </table>
                   49656: <p><ins class="diff-new">The</ins> <dfn id="generic"><ins class=
                   49657: "diff-new">generic CDATA parsing algorithm</ins></dfn> <ins class=
                   49658: "diff-new">and the</ins> <dfn id="generic0"><ins class=
                   49659: "diff-new">generic RCDATA parsing algorithm</ins></dfn> <ins class=
                   49660: "diff-new">consist of the following steps. These algorithms are
                   49661: always invoked in response to a start tag token.</ins></p>
                   49662: <ol>
                   49663: <li>
                   49664: <p><a href="#create"><ins class="diff-new">Create an element for
                   49665: the token</ins></a> <ins class="diff-new">in the</ins> <a href=
                   49666: "#html-namespace0"><ins class="diff-new">HTML namespace</ins></a>
                   49667: .</p>
                   49668: </li>
                   49669: <li>
                   49670: <p><ins class="diff-new">Append the new element to the</ins>
                   49671: <a href="#current5"><ins class="diff-new">current node</ins></a>
                   49672: .</p>
                   49673: </li>
                   49674: <li>
                   49675: <p><ins class="diff-new">If the algorithm that was invoked is
                   49676: the</ins> <a href="#generic"><ins class="diff-new">generic CDATA
                   49677: parsing algorithm</ins></a> ,<ins class="diff-new">switch the
                   49678: tokeniser's</ins> <a href="#content2"><ins class="diff-new">content
                   49679: model flag</ins></a> <ins class="diff-new">to the CDATA state;
                   49680: otherwise the algorithm invoked was the</ins> <a href=
                   49681: "#generic0"><ins class="diff-new">generic RCDATA parsing
                   49682: algorithm</ins></a> ,<ins class="diff-new">switch the
                   49683: tokeniser's</ins> <a href="#content2"><ins class="diff-new">content
                   49684: model flag</ins></a> <ins class="diff-new">to the RCDATA
                   49685: state.</ins></p>
                   49686: </li>
                   49687: <li>
                   49688: <p><ins class="diff-new">Then, collect all the character tokens
                   49689: that the tokeniser returns until it returns a token that is not a
                   49690: character token, or until it stops tokenising.</ins></p>
                   49691: </li>
                   49692: <li>
                   49693: <p><ins class="diff-new">If this process resulted in a collection
                   49694: of character tokens, append a single</ins> <code><ins class=
                   49695: "diff-new">Text</ins></code> <ins class="diff-new">node, whose
                   49696: contents is the concatenation of all those tokens' characters, to
                   49697: the new element node.</ins></p>
                   49698: </li>
                   49699: <li>
                   49700: <p><ins class="diff-new">The tokeniser's</ins> <a href=
                   49701: "#content2"><ins class="diff-new">content model flag</ins></a>
                   49702: <ins class="diff-new">will have switched back to the PCDATA
                   49703: state.</ins></p>
                   49704: </li>
                   49705: <li>
                   49706: <p><ins class="diff-new">If the next token is an end tag token with
                   49707: the same tag name as the start tag token, ignore it. Otherwise,
                   49708: it's an end-of-file token, and this is a</ins> <a href=
                   49709: "#parse1"><ins class="diff-new">parse error</ins></a> .</p>
                   49710: </li>
                   49711: </ol>
                   49712: <h5 id="closing"><span class="secno"><ins class=
                   49713: "diff-new">8.2.5.2.</ins></span> <ins class="diff-new">Closing
                   49714: elements that have implied end tags</ins></h5>
                   49715: <p><del class="diff-old">Initially,</del> <ins class=
                   49716: "diff-chg">When</ins> the <del class="diff-old">tree construction
                   49717: stage</del> <ins class="diff-chg">steps below require the UA
                   49718: to</ins> <dfn id="generate"><ins class="diff-chg">generate implied
                   49719: end tags</ins></dfn> ,<ins class="diff-chg">then, while the</ins>
                   49720: <a href="#current5"><ins class="diff-chg">current node</ins></a>
                   49721: <ins class="diff-chg">is a</ins> <code><a href="#dd"><ins class=
                   49722: "diff-chg">dd</ins></a></code> <ins class="diff-chg">element,
                   49723: a</ins> <code><a href="#dt"><ins class=
                   49724: "diff-chg">dt</ins></a></code> <ins class="diff-chg">element,
                   49725: an</ins> <code><a href="#li"><ins class=
                   49726: "diff-chg">li</ins></a></code> <ins class="diff-chg">element,
1.2     ! mike     49727: an</ins> <code><ins class="diff-chg">option</ins></code>
        !          49728: <ins class="diff-chg">element, an</ins> <code><ins class=
        !          49729: "diff-chg">optgroup</ins></code> <ins class="diff-chg">element,
1.1       mike     49730: a</ins> <code><a href="#p"><ins class="diff-chg">p</ins></a></code>
                   49731: <ins class="diff-chg">element, an</ins> <code><a href=
                   49732: "#rp"><ins class="diff-chg">rp</ins></a></code> <ins class=
                   49733: "diff-chg">element, or an</ins> <code><a href="#rt"><ins class=
                   49734: "diff-chg">rt</ins></a></code> <ins class="diff-chg">element, the
                   49735: UA</ins> must <del class="diff-old">handle each token emitted</del>
                   49736: <ins class="diff-chg">pop the</ins> <a href="#current5"><ins class=
                   49737: "diff-chg">current node</ins></a> <ins class="diff-chg">off
                   49738: the</ins> <a href="#stack"><ins class="diff-chg">stack of open
                   49739: elements</ins></a> .</p>
                   49740: <p><ins class="diff-chg">If a step requires the UA to generate
                   49741: implied end tags but lists an element to exclude</ins> from the
                   49742: <del class="diff-old">tokenisation</del> <ins class=
                   49743: "diff-chg">process, then the UA must perform the above steps as if
                   49744: that element was not in the above list.</ins></p>
                   49745: <h5 id="foster"><span class="secno"><ins class=
                   49746: "diff-chg">8.2.5.3.</ins></span> <ins class="diff-chg">Foster
                   49747: parenting</ins></h5>
                   49748: <p><ins class="diff-chg">Foster parenting happens when content is
                   49749: misnested in tables.</ins></p>
                   49750: <p><ins class="diff-chg">When a node</ins> <var title=
                   49751: ""><ins class="diff-chg">node</ins></var> <ins class="diff-chg">is
                   49752: to be</ins> <dfn id="foster0" title="foster parent"><ins class=
                   49753: "diff-chg">foster parented</ins></dfn> ,<ins class="diff-chg">the
                   49754: node</ins> <var title=""><ins class="diff-chg">node</ins></var>
                   49755: <ins class="diff-chg">must be inserted into the</ins> <i><a href=
                   49756: "#foster1"><ins class="diff-chg">foster parent element</ins></a>
                   49757: <del class="diff-old">stage</del></i> , <ins class="diff-chg">and
                   49758: the</ins> <a href="#current6"><ins class="diff-chg">current
                   49759: table</ins></a> <ins class="diff-chg">must be marked as</ins>
                   49760: <dfn id="tainted"><ins class="diff-chg">tainted</ins></dfn>
                   49761: .<ins class="diff-chg">(Once the</ins> <a href=
                   49762: "#current6"><ins class="diff-chg">current table</ins></a>
                   49763: <ins class="diff-chg">has been</ins> <a href="#tainted"><ins class=
                   49764: "diff-chg">tainted</ins></a> ,<ins class="diff-chg">whitespace
                   49765: characters are inserted into the</ins> <i><a href=
                   49766: "#foster1"><ins class="diff-chg">foster parent
                   49767: element</ins></a></i> <ins class="diff-chg">instead of the</ins>
                   49768: <a href="#current5"><ins class="diff-chg">current node</ins></a>
                   49769: .)</p>
                   49770: <p><ins class="diff-chg">The</ins> <dfn id="foster1"><ins class=
                   49771: "diff-chg">foster parent element</ins></dfn> <ins class=
                   49772: "diff-chg">is the parent element of the last</ins> <code><a href=
                   49773: "#table"><ins class="diff-chg">table</ins></a></code> <ins class=
                   49774: "diff-chg">element in the</ins> <a href="#stack"><ins class=
                   49775: "diff-chg">stack of open elements</ins></a> ,<ins class=
                   49776: "diff-chg">if there is a</ins> <code><a href="#table"><ins class=
                   49777: "diff-chg">table</ins></a></code> <ins class="diff-chg">element and
                   49778: it has such a parent element. If there is no</ins> <code><a href=
                   49779: "#table"><ins class="diff-chg">table</ins></a></code> <ins class=
                   49780: "diff-chg">element in the</ins> <a href="#stack"><ins class=
                   49781: "diff-chg">stack of open elements</ins></a> <ins class=
                   49782: "diff-chg">(</ins> <a href="#fragment"><ins class=
                   49783: "diff-chg">fragment case</ins></a> <ins class="diff-chg">), then
                   49784: the</ins> <em><a href="#foster1"><ins class="diff-chg">foster
                   49785: parent element</ins></a></em> <ins class="diff-chg">is the first
                   49786: element in the</ins> <a href="#stack"><ins class="diff-chg">stack
                   49787: of open elements</ins></a> <ins class="diff-chg">(the</ins>
                   49788: <code><a href="#html"><ins class="diff-chg">html</ins></a></code>
                   49789: <ins class="diff-chg">element). Otherwise, if there is a</ins>
                   49790: <code><a href="#table"><ins class="diff-chg">table</ins></a></code>
                   49791: <ins class="diff-chg">element in the</ins> <a href=
                   49792: "#stack"><ins class="diff-chg">stack of open elements</ins></a>
                   49793: ,<ins class="diff-chg">but the last</ins> <code><a href=
                   49794: "#table"><ins class="diff-chg">table</ins></a></code> <ins class=
                   49795: "diff-chg">element in the</ins> <a href="#stack"><ins class=
                   49796: "diff-chg">stack of open elements</ins></a> <ins class=
                   49797: "diff-chg">has no parent, or its parent node is not an element,
                   49798: then the</ins> <em><a href="#foster1"><ins class="diff-chg">foster
                   49799: parent element</ins></a></em> <ins class="diff-chg">is the element
                   49800: before the last</ins> <code><a href="#table"><ins class=
                   49801: "diff-chg">table</ins></a></code> <ins class="diff-chg">element in
                   49802: the</ins> <a href="#stack"><ins class="diff-chg">stack of open
                   49803: elements</ins></a> .</p>
                   49804: <p><ins class="diff-chg">If the</ins> <i><a href=
                   49805: "#foster1"><ins class="diff-chg">foster parent
                   49806: element</ins></a></i> <ins class="diff-chg">is the parent element
                   49807: of the last</ins> <code><a href="#table"><ins class=
                   49808: "diff-chg">table</ins></a></code> <ins class="diff-chg">element in
                   49809: the</ins> <a href="#stack"><ins class="diff-chg">stack of open
                   49810: elements</ins></a> ,<ins class="diff-chg">then</ins> <var title=
                   49811: ""><ins class="diff-chg">node</ins></var> <ins class=
                   49812: "diff-chg">must be inserted immediately</ins> <em><ins class=
                   49813: "diff-chg">before</ins></em> <ins class="diff-chg">the last</ins>
                   49814: <code><a href="#table"><ins class="diff-chg">table</ins></a></code>
                   49815: <ins class="diff-chg">element in the</ins> <a href=
                   49816: "#stack"><ins class="diff-chg">stack of open elements</ins></a>
                   49817: <ins class="diff-chg">in the</ins> <i><a href=
                   49818: "#foster1"><ins class="diff-chg">foster parent
                   49819: element</ins></a></i> <ins class="diff-chg">; otherwise,</ins>
                   49820: <var title=""><ins class="diff-chg">node</ins></var> <ins class=
                   49821: "diff-chg">must be</ins> <em><ins class=
                   49822: "diff-chg">appended</ins></em> <ins class="diff-chg">to the</ins>
                   49823: <i><a href="#foster1"><ins class="diff-chg">foster parent
                   49824: element</ins></a></i> .</p>
                   49825: <h5 id="the-initial"><span class="secno"><ins class=
                   49826: "diff-chg">8.2.5.4.</ins></span> <ins class="diff-chg">The "</ins>
                   49827: <dfn id="initial" title="insertion mode: initial"><ins class=
                   49828: "diff-chg">initial</ins></dfn> <ins class="diff-chg">" insertion
                   49829: mode</ins></h5>
                   49830: <p><ins class="diff-chg">When the</ins> <span><ins class=
                   49831: "diff-chg">insertion mode</ins></span> <ins class="diff-chg">is
                   49832: "</ins> <a href="#initial" title=
                   49833: "insertion mode: initial"><ins class="diff-chg">initial</ins></a>
                   49834: <ins class="diff-chg">", tokens must be handled</ins> as
                   49835: follows:</p>
                   49836: <dl class="switch">
                   49837: <dt>A character token that is one of one of U+0009 CHARACTER
                   49838: TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
                   49839: FORM FEED (FF), or U+0020 SPACE</dt>
                   49840: <dd>
                   49841: <p>Ignore the token.</p>
                   49842: </dd>
                   49843: <dt>A comment token</dt>
                   49844: <dd>
                   49845: <p>Append a <code>Comment</code> node to the <code>Document</code>
                   49846: object with the <code title="">data</code> attribute set to the
                   49847: data given in the comment token.</p>
                   49848: </dd>
                   49849: <dt>A DOCTYPE token</dt>
                   49850: <dd>
                   49851: <p>If the DOCTYPE token's <code title="">name</code> does not
                   49852: case-insensitively match the string " <code title="">HTML</code> ",
                   49853: or if the token's public identifier is not missing, or if the
                   49854: token's system identifier is not missing, then there is a <a href=
                   49855: "#parse1">parse error</a> . Conformance checkers may, instead of
                   49856: reporting this error, switch to a conformance checking mode for
                   49857: another language (e.g. based on the DOCTYPE token a conformance
                   49858: checker could <del class="diff-old">recognise</del> <ins class=
                   49859: "diff-chg">recognize</ins> that the document is an HTML4-era
                   49860: document, and defer to an HTML4 conformance checker.)</p>
                   49861: <p>Append a <code>DocumentType</code> node to the
                   49862: <code>Document</code> node, with the <code title="">name</code>
                   49863: attribute set to the name given in the DOCTYPE token; the
                   49864: <code title="">publicId</code> attribute set to the public
                   49865: identifier given in the DOCTYPE token, or the empty string if the
                   49866: public identifier was <del class="diff-old">not set;</del>
                   49867: <ins class="diff-chg">missing;</ins> the <code title=
                   49868: "">systemId</code> attribute set to the system identifier given in
                   49869: the DOCTYPE token, or the empty string if the system identifier was
                   49870: <del class="diff-old">not set;</del> <ins class=
                   49871: "diff-chg">missing;</ins> and the other attributes specific to
                   49872: <code>DocumentType</code> objects set to null and empty lists as
                   49873: appropriate. Associate the <code>DocumentType</code> node with the
                   49874: <code>Document</code> object so that it is returned as the value of
                   49875: the <code title="">doctype</code> attribute of the
                   49876: <code>Document</code> object.</p>
                   49877: <p id="quirks-mode-doctypes">Then, if the DOCTYPE token matches one
                   49878: of the conditions in the following list, then set the document to
                   49879: <a href="#quirks">quirks mode</a> :</p>
                   49880: <ul class="brief">
                   49881: <li>The <del class="diff-old">correctness</del> <i><ins class=
                   49882: "diff-chg">force-quirks</ins> flag</i> is set to <i><del class=
                   49883: "diff-old">incorrect</del> <ins class="diff-chg">on</ins></i>
                   49884: .</li>
                   49885: <li>The name is set to anything other than " <code title=
                   49886: "">HTML</code> ".</li>
                   49887: <li>The public identifier <del class="diff-old">is set to:</del>
                   49888: <ins class="diff-chg">starts with:</ins> " <code title=
                   49889: "">+//Silmaril//dtd html Pro v0r11 <del class=
                   49890: "diff-old">19970101//EN</del> <ins class=
                   49891: "diff-chg">19970101//</ins></code> "</li>
                   49892: <li>The public identifier <del class="diff-old">is set to:</del>
                   49893: <ins class="diff-chg">starts with:</ins> " <code title=
                   49894: "">-//AdvaSoft Ltd//DTD HTML 3.0 asWedit + <del class=
                   49895: "diff-old">extensions//EN</del> <ins class=
                   49896: "diff-chg">extensions//</ins></code> "</li>
                   49897: <li>The public identifier <del class="diff-old">is set to:</del>
                   49898: <ins class="diff-chg">starts with:</ins> " <code title=
                   49899: "">-//AS//DTD HTML 3.0 asWedit + <del class=
                   49900: "diff-old">extensions//EN</del> <ins class=
                   49901: "diff-chg">extensions//</ins></code> "</li>
                   49902: <li>The public identifier <del class="diff-old">is set to:</del>
                   49903: <ins class="diff-chg">starts with:</ins> " <code title=
                   49904: "">-//IETF//DTD HTML 2.0 Level <del class="diff-old">1//EN</del>
                   49905: <ins class="diff-chg">1//</ins></code> "</li>
                   49906: <li>The public identifier <del class="diff-old">is set to:</del>
                   49907: <ins class="diff-chg">starts with:</ins> " <code title=
                   49908: "">-//IETF//DTD HTML 2.0 Level <del class="diff-old">2//EN</del>
                   49909: <ins class="diff-chg">2//</ins></code> "</li>
                   49910: <li>The public identifier <del class="diff-old">is set to:</del>
                   49911: <ins class="diff-chg">starts with:</ins> " <code title=
                   49912: "">-//IETF//DTD HTML 2.0 Strict Level <del class=
                   49913: "diff-old">1//EN</del> <ins class="diff-chg">1//</ins></code>
                   49914: "</li>
                   49915: <li>The public identifier <del class="diff-old">is set to:</del>
                   49916: <ins class="diff-chg">starts with:</ins> " <code title=
                   49917: "">-//IETF//DTD HTML 2.0 Strict Level <del class=
                   49918: "diff-old">2//EN</del> <ins class="diff-chg">2//</ins></code>
                   49919: "</li>
                   49920: <li>The public identifier <del class="diff-old">is set to:</del>
                   49921: <ins class="diff-chg">starts with:</ins> " <code title=
                   49922: "">-//IETF//DTD HTML 2.0 <del class="diff-old">Strict//EN " The
                   49923: public identifier is set to: " -//IETF//DTD HTML 2.0//EN</del>
                   49924: <ins class="diff-chg">Strict//</ins></code> "</li>
                   49925: <li>The public identifier <del class="diff-old">is set to:</del>
                   49926: <ins class="diff-chg">starts with:</ins> " <code title=
                   49927: "">-//IETF//DTD HTML <del class="diff-old">2.1E//EN</del>
                   49928: <ins class="diff-chg">2.0//</ins></code> "</li>
                   49929: <li>The public identifier <del class="diff-old">is set to:</del>
                   49930: <ins class="diff-chg">starts with:</ins> " <code title=
                   49931: "">-//IETF//DTD HTML <del class="diff-old">3.0//EN</del>
                   49932: <ins class="diff-chg">2.1E//</ins></code> "</li>
                   49933: <li>The public identifier <del class="diff-old">is set to:</del>
                   49934: <ins class="diff-chg">starts with:</ins> " <code title=
                   49935: "">-//IETF//DTD HTML <del class="diff-old">3.0//EN//</del>
                   49936: <ins class="diff-chg">3.0//</ins></code> "</li>
                   49937: <li>The public identifier <del class="diff-old">is set to:</del>
                   49938: <ins class="diff-chg">starts with:</ins> " <code title=
                   49939: "">-//IETF//DTD HTML 3.2 <del class="diff-old">Final//EN " The
                   49940: public identifier is set to: " -//IETF//DTD HTML 3.2//EN " The
                   49941: public identifier is set to: " -//IETF//DTD HTML 3//EN " The public
                   49942: identifier is set to: " -//IETF//DTD HTML Level 0//EN " The public
                   49943: identifier is set to: " -//IETF//DTD HTML Level 0//EN//2.0 " The
                   49944: public identifier is set to: " -//IETF//DTD HTML Level 1//EN " The
                   49945: public identifier is set to: " -//IETF//DTD HTML Level 1//EN//2.0 "
                   49946: The public identifier is set to: " -//IETF//DTD HTML Level 2//EN "
                   49947: The public identifier is set to: " -//IETF//DTD HTML Level
                   49948: 2//EN//2.0</del> <ins class="diff-chg">Final//</ins></code> "</li>
                   49949: <li>The public identifier <del class="diff-old">is set to:</del>
                   49950: <ins class="diff-chg">starts with:</ins> " <code title=
                   49951: "">-//IETF//DTD HTML <del class="diff-old">Level 3//EN</del>
                   49952: <ins class="diff-chg">3.2//</ins></code> "</li>
                   49953: <li>The public identifier <del class="diff-old">is set to:</del>
                   49954: <ins class="diff-chg">starts with:</ins> " <code title=
                   49955: "">-//IETF//DTD HTML <del class="diff-old">Level 3//EN//3.0</del>
                   49956: <ins class="diff-chg">3//</ins></code> "</li>
                   49957: <li>The public identifier <del class="diff-old">is set to:</del>
                   49958: <ins class="diff-chg">starts with:</ins> " <code title=
                   49959: "">-//IETF//DTD HTML <del class="diff-old">Strict</del> Level
                   49960: <del class="diff-old">0//EN</del> <ins class=
                   49961: "diff-chg">0//</ins></code> "</li>
                   49962: <li>The public identifier <del class="diff-old">is set to:</del>
                   49963: <ins class="diff-chg">starts with:</ins> " <code title=
                   49964: "">-//IETF//DTD HTML <del class="diff-old">Strict</del> Level
                   49965: <del class="diff-old">0//EN//2.0</del> <ins class=
                   49966: "diff-chg">1//</ins></code> "</li>
                   49967: <li>The public identifier <del class="diff-old">is set to:</del>
                   49968: <ins class="diff-chg">starts with:</ins> " <code title=
                   49969: "">-//IETF//DTD HTML <del class="diff-old">Strict</del> Level
                   49970: <del class="diff-old">1//EN</del> <ins class=
                   49971: "diff-chg">2//</ins></code> "</li>
                   49972: <li>The public identifier <del class="diff-old">is set to:</del>
                   49973: <ins class="diff-chg">starts with:</ins> " <code title=
                   49974: "">-//IETF//DTD HTML <del class="diff-old">Strict</del> Level
                   49975: <del class="diff-old">1//EN//2.0</del> <ins class=
                   49976: "diff-chg">3//</ins></code> "</li>
                   49977: <li>The public identifier <del class="diff-old">is set to:</del>
                   49978: <ins class="diff-chg">starts with:</ins> " <code title=
                   49979: "">-//IETF//DTD HTML Strict Level <del class="diff-old">2//EN</del>
                   49980: <ins class="diff-chg">0//</ins></code> "</li>
                   49981: <li>The public identifier <del class="diff-old">is set to:</del>
                   49982: <ins class="diff-chg">starts with:</ins> " <code title=
                   49983: "">-//IETF//DTD HTML Strict Level <del class=
                   49984: "diff-old">2//EN//2.0</del> <ins class="diff-chg">1//</ins></code>
                   49985: "</li>
                   49986: <li>The public identifier <del class="diff-old">is set to:</del>
                   49987: <ins class="diff-chg">starts with:</ins> " <code title=
                   49988: "">-//IETF//DTD HTML Strict Level <del class="diff-old">3//EN</del>
                   49989: <ins class="diff-chg">2//</ins></code> "</li>
                   49990: <li>The public identifier <del class="diff-old">is set to:</del>
                   49991: <ins class="diff-chg">starts with:</ins> " <code title=
                   49992: "">-//IETF//DTD HTML Strict Level <del class="diff-old">3//EN//3.0
                   49993: " The public identifier is set to: " -//IETF//DTD HTML Strict//EN "
                   49994: The public identifier is set to: " -//IETF//DTD HTML
                   49995: Strict//EN//2.0</del> <ins class="diff-chg">3//</ins></code> "</li>
                   49996: <li>The public identifier <del class="diff-old">is set to:</del>
                   49997: <ins class="diff-chg">starts with:</ins> " <code title=
                   49998: "">-//IETF//DTD HTML <del class="diff-old">Strict//EN//3.0 " The
                   49999: public identifier is set to: " -//IETF//DTD HTML//EN " The public
                   50000: identifier is set to: " -//IETF//DTD HTML//EN//2.0</del>
                   50001: <ins class="diff-chg">Strict//</ins></code> "</li>
                   50002: <li>The public identifier <del class="diff-old">is set to:</del>
                   50003: <ins class="diff-chg">starts with:</ins> " <code title=
                   50004: "">-//IETF//DTD <del class="diff-old">HTML//EN//3.0</del>
                   50005: <ins class="diff-chg">HTML//</ins></code> "</li>
                   50006: <li>The public identifier <del class="diff-old">is set to:</del>
                   50007: <ins class="diff-chg">starts with:</ins> " <code title=
                   50008: "">-//Metrius//DTD Metrius <del class=
                   50009: "diff-old">Presentational//EN</del> <ins class=
                   50010: "diff-chg">Presentational//</ins></code> "</li>
                   50011: <li>The public identifier <del class="diff-old">is set to:</del>
                   50012: <ins class="diff-chg">starts with:</ins> " <code title=
                   50013: "">-//Microsoft//DTD Internet Explorer 2.0 HTML <del class=
                   50014: "diff-old">Strict//EN</del> <ins class=
                   50015: "diff-chg">Strict//</ins></code> "</li>
                   50016: <li>The public identifier <del class="diff-old">is set to:</del>
                   50017: <ins class="diff-chg">starts with:</ins> " <code title=
                   50018: "">-//Microsoft//DTD Internet Explorer 2.0 <del class=
                   50019: "diff-old">HTML//EN</del> <ins class="diff-chg">HTML//</ins></code>
                   50020: "</li>
                   50021: <li>The public identifier <del class="diff-old">is set to:</del>
                   50022: <ins class="diff-chg">starts with:</ins> " <code title=
                   50023: "">-//Microsoft//DTD Internet Explorer 2.0 <del class=
                   50024: "diff-old">Tables//EN</del> <ins class=
                   50025: "diff-chg">Tables//</ins></code> "</li>
                   50026: <li>The public identifier <del class="diff-old">is set to:</del>
                   50027: <ins class="diff-chg">starts with:</ins> " <code title=
                   50028: "">-//Microsoft//DTD Internet Explorer 3.0 HTML <del class=
                   50029: "diff-old">Strict//EN</del> <ins class=
                   50030: "diff-chg">Strict//</ins></code> "</li>
                   50031: <li>The public identifier <del class="diff-old">is set to:</del>
                   50032: <ins class="diff-chg">starts with:</ins> " <code title=
                   50033: "">-//Microsoft//DTD Internet Explorer 3.0 <del class=
                   50034: "diff-old">HTML//EN</del> <ins class="diff-chg">HTML//</ins></code>
                   50035: "</li>
                   50036: <li>The public identifier <del class="diff-old">is set to:</del>
                   50037: <ins class="diff-chg">starts with:</ins> " <code title=
                   50038: "">-//Microsoft//DTD Internet Explorer 3.0 <del class=
                   50039: "diff-old">Tables//EN</del> <ins class=
                   50040: "diff-chg">Tables//</ins></code> "</li>
                   50041: <li>The public identifier <del class="diff-old">is set to:</del>
                   50042: <ins class="diff-chg">starts with:</ins> " <code title=
                   50043: "">-//Netscape Comm. Corp.//DTD <del class=
                   50044: "diff-old">HTML//EN</del> <ins class="diff-chg">HTML//</ins></code>
                   50045: "</li>
                   50046: <li>The public identifier <del class="diff-old">is set to:</del>
                   50047: <ins class="diff-chg">starts with:</ins> " <code title=
                   50048: "">-//Netscape Comm. Corp.//DTD Strict <del class=
                   50049: "diff-old">HTML//EN</del> <ins class="diff-chg">HTML//</ins></code>
                   50050: "</li>
                   50051: <li>The public identifier <del class="diff-old">is set to:</del>
                   50052: <ins class="diff-chg">starts with:</ins> " <code title=
                   50053: "">-//O'Reilly and Associates//DTD HTML <del class=
                   50054: "diff-old">2.0//EN</del> <ins class="diff-chg">2.0//</ins></code>
                   50055: "</li>
                   50056: <li>The public identifier <del class="diff-old">is set to:</del>
                   50057: <ins class="diff-chg">starts with:</ins> " <code title=
                   50058: "">-//O'Reilly and Associates//DTD HTML Extended <del class=
                   50059: "diff-old">1.0//EN</del> <ins class="diff-chg">1.0//</ins></code>
                   50060: "</li>
                   50061: <li>The public identifier <del class="diff-old">is set to:</del>
                   50062: <ins class="diff-chg">starts with: "</ins> <code title=
                   50063: ""><ins class="diff-chg">-//O'Reilly and Associates//DTD HTML
                   50064: Extended Relaxed 1.0//</ins></code> <ins class=
                   50065: "diff-chg">"</ins></li>
                   50066: <li><ins class="diff-chg">The public identifier starts with:
                   50067: "</ins> <code title=""><ins class="diff-chg">-//SoftQuad
                   50068: Software//DTD HoTMetaL PRO 6.0::19990601::extensions to HTML
                   50069: 4.0//</ins></code> <ins class="diff-chg">"</ins></li>
                   50070: <li><ins class="diff-chg">The public identifier starts with:
                   50071: "</ins> <code title=""><ins class="diff-chg">-//SoftQuad//DTD
                   50072: HoTMetaL PRO 4.0::19971010::extensions to HTML 4.0//</ins></code>
                   50073: <ins class="diff-chg">"</ins></li>
                   50074: <li><ins class="diff-chg">The public identifier starts with:</ins>
                   50075: " <code title="">-//Spyglass//DTD HTML 2.0 <del class=
                   50076: "diff-old">Extended//EN</del> <ins class=
                   50077: "diff-chg">Extended//</ins></code> "</li>
                   50078: <li>The public identifier <del class="diff-old">is set to:</del>
                   50079: <ins class="diff-chg">starts with:</ins> " <code title=
                   50080: "">-//SQ//DTD HTML 2.0 HoTMetaL + <del class=
                   50081: "diff-old">extensions//EN</del> <ins class=
                   50082: "diff-chg">extensions//</ins></code> "</li>
                   50083: <li>The public identifier <del class="diff-old">is set to:</del>
                   50084: <ins class="diff-chg">starts with:</ins> " <code title="">-//Sun
                   50085: Microsystems Corp.//DTD HotJava <del class=
                   50086: "diff-old">HTML//EN</del> <ins class="diff-chg">HTML//</ins></code>
                   50087: "</li>
                   50088: <li>The public identifier <del class="diff-old">is set to:</del>
                   50089: <ins class="diff-chg">starts with:</ins> " <code title="">-//Sun
                   50090: Microsystems Corp.//DTD HotJava Strict <del class=
                   50091: "diff-old">HTML//EN</del> <ins class="diff-chg">HTML//</ins></code>
                   50092: "</li>
                   50093: <li>The public identifier <del class="diff-old">is set to:</del>
                   50094: <ins class="diff-chg">starts with:</ins> " <code title=
                   50095: "">-//W3C//DTD HTML 3 <del class="diff-old">1995-03-24//EN</del>
                   50096: <ins class="diff-chg">1995-03-24//</ins></code> "</li>
                   50097: <li>The public identifier <del class="diff-old">is set to:</del>
                   50098: <ins class="diff-chg">starts with:</ins> " <code title=
                   50099: "">-//W3C//DTD HTML 3.2 <del class="diff-old">Draft//EN</del>
                   50100: <ins class="diff-chg">Draft//</ins></code> "</li>
                   50101: <li>The public identifier <del class="diff-old">is set to:</del>
                   50102: <ins class="diff-chg">starts with:</ins> " <code title=
                   50103: "">-//W3C//DTD HTML 3.2 <del class="diff-old">Final//EN</del>
                   50104: <ins class="diff-chg">Final//</ins></code> "</li>
                   50105: <li>The public identifier <del class="diff-old">is set to:</del>
                   50106: <ins class="diff-chg">starts with:</ins> " <code title=
                   50107: "">-//W3C//DTD HTML <del class="diff-old">3.2//EN</del> <ins class=
                   50108: "diff-chg">3.2//</ins></code> "</li>
                   50109: <li>The public identifier <del class="diff-old">is set to:</del>
                   50110: <ins class="diff-chg">starts with:</ins> " <code title=
                   50111: "">-//W3C//DTD HTML 3.2S <del class="diff-old">Draft//EN</del>
                   50112: <ins class="diff-chg">Draft//</ins></code> "</li>
                   50113: <li>The public identifier <del class="diff-old">is set to:</del>
                   50114: <ins class="diff-chg">starts with:</ins> " <code title=
                   50115: "">-//W3C//DTD HTML 4.0 <del class="diff-old">Frameset//EN</del>
                   50116: <ins class="diff-chg">Frameset//</ins></code> "</li>
                   50117: <li>The public identifier <del class="diff-old">is set to:</del>
                   50118: <ins class="diff-chg">starts with:</ins> " <code title=
                   50119: "">-//W3C//DTD HTML 4.0 <del class=
                   50120: "diff-old">Transitional//EN</del> <ins class=
                   50121: "diff-chg">Transitional//</ins></code> "</li>
                   50122: <li>The public identifier <del class="diff-old">is set to:</del>
                   50123: <ins class="diff-chg">starts with:</ins> " <code title=
                   50124: "">-//W3C//DTD HTML Experimental <del class=
                   50125: "diff-old">19960712//EN</del> <ins class=
                   50126: "diff-chg">19960712//</ins></code> "</li>
                   50127: <li>The public identifier <del class="diff-old">is set to:</del>
                   50128: <ins class="diff-chg">starts with:</ins> " <code title=
                   50129: "">-//W3C//DTD HTML Experimental <del class=
                   50130: "diff-old">970421//EN</del> <ins class=
                   50131: "diff-chg">970421//</ins></code> "</li>
                   50132: <li>The public identifier <del class="diff-old">is set to:</del>
                   50133: <ins class="diff-chg">starts with:</ins> " <code title=
                   50134: "">-//W3C//DTD W3 <del class="diff-old">HTML//EN " The public
                   50135: identifier is set to: " -//W3O//DTD W3 HTML 3.0//EN</del>
                   50136: <ins class="diff-chg">HTML//</ins></code> "</li>
                   50137: <li>The public identifier <del class="diff-old">is set to:</del>
                   50138: <ins class="diff-chg">starts with:</ins> " <code title=
                   50139: "">-//W3O//DTD W3 HTML <del class="diff-old">3.0//EN//</del>
                   50140: <ins class="diff-chg">3.0//</ins></code> "</li>
                   50141: <li>The public identifier is set to: " <code title="">-//W3O//DTD
                   50142: W3 HTML Strict 3.0//EN//</code> "</li>
                   50143: <li>The public identifier <del class="diff-old">is set to:</del>
                   50144: <ins class="diff-chg">starts with:</ins> " <code title=
                   50145: "">-//WebTechs//DTD Mozilla HTML <del class=
                   50146: "diff-old">2.0//EN</del> <ins class="diff-chg">2.0//</ins></code>
                   50147: "</li>
                   50148: <li>The public identifier <del class="diff-old">is set to:</del>
                   50149: <ins class="diff-chg">starts with:</ins> " <code title=
                   50150: "">-//WebTechs//DTD Mozilla <del class="diff-old">HTML//EN</del>
                   50151: <ins class="diff-chg">HTML//</ins></code> "</li>
                   50152: <li>The public identifier is set to: " <code title="">-/W3C/DTD
                   50153: HTML 4.0 Transitional/EN</code> "</li>
                   50154: <li>The public identifier is set to: " <code title="">HTML</code>
                   50155: "</li>
                   50156: <li>The system identifier is set to: " <code title=
                   50157: "">http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd</code>
                   50158: "</li>
                   50159: <li>The system identifier is missing and the public identifier
                   50160: <del class="diff-old">is set to:</del> <ins class="diff-chg">starts
                   50161: with:</ins> " <code title="">-//W3C//DTD HTML 4.01 <del class=
                   50162: "diff-old">Frameset//EN</del> <ins class=
                   50163: "diff-chg">Frameset//</ins></code> "</li>
                   50164: <li>The system identifier is missing and the public identifier
                   50165: <del class="diff-old">is set to:</del> <ins class="diff-chg">starts
                   50166: with:</ins> " <code title="">-//W3C//DTD HTML 4.01 <del class=
                   50167: "diff-old">Transitional//EN</del> <ins class=
                   50168: "diff-chg">Transitional//</ins></code> "</li>
                   50169: </ul>
                   50170: <p>Otherwise, if the DOCTYPE token matches one of the conditions in
                   50171: the following list, then set the document to <a href=
                   50172: "#limited">limited quirks mode</a> :</p>
                   50173: <ul class="brief">
                   50174: <li>The public identifier <del class="diff-old">is set to:</del>
                   50175: <ins class="diff-chg">starts with:</ins> " <code title=
                   50176: "">-//W3C//DTD XHTML 1.0 <del class="diff-old">Frameset//EN</del>
                   50177: <ins class="diff-chg">Frameset//</ins></code> "</li>
                   50178: <li>The public identifier <del class="diff-old">is set to:</del>
                   50179: <ins class="diff-chg">starts with:</ins> " <code title=
                   50180: "">-//W3C//DTD XHTML 1.0 <del class=
                   50181: "diff-old">Transitional//EN</del> <ins class=
                   50182: "diff-chg">Transitional//</ins></code> "</li>
                   50183: <li>The system identifier is not missing and the public identifier
                   50184: <del class="diff-old">is set to:</del> <ins class="diff-chg">starts
                   50185: with:</ins> " <code title="">-//W3C//DTD HTML 4.01 <del class=
                   50186: "diff-old">Frameset//EN</del> <ins class=
                   50187: "diff-chg">Frameset//</ins></code> "</li>
                   50188: <li>The system identifier is not missing and the public identifier
                   50189: <del class="diff-old">is set to:</del> <ins class="diff-chg">starts
                   50190: with:</ins> " <code title="">-//W3C//DTD HTML 4.01 <del class=
                   50191: "diff-old">Transitional//EN</del> <ins class=
                   50192: "diff-chg">Transitional//</ins></code> "</li>
                   50193: </ul>
                   50194: <p>The name, system identifier, and public identifier strings must
                   50195: be compared to the values given in the lists above in a
                   50196: case-insensitive manner. <ins class="diff-new">A system identifier
                   50197: whose value is the empty string is not considered missing for the
                   50198: purposes of the conditions above.</ins></p>
                   50199: <p>Then, switch <del class="diff-old">to</del> the <del class=
                   50200: "diff-old">root element phase</del> <span><ins class=
                   50201: "diff-chg">insertion mode</ins></span> <ins class="diff-chg">to
                   50202: "</ins> <a href="#before4" title=
                   50203: "insertion mode: before html"><ins class="diff-chg">before
                   50204: html</ins></a> <del class="diff-old">of the tree construction
                   50205: stage.</del> <ins class="diff-chg">".</ins></p>
                   50206: </dd>
                   50207: <dt><del class="diff-old">A start tag token An end tag token A
                   50208: character token that is not one of one of U+0009 CHARACTER
                   50209: TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
                   50210: FORM FEED (FF), or U+0020 SPACE An end-of-file token</del>
                   50211: <ins class="diff-chg">Anything else</ins></dt>
                   50212: <dd>
                   50213: <p><a href="#parse1">Parse error</a> .</p>
                   50214: <p>Set the document to <a href="#quirks">quirks mode</a> .</p>
                   50215: <p><del class="diff-old">Then, switch to</del> <ins class=
                   50216: "diff-chg">Switch</ins> the <del class="diff-old">root element
                   50217: phase</del> <span><ins class="diff-chg">insertion mode</ins></span>
                   50218: <ins class="diff-chg">to "</ins> <a href="#before4" title=
                   50219: "insertion mode: before html"><ins class="diff-chg">before
                   50220: html</ins></a> <del class="diff-old">of the tree construction stage
                   50221: and</del> <ins class="diff-chg">", then</ins> reprocess the current
                   50222: token.</p>
                   50223: </dd>
                   50224: </dl>
                   50225: <h5 id="the-before"><span class="secno"><del class=
                   50226: "diff-old">8.2.4.2.</del> <ins class=
                   50227: "diff-chg">8.2.5.5.</ins></span> The <del class="diff-old">root
                   50228: element phase</del> <ins class="diff-chg">"</ins> <dfn id="before4"
                   50229: title="insertion mode: before html"><ins class="diff-chg">before
                   50230: html</ins></dfn> <ins class="diff-chg">" insertion mode</ins></h5>
                   50231: <p><del class="diff-old">After</del> <ins class=
                   50232: "diff-chg">When</ins> the <del class="diff-old">initial phase , as
                   50233: each token</del> <span><ins class="diff-chg">insertion
                   50234: mode</ins></span> is <del class="diff-old">emitted from the
                   50235: tokenisation</del> <ins class="diff-chg">"</ins> <a href="#before4"
                   50236: title="insertion mode: before html"><ins class="diff-chg">before
                   50237: html</ins></a> <del class="diff-old">stage, it</del> <ins class=
                   50238: "diff-chg">", tokens</ins> must be <del class=
                   50239: "diff-old">processed</del> <ins class="diff-chg">handled</ins> as
                   50240: <del class="diff-old">described in this section.</del> <ins class=
                   50241: "diff-chg">follows:</ins></p>
                   50242: <dl class="switch">
                   50243: <dt>A DOCTYPE token</dt>
                   50244: <dd>
                   50245: <p><a href="#parse1">Parse error</a> . Ignore the token.</p>
                   50246: </dd>
                   50247: <dt>A comment token</dt>
                   50248: <dd>
                   50249: <p>Append a <code>Comment</code> node to the <code>Document</code>
                   50250: object with the <code title="">data</code> attribute set to the
                   50251: data given in the comment token.</p>
                   50252: </dd>
                   50253: <dt>A character token that is one of one of U+0009 CHARACTER
                   50254: TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
                   50255: FORM FEED (FF), or U+0020 SPACE</dt>
                   50256: <dd>
                   50257: <p>Ignore the token.</p>
                   50258: </dd>
                   50259: <dt>A <del class="diff-old">character token that is not one of
                   50260: U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000B LINE
                   50261: TABULATION, U+000C FORM FEED (FF), or U+0020 SPACE A</del> start
                   50262: tag <del class="diff-old">token An end</del> <ins class=
                   50263: "diff-chg">whose</ins> tag <del class="diff-old">token An
                   50264: end-of-file token</del> <ins class="diff-chg">name is
                   50265: "html"</ins></dt>
                   50266: <dd><del class="diff-old">If</del>
                   50267: <p><a href="#create"><ins class="diff-chg">Create an element
                   50268: for</ins> the token <del class="diff-old">is a start tag token
                   50269: with</del></a> <ins class="diff-chg">in</ins> the <del class=
                   50270: "diff-old">tag name "html", and</del> <a href=
                   50271: "#html-namespace0"><ins class="diff-chg">HTML namespace</ins></a>
                   50272: .<ins class="diff-chg">Append</ins> it <ins class="diff-new">to
                   50273: the</ins> <code><ins class="diff-new">Document</ins></code>
                   50274: <ins class="diff-new">object. Put this element in the</ins>
                   50275: <a href="#stack"><ins class="diff-new">stack of open
                   50276: elements</ins></a> .</p>
                   50277: <p id="parser-appcache"><ins class="diff-new">If the token</ins>
                   50278: has an attribute <del class="diff-old">"application",</del>
                   50279: <ins class="diff-chg">"manifest",</ins> then run the <a href=
                   50280: "#application2" title=
                   50281: "concept-appcache-init-with-attribute">application cache selection
                   50282: algorithm</a> with the value of that attribute as the manifest
                   50283: <del class="diff-old">URI.</del> <ins class="diff-chg">URI,
                   50284: resolving relative URIs according to section 5.1 of RFC3986 as if
                   50285: there was no base URI embedded in content (i.e. relative to the
                   50286: base URI from the encapsulating entity or the URI used to retrieve
                   50287: the entity).</ins> Otherwise, run the <a href="#application3"
                   50288: title="concept-appcache-init-no-attribute">application cache
                   50289: selection algorithm</a> with no manifest. <a href=
                   50290: "#references"><ins class="diff-new">[RFC3986]</ins></a></p>
                   50291: <p><ins class="diff-new">Switch the</ins> <span><ins class=
                   50292: "diff-new">insertion mode</ins></span> <ins class="diff-new">to
                   50293: "</ins> <a href="#before5" title=
                   50294: "insertion mode: before head"><ins class="diff-new">before
                   50295: head</ins></a> <ins class="diff-new">".</ins></p>
                   50296: </dd>
                   50297: <dt><ins class="diff-new">Anything else</ins></dt>
                   50298: <dd>
                   50299: <p>Create an <code><a href="#htmlelement">HTMLElement</a></code>
                   50300: node with the tag name <code><a href="#html">html</a></code> , in
                   50301: the <a href="#html-namespace0">HTML namespace</a> . Append it to
                   50302: the <code>Document</code> object. <ins class="diff-new">Put this
                   50303: element in the</ins> <a href="#stack"><ins class="diff-new">stack
                   50304: of open elements</ins></a> .</p>
                   50305: <p><ins class="diff-new">Run the</ins> <a href="#application3"
                   50306: title="concept-appcache-init-no-attribute"><ins class=
                   50307: "diff-new">application cache selection algorithm</ins></a>
                   50308: <ins class="diff-new">with no manifest.</ins></p>
                   50309: <p>Switch <del class="diff-old">to</del> the <del class=
                   50310: "diff-old">main phase</del> <span><ins class="diff-chg">insertion
                   50311: mode</ins></span> <ins class="diff-chg">to "</ins> <a href=
                   50312: "#before5" title="insertion mode: before head"><ins class=
                   50313: "diff-chg">before head</ins></a> <del class="diff-old">and</del>
                   50314: <ins class="diff-chg">", then</ins> reprocess the current
                   50315: token.</p>
                   50316: <p class="big-issue">Should probably make end tags be ignored, so
                   50317: that "&lt;/head&gt; &lt;!-- --&gt; &lt;html&gt; " puts the comment
                   50318: before the root node (or should we?)</p>
                   50319: </dd>
                   50320: </dl>
                   50321: <p>The root element can end up being removed from the
                   50322: <code>Document</code> object, e.g. by scripts; nothing in
                   50323: particular happens in such cases, content continues being appended
                   50324: to the nodes as described in the next section. <del class=
                   50325: "diff-old">8.2.4.3. The main phase After the root element phase ,
                   50326: each token emitted from the tokenisation stage must be processed as
                   50327: described in this section. This is by far the most involved part of
                   50328: parsing an HTML document. The tree construction stage in this phase
                   50329: has several pieces of state: a stack of open elements , a list of
                   50330: active formatting elements , a head element pointer , a form
                   50331: element pointer , and an insertion mode . We could just fold
                   50332: insertion modes and phases into one concept (and duplicate the two
                   50333: rules common to all insertion modes into all of them). 8.2.4.3.1.
                   50334: The stack of open elements Initially the stack of open elements
                   50335: contains just the html root element node created in the last phase
                   50336: before switching to this phase (or, in the fragment case , the html
                   50337: element created as part of that algorithm ). That's the topmost
                   50338: node of the stack. It never gets popped off the stack. (This stack
                   50339: grows downwards.) The current node is the bottommost node in this
                   50340: stack. Elements in the stack fall into the following categories:
                   50341: Special The following HTML elements have varying levels of special
                   50342: parsing rules: address , area , base , basefont , bgsound ,
                   50343: blockquote , body , br , center , col , colgroup , dd , dir , div ,
                   50344: dl , dt , embed , fieldset , form , frame , frameset , h1 , h2 , h3
                   50345: , h4 , h5 , h6 , head , hr , iframe , image , img , input , isindex
                   50346: , li , link , listing , menu , meta , noembed , noframes , noscript
                   50347: , ol , optgroup , option , p , param , plaintext , pre , script ,
                   50348: select , spacer , style , tbody , textarea , tfoot , thead , title
                   50349: , tr , ul , and wbr . Scoping The following HTML elements introduce
                   50350: new scopes for various parts of the parsing: button , caption ,
                   50351: html , marquee , object , table , td and th . Formatting The
                   50352: following HTML elements are those that end up in the list of active
                   50353: formatting elements : a , b , big , em , font , i , nobr , s ,
                   50354: small , strike , strong , tt , and u . Phrasing All other elements
                   50355: found while parsing an HTML document. Still need to add these new
                   50356: elements to the lists: event-source , section , nav , article ,
                   50357: aside , header , footer , datagrid , command The stack of open
                   50358: elements is said to have an element in scope or have an element in
                   50359: table scope when the following algorithm terminates in a match
                   50360: state: Initialise node to be the current node (the bottommost node
                   50361: of the stack). If node is the target node, terminate in a match
                   50362: state. Otherwise, if node is a table element, terminate in a
                   50363: failure state. Otherwise, if the algorithm is the "has an element
                   50364: in scope" variant (rather than the "has an element in table scope"
                   50365: variant), and node is one of the following, terminate in a failure
                   50366: state: caption td th button marquee object Otherwise, if node is an
                   50367: html element, terminate in a failure state. (This can only happen
                   50368: if the node is the topmost node of the stack of open elements , and
                   50369: prevents the next step from being invoked if there are no more
                   50370: elements in the stack.) Otherwise, set node to the previous entry
                   50371: in the stack of open elements and return to step 2. (This will
                   50372: never fail, since the loop will always terminate in the previous
                   50373: step if the top of the stack is reached.) Nothing happens if at any
                   50374: time any of the elements in the stack of open elements are moved to
                   50375: a new location in, or removed from, the Document tree. In
                   50376: particular, the stack is not changed in this situation. This can
                   50377: cause, amongst other strange effects, content to be appended to
                   50378: nodes that are no longer in the DOM. In some cases (namely, when
                   50379: closing misnested formatting elements ), the stack is manipulated
                   50380: in a random-access fashion.</del></p>
                   50381: <h5 id="the-before0"><span class="secno"><del class=
                   50382: "diff-old">8.2.4.3.2.</del> <ins class=
                   50383: "diff-chg">8.2.5.6.</ins></span> The <del class="diff-old">list of
                   50384: active formatting elements Initially the list of active formatting
                   50385: elements is empty. It is used to handle mis-nested formatting
                   50386: element tags . The list contains elements in the formatting
                   50387: category, and scope markers. The scope markers are inserted when
                   50388: entering buttons, object elements, marquees, table cells, and table
                   50389: captions, and are used to prevent formatting from "leaking" into
                   50390: tables, buttons, object elements, and marquees. When the steps
                   50391: below require the UA to reconstruct the active formatting elements
                   50392: , the UA must perform the following steps: If there are no entries
                   50393: in the list of active formatting elements , then there is nothing
                   50394: to reconstruct; stop this algorithm. If the last (most recently
                   50395: added) entry in the list of active formatting elements is a marker,
                   50396: or if it is an element that is in the stack of open elements , then
                   50397: there is nothing to reconstruct; stop this algorithm. Let entry be
                   50398: the last (most recently added) element in the list of active
                   50399: formatting elements . If there are no entries</del> <ins class=
                   50400: "diff-chg">"</ins> <dfn id="before5" title=
                   50401: "insertion mode: before head">before <del class="diff-old">entry in
                   50402: the list of active formatting elements , then jump to step 8. Let
                   50403: entry be the entry one earlier than entry in the list of active
                   50404: formatting elements . If entry is neither a marker nor an element
                   50405: that is also in the stack of open elements , go to step 4. Let
                   50406: entry be the element one later than entry in the list of active
                   50407: formatting elements . Perform a shallow clone of the element entry
                   50408: to obtain clone . [DOM3CORE] Append clone to the current node and
                   50409: push it onto the stack of open elements so that it is the new
                   50410: current node . Replace the entry for entry in the list with an
                   50411: entry for clone . If the entry for clone in the list of active
                   50412: formatting elements is not the last entry in the list, return to
                   50413: step 7. This has the effect of reopening all the formatting
                   50414: elements that were opened in the current body, cell, or caption
                   50415: (whichever is youngest) that haven't been explicitly closed. The
                   50416: way this specification is written, the list of active formatting
                   50417: elements always consists of elements in chronological order with
                   50418: the least recently added element first and the most recently added
                   50419: element last (except for while steps 8 to 11 of the above algorithm
                   50420: are being executed, of course). When the steps below require the UA
                   50421: to clear the list of active formatting elements up to the last
                   50422: marker , the UA must perform the following steps: Let entry be the
                   50423: last (most recently added) entry in the list of active formatting
                   50424: elements . Remove entry from the list of active formatting elements
                   50425: . If entry was a marker, then stop the algorithm at this point. The
                   50426: list has been cleared up to the last marker. Go to step 1.
                   50427: 8.2.4.3.3. Creating and inserting HTML elements When the steps
                   50428: below require the UA to create an element for a token , the UA must
                   50429: create a node implementing the interface appropriate for the
                   50430: element type corresponding to the tag name of the token (as given
                   50431: in the section of this specification that defines that element,
                   50432: e.g. for an a element it would be the HTMLAnchorElement interface),
                   50433: with the tag name being the name of that element, with the node
                   50434: being in the HTML namespace , and with the attributes on the node
                   50435: being those given in the given token. When the steps below require
                   50436: the UA to insert an HTML element for a token, the UA must first
                   50437: create an element for the token , and then append this node to the
                   50438: current node , and push it onto the stack of open elements so that
                   50439: it is the new current node . The steps below may also require that
                   50440: the UA insert an HTML element in a particular place, in which case
                   50441: the UA must create an element for the token and then insert or
                   50442: append the new node in the location specified. (This happens in
                   50443: particular during the parsing of tables with invalid content.) The
                   50444: interface appropriate for an element that is not defined in this
                   50445: specification is HTMLElement . The generic CDATA parsing algorithm
                   50446: and the generic RCDATA parsing algorithm consist of the following
                   50447: steps. These algorithms are always invoked in response to a start
                   50448: tag token, and are always passed a context node , typically the
                   50449: current node , which is used as the place to insert the resulting
                   50450: element node. Create an element for the token . Append the new
                   50451: element to the given context node . If the algorithm that was
                   50452: invoked is the generic CDATA parsing algorithm , switch the
                   50453: tokeniser's content model flag to the CDATA state; otherwise the
                   50454: algorithm invoked was the generic RCDATA parsing algorithm , switch
                   50455: the tokeniser's content model flag to the RCDATA state. Then,
                   50456: collect all the character tokens that the tokeniser returns until
                   50457: it returns a token that is not a character token, or until it stops
                   50458: tokenising. If this process resulted in a collection of character
                   50459: tokens, append a single Text node, whose contents is the
                   50460: concatenation of all those tokens' characters, to the new element
                   50461: node. The tokeniser's content model flag will have switched back to
                   50462: the PCDATA state. If the next token is an end tag token with the
                   50463: same tag name as the start tag token, ignore it. Otherwise, this is
                   50464: a parse error . 8.2.4.3.4. Closing elements that have implied end
                   50465: tags When the steps below require the UA to generate implied end
                   50466: tags , then, if the current node is a dd element, a dt element, an
                   50467: li element, a p element, a tbody element, a td element, a tfoot
                   50468: element, a th element, a thead element, a tr element, the UA must
                   50469: act as if an end tag with the respective tag name had been seen and
                   50470: then generate implied end tags again. The step that requires the UA
                   50471: to generate implied end tags but lists an element to exclude from
                   50472: the process, then the UA must perform the above steps as if that
                   50473: element was not in the above list. 8.2.4.3.5. The element pointers
1.2     ! mike     50474: Initially the</del> head <del class="diff-old">element
        !          50475: pointer</del></dfn> <del class="diff-old">and the form element
        !          50476: pointer are both null. Once a head element has been parsed (whether
        !          50477: implicitly or explicitly) the head element pointer gets set to
        !          50478: point to this node. The form element pointer points to the last
        !          50479: form element that was opened and whose end tag has not yet been
        !          50480: seen. It is used to make form controls associate with forms in the
        !          50481: face of dramatically bad markup, for historical reasons. 8.2.4.3.6.
        !          50482: The insertion mode Initially the</del> <ins class=
        !          50483: "diff-chg">"</ins> insertion mode <del class="diff-old">is " before
        !          50484: head ". It can change to " in head ", " in head noscript ", " after
        !          50485: head ", " in body ", " in table ", " in caption ", " in column
        !          50486: group ", " in table body ", " in row ", " in cell ", " in select ",
        !          50487: " after body ", " in frameset ", and " after frameset " during the
        !          50488: course of the parsing, as described below. It affects how certain
        !          50489: tokens are processed. If the tree construction stage is switched
        !          50490: from the main phase to the trailing end phase and back again, the
        !          50491: various pieces of state are not reset; the UA must act as if the
        !          50492: state was maintained.</del></h5>
1.1       mike     50493: <p>When the <del class="diff-old">steps below require the UA to
                   50494: reset the insertion mode appropriately , it means the UA must
                   50495: follow these steps: Let last be false. Let node be the last node in
                   50496: the stack of open elements . If node is the first node in the stack
                   50497: of open elements, then set last to true. If the context element of
                   50498: the</del> <span><del class="diff-old">HTML fragment parsing
                   50499: algorithm is neither a td element nor a th element, then set node
                   50500: to the context element. ( fragment case ) If node is a select
1.2     ! mike     50501: element, then switch the</del> insertion mode <del class=
        !          50502: "diff-old">to " in select " and abort these steps. ( fragment case
        !          50503: ) If node is a td or th element, then switch the insertion mode to
        !          50504: " in cell " and abort these steps. If node is a tr element, then
        !          50505: switch the insertion mode to " in row " and abort these steps. If
        !          50506: node is a tbody , thead , or tfoot element, then switch the
        !          50507: insertion mode to " in table body " and abort these steps. If node
        !          50508: is a caption element, then switch the insertion mode to " in
        !          50509: caption " and abort these steps. If node is a colgroup element,
        !          50510: then switch the insertion mode to " in column group " and abort
        !          50511: these steps. ( fragment case ) If node is a table element, then
        !          50512: switch the insertion mode to " in table " and abort these steps. If
        !          50513: node is a head element, then switch the insertion mode to " in body
        !          50514: " (" in body "! not " in head " !) and abort these steps. (
        !          50515: fragment case ) If node is a body element, then switch the
        !          50516: insertion mode to " in body " and abort these steps. If node is a
        !          50517: frameset element, then switch the insertion mode to " in frameset "
        !          50518: and abort these steps. ( fragment case ) If node is an html
        !          50519: element, then: if the head element pointer</del></span> is
        !          50520: <del class="diff-old">null, switch the insertion mode to</del> "
        !          50521: <a href="#before5" title="insertion mode: before head">before
        !          50522: head</a> ", <del class="diff-old">otherwise, switch the insertion
        !          50523: mode to " after head ". In either case, abort these steps. (
        !          50524: fragment case ) If last is true, then set the insertion mode to "
        !          50525: in body " and abort these steps. ( fragment case ) Let node now be
        !          50526: the node before node in the stack of open elements . Return to step
        !          50527: 3. 8.2.4.3.7. How to handle</del> tokens <del class="diff-old">in
        !          50528: the main phase Tokens in the main phase</del> must be handled as
        !          50529: follows:</p>
1.1       mike     50530: <dl class="switch">
                   50531: <dt>A <del class="diff-old">DOCTYPE token Parse error . Ignore the
                   50532: token. A start tag whose tag name is "html" If this start tag token
                   50533: was not the first start tag token, then it is a parse error . For
                   50534: each attribute on the token, check to see if the attribute is
                   50535: already present on the top element of the stack of open elements .
                   50536: If it is not, add the attribute and its corresponding value to that
                   50537: element. An end-of-file token Generate implied end tags. If there
                   50538: are more than two nodes on the stack of open elements , or if there
                   50539: are two nodes but the second node is not a body node, this is a
                   50540: parse error . Otherwise, if the parser was originally created as
                   50541: part of the HTML fragment parsing algorithm , and there's more than
                   50542: one element in the stack of open elements , and the second node on
                   50543: the stack of open elements is not a body node, then this is a parse
                   50544: error . ( fragment case ) Stop parsing. This fails because it
                   50545: doesn't imply HEAD and BODY tags. We should probably expand out the
                   50546: insertion modes and merge them with phases and then put the three
                   50547: things here into each insertion mode instead of trying to factor
                   50548: them out so carefully. Anything else Depends on the insertion mode
                   50549: : If the insertion mode is " before head " Handle the token as
                   50550: follows: A</del> character token that is one of one of U+0009
                   50551: CHARACTER TABULATION, U+000A LINE FEED (LF), U+000B LINE
                   50552: TABULATION, U+000C FORM FEED (FF), or U+0020 SPACE</dt>
                   50553: <dd>
                   50554: <p><del class="diff-old">Append the character to</del> <ins class=
                   50555: "diff-chg">Ignore</ins> the <del class="diff-old">current node
                   50556: .</del> <ins class="diff-chg">token.</ins></p>
                   50557: </dd>
                   50558: <dt>A comment token</dt>
                   50559: <dd>
                   50560: <p>Append a <code>Comment</code> node to the <a href=
                   50561: "#current5">current node</a> with the <code title="">data</code>
                   50562: attribute set to the data given in the comment token.</p>
                   50563: </dd>
                   50564: <dt>A <ins class="diff-new">DOCTYPE token</ins></dt>
                   50565: <dd>
                   50566: <p><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   50567: .<ins class="diff-new">Ignore the token.</ins></p>
                   50568: </dd>
                   50569: <dt><ins class="diff-new">A</ins> start tag whose tag name is
                   50570: <del class="diff-old">"head"</del> <ins class=
                   50571: "diff-chg">"html"</ins></dt>
                   50572: <dd>
                   50573: <p><del class="diff-old">Create an element for</del> <ins class=
                   50574: "diff-chg">Process</ins> the token <del class="diff-old">. Set the
                   50575: head element pointer to this new element node. Append the new
                   50576: element to</del> <a href="#using8"><ins class=
                   50577: "diff-chg">using</ins> the <del class="diff-old">current node</del>
                   50578: <ins class="diff-chg">rules for</ins></a> <del class="diff-old">and
1.2     ! mike     50579: push it onto the stack of open elements . Change</del> the
        !          50580: <del class="diff-old">insertion mode to</del> " <a href="#in-body"
        !          50581: title="insertion mode: in body">in <del class="diff-old">head</del>
1.1       mike     50582: <ins class="diff-chg">body</ins></a> <del class="diff-old">".</del>
                   50583: <ins class="diff-chg">"</ins> <span><ins class="diff-chg">insertion
                   50584: mode</ins></span> .</p>
                   50585: </dd>
                   50586: <dt>A start tag <del class="diff-old">token</del> whose tag name is
                   50587: <del class="diff-old">one of: "base", "link", "meta", "script",
                   50588: "style", "title"</del> <ins class="diff-chg">"head"</ins></dt>
                   50589: <dd>
                   50590: <p><del class="diff-old">Act as if a start tag token with the tag
                   50591: name "head" and no attributes had been seen, then reprocess</del>
                   50592: <a href="#insert0"><ins class="diff-chg">Insert an HTML
                   50593: element</ins></a> <ins class="diff-chg">for</ins> the <del class=
                   50594: "diff-old">current</del> token.</p>
                   50595: <del class="diff-old">This will result in a</del>
                   50596: <p><ins class="diff-chg">Set the</ins> <a href=
                   50597: "#head-element"><code title=""><ins class=
                   50598: "diff-chg">head</ins></code> <ins class="diff-chg">element
                   50599: pointer</ins></a> <ins class="diff-chg">to the newly created</ins>
                   50600: <code><a href="#head">head</a></code> <del class="diff-old">element
                   50601: being generated, and with the current token being reprocessed
                   50602: in</del> <ins class="diff-chg">element.</ins></p>
                   50603: <p><ins class="diff-chg">Switch</ins> the <span><ins class=
                   50604: "diff-new">insertion mode</ins></span> <ins class=
                   50605: "diff-new">to</ins> " <a href="#in-head" title=
                   50606: "insertion mode: in head">in head</a> <del class="diff-old">"
                   50607: insertion mode .</del> <ins class="diff-chg">".</ins></p>
                   50608: </dd>
                   50609: <dt>An end tag whose tag name is one of: "head", <del class=
                   50610: "diff-old">"body", "html", "p",</del> "br"</dt>
                   50611: <dd>
                   50612: <p>Act as if a start tag token with the tag name "head" and no
                   50613: attributes had been seen, then reprocess the current token.</p>
                   50614: </dd>
                   50615: <dt>Any other end tag</dt>
                   50616: <dd>
                   50617: <p><a href="#parse1">Parse error</a> . Ignore the token.</p>
                   50618: <del class="diff-old">Do we really want to ignore end tags here? A
                   50619: character token that is not one of U+0009 CHARACTER TABULATION,
                   50620: U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED
                   50621: (FF), or U+0020 SPACE</del></dd>
                   50622: <dt><del class="diff-old">Any other start tag token</del>
                   50623: <ins class="diff-chg">Anything else</ins></dt>
                   50624: <dd>
                   50625: <p>Act as if a start tag token with the tag name "head" and no
                   50626: attributes had been seen, then reprocess the current token.</p>
                   50627: <p class="note">This will result in an empty <code><a href=
                   50628: "#head">head</a></code> element being generated, with the current
                   50629: token being reprocessed in the " <a href="#after4" title=
                   50630: "insertion mode: after head">after head</a> " <span>insertion mode
                   50631: <del class="diff-old">.</del></span> .</p>
                   50632: </dd>
                   50633: </dl>
                   50634: <del class="diff-old">If the insertion mode is</del>
                   50635: <h5 id="parsing-main-inhead"><span class="secno"><ins class=
                   50636: "diff-chg">8.2.5.7.</ins></span> <ins class="diff-chg">The</ins> "
                   50637: <dfn id="in-head" title="insertion mode: in head">in head</dfn> "
                   50638: <ins class="diff-chg">insertion mode</ins></h5>
                   50639: <p><del class="diff-old">Handle</del> <ins class=
                   50640: "diff-chg">When</ins> the <del class="diff-old">token</del>
                   50641: <span><ins class="diff-chg">insertion mode</ins></span> <ins class=
                   50642: "diff-chg">is "</ins> <a href="#in-head" title=
                   50643: "insertion mode: in head"><ins class="diff-chg">in head</ins></a>
                   50644: <ins class="diff-chg">", tokens must be handled</ins> as
                   50645: <del class="diff-old">follows.</del> <ins class=
                   50646: "diff-chg">follows:</ins></p>
                   50647: <dl class="switch">
                   50648: <dt>A character token that is one of one of U+0009 CHARACTER
                   50649: TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
                   50650: FORM FEED (FF), or U+0020 SPACE</dt>
                   50651: <dd>
                   50652: <p><del class="diff-old">Append</del> <a href="#insert" title=
                   50653: "insert a character"><ins class="diff-chg">Insert</ins> the
                   50654: character</a> <del class="diff-old">to</del> <ins class=
                   50655: "diff-chg">into</ins> the <a href="#current5">current node</a>
                   50656: .</p>
                   50657: </dd>
                   50658: <dt>A comment token</dt>
                   50659: <dd>
                   50660: <p>Append a <code>Comment</code> node to the <a href=
                   50661: "#current5">current node</a> with the <code title="">data</code>
                   50662: attribute set to the data given in the comment token.</p>
                   50663: </dd>
                   50664: <dt>A <ins class="diff-new">DOCTYPE token</ins></dt>
                   50665: <dd>
                   50666: <p><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   50667: .<ins class="diff-new">Ignore the token.</ins></p>
                   50668: </dd>
                   50669: <dt><ins class="diff-new">A start tag whose tag name is
                   50670: "html"</ins></dt>
                   50671: <dd>
                   50672: <p><ins class="diff-new">Process the token</ins> <a href=
                   50673: "#using8"><ins class="diff-new">using the rules for</ins></a>
                   50674: <ins class="diff-new">the "</ins> <a href="#in-body" title=
                   50675: "insertion mode: in body"><ins class="diff-new">in body</ins></a>
                   50676: <ins class="diff-new">"</ins> <span><ins class="diff-new">insertion
                   50677: mode</ins></span> .</p>
                   50678: </dd>
                   50679: <dt><ins class="diff-new">A</ins> start tag whose tag name is one
1.2     ! mike     50680: of: "base", <ins class="diff-new">"command", "event-source",</ins>
        !          50681: "link"</dt>
1.1       mike     50682: <dd>
                   50683: <p><a href="#insert0">Insert an HTML element</a> for the token.
                   50684: <ins class="diff-new">Immediately pop the</ins> <a href=
                   50685: "#current5"><ins class="diff-new">current node</ins></a>
                   50686: <ins class="diff-new">off the</ins> <a href="#stack"><ins class=
                   50687: "diff-new">stack of open elements</ins></a> .</p>
                   50688: <p><a href="#acknowledged" title=
                   50689: "acknowledge self-closing flag"><ins class="diff-new">Acknowledge
                   50690: the token's</ins> <i><ins class="diff-new">self-closing
                   50691: flag</ins></i></a> ,<ins class="diff-new">if it is set.</ins></p>
                   50692: </dd>
                   50693: <dt>A start tag whose tag name is "meta"</dt>
                   50694: <dd>
                   50695: <p><a href="#insert0">Insert an HTML element</a> for the token.
                   50696: <ins class="diff-new">Immediately pop the</ins> <a href=
                   50697: "#current5"><ins class="diff-new">current node</ins></a>
                   50698: <ins class="diff-new">off the</ins> <a href="#stack"><ins class=
                   50699: "diff-new">stack of open elements</ins></a> .</p>
                   50700: <p><a href="#acknowledged" title=
                   50701: "acknowledge self-closing flag"><ins class="diff-new">Acknowledge
                   50702: the token's</ins> <i><ins class="diff-new">self-closing
                   50703: flag</ins></i></a> ,<ins class="diff-new">if it is set.</ins></p>
                   50704: <p id="meta-charset-during-parse">If the element has a <code title=
                   50705: "attr-meta-charset"><a href="#charset1">charset</a></code>
                   50706: attribute, and its value is a supported encoding, and the <a href=
                   50707: "#confidence" title="concept-encoding-confidence">confidence</a> is
                   50708: currently <i>tentative</i> , then <a href="#change">change the
                   50709: encoding</a> to the encoding given by the value of the <code title=
                   50710: "attr-meta-charset"><a href="#charset1">charset</a></code>
                   50711: attribute.</p>
                   50712: <p>Otherwise, if the element has a <code title=
                   50713: "attr-meta-charset"><a href="#charset1">content</a></code>
                   50714: attribute, and applying the <a href="#algorithm4">algorithm
                   50715: <del class="diff-old">to extract</del> <ins class="diff-chg">for
                   50716: extracting</ins> an encoding from a Content-Type</a> to its value
                   50717: returns a supported encoding <var title="">encoding</var> , and the
                   50718: <a href="#confidence" title=
                   50719: "concept-encoding-confidence">confidence</a> is currently
                   50720: <i>tentative</i> , then <a href="#change">change the encoding</a>
                   50721: to the encoding <var title="">encoding</var> .</p>
                   50722: </dd>
                   50723: <dt>A start tag whose tag name is "title"</dt>
                   50724: <dd>
                   50725: <p>Follow the <a href="#generic0">generic RCDATA parsing algorithm
                   50726: <del class="diff-old">, with the head element pointer as the
                   50727: context node , unless that's null, in which case use the current
                   50728: node ( fragment cose ).</del></a> .</p>
                   50729: </dd>
                   50730: <dt>A start tag whose tag name is "noscript", if <ins class=
                   50731: "diff-new">the</ins> <a href="#scripting2">scripting <ins class=
1.2     ! mike     50732: "diff-new">flag</ins></a> is enabled <del class=
        !          50733: "diff-old">:</del></dt>
1.1       mike     50734: <dt>A start tag whose tag name is <ins class="diff-new">one of:
                   50735: "noframes",</ins> "style"</dt>
                   50736: <dd>
                   50737: <p>Follow the <a href="#generic">generic CDATA parsing algorithm
                   50738: <del class="diff-old">, with the current node as the context node
                   50739: .</del></a> .</p>
                   50740: </dd>
                   50741: <dt>A start tag whose tag name is "noscript", if <ins class=
                   50742: "diff-chg">the</ins> <a href="#scripting2">scripting <ins class=
1.2     ! mike     50743: "diff-new">flag</ins></a> is disabled <del class=
        !          50744: "diff-old">:</del></dt>
1.1       mike     50745: <dd>
                   50746: <p><a href="#insert0">Insert <del class="diff-old">a noscript</del>
                   50747: <ins class="diff-chg">an HTML</ins> element</a> for the token.</p>
                   50748: <p><del class="diff-old">Change</del> <ins class=
                   50749: "diff-chg">Switch</ins> the <span>insertion mode</span> to "
                   50750: <a href="#in-head0" title="insertion mode: in head noscript">in
                   50751: head noscript</a> ".</p>
                   50752: </dd>
                   50753: <dt id="scriptTag">A start tag whose tag name is "script"</dt>
                   50754: <dd>
                   50755: <p><a href="#create">Create an element for the token</a>
                   50756: <ins class="diff-new">in the</ins> <a href=
                   50757: "#html-namespace0"><ins class="diff-new">HTML namespace</ins></a>
                   50758: .</p>
                   50759: <p>Mark the element as being <a href=
                   50760: "#parser-inserted">"parser-inserted"</a> . This ensures that, if
                   50761: the script is external, any <code title=
                   50762: "dom-document-write-HTML"><a href=
                   50763: "#document.write...">document.write()</a></code> calls in the
                   50764: script will execute in-line, instead of blowing the document away,
                   50765: as would happen in most other cases.</p>
                   50766: <p>Switch the tokeniser's <a href="#content2">content model
                   50767: flag</a> to the CDATA state.</p>
                   50768: <p>Then, collect all the character tokens that the tokeniser
                   50769: returns until it returns a token that is not a character token, or
                   50770: until it stops tokenising.</p>
                   50771: <p>If this process resulted in a collection of character tokens,
                   50772: append a single <code>Text</code> node to the <code><a href=
                   50773: "#script1">script</a></code> element node whose contents is the
                   50774: concatenation of all those tokens' characters.</p>
                   50775: <p>The tokeniser's <a href="#content2">content model flag</a> will
                   50776: have switched back to the PCDATA state.</p>
                   50777: <p>If the next token is not an end tag token with the tag name
                   50778: "script", then this is a <a href="#parse1">parse error</a> ; mark
                   50779: the <code><a href="#script1">script</a></code> element as <a href=
                   50780: "#already">"already executed"</a> . Otherwise, the token is the
                   50781: <code><a href="#script1">script</a></code> element's end tag, so
                   50782: ignore it.</p>
                   50783: <p>If the parser was originally created for the <a href=
                   50784: "#html-fragment0">HTML fragment parsing algorithm</a> , then mark
                   50785: the <code><a href="#script1">script</a></code> element as <a href=
                   50786: "#already">"already executed"</a> , and skip the rest of the
                   50787: processing described for this token (including the part below where
                   50788: " <a href="#the-script" title=
                   50789: "the script that will execute as soon as the parser resumes">scripts
                   50790: that will execute as soon as the parser resumes</a> " are
                   50791: executed). ( <a href="#fragment">fragment case</a> )</p>
                   50792: <p class="note">Marking the <code><a href=
                   50793: "#script1">script</a></code> element as "already executed" prevents
                   50794: it from executing when it is inserted into the document a few
                   50795: paragraphs below. Thus, scripts missing their end tags and scripts
                   50796: that were inserted using <code title="dom-innerHTML-HTML"><a href=
                   50797: "#innerhtml0">innerHTML</a></code> aren't executed.</p>
                   50798: <p>Let the <var title="">old insertion point</var> have the same
                   50799: value as the current <a href="#insertion">insertion point</a> . Let
                   50800: the <a href="#insertion">insertion point</a> be just before the
                   50801: <a href="#next-input">next input character</a> .</p>
                   50802: <p>Append the new element to the <a href="#current5">current
                   50803: node</a> . <a href="#running" title="running a script">Special
                   50804: processing occurs when a <code>script</code> element is inserted
                   50805: into a document</a> that might cause some script to execute, which
                   50806: might cause <a href="#document.write..." title=
                   50807: "dom-document-write-HTML">new characters to be inserted into the
                   50808: tokeniser</a> .</p>
                   50809: <p>Let the <a href="#insertion">insertion point</a> have the value
                   50810: of the <var title="">old insertion point</var> . (In other words,
                   50811: restore the <a href="#insertion">insertion point</a> to the value
                   50812: it had before the previous paragraph. This value might be the
                   50813: "undefined" value.)</p>
                   50814: <p id="scriptTagParserResumes">At this stage, if there is <a href=
                   50815: "#the-script" title=
                   50816: "the script that will execute as soon as the parser resumes">a
                   50817: script that will execute as soon as the parser resumes</a> ,
                   50818: then:</p>
                   50819: <dl class="switch">
                   50820: <dt>If the tree construction stage is <a href=
                   50821: "#nestedParsing">being called reentrantly</a> , say from a call to
                   50822: <code title="dom-document-write-HTML"><a href=
                   50823: "#document.write...">document.write()</a></code> :</dt>
                   50824: <dd>
                   50825: <p>Abort the processing of any nested <del class=
                   50826: "diff-old">invokations</del> <ins class=
                   50827: "diff-chg">invocations</ins> of the tokeniser, yielding control
                   50828: back to the caller. (Tokenisation will resume when the caller
                   50829: returns to the "outer" tree construction stage.)</p>
                   50830: </dd>
                   50831: <dt>Otherwise:</dt>
                   50832: <dd>
                   50833: <p>Follow these steps:</p>
                   50834: <ol>
                   50835: <li>
                   50836: <p>Let <var title="">the script</var> be <a href="#the-script">the
                   50837: script that will execute as soon as the parser resumes</a> . There
                   50838: is no longer <a href="#the-script" title=
                   50839: "the script that will execute as soon as the parser resumes">a
                   50840: script that will execute as soon as the parser resumes</a> .</p>
                   50841: </li>
                   50842: <li>
                   50843: <p><a href="#pause">Pause</a> until the script has <span>completed
                   50844: loading</span> .</p>
                   50845: </li>
                   50846: <li>
                   50847: <p>Let the <a href="#insertion">insertion point</a> be just before
                   50848: the <a href="#next-input">next input character</a> .</p>
                   50849: </li>
                   50850: <li>
                   50851: <p><a href="#executing0" title="executing a script block">Execute
                   50852: the script</a> .</p>
                   50853: </li>
                   50854: <li>
                   50855: <p>Let the <a href="#insertion">insertion point</a> be undefined
                   50856: again.</p>
                   50857: </li>
                   50858: <li>
                   50859: <p>If there is once again <a href="#the-script" title=
                   50860: "the script that will execute as soon as the parser resumes">a
                   50861: script that will execute as soon as the parser resumes</a> , then
                   50862: repeat these steps from step 1.</p>
                   50863: </li>
                   50864: </ol>
                   50865: </dd>
                   50866: </dl>
                   50867: </dd>
                   50868: <dt>An end tag whose tag name is "head"</dt>
                   50869: <dd>
                   50870: <p>Pop the <a href="#current5">current node</a> (which will be the
                   50871: <code><a href="#head">head</a></code> element) off the <a href=
                   50872: "#stack">stack of open elements</a> .</p>
                   50873: <p><del class="diff-old">Change</del> <ins class=
                   50874: "diff-chg">Switch</ins> the <span>insertion mode</span> to "
                   50875: <a href="#after4" title="insertion mode: after head">after head</a>
                   50876: ".</p>
                   50877: </dd>
                   50878: <dt>An end tag whose tag name is <del class="diff-old">one of:
                   50879: "body", "html", "p",</del> "br"</dt>
                   50880: <dd>
                   50881: <p>Act as described in the "anything else" entry below.</p>
                   50882: </dd>
                   50883: <dt>A start tag whose tag name is "head"</dt>
                   50884: <dt>Any other end tag</dt>
                   50885: <dd>
                   50886: <p><a href="#parse1">Parse error</a> . Ignore the token.</p>
                   50887: </dd>
                   50888: <dt>Anything else</dt>
                   50889: <dd>
                   50890: <p>Act as if an end tag token with the tag name "head" had been
                   50891: seen, and reprocess the current token.</p>
                   50892: <p class="big-issue">In certain UAs, <a href=
                   50893: "https://bugzilla.mozilla.org/attachment.cgi?id=180157&amp;action=view">
                   50894: some elements</a> don't trigger the "in body" mode straight away,
                   50895: but instead get put into the head. Do we want to copy that?</p>
                   50896: </dd>
                   50897: </dl>
                   50898: <del class="diff-old">If</del>
                   50899: <h5 id="parsing-main-inheadnoscript"><span class=
                   50900: "secno"><ins class="diff-chg">8.2.5.8.</ins></span> <ins class=
                   50901: "diff-chg">The "</ins> <dfn id="in-head0" title=
                   50902: "insertion mode: in head noscript"><ins class="diff-chg">in head
                   50903: noscript</ins></dfn> <ins class="diff-chg">" insertion
                   50904: mode</ins></h5>
                   50905: <p><ins class="diff-chg">When</ins> the <span>insertion mode</span>
                   50906: is " <a href="#in-head0" title=
                   50907: "insertion mode: in head noscript">in head noscript <del class=
                   50908: "diff-old">"</del></a> <ins class="diff-chg">", tokens must be
                   50909: handled as follows:</ins></p>
                   50910: <dl class="switch">
                   50911: <dt><ins class="diff-new">A DOCTYPE token</ins></dt>
                   50912: <dd>
                   50913: <p><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   50914: .<ins class="diff-new">Ignore the token.</ins></p>
                   50915: </dd>
                   50916: <dt><ins class="diff-new">A start tag whose tag name is
                   50917: "html"</ins></dt>
                   50918: <dd>
                   50919: <p><ins class="diff-new">Process the token</ins> <a href=
                   50920: "#using8"><ins class="diff-new">using the rules for</ins></a>
                   50921: <ins class="diff-new">the "</ins> <a href="#in-body" title=
                   50922: "insertion mode: in body"><ins class="diff-new">in body</ins></a>
                   50923: <ins class="diff-new">"</ins> <span><ins class="diff-new">insertion
                   50924: mode</ins></span> .</p>
                   50925: </dd>
                   50926: <dt>An end tag whose tag name is "noscript"</dt>
                   50927: <dd>
                   50928: <p>Pop the <a href="#current5">current node</a> (which will be a
                   50929: <code><a href="#noscript">noscript</a></code> element) from the
                   50930: <a href="#stack">stack of open elements</a> ; the new <a href=
                   50931: "#current5">current node</a> will be a <code><a href=
                   50932: "#head">head</a></code> element.</p>
                   50933: <p>Switch the <span>insertion mode</span> to " <a href="#in-head"
                   50934: title="insertion mode: in head">in head</a> ".</p>
                   50935: </dd>
                   50936: <dt>A character token that is one of one of U+0009 CHARACTER
                   50937: TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
                   50938: FORM FEED (FF), or U+0020 SPACE</dt>
                   50939: <dt>A comment token</dt>
                   50940: <dt>A start tag whose tag name is one of: "link", "meta",
                   50941: <ins class="diff-new">"noframes",</ins> "style"</dt>
                   50942: <dd>
                   50943: <p>Process the token <del class="diff-old">as if</del> <a href=
                   50944: "#using8"><ins class="diff-chg">using</ins> the <del class=
                   50945: "diff-old">insertion mode</del> <ins class="diff-chg">rules
                   50946: for</ins></a> <del class="diff-old">had been</del> <ins class=
                   50947: "diff-chg">the</ins> " <a href="#in-head" title=
                   50948: "insertion mode: in head">in head</a> <del class=
                   50949: "diff-old">".</del> <ins class="diff-chg">"</ins> <span><ins class=
                   50950: "diff-chg">insertion mode</ins></span> .</p>
                   50951: </dd>
                   50952: <dt>An end tag whose tag name is one of: <del class=
                   50953: "diff-old">"p",</del> "br"</dt>
                   50954: <dd>
                   50955: <p>Act as described in the "anything else" entry below.</p>
                   50956: </dd>
                   50957: <dt>A start tag whose tag name is one of: "head", "noscript"</dt>
                   50958: <dt>Any other end tag</dt>
                   50959: <dd>
                   50960: <p><a href="#parse1">Parse error</a> . Ignore the token.</p>
                   50961: </dd>
                   50962: <dt>Anything else</dt>
                   50963: <dd>
                   50964: <p><a href="#parse1">Parse error</a> . Act as if an end tag with
                   50965: the tag name "noscript" had been seen and reprocess the current
                   50966: token.</p>
                   50967: </dd>
                   50968: </dl>
                   50969: <del class="diff-old">If the insertion mode is</del>
                   50970: <h5 id="the-after"><span class="secno"><ins class=
                   50971: "diff-chg">8.2.5.9.</ins></span> <ins class="diff-chg">The</ins> "
                   50972: <dfn id="after4" title="insertion mode: after head">after
                   50973: head</dfn> " <ins class="diff-chg">insertion mode</ins></h5>
                   50974: <p><del class="diff-old">Handle</del> <ins class=
                   50975: "diff-chg">When</ins> the <del class="diff-old">token</del>
                   50976: <span><ins class="diff-chg">insertion mode</ins></span> <ins class=
                   50977: "diff-chg">is "</ins> <a href="#after4" title=
                   50978: "insertion mode: after head"><ins class="diff-chg">after
                   50979: head</ins></a> <ins class="diff-chg">", tokens must be
                   50980: handled</ins> as follows:</p>
                   50981: <dl class="switch">
                   50982: <dt>A character token that is one of one of U+0009 CHARACTER
                   50983: TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
                   50984: FORM FEED (FF), or U+0020 SPACE</dt>
                   50985: <dd>
                   50986: <p><del class="diff-old">Append</del> <a href="#insert" title=
                   50987: "insert a character"><ins class="diff-chg">Insert</ins> the
                   50988: character</a> <del class="diff-old">to</del> <ins class=
                   50989: "diff-chg">into</ins> the <a href="#current5">current node</a>
                   50990: .</p>
                   50991: </dd>
                   50992: <dt>A comment token</dt>
                   50993: <dd>
                   50994: <p>Append a <code>Comment</code> node to the <a href=
                   50995: "#current5">current node</a> with the <code title="">data</code>
                   50996: attribute set to the data given in the comment token.</p>
                   50997: </dd>
                   50998: <dt>A <ins class="diff-new">DOCTYPE token</ins></dt>
                   50999: <dd>
                   51000: <p><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   51001: .<ins class="diff-new">Ignore the token.</ins></p>
                   51002: </dd>
                   51003: <dt><ins class="diff-new">A start tag whose tag name is
                   51004: "html"</ins></dt>
                   51005: <dd>
                   51006: <p><ins class="diff-new">Process the token</ins> <a href=
                   51007: "#using8"><ins class="diff-new">using the rules for</ins></a>
                   51008: <ins class="diff-new">the "</ins> <a href="#in-body" title=
                   51009: "insertion mode: in body"><ins class="diff-new">in body</ins></a>
                   51010: <ins class="diff-new">"</ins> <span><ins class="diff-new">insertion
                   51011: mode</ins></span> .</p>
                   51012: </dd>
                   51013: <dt><ins class="diff-new">A</ins> start tag whose tag name is
                   51014: "body"</dt>
                   51015: <dd>
                   51016: <p><a href="#insert0">Insert <del class="diff-old">a body</del>
                   51017: <ins class="diff-chg">an HTML</ins> element</a> for the token.</p>
                   51018: <p><del class="diff-old">Change</del> <ins class=
                   51019: "diff-chg">Switch</ins> the <span>insertion mode</span> to "
                   51020: <a href="#in-body" title="insertion mode: in body">in body</a>
                   51021: ".</p>
                   51022: </dd>
                   51023: <dt>A start tag whose tag name is "frameset"</dt>
                   51024: <dd>
                   51025: <p><a href="#insert0">Insert <del class="diff-old">a frameset</del>
                   51026: <ins class="diff-chg">an HTML</ins> element</a> for the token.</p>
                   51027: <p><del class="diff-old">Change</del> <ins class=
                   51028: "diff-chg">Switch</ins> the <span>insertion mode</span> to "
                   51029: <a href="#in-frameset" title="insertion mode: in frameset">in
                   51030: frameset</a> ".</p>
                   51031: </dd>
                   51032: <dt>A start tag token whose tag name is one of: "base", "link",
                   51033: "meta", <ins class="diff-new">"noframes",</ins> "script", "style",
                   51034: "title"</dt>
                   51035: <dd>
                   51036: <p><a href="#parse1">Parse error</a> .</p>
                   51037: <p>Push the node pointed to by the <a href=
                   51038: "#head-element"><code title="">head</code> element pointer</a> onto
                   51039: the <a href="#stack">stack of open elements</a> .</p>
                   51040: <p>Process the token <del class="diff-old">as if</del> <a href=
                   51041: "#using8"><ins class="diff-chg">using</ins> the <del class=
                   51042: "diff-old">insertion mode</del> <ins class="diff-chg">rules
                   51043: for</ins></a> <del class="diff-old">had been</del> <ins class=
                   51044: "diff-chg">the</ins> " <a href="#in-head" title=
                   51045: "insertion mode: in head">in head</a> <del class=
                   51046: "diff-old">".</del> <ins class="diff-chg">"</ins> <span><ins class=
                   51047: "diff-chg">insertion mode</ins></span> .</p>
                   51048: <p>Pop the <a href="#current5">current node</a> (which will be the
                   51049: node pointed to by the <a href="#head-element"><code title=
                   51050: "">head</code> element pointer</a> ) off the <a href="#stack">stack
                   51051: of open elements</a> .</p>
                   51052: </dd>
                   51053: <dt><ins class="diff-new">A start tag whose tag name is
                   51054: "head"</ins></dt>
                   51055: <dt><ins class="diff-new">Any other end tag</ins></dt>
                   51056: <dd>
                   51057: <p><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   51058: .<ins class="diff-new">Ignore the token.</ins></p>
                   51059: </dd>
                   51060: <dt>Anything else</dt>
                   51061: <dd>
                   51062: <p>Act as if a start tag token with the tag name "body" and no
                   51063: attributes had been seen, and then reprocess the current token.</p>
                   51064: </dd>
                   51065: </dl>
                   51066: <del class="diff-old">If the insertion mode is</del>
                   51067: <h5 id="parsing-main-inbody"><span class="secno"><ins class=
                   51068: "diff-chg">8.2.5.10.</ins></span> <ins class="diff-chg">The</ins> "
                   51069: <dfn id="in-body" title="insertion mode: in body">in body</dfn> "
                   51070: <ins class="diff-chg">insertion mode</ins></h5>
                   51071: <p><del class="diff-old">Handle</del> <ins class=
                   51072: "diff-chg">When</ins> the <del class="diff-old">token</del>
                   51073: <span><ins class="diff-chg">insertion mode</ins></span> <ins class=
                   51074: "diff-chg">is "</ins> <a href="#in-body" title=
                   51075: "insertion mode: in body"><ins class="diff-chg">in body</ins></a>
                   51076: <ins class="diff-chg">", tokens must be handled</ins> as
                   51077: follows:</p>
                   51078: <dl class="switch">
                   51079: <dt>A character token</dt>
                   51080: <dd>
                   51081: <p><a href="#reconstruct">Reconstruct the active formatting
                   51082: elements</a> , if any.</p>
                   51083: <p><del class="diff-old">Append</del> <a href="#insert" title=
                   51084: "insert a character"><ins class="diff-chg">Insert</ins> the token's
                   51085: character</a> <del class="diff-old">to</del> <ins class=
                   51086: "diff-chg">into</ins> the <a href="#current5">current node</a>
                   51087: .</p>
                   51088: </dd>
                   51089: <dt>A comment token</dt>
                   51090: <dd>
                   51091: <p>Append a <code>Comment</code> node to the <a href=
                   51092: "#current5">current node</a> with the <code title="">data</code>
                   51093: attribute set to the data given in the comment token.</p>
                   51094: </dd>
                   51095: <dt>A <ins class="diff-new">DOCTYPE token</ins></dt>
                   51096: <dd>
                   51097: <p><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   51098: .<ins class="diff-new">Ignore the token.</ins></p>
                   51099: </dd>
                   51100: <dt><ins class="diff-new">A</ins> start tag <del class=
                   51101: "diff-old">token</del> whose tag name is <del class="diff-old">one
                   51102: of: "base", "link", "meta", "script", "style"</del> <ins class=
                   51103: "diff-chg">"html"</ins></dt>
                   51104: <dd>
                   51105: <p><del class="diff-old">Process</del> <a href=
                   51106: "#parse1"><ins class="diff-chg">Parse error</ins></a> .<ins class=
                   51107: "diff-chg">For each attribute on</ins> the <del class=
                   51108: "diff-old">token as</del> <ins class="diff-chg">token, check to
                   51109: see</ins> if the <del class="diff-old">insertion mode had been " in
                   51110: head ".</del> <ins class="diff-chg">attribute is already present on
                   51111: the top element of the</ins> <a href="#stack"><ins class=
                   51112: "diff-chg">stack of open elements</ins></a> .<ins class=
                   51113: "diff-chg">If it is not, add the attribute and its corresponding
                   51114: value to that element.</ins></p>
                   51115: </dd>
                   51116: <dt>A start tag <ins class="diff-new">token</ins> whose tag name is
1.2     ! mike     51117: <ins class="diff-new">one of: "base", "command", "event-source",
        !          51118: "link", "meta", "noframes", "script", "style",</ins> "title"</dt>
1.1       mike     51119: <dd>
                   51120: <p><del class="diff-old">Parse error .</del> Process the token
                   51121: <del class="diff-old">as if</del> <a href="#using8"><ins class=
                   51122: "diff-chg">using</ins> the <del class="diff-old">insertion
                   51123: mode</del> <ins class="diff-chg">rules for</ins></a> <del class=
                   51124: "diff-old">had been</del> <ins class="diff-chg">the</ins> "
                   51125: <a href="#in-head" title="insertion mode: in head">in head</a>
                   51126: <del class="diff-old">".</del> <ins class="diff-chg">"</ins>
                   51127: <span><ins class="diff-chg">insertion mode</ins></span> .</p>
                   51128: </dd>
                   51129: <dt>A start tag whose tag name is "body"</dt>
                   51130: <dd>
                   51131: <p><a href="#parse1">Parse error</a> .</p>
                   51132: <p>If the second element on the <a href="#stack">stack of open
                   51133: elements</a> is not a <code><a href="#body0">body</a></code>
                   51134: element, or, if the <a href="#stack">stack of open elements</a> has
                   51135: only one node on it, then ignore the token. ( <a href=
                   51136: "#fragment">fragment case</a> )</p>
                   51137: <p>Otherwise, for each attribute on the token, check to see if the
                   51138: attribute is already present on the <code><a href=
                   51139: "#body0">body</a></code> element (the second element) on the
                   51140: <a href="#stack">stack of open elements</a> . If it is not, add the
                   51141: attribute and its corresponding value to that element.</p>
                   51142: </dd>
                   51143: <dt>An <del class="diff-old">end tag whose tag name is "body"</del>
                   51144: <ins class="diff-chg">end-of-file token</ins></dt>
                   51145: <dd>
                   51146: <p>If <del class="diff-old">the second element</del> <ins class=
                   51147: "diff-chg">there is a node</ins> in the <a href="#stack">stack of
                   51148: open elements</a> <ins class="diff-new">that</ins> is not
                   51149: <ins class="diff-new">either a</ins> <code><a href=
                   51150: "#dd"><ins class="diff-new">dd</ins></a></code> <ins class=
                   51151: "diff-new">element, a</ins> <code><a href="#dt"><ins class=
                   51152: "diff-new">dt</ins></a></code> <ins class="diff-new">element,
                   51153: an</ins> <code><a href="#li"><ins class=
                   51154: "diff-new">li</ins></a></code> <ins class="diff-new">element,
                   51155: a</ins> <code><a href="#p"><ins class="diff-new">p</ins></a></code>
                   51156: <ins class="diff-new">element, a</ins> <code><a href=
                   51157: "#tbody"><ins class="diff-new">tbody</ins></a></code> <ins class=
                   51158: "diff-new">element, a</ins> <code><a href="#td"><ins class=
                   51159: "diff-new">td</ins></a></code> <ins class="diff-new">element,
                   51160: a</ins> <code><a href="#tfoot0"><ins class=
1.2     ! mike     51161: "diff-new">tfoot</ins></a></code> <ins class=
        !          51162: "diff-new">element,</ins> a <code><a href="#th"><ins class=
1.1       mike     51163: "diff-new">th</ins></a></code> <ins class="diff-new">element,
                   51164: a</ins> <code><a href="#thead0"><ins class=
1.2     ! mike     51165: "diff-new">thead</ins></a></code> <ins class="diff-new">element,
        !          51166: a</ins> <code><a href="#tr"><ins class=
1.1       mike     51167: "diff-new">tr</ins></a></code> <ins class="diff-new">element,
                   51168: the</ins> <code><a href="#body0">body</a></code> element,
                   51169: <ins class="diff-new">or the</ins> <code><a href=
                   51170: "#html"><ins class="diff-new">html</ins></a></code> <ins class=
                   51171: "diff-new">element, then</ins> this is a <a href="#parse1">parse
                   51172: error</a> . <del class="diff-old">Ignore</del></p>
                   51173: <p><a href="#stops"><ins class="diff-chg">Stop parsing</ins></a>
                   51174: .</p>
                   51175: </dd>
                   51176: <dt><ins class="diff-chg">An end tag whose tag name is
                   51177: "body"</ins></dt>
                   51178: <dd>
                   51179: <p><ins class="diff-chg">If</ins> the <del class="diff-old">token.
                   51180: ( fragment case</del> <a href="#stack"><ins class="diff-chg">stack
                   51181: of open elements</ins></a> <del class="diff-old">)</del>
                   51182: <ins class="diff-chg">does not</ins> <a href="#have-an" title=
                   51183: "has an element in scope"><ins class="diff-chg">have a</ins>
                   51184: <code><ins class="diff-chg">body</ins></code> <ins class=
                   51185: "diff-chg">element in scope</ins></a> ,<ins class="diff-chg">this
                   51186: is a</ins> <a href="#parse1"><ins class="diff-chg">parse
                   51187: error</ins></a> <ins class="diff-chg">; ignore the token.</ins></p>
                   51188: <p>Otherwise, if there is a node in the <a href="#stack">stack of
                   51189: open elements</a> that is not either a <code><a href=
                   51190: "#dd">dd</a></code> element, a <code><a href="#dt">dt</a></code>
                   51191: element, an <code><a href="#li">li</a></code> element, a
                   51192: <code><a href="#p">p</a></code> element, a <code><a href=
                   51193: "#tbody">tbody</a></code> element, a <code><a href=
                   51194: "#td">td</a></code> element, a <code><a href=
                   51195: "#tfoot0">tfoot</a></code> element, a <code><a href=
                   51196: "#th">th</a></code> element, a <code><a href=
                   51197: "#thead0">thead</a></code> element, a <code><a href=
                   51198: "#tr">tr</a></code> element, the <code><a href=
                   51199: "#body0">body</a></code> element, or the <code><a href=
                   51200: "#html">html</a></code> element, then this is a <a href=
                   51201: "#parse1">parse error</a> .</p>
                   51202: <p><del class="diff-old">Change</del> <ins class=
                   51203: "diff-chg">Switch</ins> the <span>insertion mode</span> to "
                   51204: <a href="#after5" title="insertion mode: after body">after body</a>
                   51205: ". <ins class="diff-new">Otherwise, ignore the token.</ins></p>
                   51206: </dd>
                   51207: <dt>An end tag whose tag name is "html"</dt>
                   51208: <dd>
                   51209: <p>Act as if an end tag with tag name "body" had been seen, then,
                   51210: if that token wasn't ignored, reprocess the current token.</p>
                   51211: <p class="note">The fake end tag token here can only be ignored in
                   51212: the <a href="#fragment">fragment case</a> .</p>
                   51213: </dd>
1.2     ! mike     51214: <dt>A start tag whose tag name is one of: "address", <ins class=
        !          51215: "diff-new">"article", "aside",</ins> "blockquote", "center",
        !          51216: <ins class="diff-new">"datagrid", "dialog",</ins> "dir", "div",
        !          51217: "dl", "fieldset", <del class="diff-old">"listing",</del>
        !          51218: <ins class="diff-chg">"footer", "h1", "h2", "h3", "h4", "h5", "h6",
        !          51219: "header",</ins> "menu", <ins class="diff-new">"nav",</ins> "ol",
        !          51220: "p", <ins class="diff-new">"section",</ins> "ul"</dt>
1.1       mike     51221: <dd><del class="diff-old">This doesn't match browsers.</del>
                   51222: <p>If the <a href="#stack">stack of open elements</a> <a href=
                   51223: "#have-an" title="has an element in scope">has a <code>p</code>
                   51224: element in scope</a> , then act as if an end tag with the tag name
                   51225: <code><a href="#p">p</a></code> had been seen.</p>
                   51226: <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
                   51227: </dd>
                   51228: <dt>A start tag whose tag name is <del class="diff-old">"pre"</del>
                   51229: <ins class="diff-chg">one of: "pre", "listing"</ins></dt>
                   51230: <dd>
                   51231: <p>If the <a href="#stack">stack of open elements</a> <a href=
                   51232: "#have-an" title="has an element in scope">has a <code>p</code>
                   51233: element in scope</a> , then act as if an end tag with the tag name
                   51234: <code><a href="#p">p</a></code> had been seen.</p>
                   51235: <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
                   51236: <p>If the next token is a U+000A LINE FEED (LF) character token,
                   51237: then ignore that token and move on to the next one. (Newlines at
                   51238: the start of <code><a href="#pre">pre</a></code> blocks are ignored
                   51239: as an authoring convenience.)</p>
                   51240: </dd>
                   51241: <dt>A start tag whose tag name is "form"</dt>
                   51242: <dd>
                   51243: <p>If the <a href="#form-element"><code title="form">form</code>
                   51244: element pointer</a> is not null, ignore the token with a <a href=
                   51245: "#parse1">parse error</a> .</p>
                   51246: <p>Otherwise:</p>
                   51247: <p>If the <a href="#stack">stack of open elements</a> <a href=
                   51248: "#have-an" title="has an element in scope">has a <code>p</code>
                   51249: element in scope</a> , then act as if an end tag with the tag name
                   51250: <code><a href="#p">p</a></code> had been seen.</p>
                   51251: <p><a href="#insert0">Insert an HTML element</a> for the token, and
                   51252: set the <code title="form">form</code> element pointer to point to
                   51253: the element created.</p>
                   51254: </dd>
                   51255: <dt>A start tag whose tag name is "li"</dt>
                   51256: <dd>
1.2     ! mike     51257: <p><del class="diff-old">If the stack of open elements has a p
        !          51258: element in scope , then act as if an end tag with the tag name p
        !          51259: had been seen.</del> Run the following algorithm:</p>
1.1       mike     51260: <ol>
                   51261: <li>
                   51262: <p>Initialise <var title="">node</var> to be the <a href=
                   51263: "#current5">current node</a> (the bottommost node of the
                   51264: stack).</p>
                   51265: </li>
                   51266: <li>
                   51267: <p>If <var title="">node</var> is an <code><a href=
1.2     ! mike     51268: "#li">li</a></code> element, then <del class="diff-old">pop all the
        !          51269: nodes from</del> <ins class="diff-chg">act as if an end tag
        !          51270: with</ins> the <del class="diff-old">current node</del> <ins class=
        !          51271: "diff-chg">tag name</ins> <code><a href="#li"><ins class=
        !          51272: "diff-chg">li</ins></a> <del class="diff-old">up to node ,
        !          51273: including node , then stop this algorithm. If more than one node is
        !          51274: popped,</del></code> <ins class="diff-chg">had been seen,</ins>
        !          51275: then <del class="diff-old">this is a parse error .</del>
        !          51276: <ins class="diff-chg">jump to the last step.</ins></p>
1.1       mike     51277: </li>
                   51278: <li>
                   51279: <p>If <var title="">node</var> is not in the <a href=
                   51280: "#formatting">formatting</a> category, and is not in the <a href=
                   51281: "#phrasing1">phrasing</a> category, and is not an <code><a href=
                   51282: "#address">address</a></code> or <code><a href=
1.2     ! mike     51283: "#div">div</a></code> element, then <del class="diff-old">stop this
        !          51284: algorithm.</del> <ins class="diff-chg">jump to the last
        !          51285: step.</ins></p>
1.1       mike     51286: </li>
                   51287: <li>
                   51288: <p>Otherwise, set <var title="">node</var> to the previous entry in
                   51289: the <a href="#stack">stack of open elements</a> and return to step
1.2     ! mike     51290: 2. <del class="diff-old">Finally, insert an li element . A start
        !          51291: tag whose tag name is one of: "dd", "dt"</del></p>
1.1       mike     51292: </li>
1.2     ! mike     51293: <li>
1.1       mike     51294: <p>If the <a href="#stack">stack of open elements</a> <a href=
                   51295: "#have-an" title="has an element in scope">has a <code>p</code>
                   51296: element in scope</a> , then act as if an end tag with the tag name
                   51297: <code><a href="#p">p</a></code> had been seen.</p>
1.2     ! mike     51298: <p><ins class="diff-new">Finally,</ins> <a href=
        !          51299: "#insert0"><ins class="diff-new">insert an HTML element</ins></a>
        !          51300: <ins class="diff-new">for the token.</ins></p>
        !          51301: </li>
        !          51302: </ol>
        !          51303: </dd>
        !          51304: <dt><ins class="diff-new">A start tag whose tag name is one of:
        !          51305: "dd", "dt"</ins></dt>
        !          51306: <dd>
1.1       mike     51307: <p>Run the following algorithm:</p>
                   51308: <ol>
                   51309: <li>
                   51310: <p>Initialise <var title="">node</var> to be the <a href=
                   51311: "#current5">current node</a> (the bottommost node of the
                   51312: stack).</p>
                   51313: </li>
                   51314: <li>
                   51315: <p>If <var title="">node</var> is a <code><a href=
                   51316: "#dd">dd</a></code> or <code><a href="#dt">dt</a></code> element,
1.2     ! mike     51317: then <del class="diff-old">pop all the nodes from</del> <ins class=
        !          51318: "diff-chg">act as if an end tag with</ins> the <del class=
        !          51319: "diff-old">current node up to node , including</del> <ins class=
        !          51320: "diff-chg">same tag name as</ins> <var title="">node <del class=
        !          51321: "diff-old">, then stop this algorithm. If more than one node is
        !          51322: popped,</del></var> <ins class="diff-chg">had been seen,</ins> then
        !          51323: <del class="diff-old">this is a parse error .</del> <ins class=
        !          51324: "diff-chg">jump to the last step.</ins></p>
1.1       mike     51325: </li>
                   51326: <li>
                   51327: <p>If <var title="">node</var> is not in the <a href=
                   51328: "#formatting">formatting</a> category, and is not in the <a href=
                   51329: "#phrasing1">phrasing</a> category, and is not an <code><a href=
                   51330: "#address">address</a></code> or <code><a href=
1.2     ! mike     51331: "#div">div</a></code> element, then <del class="diff-old">stop this
        !          51332: algorithm.</del> <ins class="diff-chg">jump to the last
        !          51333: step.</ins></p>
1.1       mike     51334: </li>
                   51335: <li>
                   51336: <p>Otherwise, set <var title="">node</var> to the previous entry in
                   51337: the <a href="#stack">stack of open elements</a> and return to step
                   51338: 2.</p>
                   51339: </li>
1.2     ! mike     51340: <li>
        !          51341: <p><ins class="diff-chg">If the</ins> <a href="#stack"><ins class=
        !          51342: "diff-chg">stack of open elements</ins></a> <a href="#have-an"
        !          51343: title="has an element in scope"><ins class="diff-chg">has a</ins>
        !          51344: <code><ins class="diff-chg">p</ins></code> <ins class=
        !          51345: "diff-chg">element in scope</ins></a> ,<ins class="diff-chg">then
        !          51346: act as if an end tag with the tag name</ins> <code><a href=
        !          51347: "#p"><ins class="diff-chg">p</ins></a></code> <ins class=
        !          51348: "diff-chg">had been seen.</ins></p>
1.1       mike     51349: <p>Finally, <a href="#insert0">insert an HTML element</a>
                   51350: <del class="diff-old">with the same tag name as</del> <ins class=
                   51351: "diff-chg">for</ins> the <del class="diff-old">token's.</del>
                   51352: <ins class="diff-chg">token.</ins></p>
1.2     ! mike     51353: </li>
        !          51354: </ol>
1.1       mike     51355: </dd>
                   51356: <dt>A start tag whose tag name is "plaintext"</dt>
                   51357: <dd>
                   51358: <p>If the <a href="#stack">stack of open elements</a> <a href=
                   51359: "#have-an" title="has an element in scope">has a <code>p</code>
                   51360: element in scope</a> , then act as if an end tag with the tag name
                   51361: <code><a href="#p">p</a></code> had been seen.</p>
                   51362: <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
                   51363: <p>Switch the <a href="#content2">content model flag</a> to the
                   51364: PLAINTEXT state.</p>
                   51365: <p class="note">Once a start tag with the tag name "plaintext" has
                   51366: been seen, that will be the last token ever seen other than
                   51367: character tokens (and the end-of-file token), because there is no
                   51368: way to switch the <a href="#content2">content model flag</a> out of
                   51369: the PLAINTEXT state.</p>
                   51370: </dd>
1.2     ! mike     51371: <dt>An end tag whose tag name is one of: "address", <ins class=
        !          51372: "diff-new">"article", "aside",</ins> "blockquote", "center",
        !          51373: <ins class="diff-new">"datagrid", "dialog",</ins> "dir", "div",
        !          51374: "dl", "fieldset", <ins class="diff-new">"footer", "header",</ins>
        !          51375: "listing", "menu", <ins class="diff-new">"nav",</ins> "ol", "pre",
        !          51376: <ins class="diff-new">"section",</ins> "ul"</dt>
1.1       mike     51377: <dd>
                   51378: <p>If the <a href="#stack">stack of open elements</a> <del class=
                   51379: "diff-old">has</del> <ins class="diff-chg">does not</ins> <a href=
                   51380: "#have-an" title="has an element in scope"><ins class=
                   51381: "diff-chg">have</ins> an element in scope</a> with the same tag
                   51382: name as that of the token, then <ins class="diff-new">this is
                   51383: a</ins> <a href="#parse1"><ins class="diff-new">parse
                   51384: error</ins></a> .</p>
                   51385: <p><ins class="diff-new">Otherwise, run these steps:</ins></p>
                   51386: <ol>
                   51387: <li>
                   51388: <p><a href="#generate"><del class="diff-old">generate</del>
                   51389: <ins class="diff-chg">Generate</ins> implied end tags</a> .</p>
                   51390: </li>
                   51391: <li>
                   51392: <p><del class="diff-old">Now, if</del> <ins class=
                   51393: "diff-chg">If</ins> the <a href="#current5">current node</a> is not
                   51394: an element with the same tag name as that of the token, then this
                   51395: is a <a href="#parse1">parse error</a> .</p>
                   51396: </li>
                   51397: <li>
                   51398: <p><del class="diff-old">If</del> <ins class="diff-chg">Pop
                   51399: elements from</ins> the <a href="#stack">stack of open elements</a>
                   51400: <del class="diff-old">has</del> <ins class="diff-chg">until</ins>
                   51401: an element <del class="diff-old">in scope</del> with the same tag
                   51402: name as <del class="diff-old">that of</del> the <del class=
                   51403: "diff-old">token, then pop elements from this stack until an
                   51404: element with that tag name</del> <ins class="diff-chg">token</ins>
                   51405: has been popped from the stack.</p>
                   51406: </li>
                   51407: </ol>
                   51408: </dd>
                   51409: <dt>An end tag whose tag name is "form"</dt>
                   51410: <dd>
                   51411: <p><ins class="diff-new">Set the</ins> <a href=
                   51412: "#form-element"><code title=""><ins class=
                   51413: "diff-new">form</ins></code> <ins class="diff-new">element
                   51414: pointer</ins></a> <ins class="diff-new">to null.</ins></p>
                   51415: <p>If the <a href="#stack">stack of open elements</a> <del class=
                   51416: "diff-old">has</del> <ins class="diff-chg">does not</ins> <a href=
                   51417: "#have-an" title="has an element in scope"><ins class=
                   51418: "diff-chg">have</ins> an element in scope</a> with the same tag
                   51419: name as that of the token, then <ins class="diff-new">this is
                   51420: a</ins> <a href="#parse1"><ins class="diff-new">parse
                   51421: error</ins></a> .</p>
                   51422: <p><ins class="diff-new">Otherwise, run these steps:</ins></p>
                   51423: <ol>
                   51424: <li>
                   51425: <p><a href="#generate"><del class="diff-old">generate</del>
                   51426: <ins class="diff-chg">Generate</ins> implied end tags</a> .</p>
                   51427: </li>
                   51428: <li>
                   51429: <p><del class="diff-old">Now, if</del> <ins class=
                   51430: "diff-chg">If</ins> the <a href="#current5">current node</a> is not
                   51431: an element with the same tag name as that of the token, then this
                   51432: is a <a href="#parse1">parse error</a> .</p>
                   51433: </li>
                   51434: <li>
                   51435: <p><del class="diff-old">Otherwise, if</del> <ins class=
                   51436: "diff-chg">Pop elements from</ins> the <del class=
                   51437: "diff-old">current node</del> <a href="#stack"><ins class=
                   51438: "diff-chg">stack of open elements</ins></a> <del class=
                   51439: "diff-old">is</del> <ins class="diff-chg">until</ins> an element
                   51440: with the same tag name as <del class="diff-old">that of</del> the
                   51441: token <del class="diff-old">pop that element</del> <ins class=
                   51442: "diff-chg">has been popped</ins> from the stack. <del class=
                   51443: "diff-old">In any case, set the form element pointer to
                   51444: null.</del></p>
                   51445: </li>
                   51446: </ol>
                   51447: </dd>
                   51448: <dt>An end tag whose tag name is "p"</dt>
                   51449: <dd>
1.2     ! mike     51450: <p>If the <a href="#stack">stack of open elements</a> <ins class=
        !          51451: "diff-new">does not</ins> <a href="#have-an" title=
        !          51452: "has an element in scope"><del class="diff-old">has a p</del>
        !          51453: <ins class="diff-chg">have an</ins> element in scope <del class=
        !          51454: "diff-old">,</del></a> <ins class="diff-chg">with the same tag name
        !          51455: as that of the token,</ins> then <del class="diff-old">generate
        !          51456: implied end tags , except for</del> <ins class="diff-chg">this is
        !          51457: a</ins> <a href="#parse1"><ins class="diff-chg">parse
        !          51458: error</ins></a> <ins class="diff-chg">; act as if a start tag with
        !          51459: the tag name</ins> <code><a href="#p">p</a></code> <del class=
        !          51460: "diff-old">elements.</del> <ins class="diff-chg">had been seen,
        !          51461: then reprocess the current token.</ins></p>
        !          51462: <p><ins class="diff-new">Otherwise, run these steps:</ins></p>
        !          51463: <ol>
        !          51464: <li>
        !          51465: <p><a href="#generate"><ins class="diff-new">Generate implied end
        !          51466: tags</ins></a> ,<ins class="diff-new">except for elements with the
        !          51467: same tag name as the token.</ins></p>
        !          51468: </li>
        !          51469: <li>
        !          51470: <p>If the <a href="#current5">current node</a> is not <del class=
        !          51471: "diff-old">a p element,</del> <ins class="diff-chg">an element with
        !          51472: the same tag name as that of the token,</ins> then this is a
        !          51473: <a href="#parse1">parse error</a> .</p>
        !          51474: </li>
        !          51475: <li>
        !          51476: <p><del class="diff-old">If</del> <ins class="diff-chg">Pop
        !          51477: elements from</ins> the <a href="#stack">stack of open elements</a>
        !          51478: <del class="diff-old">has a p element in scope , then pop elements
        !          51479: from this stack</del> until <del class="diff-old">the stack no
        !          51480: longer has a p</del> <ins class="diff-chg">an</ins> element
        !          51481: <del class="diff-old">in scope . Otherwise, act as if a start
        !          51482: tag</del> with the <ins class="diff-new">same</ins> tag name
        !          51483: <del class="diff-old">p had</del> <ins class="diff-chg">as the
        !          51484: token has</ins> been <del class="diff-old">seen, then
        !          51485: reprocess</del> <ins class="diff-chg">popped from</ins> the
        !          51486: <del class="diff-old">current token.</del> <ins class=
        !          51487: "diff-chg">stack.</ins></p>
        !          51488: </li>
        !          51489: </ol>
1.1       mike     51490: </dd>
                   51491: <dt>An end tag whose tag name is one of: "dd", "dt", "li"</dt>
                   51492: <dd>
                   51493: <p>If the <a href="#stack">stack of open elements</a> <del class=
                   51494: "diff-old">has</del> <ins class="diff-chg">does not</ins> <a href=
                   51495: "#have-an" title="has an element in scope"><ins class=
                   51496: "diff-chg">have</ins> an element in scope</a> <del class=
                   51497: "diff-old">whose tag name matches</del> <ins class=
                   51498: "diff-chg">with</ins> the <ins class="diff-new">same</ins> tag name
                   51499: <ins class="diff-new">as that</ins> of the token, then <ins class=
                   51500: "diff-new">this is a</ins> <a href="#parse1"><ins class=
                   51501: "diff-new">parse error</ins></a> .</p>
                   51502: <p><ins class="diff-new">Otherwise, run these steps:</ins></p>
                   51503: <ol>
                   51504: <li>
                   51505: <p><a href="#generate"><del class="diff-old">generate</del>
                   51506: <ins class="diff-chg">Generate</ins> implied end tags</a> , except
                   51507: for elements with the same tag name as the token.</p>
                   51508: </li>
                   51509: <li>
                   51510: <p>If the <a href="#current5">current node</a> is not an element
                   51511: with the same tag name as <ins class="diff-new">that of</ins> the
                   51512: token, then this is a <a href="#parse1">parse error</a> .</p>
                   51513: </li>
                   51514: <li>
                   51515: <p><del class="diff-old">If</del> <ins class="diff-chg">Pop
                   51516: elements from</ins> the <a href="#stack">stack of open elements</a>
                   51517: <del class="diff-old">has an element in scope whose tag name
                   51518: matches the tag name of the token, then pop elements from this
                   51519: stack</del> until an element with <del class="diff-old">that</del>
                   51520: <ins class="diff-chg">the same</ins> tag name <ins class=
                   51521: "diff-new">as the token</ins> has been popped from the stack.
                   51522: <del class="diff-old">A start tag whose tag name is one of: "h1",
                   51523: "h2", "h3", "h4", "h5", "h6" If the stack of open elements has a p
                   51524: element in scope , then act as if an end tag with the tag name p
                   51525: had been seen. Insert an HTML element for the token.</del></p>
                   51526: </li>
                   51527: </ol>
                   51528: </dd>
                   51529: <dt>An end tag whose tag name is one of: "h1", "h2", "h3", "h4",
                   51530: "h5", "h6"</dt>
                   51531: <dd>
                   51532: <p>If the <a href="#stack">stack of open elements</a> <ins class=
                   51533: "diff-new">does not</ins> <a href="#have-an" title=
                   51534: "has an element in scope"><del class="diff-old">has</del>
                   51535: <ins class="diff-chg">have an element</ins> in scope</a>
                   51536: <del class="diff-old">an element</del> whose tag name is one of
                   51537: "h1", "h2", "h3", "h4", "h5", or "h6", then <ins class=
                   51538: "diff-new">this is a</ins> <a href="#parse1"><ins class=
                   51539: "diff-new">parse error</ins></a> .</p>
                   51540: <p><ins class="diff-new">Otherwise, run these steps:</ins></p>
                   51541: <ol>
                   51542: <li>
                   51543: <p><a href="#generate"><del class="diff-old">generate</del>
                   51544: <ins class="diff-chg">Generate</ins> implied end tags</a> .</p>
                   51545: </li>
                   51546: <li>
                   51547: <p><del class="diff-old">Now, if</del> <ins class=
                   51548: "diff-chg">If</ins> the <a href="#current5">current node</a> is not
                   51549: an element with the same tag name as that of the token, then this
                   51550: is a <a href="#parse1">parse error</a> .</p>
                   51551: </li>
                   51552: <li>
                   51553: <p><del class="diff-old">If</del> <ins class="diff-chg">Pop
                   51554: elements from</ins> the <a href="#stack">stack of open elements</a>
                   51555: <del class="diff-old">has in scope</del> <ins class=
                   51556: "diff-chg">until</ins> an element whose tag name is one of "h1",
                   51557: "h2", "h3", "h4", "h5", or <del class="diff-old">"h6", then pop
                   51558: elements from the stack until an element with one of those tag
                   51559: names</del> <ins class="diff-chg">"h6"</ins> has been popped from
                   51560: the stack.</p>
                   51561: </li>
                   51562: </ol>
                   51563: </dd>
1.2     ! mike     51564: <dt><ins class="diff-new">An end tag whose tag name is
        !          51565: "sarcasm"</ins></dt>
        !          51566: <dd>
        !          51567: <p><ins class="diff-new">Take a deep breath, then act as described
        !          51568: in the "any other end tag" entry below.</ins></p>
        !          51569: </dd>
1.1       mike     51570: <dt>A start tag whose tag name is "a"</dt>
                   51571: <dd>
                   51572: <p>If the <a href="#list-of4">list of active formatting
                   51573: elements</a> contains an element whose tag name is "a" between the
                   51574: end of the list and the last marker on the list (or the start of
                   51575: the list if there is no marker on the list), then this is a
                   51576: <a href="#parse1">parse error</a> ; act as if an end tag with the
                   51577: tag name "a" had been seen, then remove that element from the
                   51578: <a href="#list-of4">list of active formatting elements</a> and the
                   51579: <a href="#stack">stack of open elements</a> if the end tag didn't
                   51580: already remove it (it might not have if the element is not <a href=
                   51581: "#have-an0" title="has an element in table scope">in table
                   51582: scope</a> ).</p>
                   51583: <p class="example">In the non-conforming stream
                   51584: <code>&lt;a&nbsp;href="a"&gt; a&lt;table&gt;
                   51585: &lt;a&nbsp;href="b"&gt; b&lt;/table&gt; x</code> , the first
                   51586: <code><a href="#a">a</a></code> element would be closed upon seeing
                   51587: the second one, and the "x" character would be inside a link to
                   51588: "b", not to "a". This is despite the fact that the outer
                   51589: <code><a href="#a">a</a></code> element is not in table scope
                   51590: (meaning that a regular <code>&lt;/a&gt;</code> end tag at the
                   51591: start of the table wouldn't close the outer <code><a href=
                   51592: "#a">a</a></code> element).</p>
                   51593: <p><a href="#reconstruct">Reconstruct the active formatting
                   51594: elements</a> , if any.</p>
                   51595: <p><a href="#insert0">Insert an HTML element</a> for the token. Add
                   51596: that element to the <a href="#list-of4">list of active formatting
                   51597: elements</a> .</p>
                   51598: </dd>
                   51599: <dt>A start tag whose tag name is one of: "b", "big", "em", "font",
                   51600: "i", "s", "small", "strike", "strong", "tt", "u"</dt>
                   51601: <dd>
                   51602: <p><a href="#reconstruct">Reconstruct the active formatting
                   51603: elements</a> , if any.</p>
                   51604: <p><a href="#insert0">Insert an HTML element</a> for the token. Add
                   51605: that element to the <a href="#list-of4">list of active formatting
                   51606: elements</a> .</p>
                   51607: </dd>
                   51608: <dt>A start tag whose tag name is "nobr"</dt>
                   51609: <dd>
                   51610: <p><a href="#reconstruct">Reconstruct the active formatting
                   51611: elements</a> , if any.</p>
                   51612: <p>If the <a href="#stack">stack of open elements</a> <a href=
                   51613: "#have-an" title="has an element in scope">has a <code>nobr</code>
                   51614: element in scope</a> , then this is a <a href="#parse1">parse
                   51615: error</a> . Act as if an end tag with the tag name
                   51616: <code>nobr</code> had been seen, then once again <a href=
                   51617: "#reconstruct">reconstruct the active formatting elements</a> , if
                   51618: any.</p>
                   51619: <p><a href="#insert0">Insert an HTML element</a> for the token. Add
                   51620: that element to the <a href="#list-of4">list of active formatting
                   51621: elements</a> .</p>
                   51622: </dd>
                   51623: <dt id="adoptionAgency">An end tag whose tag name is one of: "a",
                   51624: "b", "big", "em", "font", "i", "nobr", "s", "small", "strike",
                   51625: "strong", "tt", "u"</dt>
                   51626: <dd>
                   51627: <p>Follow these steps:</p>
                   51628: <ol>
                   51629: <li>
                   51630: <p>Let the <var title="">formatting element</var> be the last
                   51631: element in the <a href="#list-of4">list of active formatting
                   51632: elements</a> that:</p>
                   51633: <ul>
                   51634: <li>is between the end of the list and the last scope marker in the
                   51635: list, if any, or the start of the list otherwise, and</li>
                   51636: <li>has the same tag name as the token.</li>
                   51637: </ul>
                   51638: <p>If there is no such node, or, if that node is also in the
                   51639: <a href="#stack">stack of open elements</a> but the element is not
                   51640: <a href="#have-an" title="has an element in scope">in scope</a> ,
                   51641: then this is a <a href="#parse1">parse error</a> . Abort these
                   51642: steps. The token is ignored.</p>
                   51643: <p>Otherwise, if there is such a node, but that node is not in the
                   51644: <a href="#stack">stack of open elements</a> , then this is a
                   51645: <a href="#parse1">parse error</a> ; remove the element from the
                   51646: list, and abort these steps.</p>
                   51647: <p>Otherwise, there is a <var title="">formatting element</var> and
                   51648: that element is in <a href="#stack" title=
                   51649: "stack of open elements">the stack</a> and is <a href="#have-an"
                   51650: title="has an element in scope">in scope</a> . If the element is
                   51651: not the <a href="#current5">current node</a> , this is a <a href=
                   51652: "#parse1">parse error</a> . In any case, proceed with the algorithm
                   51653: as written in the following steps.</p>
                   51654: </li>
                   51655: <li>
                   51656: <p>Let the <var title="">furthest block</var> be the topmost node
                   51657: in the <a href="#stack">stack of open elements</a> that is lower in
                   51658: the stack than the <var title="">formatting element</var> , and is
                   51659: not an element in the <a href="#phrasing1">phrasing</a> or <a href=
                   51660: "#formatting">formatting</a> categories. There might not be
                   51661: one.</p>
                   51662: </li>
                   51663: <li>
                   51664: <p>If there is no <var title="">furthest block</var> , then the UA
                   51665: must skip the subsequent steps and instead just pop all the nodes
                   51666: from the bottom of the <a href="#stack">stack of open elements</a>
                   51667: , from the <a href="#current5">current node</a> up to and including
                   51668: the <var title="">formatting element</var> , and remove the
                   51669: <var title="">formatting element</var> from the <a href=
                   51670: "#list-of4">list of active formatting elements</a> .</p>
                   51671: </li>
                   51672: <li>
                   51673: <p>Let the <var title="">common ancestor</var> be the element
                   51674: immediately above the <var title="">formatting element</var> in the
                   51675: <a href="#stack">stack of open elements</a> .</p>
                   51676: </li>
                   51677: <li>
                   51678: <p>If the <var title="">furthest block</var> has a parent node,
                   51679: then remove the <var title="">furthest block</var> from its parent
                   51680: node.</p>
                   51681: </li>
                   51682: <li>
                   51683: <p>Let a bookmark note the position of the <var title="">formatting
                   51684: element</var> in the <a href="#list-of4">list of active formatting
                   51685: elements</a> relative to the elements on either side of it in the
                   51686: list.</p>
                   51687: </li>
                   51688: <li>
                   51689: <p>Let <var title="">node</var> and <var title="">last node</var>
                   51690: be the <var title="">furthest block</var> . Follow these steps:</p>
                   51691: <ol>
                   51692: <li>Let <var title="">node</var> be the element immediately
                   51693: <del class="diff-old">prior to</del> <ins class=
                   51694: "diff-chg">above</ins> <var title="">node</var> in the <a href=
                   51695: "#stack">stack of open elements</a> .</li>
                   51696: <li>If <var title="">node</var> is not in the <a href=
                   51697: "#list-of4">list of active formatting elements</a> , then remove
                   51698: <var title="">node</var> from the <a href="#stack">stack of open
                   51699: elements</a> and then go back to step 1.</li>
                   51700: <li>Otherwise, if <var title="">node</var> is the <var title=
                   51701: "">formatting element</var> , then go to the next step in the
                   51702: overall algorithm.</li>
                   51703: <li>Otherwise, if <var title="">last node</var> is the <var title=
                   51704: "">furthest block</var> , then move the aforementioned bookmark to
                   51705: be immediately after the <var title="">node</var> in the <a href=
                   51706: "#list-of4">list of active formatting elements</a> .</li>
                   51707: <li>If <var title="">node</var> has any children, perform a shallow
                   51708: clone of <var title="">node</var> , replace the entry for
                   51709: <var title="">node</var> in the <a href="#list-of4">list of active
                   51710: formatting elements</a> with an entry for the clone, replace the
                   51711: entry for <var title="">node</var> in the <a href="#stack">stack of
                   51712: open elements</a> with an entry for the clone, and let <var title=
                   51713: "">node</var> be the clone.</li>
                   51714: <li>Insert <var title="">last node</var> into <var title=
                   51715: "">node</var> , first removing it from its previous parent node if
                   51716: any.</li>
                   51717: <li>Let <var title="">last node</var> be <var title="">node</var>
                   51718: .</li>
                   51719: <li>Return to step 1 of this inner set of steps.</li>
                   51720: </ol>
                   51721: </li>
                   51722: <li>
                   51723: <p><del class="diff-old">Insert</del> <ins class="diff-chg">If
                   51724: the</ins> <var title=""><ins class="diff-chg">common
                   51725: ancestor</ins></var> <ins class="diff-chg">node is a</ins>
                   51726: <code><a href="#table"><ins class="diff-chg">table</ins></a></code>
                   51727: ,<code><a href="#tbody"><ins class=
                   51728: "diff-chg">tbody</ins></a></code> ,<code><a href=
                   51729: "#tfoot0"><ins class="diff-chg">tfoot</ins></a></code>
                   51730: ,<code><a href="#thead0"><ins class=
                   51731: "diff-chg">thead</ins></a></code> ,<ins class="diff-chg">or</ins>
                   51732: <code><a href="#tr"><ins class="diff-chg">tr</ins></a></code>
                   51733: <ins class="diff-chg">element, then,</ins> <a href=
                   51734: "#foster0"><ins class="diff-chg">foster parent</ins></a>
                   51735: <ins class="diff-chg">whatever</ins> <var title=""><ins class=
                   51736: "diff-chg">last node</ins></var> <ins class="diff-chg">ended up
                   51737: being in the previous step.</ins></p>
                   51738: <p><ins class="diff-chg">Otherwise, append</ins> whatever
                   51739: <var title="">last node</var> ended up being in the previous step
                   51740: <del class="diff-old">into</del> <ins class="diff-chg">to</ins> the
                   51741: <var title="">common ancestor</var> node, first removing it from
                   51742: its previous parent node if any.</p>
                   51743: </li>
                   51744: <li>
                   51745: <p>Perform a shallow clone of the <var title="">formatting
                   51746: element</var> .</p>
                   51747: </li>
                   51748: <li>
                   51749: <p>Take all of the child nodes of the <var title="">furthest
                   51750: block</var> and append them to the clone created in the last
                   51751: step.</p>
                   51752: </li>
                   51753: <li>
                   51754: <p>Append that clone to the <var title="">furthest block</var>
                   51755: .</p>
                   51756: </li>
                   51757: <li>
                   51758: <p>Remove the <var title="">formatting element</var> from the
                   51759: <a href="#list-of4">list of active formatting elements</a> , and
                   51760: insert the clone into the <a href="#list-of4">list of active
                   51761: formatting elements</a> at the position of the aforementioned
                   51762: bookmark.</p>
                   51763: </li>
                   51764: <li>
                   51765: <p>Remove the <var title="">formatting element</var> from the
                   51766: <a href="#stack">stack of open elements</a> , and insert the clone
                   51767: into the <a href="#stack">stack of open elements</a> immediately
                   51768: <del class="diff-old">after (i.e. in a more deeply nested position
                   51769: than)</del> <ins class="diff-chg">below</ins> the position of the
                   51770: <var title="">furthest block</var> in that stack.</p>
                   51771: </li>
                   51772: <li>
                   51773: <p>Jump back to step 1 in this series of steps.</p>
                   51774: </li>
                   51775: </ol>
                   51776: <p class="note">The way these steps are defined, only elements in
                   51777: the <a href="#formatting">formatting</a> category ever get cloned
                   51778: by this algorithm.</p>
                   51779: <p class="note">Because of the way this algorithm causes elements
                   51780: to change parents, it has been dubbed the "adoption agency
                   51781: algorithm" (in contrast with other possibly algorithms for dealing
                   51782: with misnested content, which included the "incest algorithm", the
                   51783: "secret affair algorithm", and the "Heisenberg algorithm").</p>
                   51784: </dd>
                   51785: <dt>A start tag whose tag name is "button"</dt>
                   51786: <dd>
                   51787: <p>If the <a href="#stack">stack of open elements</a> <a href=
                   51788: "#have-an" title="has an element in scope">has a
                   51789: <code>button</code> element in scope</a> , then this is a <a href=
                   51790: "#parse1">parse error</a> ; act as if an end tag with the tag name
                   51791: "button" had been seen, then reprocess the token.</p>
                   51792: <p>Otherwise:</p>
                   51793: <p><a href="#reconstruct">Reconstruct the active formatting
                   51794: elements</a> , if any.</p>
                   51795: <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
                   51796: <p><ins class="diff-new">If the</ins> <a href=
                   51797: "#form-element"><code title=""><ins class=
                   51798: "diff-new">form</ins></code> <ins class="diff-new">element
                   51799: pointer</ins></a> <ins class="diff-new">is not null, then</ins>
                   51800: <span><ins class="diff-new">associate</ins></span> <ins class=
                   51801: "diff-new">the</ins> <code><ins class=
                   51802: "diff-new">button</ins></code> <ins class="diff-new">element with
                   51803: the</ins> <code><ins class="diff-new">form</ins></code> <ins class=
                   51804: "diff-new">element pointed to by the</ins> <a href=
                   51805: "#form-element"><code title=""><ins class=
                   51806: "diff-new">form</ins></code> <ins class="diff-new">element
                   51807: pointer</ins></a> .</p>
                   51808: <p>Insert a marker at the end of the <a href="#list-of4">list of
                   51809: active formatting elements</a> .</p>
                   51810: </dd>
                   51811: <dt>A start tag token whose tag name is one of: <ins class=
                   51812: "diff-new">"applet",</ins> "marquee", "object"</dt>
                   51813: <dd>
                   51814: <p><a href="#reconstruct">Reconstruct the active formatting
                   51815: elements</a> , if any.</p>
                   51816: <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
                   51817: <p>Insert a marker at the end of the <a href="#list-of4">list of
                   51818: active formatting elements</a> .</p>
                   51819: </dd>
                   51820: <dt>An end tag token whose tag name is one of: <ins class=
                   51821: "diff-new">"applet",</ins> "button", "marquee", "object"</dt>
                   51822: <dd>
                   51823: <p>If the <a href="#stack">stack of open elements</a> <ins class=
                   51824: "diff-new">does not</ins> <a href="#have-an" title=
                   51825: "has an element in scope"><del class="diff-old">has</del>
                   51826: <ins class="diff-chg">have an element</ins> in scope</a>
                   51827: <del class="diff-old">an element whose tag name is</del>
                   51828: <ins class="diff-chg">with</ins> the same <del class="diff-old">as
                   51829: the</del> tag name <ins class="diff-new">as that</ins> of the
                   51830: token, then <ins class="diff-new">this is a</ins> <a href=
                   51831: "#parse1"><ins class="diff-new">parse error</ins></a> .</p>
                   51832: <p><ins class="diff-new">Otherwise, run these steps:</ins></p>
                   51833: <ol>
                   51834: <li>
                   51835: <p><a href="#generate"><del class="diff-old">generate</del>
                   51836: <ins class="diff-chg">Generate</ins> implied end tags</a> .</p>
                   51837: </li>
                   51838: <li>
                   51839: <p><del class="diff-old">Now, if</del> <ins class=
                   51840: "diff-chg">If</ins> the <a href="#current5">current node</a> is not
                   51841: an element with the same tag name as <ins class="diff-new">that
                   51842: of</ins> the token, then this is a <a href="#parse1">parse
                   51843: error</a> .</p>
                   51844: </li>
                   51845: <li>
                   51846: <p><del class="diff-old">Now, if</del> <ins class="diff-chg">Pop
                   51847: elements from</ins> the <a href="#stack">stack of open elements</a>
                   51848: <del class="diff-old">has</del> <ins class="diff-chg">until</ins>
                   51849: an element <del class="diff-old">in scope whose tag name
                   51850: matches</del> <ins class="diff-chg">with</ins> the <ins class=
                   51851: "diff-new">same</ins> tag name <del class="diff-old">of the token,
                   51852: then pop elements from</del> <ins class="diff-chg">as</ins> the
                   51853: <del class="diff-old">stack until that element</del> <ins class=
                   51854: "diff-chg">token</ins> has been popped from the <del class=
                   51855: "diff-old">stack, and clear</del> <ins class=
                   51856: "diff-chg">stack.</ins></p>
                   51857: </li>
                   51858: <li><a href="#clear1"><ins class="diff-chg">Clear</ins> the list of
                   51859: active formatting elements up to the last marker</a> .</li>
                   51860: </ol>
                   51861: </dd>
                   51862: <dt>A start tag whose tag name is "xmp"</dt>
                   51863: <dd>
                   51864: <p><a href="#reconstruct">Reconstruct the active formatting
                   51865: elements</a> , if any.</p>
                   51866: <p>Follow the <a href="#generic">generic CDATA parsing algorithm
                   51867: <del class="diff-old">, with the current node as the context node
                   51868: .</del></a> .</p>
                   51869: </dd>
                   51870: <dt>A start tag whose tag name is "table"</dt>
                   51871: <dd>
                   51872: <p>If the <a href="#stack">stack of open elements</a> <a href=
                   51873: "#have-an" title="has an element in scope">has a <code>p</code>
                   51874: element in scope</a> , then act as if an end tag with the tag name
                   51875: <code><a href="#p">p</a></code> had been seen.</p>
                   51876: <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
                   51877: <p><del class="diff-old">Change</del> <ins class=
                   51878: "diff-chg">Switch</ins> the <span>insertion mode</span> to "
                   51879: <a href="#in-table" title="insertion mode: in table">in table</a>
                   51880: ".</p>
                   51881: </dd>
                   51882: <dt>A start tag whose tag name is one of: "area", "basefont",
1.2     ! mike     51883: "bgsound", "br", "embed", "img", <del class=
        !          51884: "diff-old">"param",</del> "spacer", "wbr"</dt>
1.1       mike     51885: <dd>
                   51886: <p><a href="#reconstruct">Reconstruct the active formatting
                   51887: elements</a> , if any.</p>
                   51888: <p><a href="#insert0">Insert an HTML element</a> for the token.
1.2     ! mike     51889: Immediately pop the <a href="#current5"><ins class=
        !          51890: "diff-chg">current node</ins></a> <ins class="diff-chg">off
        !          51891: the</ins> <a href="#stack"><ins class="diff-chg">stack of open
        !          51892: elements</ins></a> .</p>
        !          51893: <p><a href="#acknowledged" title=
        !          51894: "acknowledge self-closing flag"><ins class="diff-chg">Acknowledge
        !          51895: the token's</ins> <i><ins class="diff-chg">self-closing
        !          51896: flag</ins></i></a> ,<ins class="diff-chg">if it is set.</ins></p>
        !          51897: </dd>
        !          51898: <dt><ins class="diff-chg">A start tag whose tag name is one of:
        !          51899: "param", "source"</ins></dt>
        !          51900: <dd>
        !          51901: <p><a href="#insert0"><ins class="diff-chg">Insert an HTML
        !          51902: element</ins></a> <ins class="diff-chg">for the token. Immediately
        !          51903: pop the</ins> <a href="#current5">current node</a> off the <a href=
        !          51904: "#stack">stack of open elements</a> .</p>
1.1       mike     51905: <p><a href="#acknowledged" title=
                   51906: "acknowledge self-closing flag"><ins class="diff-new">Acknowledge
                   51907: the token's</ins> <i><ins class="diff-new">self-closing
                   51908: flag</ins></i></a> ,<ins class="diff-new">if it is set.</ins></p>
                   51909: </dd>
                   51910: <dt>A start tag whose tag name is "hr"</dt>
                   51911: <dd>
                   51912: <p>If the <a href="#stack">stack of open elements</a> <a href=
                   51913: "#have-an" title="has an element in scope">has a <code>p</code>
                   51914: element in scope</a> , then act as if an end tag with the tag name
                   51915: <code><a href="#p">p</a></code> had been seen.</p>
                   51916: <p><a href="#insert0">Insert an HTML element</a> for the token.
                   51917: Immediately pop the <a href="#current5">current node</a> off the
                   51918: <a href="#stack">stack of open elements</a> .</p>
                   51919: <p><a href="#acknowledged" title=
                   51920: "acknowledge self-closing flag"><ins class="diff-new">Acknowledge
                   51921: the token's</ins> <i><ins class="diff-new">self-closing
                   51922: flag</ins></i></a> ,<ins class="diff-new">if it is set.</ins></p>
                   51923: </dd>
                   51924: <dt>A start tag whose tag name is "image"</dt>
                   51925: <dd>
                   51926: <p><a href="#parse1">Parse error</a> . Change the token's tag name
                   51927: to "img" and reprocess it. (Don't ask.)</p>
                   51928: </dd>
                   51929: <dt>A start tag whose tag name is "input"</dt>
                   51930: <dd>
                   51931: <p><a href="#reconstruct">Reconstruct the active formatting
                   51932: elements</a> , if any.</p>
                   51933: <p><a href="#insert0">Insert an <del class="diff-old">input</del>
                   51934: <ins class="diff-chg">HTML</ins> element</a> for the token.
                   51935: <ins class="diff-new">Immediately pop the</ins> <a href=
                   51936: "#current5"><ins class="diff-new">current node</ins></a>
                   51937: <ins class="diff-new">off the</ins> <a href="#stack"><ins class=
                   51938: "diff-new">stack of open elements</ins></a> .</p>
                   51939: <p><a href="#acknowledged" title=
                   51940: "acknowledge self-closing flag"><ins class="diff-new">Acknowledge
                   51941: the token's</ins> <i><ins class="diff-new">self-closing
                   51942: flag</ins></i></a> ,<ins class="diff-new">if it is set.</ins></p>
                   51943: <p>If the <a href="#form-element"><code title="">form</code>
                   51944: element pointer</a> is not null, then <span>associate</span> the
                   51945: <ins class="diff-new">newly created</ins> <code>input</code>
                   51946: element with the <code>form</code> element pointed to by the
                   51947: <a href="#form-element"><code title="">form</code> element
                   51948: pointer</a> .</p>
                   51949: <del class="diff-old">Pop that input element off the stack of open
                   51950: elements .</del></dd>
                   51951: <dt id="isindex">A start tag whose tag name is "isindex"</dt>
                   51952: <dd>
                   51953: <p><a href="#parse1">Parse error</a> .</p>
                   51954: <p>If the <a href="#form-element"><code title="">form</code>
                   51955: element pointer</a> is not null, then ignore the token.</p>
                   51956: <p>Otherwise:</p>
                   51957: <p><a href="#acknowledged" title=
                   51958: "acknowledge self-closing flag"><ins class="diff-new">Acknowledge
                   51959: the token's</ins> <i><ins class="diff-new">self-closing
                   51960: flag</ins></i></a> ,<ins class="diff-new">if it is set.</ins></p>
                   51961: <p>Act as if a start tag token with the tag name "form" had been
                   51962: seen.</p>
                   51963: <p>If the token has an attribute called "action", set the
                   51964: <code title="attr-form-action">action</code> attribute on the
                   51965: resulting <code>form</code> element to the value of the "action"
                   51966: attribute of the token.</p>
                   51967: <p>Act as if a start tag token with the tag name "hr" had been
                   51968: seen.</p>
                   51969: <p>Act as if a start tag token with the tag name "p" had been
                   51970: seen.</p>
                   51971: <p>Act as if a start tag token with the tag name "label" had been
                   51972: seen.</p>
                   51973: <p>Act as if a stream of character tokens had been seen (see below
                   51974: for what they should say).</p>
                   51975: <p>Act as if a start tag token with the tag name "input" had been
                   51976: seen, with all the attributes from the "isindex" token except
                   51977: "name", "action", and "prompt". Set the <code title=
                   51978: "attr-input-name">name</code> attribute of the resulting
                   51979: <code>input</code> element to the value " <code title=
                   51980: "">isindex</code> ".</p>
                   51981: <p>Act as if a stream of character tokens had been seen (see below
                   51982: for what they should say).</p>
                   51983: <p>Act as if an end tag token with the tag name "label" had been
                   51984: seen.</p>
                   51985: <p>Act as if an end tag token with the tag name "p" had been
                   51986: seen.</p>
                   51987: <p>Act as if a start tag token with the tag name "hr" had been
                   51988: seen.</p>
                   51989: <p>Act as if an end tag token with the tag name "form" had been
                   51990: seen.</p>
                   51991: <p>If the token has an attribute with the name "prompt", then the
                   51992: first stream of characters must be the same string as given in that
                   51993: attribute, and the second stream of characters must be empty.
                   51994: Otherwise, the two streams of character tokens together should,
                   51995: together with the <code>input</code> element, express the
                   51996: equivalent of "This is a searchable index. Insert your search
                   51997: keywords here: (input field)" in the user's preferred language.</p>
                   51998: <p class="big-issue">Then need to specify that if the form
                   51999: submission causes just a single form control, whose name is
                   52000: "isindex", to be submitted, then we submit just the value part, not
                   52001: the "isindex=" part.</p>
                   52002: </dd>
                   52003: <dt>A start tag whose tag name is "textarea"</dt>
                   52004: <dd>
                   52005: <p><a href="#create">Create an element for the token</a>
                   52006: <ins class="diff-new">in the</ins> <a href=
                   52007: "#html-namespace0"><ins class="diff-new">HTML namespace</ins></a>
                   52008: .<ins class="diff-new">Append the new element to the</ins> <a href=
                   52009: "#current5"><ins class="diff-new">current node</ins></a> .</p>
                   52010: <p>If the <a href="#form-element"><code title="">form</code>
                   52011: element pointer</a> is not null, then <span>associate</span> the
                   52012: <ins class="diff-new">newly created</ins> <code>textarea</code>
                   52013: element with the <code>form</code> element pointed to by the
                   52014: <a href="#form-element"><code title="">form</code> element
                   52015: pointer</a> .</p>
                   52016: <p><del class="diff-old">Append the new element to the current node
                   52017: .</del> Switch the tokeniser's <a href="#content2">content model
                   52018: flag</a> to the RCDATA state.</p>
                   52019: <p>If the next token is a U+000A LINE FEED (LF) character token,
                   52020: then ignore that token and move on to the next one. (Newlines at
                   52021: the start of <code>textarea</code> elements are ignored as an
                   52022: authoring convenience.)</p>
                   52023: <p>Then, collect all the character tokens that the tokeniser
                   52024: returns until it returns a token that is not a character token, or
                   52025: until it stops tokenising.</p>
                   52026: <p>If this process resulted in a collection of character tokens,
                   52027: append a single <code>Text</code> node, whose contents is the
                   52028: concatenation of all those tokens' characters, to the new element
                   52029: node.</p>
                   52030: <p>The tokeniser's <a href="#content2">content model flag</a> will
                   52031: have switched back to the PCDATA state.</p>
                   52032: <p>If the next token is an end tag token with the tag name
                   52033: "textarea", ignore it. Otherwise, this is a <a href="#parse1">parse
                   52034: error</a> .</p>
                   52035: </dd>
                   52036: <dt>A start tag whose tag name is one of: "iframe", <del class=
                   52037: "diff-old">"noembed", "noframes"</del> <ins class=
                   52038: "diff-chg">"noembed"</ins></dt>
                   52039: <dt>A start tag whose tag name is "noscript", if <ins class=
                   52040: "diff-new">the</ins> <a href="#scripting2">scripting <ins class=
1.2     ! mike     52041: "diff-new">flag</ins></a> is enabled <del class=
        !          52042: "diff-old">:</del></dt>
1.1       mike     52043: <dd>
                   52044: <p>Follow the <a href="#generic">generic CDATA parsing algorithm
                   52045: <del class="diff-old">, with the current node as the context node
                   52046: .</del></a> .</p>
                   52047: </dd>
                   52048: <dt>A start tag whose tag name is "select"</dt>
                   52049: <dd>
                   52050: <p><a href="#reconstruct">Reconstruct the active formatting
                   52051: elements</a> , if any.</p>
                   52052: <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
                   52053: <p><del class="diff-old">Change</del> <ins class=
                   52054: "diff-chg">If</ins> the <a href="#form-element"><code title=
                   52055: ""><ins class="diff-chg">form</ins></code> <ins class=
                   52056: "diff-chg">element pointer</ins></a> <ins class="diff-chg">is not
                   52057: null, then</ins> <span><ins class="diff-chg">associate</ins></span>
                   52058: <ins class="diff-chg">the</ins> <code><ins class=
                   52059: "diff-chg">select</ins></code> <ins class="diff-chg">element with
                   52060: the</ins> <code><ins class="diff-chg">form</ins></code> <ins class=
                   52061: "diff-chg">element pointed to by the</ins> <a href=
                   52062: "#form-element"><code title=""><ins class=
                   52063: "diff-chg">form</ins></code> <ins class="diff-chg">element
                   52064: pointer</ins></a> .</p>
                   52065: <p><ins class="diff-chg">If the</ins> <span>insertion mode</span>
                   52066: <ins class="diff-new">is one of</ins> <a href="#in-table" title=
                   52067: "insertion mode: in table"><ins class="diff-new">in table</ins></a>
                   52068: <ins class="diff-new">", "</ins> <a href="#in-caption" title=
                   52069: "insertion mode: in caption"><ins class="diff-new">in
                   52070: caption</ins></a> <ins class="diff-new">", "</ins> <a href=
                   52071: "#in-column" title="insertion mode: in column group"><ins class=
                   52072: "diff-new">in column group</ins></a> <ins class="diff-new">",
                   52073: "</ins> <a href="#in-table0" title=
                   52074: "insertion mode: in table body"><ins class="diff-new">in table
                   52075: body</ins></a> <ins class="diff-new">", "</ins> <a href="#in-row"
                   52076: title="insertion mode: in row"><ins class="diff-new">in
                   52077: row</ins></a> <ins class="diff-new">", or "</ins> <a href=
                   52078: "#in-cell" title="insertion mode: in cell"><ins class="diff-new">in
                   52079: cell</ins></a> <ins class="diff-new">", then switch the</ins>
                   52080: <span><ins class="diff-new">insertion mode</ins></span> <ins class=
                   52081: "diff-new">to "</ins> <a href="#in-select0" title=
                   52082: "insertion mode: in select in table"><ins class="diff-new">in
                   52083: select in table</ins></a> <ins class="diff-new">". Otherwise,
                   52084: switch the</ins> <span><ins class="diff-new">insertion
                   52085: mode</ins></span> to " <a href="#in-select" title=
                   52086: "insertion mode: in select">in select</a> ".</p>
                   52087: </dd>
                   52088: <dt><ins class="diff-new">A start tag whose tag name is one of:
                   52089: "rp", "rt"</ins></dt>
                   52090: <dd>
                   52091: <p><ins class="diff-new">If the</ins> <a href="#stack"><ins class=
                   52092: "diff-new">stack of open elements</ins></a> <a href="#have-an"
                   52093: title="has an element in scope"><ins class="diff-new">has a</ins>
                   52094: <code><ins class="diff-new">ruby</ins></code> <ins class=
                   52095: "diff-new">element in scope</ins></a> ,<ins class=
                   52096: "diff-new">then</ins> <a href="#generate"><ins class=
                   52097: "diff-new">generate implied end tags</ins></a> .<ins class=
                   52098: "diff-new">If the</ins> <a href="#current5"><ins class=
                   52099: "diff-new">current node</ins></a> <ins class="diff-new">is not then
                   52100: a</ins> <code><a href="#ruby"><ins class=
                   52101: "diff-new">ruby</ins></a></code> <ins class="diff-new">element,
                   52102: this is a</ins> <a href="#parse1"><ins class="diff-new">parse
                   52103: error</ins></a> <ins class="diff-new">; pop all the nodes from
                   52104: the</ins> <a href="#current5"><ins class="diff-new">current
                   52105: node</ins></a> <ins class="diff-new">up to the node immediately
                   52106: before the bottommost</ins> <code><a href="#ruby"><ins class=
                   52107: "diff-new">ruby</ins></a></code> <ins class="diff-new">element on
                   52108: the</ins> <a href="#stack"><ins class="diff-new">stack of open
                   52109: elements</ins></a> .</p>
                   52110: <p><a href="#insert0"><ins class="diff-new">Insert an HTML
                   52111: element</ins></a> <ins class="diff-new">for the token.</ins></p>
                   52112: </dd>
                   52113: <dt>An end tag whose tag name is "br"</dt>
                   52114: <dd>
                   52115: <p><a href="#parse1">Parse error</a> . Act as if a start tag token
                   52116: with the tag name "br" had been seen. Ignore the end tag token.</p>
                   52117: </dd>
1.2     ! mike     52118: <dt>A start <del class="diff-old">or end</del> <ins class=
        !          52119: "diff-chg">tag whose tag name is "math"</ins></dt>
1.1       mike     52120: <dd>
1.2     ! mike     52121: <p><a href="#reconstruct"><ins class="diff-chg">Reconstruct the
        !          52122: active formatting elements</ins></a> ,<ins class="diff-chg">if
1.1       mike     52123: any.</ins></p>
1.2     ! mike     52124: <p><a href="#adjust"><ins class="diff-chg">Adjust foreign
        !          52125: attributes</ins></a> <ins class="diff-chg">for the token. (This
1.1       mike     52126: fixes the use of namespaced attributes, in particular
                   52127: XLink.)</ins></p>
1.2     ! mike     52128: <p><a href="#insert1"><ins class="diff-chg">Insert a foreign
        !          52129: element</ins></a> <ins class="diff-chg">for the token, in the</ins>
        !          52130: <a href="#mathml0"><ins class="diff-chg">MathML namespace</ins></a>
        !          52131: .</p>
        !          52132: <p><ins class="diff-chg">If the token has its</ins> <i><ins class=
        !          52133: "diff-chg">self-closing flag</ins></i> <ins class="diff-chg">set,
        !          52134: pop the</ins> <a href="#current5"><ins class="diff-chg">current
        !          52135: node</ins></a> <ins class="diff-chg">off the</ins> <a href=
        !          52136: "#stack"><ins class="diff-chg">stack of open elements</ins></a>
        !          52137: <ins class="diff-chg">and</ins> <a href="#acknowledged" title=
        !          52138: "acknowledge self-closing flag"><ins class="diff-chg">acknowledge
        !          52139: the token's</ins> <i><ins class="diff-chg">self-closing
1.1       mike     52140: flag</ins></i></a> .</p>
1.2     ! mike     52141: <p><ins class="diff-chg">Otherwise, let the</ins> <a href=
        !          52142: "#secondary1"><ins class="diff-chg">secondary insertion
        !          52143: mode</ins></a> <ins class="diff-chg">be the current</ins>
        !          52144: <span><ins class="diff-chg">insertion mode</ins></span>
        !          52145: ,<ins class="diff-chg">and then switch the</ins> <span><ins class=
        !          52146: "diff-chg">insertion mode</ins></span> <ins class="diff-chg">to
1.1       mike     52147: "</ins> <a href="#in-foreign" title=
1.2     ! mike     52148: "insertion mode: in foreign content"><ins class="diff-chg">in
        !          52149: foreign content</ins></a> <ins class="diff-chg">".</ins></p>
1.1       mike     52150: </dd>
1.2     ! mike     52151: <dt><ins class="diff-chg">A start</ins> tag whose tag name is one
        !          52152: of: "caption", "col", "colgroup", "frame", "frameset", "head",
        !          52153: <del class="diff-old">"option", "optgroup",</del> "tbody", "td",
        !          52154: "tfoot", "th", "thead", "tr" <del class="diff-old">An end tag whose
        !          52155: tag name is one of: "area", "basefont", "bgsound", "br", "embed",
        !          52156: "hr", "iframe", "image", "img", "input", "isindex", "noembed",
1.1       mike     52157: "noframes", "param", "select", "spacer", "table", "textarea",
1.2     ! mike     52158: "wbr"</del></dt>
        !          52159: <dd><del class="diff-old">An end tag whose tag name is "noscript",
        !          52160: if scripting is enabled :</del></dd>
1.1       mike     52161: <dd>
                   52162: <p><a href="#parse1">Parse error</a> . Ignore the token.</p>
                   52163: </dd>
1.2     ! mike     52164: <dt><del class="diff-old">A start or end tag whose tag name is one
        !          52165: of: "event-source", "section", "nav", "article", "aside", "header",
        !          52166: "footer", "datagrid", "command" Work in progress! A</del>
        !          52167: <ins class="diff-chg">Any other</ins> start tag <del class=
        !          52168: "diff-old">token not covered by the previous entries</del></dt>
1.1       mike     52169: <dd>
                   52170: <p><a href="#reconstruct">Reconstruct the active formatting
                   52171: elements</a> , if any.</p>
                   52172: <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
                   52173: <p class="note">This element will be a <a href=
                   52174: "#phrasing1">phrasing</a> element.</p>
                   52175: </dd>
1.2     ! mike     52176: <dt><del class="diff-old">An</del> <ins class="diff-chg">Any
        !          52177: other</ins> end tag <del class="diff-old">token not covered by the
        !          52178: previous entries</del></dt>
1.1       mike     52179: <dd>
                   52180: <p>Run the following algorithm:</p>
                   52181: <ol>
                   52182: <li>
                   52183: <p>Initialise <var title="">node</var> to be the <a href=
                   52184: "#current5">current node</a> (the bottommost node of the
                   52185: stack).</p>
                   52186: </li>
                   52187: <li>
                   52188: <p>If <var title="">node</var> has the same tag name as the end tag
                   52189: token, then:</p>
                   52190: <ol>
                   52191: <li>
                   52192: <p><a href="#generate">Generate implied end tags</a> .</p>
                   52193: </li>
                   52194: <li>
                   52195: <p>If the tag name of the end tag token does not match the tag name
                   52196: of the <a href="#current5">current node</a> , this is a <a href=
                   52197: "#parse1">parse error</a> .</p>
                   52198: </li>
                   52199: <li>
                   52200: <p>Pop all the nodes from the <a href="#current5">current node</a>
                   52201: up to <var title="">node</var> , including <var title="">node</var>
                   52202: , then stop this algorithm.</p>
                   52203: </li>
                   52204: </ol>
                   52205: </li>
                   52206: <li>
                   52207: <p>Otherwise, if <var title="">node</var> is in neither the
                   52208: <a href="#formatting">formatting</a> category nor the <a href=
                   52209: "#phrasing1">phrasing</a> category, then this is a <a href=
                   52210: "#parse1">parse error</a> . Stop this algorithm. The end tag token
                   52211: is ignored.</p>
                   52212: </li>
                   52213: <li>
                   52214: <p>Set <var title="">node</var> to the previous entry in the
                   52215: <a href="#stack">stack of open elements</a> .</p>
                   52216: </li>
                   52217: <li>
                   52218: <p>Return to step 2.</p>
                   52219: </li>
                   52220: </ol>
                   52221: </dd>
                   52222: </dl>
                   52223: <del class="diff-old">If</del>
                   52224: <h5 id="parsing-main-intable"><span class="secno"><ins class=
                   52225: "diff-chg">8.2.5.11.</ins></span> <ins class="diff-chg">The "</ins>
                   52226: <dfn id="in-table" title="insertion mode: in table"><ins class=
                   52227: "diff-chg">in table</ins></dfn> <ins class="diff-chg">" insertion
                   52228: mode</ins></h5>
                   52229: <p><ins class="diff-chg">When</ins> the <span>insertion mode</span>
                   52230: is " <a href="#in-table" title="insertion mode: in table">in table
                   52231: <del class="diff-old">"</del></a> <ins class="diff-chg">", tokens
                   52232: must be handled as follows:</ins></p>
                   52233: <dl class="switch">
                   52234: <dt>A character token that is one of one of U+0009 CHARACTER
                   52235: TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
                   52236: FORM FEED (FF), or U+0020 SPACE</dt>
                   52237: <dd>
                   52238: <p><del class="diff-old">Append</del> <ins class="diff-chg">If
                   52239: the</ins> <a href="#current6"><ins class="diff-chg">current
                   52240: table</ins></a> <ins class="diff-chg">is</ins> <a href=
                   52241: "#tainted"><ins class="diff-chg">tainted</ins></a> ,<ins class=
                   52242: "diff-chg">then act as described in the "anything else" entry
                   52243: below.</ins></p>
                   52244: <p><ins class="diff-chg">Otherwise,</ins> <a href="#insert" title=
                   52245: "insert a character"><ins class="diff-chg">insert</ins> the
                   52246: character</a> <del class="diff-old">to</del> <ins class=
                   52247: "diff-chg">into</ins> the <a href="#current5">current node</a>
                   52248: .</p>
                   52249: </dd>
                   52250: <dt>A comment token</dt>
                   52251: <dd>
                   52252: <p>Append a <code>Comment</code> node to the <a href=
                   52253: "#current5">current node</a> with the <code title="">data</code>
                   52254: attribute set to the data given in the comment token.</p>
                   52255: </dd>
                   52256: <dt>A <ins class="diff-new">DOCTYPE token</ins></dt>
                   52257: <dd>
                   52258: <p><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   52259: .<ins class="diff-new">Ignore the token.</ins></p>
                   52260: </dd>
                   52261: <dt><ins class="diff-new">A</ins> start tag whose tag name is
                   52262: "caption"</dt>
                   52263: <dd>
                   52264: <p><a href="#clear2">Clear the stack back to a table context</a> .
                   52265: (See below.)</p>
                   52266: <p>Insert a marker at the end of the <a href="#list-of4">list of
                   52267: active formatting elements</a> .</p>
                   52268: <p><a href="#insert0">Insert an HTML element</a> for the token,
                   52269: then switch the <span>insertion mode</span> to " <a href=
                   52270: "#in-caption" title="insertion mode: in caption">in caption</a>
                   52271: ".</p>
                   52272: </dd>
                   52273: <dt>A start tag whose tag name is "colgroup"</dt>
                   52274: <dd>
                   52275: <p><a href="#clear2">Clear the stack back to a table context</a> .
                   52276: (See below.)</p>
                   52277: <p><a href="#insert0">Insert an HTML element</a> for the token,
                   52278: then switch the <span>insertion mode</span> to " <a href=
                   52279: "#in-column" title="insertion mode: in column group">in column
                   52280: group</a> ".</p>
                   52281: </dd>
                   52282: <dt>A start tag whose tag name is "col"</dt>
                   52283: <dd>
                   52284: <p>Act as if a start tag token with the tag name "colgroup" had
                   52285: been seen, then reprocess the current token.</p>
                   52286: </dd>
                   52287: <dt>A start tag whose tag name is one of: "tbody", "tfoot",
                   52288: "thead"</dt>
                   52289: <dd>
                   52290: <p><a href="#clear2">Clear the stack back to a table context</a> .
                   52291: (See below.)</p>
                   52292: <p><a href="#insert0">Insert an HTML element</a> for the token,
                   52293: then switch the <span>insertion mode</span> to " <a href=
                   52294: "#in-table0" title="insertion mode: in table body">in table
                   52295: body</a> ".</p>
                   52296: </dd>
                   52297: <dt>A start tag whose tag name is one of: "td", "th", "tr"</dt>
                   52298: <dd>
                   52299: <p>Act as if a start tag token with the tag name "tbody" had been
                   52300: seen, then reprocess the current token.</p>
                   52301: </dd>
                   52302: <dt>A start tag whose tag name is "table"</dt>
                   52303: <dd>
                   52304: <p><a href="#parse1">Parse error</a> . Act as if an end tag token
                   52305: with the tag name "table" had been seen, then, if that token wasn't
                   52306: ignored, reprocess the current token.</p>
                   52307: <p class="note">The fake end tag token here can only be ignored in
                   52308: the <a href="#fragment">fragment case</a> .</p>
                   52309: </dd>
                   52310: <dt>An end tag whose tag name is "table"</dt>
                   52311: <dd>
                   52312: <p>If the <a href="#stack">stack of open elements</a> does not
                   52313: <a href="#have-an0" title="has an element in table scope">have an
                   52314: element in table scope</a> with the same tag name as the token,
                   52315: this is a <a href="#parse1">parse error</a> . Ignore the token. (
                   52316: <a href="#fragment">fragment case</a> )</p>
                   52317: <p>Otherwise:</p>
                   52318: <p><del class="diff-old">Generate implied end tags . Now, if the
                   52319: current node is not a table element, then this is a parse error
                   52320: .</del> Pop elements from this stack until a <code><a href=
                   52321: "#table">table</a></code> element has been popped from the
                   52322: stack.</p>
                   52323: <p><a href="#reset">Reset the insertion mode appropriately</a>
                   52324: .</p>
                   52325: </dd>
                   52326: <dt>An end tag whose tag name is one of: "body", "caption", "col",
                   52327: "colgroup", "html", "tbody", "td", "tfoot", "th", "thead",
                   52328: "tr"</dt>
                   52329: <dd>
                   52330: <p><a href="#parse1">Parse error</a> . Ignore the token.</p>
                   52331: </dd>
                   52332: <dt><del class="diff-old">Anything else</del> <ins class=
                   52333: "diff-chg">A start tag whose tag name is one of: "style",
                   52334: "script"</ins></dt>
                   52335: <dd>
                   52336: <p><del class="diff-old">Parse error . Process</del> <ins class=
                   52337: "diff-chg">If</ins> the <del class="diff-old">token</del> <a href=
                   52338: "#current6"><ins class="diff-chg">current table</ins></a>
                   52339: <ins class="diff-chg">is</ins> <a href="#tainted"><ins class=
                   52340: "diff-chg">tainted</ins></a> <ins class="diff-chg">then act</ins>
                   52341: as <del class="diff-old">if</del> <ins class="diff-chg">described
                   52342: in</ins> the <del class="diff-old">insertion mode</del> <ins class=
                   52343: "diff-chg">"anything else" entry below.</ins></p>
                   52344: <p><ins class="diff-chg">Otherwise, process the token</ins>
                   52345: <a href="#using8"><ins class="diff-chg">using the rules
                   52346: for</ins></a> <del class="diff-old">was</del> <ins class=
                   52347: "diff-chg">the</ins> " <a href="#in-head" title=
                   52348: "insertion mode: in head">in <del class="diff-old">body</del>
                   52349: <ins class="diff-chg">head</ins></a> <del class="diff-old">", with
                   52350: the following exception:</del> <ins class="diff-chg">"</ins>
                   52351: <span><ins class="diff-chg">insertion mode</ins></span> .</p>
                   52352: </dd>
                   52353: <dt><ins class="diff-new">A start tag whose tag name is
                   52354: "input"</ins></dt>
                   52355: <dd>
                   52356: <p>If the <del class="diff-old">current node is a table , tbody ,
                   52357: tfoot , thead ,</del> <ins class="diff-chg">token does not have an
                   52358: attribute with the name "type",</ins> or <del class="diff-old">tr
                   52359: element, then, whenever</del> <ins class="diff-chg">if it does, but
                   52360: that attribute's value is not</ins> a <del class="diff-old">node
                   52361: would be inserted into</del> <ins class="diff-chg">case-insensitive
                   52362: match for</ins> the <ins class="diff-chg">string "hidden", or, if
                   52363: the</ins> <a href="#current6">current <del class=
                   52364: "diff-old">node</del> <ins class="diff-chg">table</ins></a>
                   52365: <ins class="diff-chg">is</ins> <a href="#tainted"><ins class=
                   52366: "diff-chg">tainted</ins></a> , <del class="diff-old">it must
                   52367: instead be inserted into</del> <ins class="diff-chg">then: act as
                   52368: described in</ins> the <ins class="diff-chg">"anything else" entry
                   52369: below.</ins></p>
                   52370: <p><ins class="diff-chg">Otherwise:</ins></p>
                   52371: <p><del class="diff-old">foster parent</del> <a href=
                   52372: "#parse1"><ins class="diff-chg">Parse error</ins></a> .</p>
                   52373: <p><a href="#insert0"><ins class="diff-chg">Insert an HTML</ins>
                   52374: element</a> <del class="diff-old">.</del> <ins class="diff-chg">for
                   52375: the token.</ins></p>
                   52376: <p><del class="diff-old">The foster parent</del> <ins class=
                   52377: "diff-chg">If the</ins> <a href="#form-element"><code title=
                   52378: ""><ins class="diff-chg">form</ins></code> element <ins class=
                   52379: "diff-chg">pointer</ins></a> is <ins class="diff-new">not null,
                   52380: then</ins> <span><ins class="diff-new">associate</ins></span> the
                   52381: <del class="diff-old">parent</del> <code><ins class=
                   52382: "diff-chg">input</ins></code> element <del class=
                   52383: "diff-old">of</del> <ins class="diff-chg">with</ins> the
                   52384: <del class="diff-old">last</del> <code><del class=
                   52385: "diff-old">table</del> <ins class="diff-chg">form</ins></code>
                   52386: element <del class="diff-old">in</del> <ins class=
                   52387: "diff-chg">pointed to by</ins> the <del class="diff-old">stack of
                   52388: open elements , if there is a table</del> <a href=
                   52389: "#form-element"><code title=""><ins class=
                   52390: "diff-new">form</ins></code> element <del class="diff-old">and it
                   52391: has such a parent element. If there is no</del> <ins class=
                   52392: "diff-chg">pointer</ins></a> .</p>
                   52393: <p><ins class="diff-chg">Pop that</ins> <code><del class=
                   52394: "diff-old">table</del> <ins class="diff-chg">input</ins></code>
                   52395: element <del class="diff-old">in</del> <ins class=
                   52396: "diff-chg">off</ins> the <a href="#stack">stack of open elements
                   52397: <del class="diff-old">( fragment case ), then</del></a> .</p>
                   52398: </dd>
                   52399: <dt><ins class="diff-chg">An end-of-file token</ins></dt>
                   52400: <dd>
                   52401: <p><ins class="diff-chg">If</ins> the <del class="diff-old">foster
                   52402: parent element</del> <a href="#current5"><ins class=
                   52403: "diff-chg">current node</ins></a> is <ins class=
                   52404: "diff-new">not</ins> the <del class="diff-old">first element in the
                   52405: stack of open elements (the</del> <ins class="diff-chg">root</ins>
                   52406: <code><a href="#html">html</a></code> <del class=
                   52407: "diff-old">element). Otherwise, if there</del> <ins class=
                   52408: "diff-chg">element, then this</ins> is a <del class=
                   52409: "diff-old">table</del> <a href="#parse1"><ins class=
                   52410: "diff-chg">parse error.</ins></a> .</p>
                   52411: <p class="note"><ins class="diff-chg">It can only be the</ins>
                   52412: <a href="#current5"><ins class="diff-chg">current node</ins></a>
                   52413: <del class="diff-old">element</del> in the <del class=
                   52414: "diff-old">stack of open elements , but the last</del> <a href=
                   52415: "#fragment"><ins class="diff-chg">fragment case</ins></a> .</p>
                   52416: <p><del class="diff-old">table</del> <a href="#stops"><ins class=
                   52417: "diff-chg">Stop parsing.</ins></a> <del class="diff-old">element
                   52418: in</del></p>
                   52419: </dd>
                   52420: <dt><ins class="diff-chg">Anything else</ins></dt>
                   52421: <dd>
                   52422: <p><a href="#parse1"><ins class="diff-chg">Parse error</ins></a>
                   52423: .<ins class="diff-chg">Process</ins> the <del class=
                   52424: "diff-old">stack of open elements has no parent, or its parent node
                   52425: is not an element, then</del> <ins class="diff-chg">token</ins>
                   52426: <a href="#using8"><ins class="diff-chg">using</ins> the <del class=
                   52427: "diff-old">foster parent element</del> <ins class="diff-chg">rules
                   52428: for</ins></a> <del class="diff-old">is</del> the <del class=
                   52429: "diff-old">element before</del> <ins class="diff-chg">"</ins>
                   52430: <a href="#in-body" title="insertion mode: in body"><ins class=
                   52431: "diff-chg">in body</ins></a> <ins class="diff-chg">"</ins>
                   52432: <span><ins class="diff-chg">insertion mode</ins></span>
                   52433: ,<ins class="diff-chg">except that if</ins> the <del class=
                   52434: "diff-old">last</del> <a href="#current5"><ins class=
                   52435: "diff-chg">current node</ins></a> <ins class="diff-chg">is a</ins>
                   52436: <code><a href="#table">table</a> <del class="diff-old">element in
                   52437: the stack of open elements . If the</del></code> ,
                   52438: <code><del class="diff-old">foster parent element</del> <a href=
                   52439: "#tbody"><ins class="diff-chg">tbody</ins></a> <del class=
                   52440: "diff-old">is the parent element of the last</del></code> ,
                   52441: <code><del class="diff-old">table</del> <a href=
                   52442: "#tfoot0"><ins class="diff-chg">tfoot</ins></a> <del class=
                   52443: "diff-old">element in the stack of open elements , then the new
                   52444: node must be inserted immediately before the last</del></code> ,
                   52445: <code><del class="diff-old">table</del> <a href=
                   52446: "#thead0"><ins class="diff-chg">thead</ins></a> <del class=
                   52447: "diff-old">element in the stack of open elements in the foster
                   52448: parent element</del></code> , <ins class="diff-chg">or</ins>
                   52449: <code><a href="#tr"><ins class="diff-chg">tr</ins></a> <del class=
                   52450: "diff-old">; otherwise,</del></code> <ins class="diff-chg">element,
                   52451: then, whenever a node would be inserted into</ins> the <del class=
                   52452: "diff-old">new</del> <a href="#current5"><ins class=
                   52453: "diff-chg">current</ins> node</a> , <ins class="diff-new">it</ins>
                   52454: must <ins class="diff-new">instead</ins> be <del class=
                   52455: "diff-old">appended to the</del> <a href="#foster0" title=
                   52456: "foster parent">foster <del class="diff-old">parent element</del>
                   52457: <ins class="diff-chg">parented</ins></a> .</p>
                   52458: </dd>
                   52459: </dl>
                   52460: <p>When the steps above require the UA to <dfn id="clear2">clear
                   52461: the stack back to a table context</dfn> , it means that the UA
                   52462: must, while the <a href="#current5">current node</a> is not a
                   52463: <code><a href="#table">table</a></code> element or an
                   52464: <code><a href="#html">html</a></code> element, pop elements from
                   52465: the <a href="#stack">stack of open elements</a> . <del class=
                   52466: "diff-old">If this causes any elements to be popped from the stack,
                   52467: then this is a parse error .</del></p>
                   52468: <p class="note">The <a href="#current5">current node</a> being an
                   52469: <code><a href="#html">html</a></code> element after this process is
                   52470: a <a href="#fragment">fragment case</a> . <del class=
                   52471: "diff-old">If</del></p>
                   52472: <h5 id="parsing-main-incaption"><span class="secno"><ins class=
                   52473: "diff-chg">8.2.5.12.</ins></span> <ins class="diff-chg">The "</ins>
                   52474: <dfn id="in-caption" title="insertion mode: in caption"><ins class=
                   52475: "diff-chg">in caption</ins></dfn> <ins class="diff-chg">" insertion
                   52476: mode</ins></h5>
                   52477: <p><ins class="diff-chg">When</ins> the <span>insertion mode</span>
                   52478: is " <a href="#in-caption" title="insertion mode: in caption">in
                   52479: caption <del class="diff-old">"</del></a> <ins class="diff-chg">",
                   52480: tokens must be handled as follows:</ins></p>
                   52481: <dl class="switch">
                   52482: <dt>An end tag whose tag name is "caption"</dt>
                   52483: <dd>
                   52484: <p>If the <a href="#stack">stack of open elements</a> does not
                   52485: <a href="#have-an0" title="has an element in table scope">have an
                   52486: element in table scope</a> with the same tag name as the token,
                   52487: this is a <a href="#parse1">parse error</a> . Ignore the token. (
                   52488: <a href="#fragment">fragment case</a> )</p>
                   52489: <p>Otherwise:</p>
                   52490: <p><a href="#generate">Generate implied end tags</a> .</p>
                   52491: <p>Now, if the <a href="#current5">current node</a> is not a
                   52492: <code><a href="#caption0">caption</a></code> element, then this is
                   52493: a <a href="#parse1">parse error</a> .</p>
                   52494: <p>Pop elements from this stack until a <code><a href=
                   52495: "#caption0">caption</a></code> element has been popped from the
                   52496: stack.</p>
                   52497: <p><a href="#clear1">Clear the list of active formatting elements
                   52498: up to the last marker</a> .</p>
                   52499: <p>Switch the <span>insertion mode</span> to " <a href="#in-table"
                   52500: title="insertion mode: in table">in table</a> ".</p>
                   52501: </dd>
                   52502: <dt>A start tag whose tag name is one of: "caption", "col",
                   52503: "colgroup", "tbody", "td", "tfoot", "th", "thead", "tr"</dt>
                   52504: <dt>An end tag whose tag name is "table"</dt>
                   52505: <dd>
                   52506: <p><a href="#parse1">Parse error</a> . Act as if an end tag with
                   52507: the tag name "caption" had been seen, then, if that token wasn't
                   52508: ignored, reprocess the current token.</p>
                   52509: <p class="note">The fake end tag token here can only be ignored in
                   52510: the <a href="#fragment">fragment case</a> .</p>
                   52511: </dd>
                   52512: <dt>An end tag whose tag name is one of: "body", "col", "colgroup",
                   52513: "html", "tbody", "td", "tfoot", "th", "thead", "tr"</dt>
                   52514: <dd>
                   52515: <p><a href="#parse1">Parse error</a> . Ignore the token.</p>
                   52516: </dd>
                   52517: <dt>Anything else</dt>
                   52518: <dd>
                   52519: <p>Process the token <del class="diff-old">as if</del> <a href=
                   52520: "#using8"><ins class="diff-chg">using</ins> the <del class=
                   52521: "diff-old">insertion mode</del> <ins class="diff-chg">rules
                   52522: for</ins></a> <del class="diff-old">was</del> <ins class=
                   52523: "diff-chg">the</ins> " <a href="#in-body" title=
                   52524: "insertion mode: in body">in body</a> <del class=
                   52525: "diff-old">".</del> <ins class="diff-chg">"</ins> <span><ins class=
                   52526: "diff-chg">insertion mode</ins></span> .</p>
                   52527: </dd>
                   52528: </dl>
                   52529: <del class="diff-old">If</del>
                   52530: <h5 id="parsing-main-incolgroup"><span class="secno"><ins class=
                   52531: "diff-chg">8.2.5.13.</ins></span> <ins class="diff-chg">The "</ins>
                   52532: <dfn id="in-column" title=
                   52533: "insertion mode: in column group"><ins class="diff-chg">in column
                   52534: group</ins></dfn> <ins class="diff-chg">" insertion mode</ins></h5>
                   52535: <p><ins class="diff-chg">When</ins> the <span>insertion mode</span>
                   52536: is " <a href="#in-column" title=
                   52537: "insertion mode: in column group">in column group <del class=
                   52538: "diff-old">"</del></a> <ins class="diff-chg">", tokens must be
                   52539: handled as follows:</ins></p>
                   52540: <dl class="switch">
                   52541: <dt>A character token that is one of one of U+0009 CHARACTER
                   52542: TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
                   52543: FORM FEED (FF), or U+0020 SPACE</dt>
                   52544: <dd>
                   52545: <p><del class="diff-old">Append</del> <a href="#insert" title=
                   52546: "insert a character"><ins class="diff-chg">Insert</ins> the
                   52547: character</a> <del class="diff-old">to</del> <ins class=
                   52548: "diff-chg">into</ins> the <a href="#current5">current node</a>
                   52549: .</p>
                   52550: </dd>
                   52551: <dt>A comment token</dt>
                   52552: <dd>
                   52553: <p>Append a <code>Comment</code> node to the <a href=
                   52554: "#current5">current node</a> with the <code title="">data</code>
                   52555: attribute set to the data given in the comment token.</p>
                   52556: </dd>
                   52557: <dt>A <ins class="diff-new">DOCTYPE token</ins></dt>
                   52558: <dd>
                   52559: <p><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   52560: .<ins class="diff-new">Ignore the token.</ins></p>
                   52561: </dd>
                   52562: <dt><ins class="diff-new">A start tag whose tag name is
                   52563: "html"</ins></dt>
                   52564: <dd>
                   52565: <p><ins class="diff-new">Process the token</ins> <a href=
                   52566: "#using8"><ins class="diff-new">using the rules for</ins></a>
                   52567: <ins class="diff-new">the "</ins> <a href="#in-body" title=
                   52568: "insertion mode: in body"><ins class="diff-new">in body</ins></a>
                   52569: <ins class="diff-new">"</ins> <span><ins class="diff-new">insertion
                   52570: mode</ins></span> .</p>
                   52571: </dd>
                   52572: <dt><ins class="diff-new">A</ins> start tag whose tag name is
                   52573: "col"</dt>
                   52574: <dd>
                   52575: <p><a href="#insert0">Insert <del class="diff-old">a col</del>
                   52576: <ins class="diff-chg">an HTML</ins> element</a> for the token.
                   52577: Immediately pop the <a href="#current5">current node</a> off the
                   52578: <a href="#stack">stack of open elements</a> .</p>
                   52579: <p><a href="#acknowledged" title=
                   52580: "acknowledge self-closing flag"><ins class="diff-new">Acknowledge
                   52581: the token's</ins> <i><ins class="diff-new">self-closing
                   52582: flag</ins></i></a> ,<ins class="diff-new">if it is set.</ins></p>
                   52583: </dd>
                   52584: <dt>An end tag whose tag name is "colgroup"</dt>
                   52585: <dd>
                   52586: <p>If the <a href="#current5">current node</a> is the root
                   52587: <code><a href="#html">html</a></code> element, then this is a
                   52588: <a href="#parse1">parse error</a> , ignore the token. ( <a href=
                   52589: "#fragment">fragment case</a> )</p>
                   52590: <p>Otherwise, pop the <a href="#current5">current node</a> (which
                   52591: will be a <code><a href="#colgroup">colgroup</a></code> element)
                   52592: from the <a href="#stack">stack of open elements</a> . Switch the
                   52593: <span>insertion mode</span> to " <a href="#in-table" title=
                   52594: "insertion mode: in table">in table</a> ".</p>
                   52595: </dd>
                   52596: <dt>An end tag whose tag name is "col"</dt>
                   52597: <dd>
                   52598: <p><a href="#parse1">Parse error</a> . Ignore the token.</p>
                   52599: </dd>
                   52600: <dt><ins class="diff-new">An end-of-file token</ins></dt>
                   52601: <dd>
                   52602: <p><ins class="diff-new">If the</ins> <a href=
                   52603: "#current5"><ins class="diff-new">current node</ins></a>
                   52604: <ins class="diff-new">is the root</ins> <code><a href=
                   52605: "#html"><ins class="diff-new">html</ins></a></code> <ins class=
                   52606: "diff-new">element, then</ins> <a href="#stops"><ins class=
                   52607: "diff-new">stop parsing</ins></a> .<ins class="diff-new">(</ins>
                   52608: <a href="#fragment"><ins class="diff-new">fragment case</ins></a>
                   52609: <ins class="diff-new">)</ins></p>
                   52610: <p><ins class="diff-new">Otherwise, act as described in the
                   52611: "anything else" entry below.</ins></p>
                   52612: </dd>
                   52613: <dt>Anything else</dt>
                   52614: <dd>
                   52615: <p>Act as if an end tag with the tag name "colgroup" had been seen,
                   52616: and then, if that token wasn't ignored, reprocess the current
                   52617: token.</p>
                   52618: <p class="note">The fake end tag token here can only be ignored in
                   52619: the <a href="#fragment">fragment case</a> .</p>
                   52620: </dd>
                   52621: </dl>
                   52622: <del class="diff-old">If</del>
                   52623: <h5 id="parsing-main-intbody"><span class="secno"><ins class=
                   52624: "diff-chg">8.2.5.14.</ins></span> <ins class="diff-chg">The "</ins>
                   52625: <dfn id="in-table0" title=
                   52626: "insertion mode: in table body"><ins class="diff-chg">in table
                   52627: body</ins></dfn> <ins class="diff-chg">" insertion mode</ins></h5>
                   52628: <p><ins class="diff-chg">When</ins> the <span>insertion mode</span>
                   52629: is " <a href="#in-table0" title="insertion mode: in table body">in
                   52630: table body <del class="diff-old">"</del></a> <ins class=
                   52631: "diff-chg">", tokens must be handled as follows:</ins></p>
                   52632: <dl class="switch">
                   52633: <dt>A start tag whose tag name is "tr"</dt>
                   52634: <dd>
                   52635: <p><a href="#clear3">Clear the stack back to a table body
                   52636: context</a> . (See below.)</p>
                   52637: <p><a href="#insert0">Insert <del class="diff-old">a tr</del>
                   52638: <ins class="diff-chg">an HTML</ins> element</a> for the token, then
                   52639: switch the <span>insertion mode</span> to " <a href="#in-row"
                   52640: title="insertion mode: in row">in row</a> ".</p>
                   52641: </dd>
                   52642: <dt>A start tag whose tag name is one of: "th", "td"</dt>
                   52643: <dd>
                   52644: <p><a href="#parse1">Parse error</a> . Act as if a start tag with
                   52645: the tag name "tr" had been seen, then reprocess the current
                   52646: token.</p>
                   52647: </dd>
                   52648: <dt>An end tag whose tag name is one of: "tbody", "tfoot",
                   52649: "thead"</dt>
                   52650: <dd>
                   52651: <p>If the <a href="#stack">stack of open elements</a> does not
                   52652: <a href="#have-an0" title="has an element in table scope">have an
                   52653: element in table scope</a> with the same tag name as the token,
                   52654: this is a <a href="#parse1">parse error</a> . Ignore the token.</p>
                   52655: <p>Otherwise:</p>
                   52656: <p><a href="#clear3">Clear the stack back to a table body
                   52657: context</a> . (See below.)</p>
                   52658: <p>Pop the <a href="#current5">current node</a> from the <a href=
                   52659: "#stack">stack of open elements</a> . Switch the <span>insertion
                   52660: mode</span> to " <a href="#in-table" title=
                   52661: "insertion mode: in table">in table</a> ".</p>
                   52662: </dd>
                   52663: <dt>A start tag whose tag name is one of: "caption", "col",
                   52664: "colgroup", "tbody", "tfoot", "thead"</dt>
                   52665: <dt>An end tag whose tag name is "table"</dt>
                   52666: <dd>
                   52667: <p>If the <a href="#stack">stack of open elements</a> does not
                   52668: <a href="#have-an0" title="has an element in table scope">have a
                   52669: <code>tbody</code> , <code>thead</code> , or <code>tfoot</code>
                   52670: element in table scope</a> , this is a <a href="#parse1">parse
                   52671: error</a> . Ignore the token. ( <a href="#fragment">fragment
                   52672: case</a> )</p>
                   52673: <p>Otherwise:</p>
                   52674: <p><a href="#clear3">Clear the stack back to a table body
                   52675: context</a> . (See below.)</p>
                   52676: <p>Act as if an end tag with the same tag name as the <a href=
                   52677: "#current5">current node</a> ("tbody", "tfoot", or "thead") had
                   52678: been seen, then reprocess the current token.</p>
                   52679: </dd>
                   52680: <dt>An end tag whose tag name is one of: "body", "caption", "col",
                   52681: "colgroup", "html", "td", "th", "tr"</dt>
                   52682: <dd>
                   52683: <p><a href="#parse1">Parse error</a> . Ignore the token.</p>
                   52684: </dd>
                   52685: <dt>Anything else</dt>
                   52686: <dd>
                   52687: <p>Process the token <del class="diff-old">as if</del> <a href=
                   52688: "#using8"><ins class="diff-chg">using</ins> the <del class=
                   52689: "diff-old">insertion mode</del> <ins class="diff-chg">rules
                   52690: for</ins></a> <del class="diff-old">was</del> <ins class=
                   52691: "diff-chg">the</ins> " <a href="#in-table" title=
                   52692: "insertion mode: in table">in table</a> <del class=
                   52693: "diff-old">".</del> <ins class="diff-chg">"</ins> <span><ins class=
                   52694: "diff-chg">insertion mode</ins></span> .</p>
                   52695: </dd>
                   52696: </dl>
                   52697: <p>When the steps above require the UA to <dfn id="clear3">clear
                   52698: the stack back to a table body context</dfn> , it means that the UA
                   52699: must, while the <a href="#current5">current node</a> is not a
                   52700: <code><a href="#tbody">tbody</a></code> , <code><a href=
                   52701: "#tfoot0">tfoot</a></code> , <code><a href=
                   52702: "#thead0">thead</a></code> , or <code><a href=
                   52703: "#html">html</a></code> element, pop elements from the <a href=
                   52704: "#stack">stack of open elements</a> . <del class="diff-old">If this
                   52705: causes any elements to be popped from the stack, then this is a
                   52706: parse error .</del></p>
                   52707: <p class="note">The <a href="#current5">current node</a> being an
                   52708: <code><a href="#html">html</a></code> element after this process is
                   52709: a <a href="#fragment">fragment case</a> . <del class=
                   52710: "diff-old">If</del></p>
                   52711: <h5 id="parsing-main-intr"><span class="secno"><ins class=
                   52712: "diff-chg">8.2.5.15.</ins></span> <ins class="diff-chg">The "</ins>
                   52713: <dfn id="in-row" title="insertion mode: in row"><ins class=
                   52714: "diff-chg">in row</ins></dfn> <ins class="diff-chg">" insertion
                   52715: mode</ins></h5>
                   52716: <p><ins class="diff-chg">When</ins> the <span>insertion mode</span>
                   52717: is " <a href="#in-row" title="insertion mode: in row">in row
                   52718: <del class="diff-old">"</del></a> <ins class="diff-chg">", tokens
                   52719: must be handled as follows:</ins></p>
                   52720: <dl class="switch">
                   52721: <dt>A start tag whose tag name is one of: "th", "td"</dt>
                   52722: <dd>
                   52723: <p><a href="#clear4">Clear the stack back to a table row
                   52724: context</a> . (See below.)</p>
                   52725: <p><a href="#insert0">Insert an HTML element</a> for the token,
                   52726: then switch the <span>insertion mode</span> to " <a href="#in-cell"
                   52727: title="insertion mode: in cell">in cell</a> ".</p>
                   52728: <p>Insert a marker at the end of the <a href="#list-of4">list of
                   52729: active formatting elements</a> .</p>
                   52730: </dd>
                   52731: <dt>An end tag whose tag name is "tr"</dt>
                   52732: <dd>
                   52733: <p>If the <a href="#stack">stack of open elements</a> does not
                   52734: <a href="#have-an0" title="has an element in table scope">have an
                   52735: element in table scope</a> with the same tag name as the token,
                   52736: this is a <a href="#parse1">parse error</a> . Ignore the token. (
                   52737: <a href="#fragment">fragment case</a> )</p>
                   52738: <p>Otherwise:</p>
                   52739: <p><a href="#clear4">Clear the stack back to a table row
                   52740: context</a> . (See below.)</p>
                   52741: <p>Pop the <a href="#current5">current node</a> (which will be a
                   52742: <code><a href="#tr">tr</a></code> element) from the <a href=
                   52743: "#stack">stack of open elements</a> . Switch the <span>insertion
                   52744: mode</span> to " <a href="#in-table0" title=
                   52745: "insertion mode: in table body">in table body</a> ".</p>
                   52746: </dd>
                   52747: <dt>A start tag whose tag name is one of: "caption", "col",
                   52748: "colgroup", "tbody", "tfoot", "thead", "tr"</dt>
                   52749: <dt>An end tag whose tag name is "table"</dt>
                   52750: <dd>
                   52751: <p>Act as if an end tag with the tag name "tr" had been seen, then,
                   52752: if that token wasn't ignored, reprocess the current token.</p>
                   52753: <p class="note">The fake end tag token here can only be ignored in
                   52754: the <a href="#fragment">fragment case</a> .</p>
                   52755: </dd>
                   52756: <dt>An end tag whose tag name is one of: "tbody", "tfoot",
                   52757: "thead"</dt>
                   52758: <dd>
                   52759: <p>If the <a href="#stack">stack of open elements</a> does not
                   52760: <a href="#have-an0" title="has an element in table scope">have an
                   52761: element in table scope</a> with the same tag name as the token,
                   52762: this is a <a href="#parse1">parse error</a> . Ignore the token.</p>
                   52763: <p>Otherwise, act as if an end tag with the tag name "tr" had been
                   52764: seen, then reprocess the current token.</p>
                   52765: </dd>
                   52766: <dt>An end tag whose tag name is one of: "body", "caption", "col",
                   52767: "colgroup", "html", "td", "th"</dt>
                   52768: <dd>
                   52769: <p><a href="#parse1">Parse error</a> . Ignore the token.</p>
                   52770: </dd>
                   52771: <dt>Anything else</dt>
                   52772: <dd>
                   52773: <p>Process the token <del class="diff-old">as if</del> <a href=
                   52774: "#using8"><ins class="diff-chg">using</ins> the <del class=
                   52775: "diff-old">insertion mode</del> <ins class="diff-chg">rules
                   52776: for</ins></a> <del class="diff-old">was</del> <ins class=
                   52777: "diff-chg">the</ins> " <a href="#in-table" title=
                   52778: "insertion mode: in table">in table</a> <del class=
                   52779: "diff-old">".</del> <ins class="diff-chg">"</ins> <span><ins class=
                   52780: "diff-chg">insertion mode</ins></span> .</p>
                   52781: </dd>
                   52782: </dl>
                   52783: <p>When the steps above require the UA to <dfn id="clear4">clear
                   52784: the stack back to a table row context</dfn> , it means that the UA
                   52785: must, while the <a href="#current5">current node</a> is not a
                   52786: <code><a href="#tr">tr</a></code> element or an <code><a href=
                   52787: "#html">html</a></code> element, pop elements from the <a href=
                   52788: "#stack">stack of open elements</a> . <del class="diff-old">If this
                   52789: causes any elements to be popped from the stack, then this is a
                   52790: parse error .</del></p>
                   52791: <p class="note">The <a href="#current5">current node</a> being an
                   52792: <code><a href="#html">html</a></code> element after this process is
                   52793: a <a href="#fragment">fragment case</a> . <del class=
                   52794: "diff-old">If</del></p>
                   52795: <h5 id="parsing-main-intd"><span class="secno"><ins class=
                   52796: "diff-chg">8.2.5.16.</ins></span> <ins class="diff-chg">The "</ins>
                   52797: <dfn id="in-cell" title="insertion mode: in cell"><ins class=
                   52798: "diff-chg">in cell</ins></dfn> <ins class="diff-chg">" insertion
                   52799: mode</ins></h5>
                   52800: <p><ins class="diff-chg">When</ins> the <span>insertion mode</span>
                   52801: is " <a href="#in-cell" title="insertion mode: in cell">in cell
                   52802: <del class="diff-old">"</del></a> <ins class="diff-chg">", tokens
                   52803: must be handled as follows:</ins></p>
                   52804: <dl class="switch">
                   52805: <dt>An end tag whose tag name is one of: "td", "th"</dt>
                   52806: <dd>
                   52807: <p>If the <a href="#stack">stack of open elements</a> does not
                   52808: <a href="#have-an0" title="has an element in table scope">have an
                   52809: element in table scope</a> with the same tag name as that of the
                   52810: token, then this is a <a href="#parse1">parse error</a> and the
                   52811: token must be ignored.</p>
                   52812: <p>Otherwise:</p>
                   52813: <p><a href="#generate">Generate implied end tags <del class=
                   52814: "diff-old">, except for elements with the same tag name as the
                   52815: token.</del></a> .</p>
                   52816: <p>Now, if the <a href="#current5">current node</a> is not an
                   52817: element with the same tag name as the token, then this is a
                   52818: <a href="#parse1">parse error</a> .</p>
                   52819: <p>Pop elements from this stack until an element with the same tag
                   52820: name as the token has been popped from the stack.</p>
                   52821: <p><a href="#clear1">Clear the list of active formatting elements
                   52822: up to the last marker</a> .</p>
                   52823: <p>Switch the <span>insertion mode</span> to " <a href="#in-row"
                   52824: title="insertion mode: in row">in row</a> ". (The <a href=
                   52825: "#current5">current node</a> will be a <code><a href=
                   52826: "#tr">tr</a></code> element at this point.)</p>
                   52827: </dd>
                   52828: <dt>A start tag whose tag name is one of: "caption", "col",
                   52829: "colgroup", "tbody", "td", "tfoot", "th", "thead", "tr"</dt>
                   52830: <dd>
                   52831: <p>If the <a href="#stack">stack of open elements</a> does
                   52832: <em>not</em> <a href="#have-an0" title=
                   52833: "has an element in table scope">have a <code>td</code> or
                   52834: <code>th</code> element in table scope</a> , then this is a
                   52835: <a href="#parse1">parse error</a> ; ignore the token. ( <a href=
                   52836: "#fragment">fragment case</a> )</p>
                   52837: <p>Otherwise, <a href="#close2">close the cell</a> (see below) and
                   52838: reprocess the current token.</p>
                   52839: </dd>
                   52840: <dt>An end tag whose tag name is one of: "body", "caption", "col",
                   52841: "colgroup", "html"</dt>
                   52842: <dd>
                   52843: <p><a href="#parse1">Parse error</a> . Ignore the token.</p>
                   52844: </dd>
                   52845: <dt>An end tag whose tag name is one of: "table", "tbody", "tfoot",
                   52846: "thead", "tr"</dt>
                   52847: <dd>
                   52848: <p>If the <a href="#stack">stack of open elements</a> does not
                   52849: <a href="#have-an0" title="has an element in table scope">have an
                   52850: element in table scope</a> with the same tag name as that of the
                   52851: token (which can only happen for "tbody", "tfoot" and "thead", or,
                   52852: in the <a href="#fragment">fragment case</a> ), then this is a
                   52853: <a href="#parse1">parse error</a> and the token must be
                   52854: ignored.</p>
                   52855: <p>Otherwise, <a href="#close2">close the cell</a> (see below) and
                   52856: reprocess the current token.</p>
                   52857: </dd>
                   52858: <dt>Anything else</dt>
                   52859: <dd>
                   52860: <p>Process the token <del class="diff-old">as if</del> <a href=
                   52861: "#using8"><ins class="diff-chg">using</ins> the <del class=
                   52862: "diff-old">insertion mode</del> <ins class="diff-chg">rules
                   52863: for</ins></a> <del class="diff-old">was</del> <ins class=
                   52864: "diff-chg">the</ins> " <a href="#in-body" title=
                   52865: "insertion mode: in body">in body</a> <del class=
                   52866: "diff-old">".</del> <ins class="diff-chg">"</ins> <span><ins class=
                   52867: "diff-chg">insertion mode</ins></span> .</p>
                   52868: </dd>
                   52869: </dl>
                   52870: <p>Where the steps above say to <dfn id="close2">close the
                   52871: cell</dfn> , they mean to run the following algorithm:</p>
                   52872: <ol>
                   52873: <li>
                   52874: <p>If the <a href="#stack">stack of open elements</a> <a href=
                   52875: "#have-an0" title="has an element in table scope">has a
                   52876: <code>td</code> element in table scope</a> , then act as if an end
                   52877: tag token with the tag name "td" had been seen.</p>
                   52878: </li>
                   52879: <li>
                   52880: <p>Otherwise, the <a href="#stack">stack of open elements</a> will
                   52881: <a href="#have-an0" title="has an element in table scope">have a
                   52882: <code>th</code> element in table scope</a> ; act as if an end tag
                   52883: token with the tag name "th" had been seen.</p>
                   52884: </li>
                   52885: </ol>
                   52886: <p class="note">The <a href="#stack">stack of open elements</a>
                   52887: cannot have both a <code><a href="#td">td</a></code> and a
                   52888: <code><a href="#th">th</a></code> element <a href="#have-an0"
                   52889: title="has an element in table scope">in table scope</a> at the
                   52890: same time, nor can it have neither when the <span>insertion
                   52891: mode</span> is " <a href="#in-cell" title=
                   52892: "insertion mode: in cell">in cell</a> ". <del class="diff-old">If
                   52893: the insertion mode is</del></p>
                   52894: <h5 id="parsing-main-inselect"><span class="secno"><ins class=
                   52895: "diff-chg">8.2.5.17.</ins></span> <ins class="diff-chg">The</ins> "
                   52896: <dfn id="in-select" title="insertion mode: in select">in
                   52897: select</dfn> " <ins class="diff-chg">insertion mode</ins></h5>
                   52898: <p><del class="diff-old">Handle</del> <ins class=
                   52899: "diff-chg">When</ins> the <del class="diff-old">token</del>
                   52900: <span><ins class="diff-chg">insertion mode</ins></span> <ins class=
                   52901: "diff-chg">is "</ins> <a href="#in-select" title=
                   52902: "insertion mode: in select"><ins class="diff-chg">in
                   52903: select</ins></a> <ins class="diff-chg">", tokens must be
                   52904: handled</ins> as follows:</p>
                   52905: <dl class="switch">
                   52906: <dt>A character token</dt>
                   52907: <dd>
                   52908: <p><del class="diff-old">Append</del> <a href="#insert" title=
                   52909: "insert a character"><ins class="diff-chg">Insert</ins> the token's
                   52910: character</a> <del class="diff-old">to</del> <ins class=
                   52911: "diff-chg">into</ins> the <a href="#current5">current node</a>
                   52912: .</p>
                   52913: </dd>
                   52914: <dt>A comment token</dt>
                   52915: <dd>
                   52916: <p>Append a <code>Comment</code> node to the <a href=
                   52917: "#current5">current node</a> with the <code title="">data</code>
                   52918: attribute set to the data given in the comment token.</p>
                   52919: </dd>
                   52920: <dt>A <ins class="diff-new">DOCTYPE token</ins></dt>
                   52921: <dd>
                   52922: <p><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   52923: .<ins class="diff-new">Ignore the token.</ins></p>
                   52924: </dd>
                   52925: <dt><ins class="diff-new">A start tag whose tag name is
                   52926: "html"</ins></dt>
                   52927: <dd>
                   52928: <p><ins class="diff-new">Process the token</ins> <a href=
                   52929: "#using8"><ins class="diff-new">using the rules for</ins></a>
                   52930: <ins class="diff-new">the "</ins> <a href="#in-body" title=
                   52931: "insertion mode: in body"><ins class="diff-new">in body</ins></a>
                   52932: <ins class="diff-new">"</ins> <span><ins class="diff-new">insertion
                   52933: mode</ins></span> .</p>
                   52934: </dd>
                   52935: <dt><ins class="diff-new">A</ins> start tag whose tag name is
                   52936: "option"</dt>
                   52937: <dd>
                   52938: <p>If the <a href="#current5">current node</a> is an
                   52939: <code>option</code> element, act as if an end tag with the tag name
                   52940: "option" had been seen.</p>
                   52941: <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
                   52942: </dd>
                   52943: <dt>A start tag whose tag name is "optgroup"</dt>
                   52944: <dd>
                   52945: <p>If the <a href="#current5">current node</a> is an
                   52946: <code>option</code> element, act as if an end tag with the tag name
                   52947: "option" had been seen.</p>
                   52948: <p>If the <a href="#current5">current node</a> is an
                   52949: <code>optgroup</code> element, act as if an end tag with the tag
                   52950: name "optgroup" had been seen.</p>
                   52951: <p><a href="#insert0">Insert an HTML element</a> for the token.</p>
                   52952: </dd>
                   52953: <dt>An end tag whose tag name is "optgroup"</dt>
                   52954: <dd>
                   52955: <p>First, if the <a href="#current5">current node</a> is an
                   52956: <code>option</code> element, and the node immediately before it in
                   52957: the <a href="#stack">stack of open elements</a> is an
                   52958: <code>optgroup</code> element, then act as if an end tag with the
                   52959: tag name "option" had been seen.</p>
                   52960: <p>If the <a href="#current5">current node</a> is an
                   52961: <code>optgroup</code> element, then pop that node from the <a href=
                   52962: "#stack">stack of open elements</a> . Otherwise, this is a <a href=
                   52963: "#parse1">parse error</a> , ignore the token.</p>
                   52964: </dd>
                   52965: <dt>An end tag whose tag name is "option"</dt>
                   52966: <dd>
                   52967: <p>If the <a href="#current5">current node</a> is an
                   52968: <code>option</code> element, then pop that node from the <a href=
                   52969: "#stack">stack of open elements</a> . Otherwise, this is a <a href=
                   52970: "#parse1">parse error</a> , ignore the token.</p>
                   52971: </dd>
                   52972: <dt>An end tag whose tag name is "select"</dt>
                   52973: <dd>
                   52974: <p>If the <a href="#stack">stack of open elements</a> does not
                   52975: <a href="#have-an0" title="has an element in table scope">have an
                   52976: element in table scope</a> with the same tag name as the token,
                   52977: this is a <a href="#parse1">parse error</a> . Ignore the token. (
                   52978: <a href="#fragment">fragment case</a> )</p>
                   52979: <p>Otherwise:</p>
                   52980: <p>Pop elements from the <a href="#stack">stack of open
                   52981: elements</a> until a <code>select</code> element has been popped
                   52982: from the stack.</p>
                   52983: <p><a href="#reset">Reset the insertion mode appropriately</a>
                   52984: .</p>
                   52985: </dd>
                   52986: <dt>A start tag whose tag name is "select"</dt>
                   52987: <dd>
                   52988: <p><a href="#parse1">Parse error</a> . Act as if the token had been
                   52989: an end tag with the tag name "select" instead.</p>
                   52990: </dd>
                   52991: <dt><ins class="diff-new">A start tag whose tag name is one of:
                   52992: "input", "textarea"</ins></dt>
                   52993: <dd>
                   52994: <p><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   52995: .<ins class="diff-new">Act as if an end tag with the tag name
                   52996: "select" had been seen, and reprocess the token.</ins></p>
                   52997: </dd>
                   52998: <dt><ins class="diff-new">An end-of-file token</ins></dt>
                   52999: <dd>
                   53000: <p><ins class="diff-new">If the</ins> <a href=
                   53001: "#current5"><ins class="diff-new">current node</ins></a>
                   53002: <ins class="diff-new">is not the root</ins> <code><a href=
                   53003: "#html"><ins class="diff-new">html</ins></a></code> <ins class=
                   53004: "diff-new">element, then this is a</ins> <a href=
                   53005: "#parse1"><ins class="diff-new">parse error.</ins></a> .</p>
                   53006: <p class="note"><ins class="diff-new">It can only be the</ins>
                   53007: <a href="#current5"><ins class="diff-new">current node</ins></a>
                   53008: <ins class="diff-new">in the</ins> <a href="#fragment"><ins class=
                   53009: "diff-new">fragment case</ins></a> .</p>
                   53010: <p><a href="#stops"><ins class="diff-new">Stop
                   53011: parsing.</ins></a></p>
                   53012: </dd>
                   53013: <dt><ins class="diff-new">Anything else</ins></dt>
                   53014: <dd>
                   53015: <p><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   53016: .<ins class="diff-new">Ignore the token.</ins></p>
                   53017: </dd>
                   53018: </dl>
                   53019: <h5 id="parsing-main-inselectintable"><span class=
                   53020: "secno"><ins class="diff-new">8.2.5.18.</ins></span> <ins class=
                   53021: "diff-new">The "</ins> <dfn id="in-select0" title=
                   53022: "insertion mode: in select in table"><ins class="diff-new">in
                   53023: select in table</ins></dfn> <ins class="diff-new">" insertion
                   53024: mode</ins></h5>
                   53025: <p><ins class="diff-new">When the</ins> <span><ins class=
                   53026: "diff-new">insertion mode</ins></span> <ins class="diff-new">is
                   53027: "</ins> <a href="#in-select0" title=
                   53028: "insertion mode: in select in table"><ins class="diff-new">in
                   53029: select in table</ins></a> <ins class="diff-new">", tokens must be
                   53030: handled as follows:</ins></p>
                   53031: <dl class="switch">
                   53032: <dt><ins class="diff-new">A start tag whose tag name is one of:
                   53033: "caption", "table", "tbody", "tfoot", "thead", "tr", "td",
                   53034: "th"</ins></dt>
                   53035: <dd>
                   53036: <p><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   53037: .<ins class="diff-new">Act as if an end tag with the tag name
                   53038: "select" had been seen, and reprocess the token.</ins></p>
                   53039: </dd>
                   53040: <dt>An end tag whose tag name is one of: "caption", "table",
                   53041: "tbody", "tfoot", "thead", "tr", "td", "th"</dt>
                   53042: <dd>
                   53043: <p><a href="#parse1">Parse error</a> .</p>
                   53044: <p>If the <a href="#stack">stack of open elements</a> <a href=
                   53045: "#have-an0">has an element in table scope</a> with the same tag
                   53046: name as that of the token, then act as if an end tag with the tag
                   53047: name "select" had been seen, and reprocess the token. Otherwise,
                   53048: ignore the token.</p>
                   53049: </dd>
                   53050: <dt>Anything else</dt>
                   53051: <dd>
                   53052: <p><ins class="diff-new">Process the token</ins> <a href=
                   53053: "#using8"><ins class="diff-new">using the rules for</ins></a>
                   53054: <ins class="diff-new">the "</ins> <a href="#in-select" title=
                   53055: "insertion mode: in select"><ins class="diff-new">in
                   53056: select</ins></a> <ins class="diff-new">"</ins> <span><ins class=
                   53057: "diff-new">insertion mode</ins></span> .</p>
                   53058: </dd>
                   53059: </dl>
                   53060: <h5 id="parsing-main-inforeign"><span class="secno"><ins class=
                   53061: "diff-chg">8.2.5.19.</ins></span> <ins class="diff-chg">The "</ins>
                   53062: <dfn id="in-foreign" title=
                   53063: "insertion mode: in foreign content"><ins class="diff-chg">in
                   53064: foreign content</ins></dfn> <ins class="diff-chg">" insertion
                   53065: mode</ins></h5>
                   53066: <p><ins class="diff-chg">When the</ins> <span><ins class=
                   53067: "diff-chg">insertion mode</ins></span> <ins class="diff-chg">is
                   53068: "</ins> <a href="#in-foreign" title=
                   53069: "insertion mode: in foreign content"><ins class="diff-chg">in
                   53070: foreign content</ins></a> <ins class="diff-chg">", tokens must be
                   53071: handled as follows:</ins></p>
                   53072: <dl class="switch">
                   53073: <dt><ins class="diff-chg">A character token</ins></dt>
                   53074: <dd>
                   53075: <p><a href="#insert" title="insert a character"><ins class=
                   53076: "diff-chg">Insert the token's character</ins></a> <ins class=
                   53077: "diff-chg">into the</ins> <a href="#current5"><ins class=
                   53078: "diff-chg">current node</ins></a> .</p>
                   53079: </dd>
                   53080: <dt><ins class="diff-chg">A comment token</ins></dt>
                   53081: <dd>
                   53082: <p><ins class="diff-chg">Append a</ins> <code><ins class=
                   53083: "diff-chg">Comment</ins></code> <ins class="diff-chg">node to
                   53084: the</ins> <a href="#current5"><ins class="diff-chg">current
                   53085: node</ins></a> <ins class="diff-chg">with the</ins> <code title=
                   53086: ""><ins class="diff-chg">data</ins></code> <ins class=
                   53087: "diff-chg">attribute set to the data given in the comment
                   53088: token.</ins></p>
                   53089: </dd>
                   53090: <dt><ins class="diff-chg">A DOCTYPE token</ins></dt>
                   53091: <dd>
                   53092: <p><a href="#parse1">Parse error</a> . Ignore the token.</p>
                   53093: <del class="diff-old">If</del></dd>
                   53094: <dt><ins class="diff-chg">A start tag whose tag name is neither
                   53095: "mglyph" nor "malignmark", if</ins> the <a href=
                   53096: "#current5"><ins class="diff-chg">current node</ins></a>
                   53097: <ins class="diff-chg">is an</ins> <code title=""><ins class=
                   53098: "diff-chg">mi</ins></code> <ins class="diff-chg">element in
                   53099: the</ins> <a href="#mathml0"><ins class="diff-chg">MathML
                   53100: namespace</ins></a> .</dt>
                   53101: <dt><ins class="diff-chg">A start tag whose tag name is neither
                   53102: "mglyph" nor "malignmark", if the</ins> <a href=
                   53103: "#current5"><ins class="diff-chg">current node</ins></a>
                   53104: <ins class="diff-chg">is an</ins> <code title=""><ins class=
                   53105: "diff-chg">mo</ins></code> <ins class="diff-chg">element in
                   53106: the</ins> <a href="#mathml0"><ins class="diff-chg">MathML
                   53107: namespace</ins></a> .</dt>
                   53108: <dt><ins class="diff-chg">A start tag whose tag name is neither
                   53109: "mglyph" nor "malignmark", if the</ins> <a href=
                   53110: "#current5"><ins class="diff-chg">current node</ins></a>
                   53111: <ins class="diff-chg">is an</ins> <code title=""><ins class=
                   53112: "diff-chg">mn</ins></code> <ins class="diff-chg">element in
                   53113: the</ins> <a href="#mathml0"><ins class="diff-chg">MathML
                   53114: namespace</ins></a> .</dt>
                   53115: <dt><ins class="diff-chg">A start tag whose tag name is neither
                   53116: "mglyph" nor "malignmark", if the</ins> <a href=
                   53117: "#current5"><ins class="diff-chg">current node</ins></a>
                   53118: <ins class="diff-chg">is an</ins> <code title=""><ins class=
                   53119: "diff-chg">ms</ins></code> <ins class="diff-chg">element in
                   53120: the</ins> <a href="#mathml0"><ins class="diff-chg">MathML
                   53121: namespace</ins></a> .</dt>
                   53122: <dt><ins class="diff-chg">A start tag whose tag name is neither
                   53123: "mglyph" nor "malignmark", if the</ins> <a href=
                   53124: "#current5"><ins class="diff-chg">current node</ins></a>
                   53125: <ins class="diff-chg">is an</ins> <code title=""><ins class=
                   53126: "diff-chg">mtext</ins></code> <ins class="diff-chg">element in
                   53127: the</ins> <a href="#mathml0"><ins class="diff-chg">MathML
                   53128: namespace</ins></a> .</dt>
                   53129: <dt><ins class="diff-chg">A start tag, if the</ins> <a href=
                   53130: "#current5"><ins class="diff-chg">current node</ins></a>
                   53131: <ins class="diff-chg">is an element in the</ins> <a href=
                   53132: "#html-namespace0"><ins class="diff-chg">HTML namespace</ins></a>
                   53133: .</dt>
                   53134: <dt><ins class="diff-chg">An end tag</ins></dt>
                   53135: <dd>
                   53136: <p><ins class="diff-chg">Process the token</ins> <a href=
                   53137: "#using8"><ins class="diff-chg">using the rules for</ins></a>
                   53138: <ins class="diff-chg">the</ins> <a href="#secondary1"><ins class=
1.2     ! mike     53139: "diff-chg">secondary</ins> insertion mode</a> .</p>
        !          53140: <p><ins class="diff-new">If, after doing so, the</ins>
        !          53141: <span><ins class="diff-new">insertion mode</ins></span> <ins class=
        !          53142: "diff-new">is still "</ins> <a href="#in-foreign" title=
1.1       mike     53143: "insertion mode: in foreign content"><ins class="diff-new">in
1.2     ! mike     53144: foreign content</ins></a> <ins class="diff-new">", but there</ins>
        !          53145: is <ins class="diff-new">no element in scope that has a namespace
        !          53146: other than the</ins> <a href="#html-namespace0"><ins class=
        !          53147: "diff-new">HTML namespace</ins></a> ,<ins class="diff-new">switch
        !          53148: the</ins> <span><ins class="diff-new">insertion mode</ins></span>
        !          53149: <ins class="diff-new">to the</ins> <a href=
        !          53150: "#secondary1"><ins class="diff-new">secondary insertion
        !          53151: mode</ins></a> .</p>
1.1       mike     53152: </dd>
1.2     ! mike     53153: <dt><ins class="diff-new">A start tag whose tag name is one of:
        !          53154: "b", "big", "blockquote", "body", "br", "center", "code", "dd",
        !          53155: "div", "dl", "dt" , "em", "embed", "font", "h1", "h2", "h3", "h4",
        !          53156: "h5", "h6" , "hr", "i", "img", "li", "listing" , "menu", "meta",
        !          53157: "nobr", "ol" , "p", "pre", "ruby", "s", "small", "span", "strong",
        !          53158: "strike" , "sub", "sup", "table", "tt", "u", "ul", "var"</ins></dt>
1.1       mike     53159: <dt><ins class="diff-new">An end-of-file token</ins></dt>
                   53160: <dd>
                   53161: <p><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   53162: .</p>
                   53163: <p><ins class="diff-new">Pop elements from the</ins> <a href=
                   53164: "#stack"><ins class="diff-new">stack of open elements</ins></a>
                   53165: <ins class="diff-new">until the</ins> <a href=
                   53166: "#current5"><ins class="diff-new">current node</ins></a>
                   53167: <ins class="diff-new">is in the</ins> <a href=
                   53168: "#html-namespace0"><ins class="diff-new">HTML namespace</ins></a>
                   53169: .</p>
                   53170: <p><ins class="diff-new">Switch the</ins> <span><ins class=
                   53171: "diff-new">insertion mode</ins></span> <ins class="diff-new">to
                   53172: the</ins> <a href="#secondary1"><ins class="diff-new">secondary
                   53173: insertion mode</ins></a> ,<ins class="diff-new">and reprocess the
                   53174: token.</ins></p>
                   53175: </dd>
                   53176: <dt><ins class="diff-new">Any other start tag</ins></dt>
                   53177: <dd>
                   53178: <p><a href="#adjust"><ins class="diff-new">Adjust foreign
                   53179: attributes</ins></a> <ins class="diff-new">for the token. (This
                   53180: fixes the use of namespaced attributes, in particular XLink in
                   53181: SVG.)</ins></p>
                   53182: <p><a href="#insert1"><ins class="diff-new">Insert a foreign
                   53183: element</ins></a> <ins class="diff-new">for the token, in the same
                   53184: namespace as the</ins> <a href="#current5"><ins class=
                   53185: "diff-new">current node</ins></a> .</p>
                   53186: <p><ins class="diff-new">If the token has its</ins> <i><ins class=
                   53187: "diff-new">self-closing flag</ins></i> <ins class="diff-new">set,
                   53188: pop the</ins> <a href="#current5"><ins class="diff-new">current
                   53189: node</ins></a> <ins class="diff-new">off the</ins> <a href=
                   53190: "#stack"><ins class="diff-new">stack of open elements</ins></a>
                   53191: <ins class="diff-new">and</ins> <a href="#acknowledged" title=
                   53192: "acknowledge self-closing flag"><ins class="diff-new">acknowledge
                   53193: the token's</ins> <i><ins class="diff-new">self-closing
                   53194: flag</ins></i></a> .</p>
                   53195: </dd>
                   53196: </dl>
                   53197: <h5 id="parsing-main-afterbody"><span class="secno"><ins class=
                   53198: "diff-new">8.2.5.20.</ins></span> <ins class="diff-new">The</ins> "
                   53199: <dfn id="after5" title="insertion mode: after body">after
                   53200: body</dfn> " <ins class="diff-chg">insertion mode</ins></h5>
                   53201: <p><del class="diff-old">Handle</del> <ins class=
                   53202: "diff-chg">When</ins> the <del class="diff-old">token</del>
                   53203: <span><ins class="diff-chg">insertion mode</ins></span> <ins class=
                   53204: "diff-chg">is "</ins> <a href="#after5" title=
                   53205: "insertion mode: after body"><ins class="diff-chg">after
                   53206: body</ins></a> <ins class="diff-chg">", tokens must be
                   53207: handled</ins> as follows:</p>
                   53208: <dl class="switch">
                   53209: <dt>A character token that is one of one of U+0009 CHARACTER
                   53210: TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
                   53211: FORM FEED (FF), or U+0020 SPACE</dt>
                   53212: <dd>
                   53213: <p>Process the token <del class="diff-old">as it would be processed
                   53214: if</del> <a href="#using8"><ins class="diff-chg">using</ins> the
                   53215: <del class="diff-old">insertion mode</del> <ins class=
                   53216: "diff-chg">rules for</ins></a> <del class="diff-old">was</del>
                   53217: <ins class="diff-chg">the</ins> " <a href="#in-body" title=
                   53218: "insertion mode: in body">in body</a> <del class=
                   53219: "diff-old">".</del> <ins class="diff-chg">"</ins> <span><ins class=
                   53220: "diff-chg">insertion mode</ins></span> .</p>
                   53221: </dd>
                   53222: <dt>A comment token</dt>
                   53223: <dd>
                   53224: <p>Append a <code>Comment</code> node to the first element in the
                   53225: <a href="#stack">stack of open elements</a> (the <code><a href=
                   53226: "#html">html</a></code> element), with the <code title=
                   53227: "">data</code> attribute set to the data given in the comment
                   53228: token.</p>
                   53229: </dd>
                   53230: <dt><ins class="diff-new">A DOCTYPE token</ins></dt>
                   53231: <dd>
                   53232: <p><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   53233: .<ins class="diff-new">Ignore the token.</ins></p>
                   53234: </dd>
                   53235: <dt><ins class="diff-new">A start tag whose tag name is
                   53236: "html"</ins></dt>
                   53237: <dd>
                   53238: <p><ins class="diff-new">Process the token</ins> <a href=
                   53239: "#using8"><ins class="diff-new">using the rules for</ins></a>
                   53240: <ins class="diff-new">the "</ins> <a href="#in-body" title=
                   53241: "insertion mode: in body"><ins class="diff-new">in body</ins></a>
                   53242: <ins class="diff-new">"</ins> <span><ins class="diff-new">insertion
                   53243: mode</ins></span> .</p>
                   53244: </dd>
                   53245: <dt>An end tag whose tag name is "html"</dt>
                   53246: <dd>
                   53247: <p>If the parser was originally created as part of the <a href=
                   53248: "#html-fragment0">HTML fragment parsing algorithm</a> , this is a
                   53249: <a href="#parse1">parse error</a> ; ignore the token. <del class=
                   53250: "diff-old">(The element will be an html element in this
                   53251: case.)</del> ( <a href="#fragment">fragment case</a> )</p>
                   53252: <p>Otherwise, switch <del class="diff-old">to</del> the <del class=
                   53253: "diff-old">trailing end phase .</del> <span><ins class=
                   53254: "diff-chg">insertion mode</ins></span> <ins class="diff-chg">to
                   53255: "</ins> <a href="#after7" title=
                   53256: "insertion mode: after after body"><ins class="diff-chg">after
                   53257: after body</ins></a> <ins class="diff-chg">".</ins></p>
                   53258: </dd>
                   53259: <dt><ins class="diff-chg">An end-of-file token</ins></dt>
                   53260: <dd>
                   53261: <p><a href="#stops"><ins class="diff-chg">Stop
                   53262: parsing.</ins></a></p>
                   53263: </dd>
                   53264: <dt>Anything else</dt>
                   53265: <dd>
                   53266: <p><a href="#parse1">Parse error</a> . <del class=
                   53267: "diff-old">Set</del> <ins class="diff-chg">Switch</ins> the
                   53268: <span>insertion mode</span> to " <a href="#in-body" title=
                   53269: "insertion mode: in body">in body</a> " and reprocess the
                   53270: token.</p>
                   53271: </dd>
                   53272: </dl>
                   53273: <del class="diff-old">If the insertion mode is</del>
                   53274: <h5 id="parsing-main-inframeset"><span class="secno"><ins class=
                   53275: "diff-chg">8.2.5.21.</ins></span> <ins class="diff-chg">The</ins> "
                   53276: <dfn id="in-frameset" title="insertion mode: in frameset">in
                   53277: frameset</dfn> " <ins class="diff-chg">insertion mode</ins></h5>
                   53278: <p><del class="diff-old">Handle</del> <ins class=
                   53279: "diff-chg">When</ins> the <del class="diff-old">token</del>
                   53280: <span><ins class="diff-chg">insertion mode</ins></span> <ins class=
                   53281: "diff-chg">is "</ins> <a href="#in-frameset" title=
                   53282: "insertion mode: in frameset"><ins class="diff-chg">in
                   53283: frameset</ins></a> <ins class="diff-chg">", tokens must be
                   53284: handled</ins> as follows:</p>
                   53285: <dl class="switch">
                   53286: <dt>A character token that is one of one of U+0009 CHARACTER
                   53287: TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
                   53288: FORM FEED (FF), or U+0020 SPACE</dt>
                   53289: <dd>
                   53290: <p><del class="diff-old">Append</del> <a href="#insert" title=
                   53291: "insert a character"><ins class="diff-chg">Insert</ins> the
                   53292: character</a> <del class="diff-old">to</del> <ins class=
                   53293: "diff-chg">into</ins> the <a href="#current5">current node</a>
                   53294: .</p>
                   53295: </dd>
                   53296: <dt>A comment token</dt>
                   53297: <dd>
                   53298: <p>Append a <code>Comment</code> node to the <a href=
                   53299: "#current5">current node</a> with the <code title="">data</code>
                   53300: attribute set to the data given in the comment token.</p>
                   53301: </dd>
                   53302: <dt>A <ins class="diff-new">DOCTYPE token</ins></dt>
                   53303: <dd>
                   53304: <p><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   53305: .<ins class="diff-new">Ignore the token.</ins></p>
                   53306: </dd>
                   53307: <dt><ins class="diff-new">A start tag whose tag name is
                   53308: "html"</ins></dt>
                   53309: <dd>
                   53310: <p><ins class="diff-new">Process the token</ins> <a href=
                   53311: "#using8"><ins class="diff-new">using the rules for</ins></a>
                   53312: <ins class="diff-new">the "</ins> <a href="#in-body" title=
                   53313: "insertion mode: in body"><ins class="diff-new">in body</ins></a>
                   53314: <ins class="diff-new">"</ins> <span><ins class="diff-new">insertion
                   53315: mode</ins></span> .</p>
                   53316: </dd>
                   53317: <dt><ins class="diff-new">A</ins> start tag whose tag name is
                   53318: "frameset"</dt>
                   53319: <dd>
                   53320: <p><a href="#insert0">Insert <del class="diff-old">a frameset</del>
                   53321: <ins class="diff-chg">an HTML</ins> element</a> for the token.</p>
                   53322: </dd>
                   53323: <dt>An end tag whose tag name is "frameset"</dt>
                   53324: <dd>
                   53325: <p>If the <a href="#current5">current node</a> is the root
                   53326: <code><a href="#html">html</a></code> element, then this is a
                   53327: <a href="#parse1">parse error</a> ; ignore the token. ( <a href=
                   53328: "#fragment">fragment case</a> )</p>
                   53329: <p>Otherwise, pop the <a href="#current5">current node</a> from the
                   53330: <a href="#stack">stack of open elements</a> .</p>
                   53331: <p>If the parser was <em>not</em> originally created as part of the
                   53332: <a href="#html-fragment0">HTML fragment parsing algorithm</a> (
                   53333: <a href="#fragment">fragment case</a> ), and the <a href=
                   53334: "#current5">current node</a> is no longer a <code>frameset</code>
                   53335: element, then <del class="diff-old">change</del> <ins class=
                   53336: "diff-chg">switch</ins> the <span>insertion mode</span> to "
                   53337: <a href="#after6" title="insertion mode: after frameset">after
                   53338: frameset</a> ".</p>
                   53339: </dd>
                   53340: <dt>A start tag whose tag name is "frame"</dt>
                   53341: <dd>
                   53342: <p><a href="#insert0">Insert an HTML element</a> for the token.
                   53343: Immediately pop the <a href="#current5">current node</a> off the
                   53344: <a href="#stack">stack of open elements</a> .</p>
                   53345: <p><a href="#acknowledged" title=
                   53346: "acknowledge self-closing flag"><ins class="diff-new">Acknowledge
                   53347: the token's</ins> <i><ins class="diff-new">self-closing
                   53348: flag</ins></i></a> ,<ins class="diff-new">if it is set.</ins></p>
                   53349: </dd>
                   53350: <dt>A start tag whose tag name is "noframes"</dt>
                   53351: <dd>
                   53352: <p>Process the token <del class="diff-old">as if</del> <a href=
                   53353: "#using8"><ins class="diff-chg">using</ins> the <ins class=
                   53354: "diff-chg">rules for</ins></a> <ins class="diff-chg">the "</ins>
                   53355: <a href="#in-head" title="insertion mode: in head"><ins class=
                   53356: "diff-chg">in head</ins></a> <ins class="diff-chg">"</ins>
                   53357: <span>insertion mode</span> .</p>
                   53358: </dd>
                   53359: <dt><ins class="diff-new">An end-of-file token</ins></dt>
                   53360: <dd>
                   53361: <p><ins class="diff-new">If the</ins> <a href=
                   53362: "#current5"><ins class="diff-new">current node</ins></a>
                   53363: <ins class="diff-new">is not the root</ins> <code><a href=
                   53364: "#html"><ins class="diff-new">html</ins></a></code> <ins class=
                   53365: "diff-new">element, then this is a</ins> <a href=
                   53366: "#parse1"><ins class="diff-new">parse error.</ins></a> .</p>
                   53367: <p class="note"><ins class="diff-new">It can only be the</ins>
                   53368: <a href="#current5"><ins class="diff-new">current node</ins></a>
                   53369: <del class="diff-old">had been "</del> in <del class=
                   53370: "diff-old">body</del> <ins class="diff-chg">the</ins> <a href=
                   53371: "#fragment"><ins class="diff-chg">fragment case</ins></a> .</p>
                   53372: <p><a href="#stops"><ins class="diff-chg">Stop parsing.</ins></a>
                   53373: <del class="diff-old">".</del></p>
                   53374: </dd>
                   53375: <dt>Anything else</dt>
                   53376: <dd>
                   53377: <p><a href="#parse1">Parse error</a> . Ignore the token.</p>
                   53378: </dd>
                   53379: </dl>
                   53380: <del class="diff-old">If the insertion mode is</del>
                   53381: <h5 id="parsing-main-afterframeset"><span class="secno"><ins class=
                   53382: "diff-chg">8.2.5.22.</ins></span> <ins class="diff-chg">The</ins> "
                   53383: <dfn id="after6" title="insertion mode: after frameset">after
                   53384: frameset</dfn> " <ins class="diff-chg">insertion mode</ins></h5>
                   53385: <p><del class="diff-old">Handle</del> <ins class=
                   53386: "diff-chg">When</ins> the <del class="diff-old">token</del>
                   53387: <span><ins class="diff-chg">insertion mode</ins></span> <ins class=
                   53388: "diff-chg">is "</ins> <a href="#after6" title=
                   53389: "insertion mode: after frameset"><ins class="diff-chg">after
                   53390: frameset</ins></a> <ins class="diff-chg">", tokens must be
                   53391: handled</ins> as follows:</p>
                   53392: <dl class="switch">
                   53393: <dt>A character token that is one of one of U+0009 CHARACTER
                   53394: TABULATION, U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C
                   53395: FORM FEED (FF), or U+0020 SPACE</dt>
                   53396: <dd>
                   53397: <p><del class="diff-old">Append</del> <a href="#insert" title=
                   53398: "insert a character"><ins class="diff-chg">Insert</ins> the
                   53399: character</a> <del class="diff-old">to</del> <ins class=
                   53400: "diff-chg">into</ins> the <a href="#current5">current node</a>
                   53401: .</p>
                   53402: </dd>
                   53403: <dt>A comment token</dt>
                   53404: <dd>
                   53405: <p>Append a <code>Comment</code> node to the <a href=
                   53406: "#current5">current node</a> with the <code title="">data</code>
                   53407: attribute set to the data given in the comment token.</p>
                   53408: </dd>
                   53409: <dt><ins class="diff-new">A DOCTYPE token</ins></dt>
                   53410: <dd>
                   53411: <p><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   53412: .<ins class="diff-new">Ignore the token.</ins></p>
                   53413: </dd>
                   53414: <dt><ins class="diff-new">A start tag whose tag name is
                   53415: "html"</ins></dt>
                   53416: <dd>
                   53417: <p><ins class="diff-new">Process the token</ins> <a href=
                   53418: "#using8"><ins class="diff-new">using the rules for</ins></a>
                   53419: <ins class="diff-new">the "</ins> <a href="#in-body" title=
                   53420: "insertion mode: in body"><ins class="diff-new">in body</ins></a>
                   53421: <ins class="diff-new">"</ins> <span><ins class="diff-new">insertion
                   53422: mode</ins></span> .</p>
                   53423: </dd>
                   53424: <dt>An end tag whose tag name is "html"</dt>
                   53425: <dd>
                   53426: <p>Switch <del class="diff-old">to</del> the <del class=
                   53427: "diff-old">trailing end phase .</del> <span><ins class=
                   53428: "diff-chg">insertion mode</ins></span> <ins class="diff-chg">to
                   53429: "</ins> <a href="#after8" title=
                   53430: "insertion mode: after after frameset"><ins class="diff-chg">after
                   53431: after frameset</ins></a> <ins class="diff-chg">".</ins></p>
                   53432: </dd>
                   53433: <dt>A start tag whose tag name is "noframes"</dt>
                   53434: <dd>
                   53435: <p>Process the token <del class="diff-old">as if</del> <a href=
                   53436: "#using8"><ins class="diff-chg">using</ins> the <del class=
                   53437: "diff-old">insertion mode</del> <ins class="diff-chg">rules
                   53438: for</ins></a> <del class="diff-old">had been</del> <ins class=
                   53439: "diff-chg">the</ins> " <a href="#in-head" title=
                   53440: "insertion mode: in head">in <del class="diff-old">body</del>
                   53441: <ins class="diff-chg">head</ins></a> <del class="diff-old">".</del>
                   53442: <ins class="diff-chg">"</ins> <span><ins class="diff-chg">insertion
                   53443: mode</ins></span> .</p>
                   53444: </dd>
                   53445: <dt><ins class="diff-chg">An end-of-file token</ins></dt>
                   53446: <dd>
                   53447: <p><a href="#stops"><ins class="diff-chg">Stop
                   53448: parsing.</ins></a></p>
                   53449: </dd>
                   53450: <dt>Anything else</dt>
                   53451: <dd>
                   53452: <p><a href="#parse1">Parse error</a> . Ignore the token.</p>
                   53453: </dd>
                   53454: </dl>
                   53455: <p class="big-issue">This doesn't handle UAs that don't support
                   53456: frames, or that do support frames but want to show the NOFRAMES
                   53457: content. Supporting the former is easy; supporting the latter is
                   53458: harder.</p>
                   53459: <h5 id="the-after0"><span class="secno"><del class=
                   53460: "diff-old">8.2.4.4.</del> <ins class=
                   53461: "diff-chg">8.2.5.23.</ins></span> The <del class=
                   53462: "diff-old">trailing end phase</del> <ins class="diff-chg">"</ins>
                   53463: <dfn id="after7" title=
                   53464: "insertion mode: after after body"><ins class="diff-chg">after
                   53465: after body</ins></dfn> <ins class="diff-chg">" insertion
                   53466: mode</ins></h5>
                   53467: <p><del class="diff-old">After</del> <ins class=
                   53468: "diff-chg">When</ins> the <del class="diff-old">main phase , as
                   53469: each token</del> <span><ins class="diff-chg">insertion
                   53470: mode</ins></span> is <del class="diff-old">emitted from the
                   53471: tokenisation</del> <ins class="diff-chg">"</ins> <a href="#after7"
                   53472: title="insertion mode: after after body"><ins class=
                   53473: "diff-chg">after after body</ins></a> <del class="diff-old">stage,
                   53474: it</del> <ins class="diff-chg">", tokens</ins> must be <del class=
                   53475: "diff-old">processed</del> <ins class="diff-chg">handled</ins> as
                   53476: <del class="diff-old">described in this section.</del> <ins class=
                   53477: "diff-chg">follows:</ins></p>
                   53478: <dl class="switch">
                   53479: <dt>A <del class="diff-old">DOCTYPE token Parse error . Ignore the
                   53480: token. A</del> comment token</dt>
                   53481: <dd>
                   53482: <p>Append a <code>Comment</code> node to the <code>Document</code>
                   53483: object with the <code title="">data</code> attribute set to the
                   53484: data given in the comment token.</p>
                   53485: </dd>
                   53486: <dt>A <ins class="diff-new">DOCTYPE token</ins></dt>
                   53487: <dt><ins class="diff-new">A</ins> character token that is one of
                   53488: one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000B
                   53489: LINE TABULATION, U+000C FORM FEED (FF), or U+0020 SPACE</dt>
                   53490: <dt><ins class="diff-new">A start tag whose tag name is
                   53491: "html"</ins></dt>
                   53492: <dd>
                   53493: <p>Process the token <del class="diff-old">as it would</del>
                   53494: <a href="#using8"><ins class="diff-chg">using the rules
                   53495: for</ins></a> <ins class="diff-chg">the "</ins> <a href="#in-body"
                   53496: title="insertion mode: in body"><ins class="diff-chg">in
                   53497: body</ins></a> <ins class="diff-chg">"</ins> <span><ins class=
                   53498: "diff-chg">insertion mode</ins></span> .</p>
                   53499: </dd>
                   53500: <dt><ins class="diff-chg">An end-of-file token</ins></dt>
                   53501: <dd>
                   53502: <p><a href="#stops"><ins class="diff-chg">Stop parsing</ins></a>
                   53503: .</p>
                   53504: </dd>
                   53505: <dt><ins class="diff-chg">Anything else</ins></dt>
                   53506: <dd>
                   53507: <p><a href="#parse1"><ins class="diff-chg">Parse error</ins></a>
                   53508: .<ins class="diff-chg">Switch the</ins> <span><ins class=
                   53509: "diff-chg">insertion mode</ins></span> <ins class="diff-chg">to
                   53510: "</ins> <a href="#in-body" title=
                   53511: "insertion mode: in body"><ins class="diff-chg">in body</ins></a>
                   53512: <ins class="diff-chg">" and reprocess the token.</ins></p>
                   53513: </dd>
                   53514: </dl>
                   53515: <h5 id="the-after1"><span class="secno"><ins class=
                   53516: "diff-chg">8.2.5.24.</ins></span> <ins class="diff-chg">The "</ins>
                   53517: <dfn id="after8" title=
                   53518: "insertion mode: after after frameset"><ins class="diff-chg">after
                   53519: after frameset</ins></dfn> <ins class="diff-chg">" insertion
                   53520: mode</ins></h5>
                   53521: <p><ins class="diff-chg">When the</ins> <span><ins class=
                   53522: "diff-chg">insertion mode</ins></span> <ins class="diff-chg">is
                   53523: "</ins> <a href="#after8" title=
                   53524: "insertion mode: after after frameset"><ins class="diff-chg">after
                   53525: after frameset</ins></a> <ins class="diff-chg">", tokens must</ins>
                   53526: be <del class="diff-old">processed</del> <ins class=
                   53527: "diff-chg">handled as follows:</ins></p>
                   53528: <dl class="switch">
                   53529: <dt><ins class="diff-chg">A comment token</ins></dt>
                   53530: <dd>
                   53531: <p><ins class="diff-chg">Append a</ins> <code><ins class=
                   53532: "diff-chg">Comment</ins></code> <ins class="diff-chg">node to
                   53533: the</ins> <code><ins class="diff-chg">Document</ins></code>
                   53534: <ins class="diff-chg">object with the</ins> <code title=
                   53535: ""><ins class="diff-chg">data</ins></code> <ins class=
                   53536: "diff-chg">attribute set to the data given</ins> in the <del class=
                   53537: "diff-old">main phase .</del> <ins class="diff-chg">comment
                   53538: token.</ins></p>
                   53539: </dd>
                   53540: <dt>A <ins class="diff-new">DOCTYPE token</ins></dt>
                   53541: <dt><ins class="diff-new">A</ins> character token that is
                   53542: <del class="diff-old">not</del> <ins class="diff-chg">one of</ins>
                   53543: one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000B
                   53544: LINE TABULATION, U+000C FORM FEED (FF), or U+0020 SPACE</dt>
                   53545: <dt>A start tag <del class="diff-old">token An end</del>
                   53546: <ins class="diff-chg">whose</ins> tag <del class=
                   53547: "diff-old">token</del> <ins class="diff-chg">name is
                   53548: "html"</ins></dt>
                   53549: <dd>
                   53550: <p><del class="diff-old">Parse error . Switch back to</del>
                   53551: <ins class="diff-chg">Process</ins> the <del class="diff-old">main
                   53552: phase</del> <ins class="diff-chg">token</ins> <a href=
                   53553: "#using8"><ins class="diff-chg">using the rules for</ins></a>
                   53554: <del class="diff-old">and reprocess</del> the <del class=
                   53555: "diff-old">token.</del> <ins class="diff-chg">"</ins> <a href=
                   53556: "#in-body" title="insertion mode: in body"><ins class="diff-chg">in
                   53557: body</ins></a> <ins class="diff-chg">"</ins> <span><ins class=
                   53558: "diff-chg">insertion mode</ins></span> .</p>
                   53559: </dd>
                   53560: <dt>An end-of-file token</dt>
                   53561: <dd>
                   53562: <p><a href="#stops">Stop parsing</a> .</p>
                   53563: </dd>
                   53564: <dt><ins class="diff-new">Anything else</ins></dt>
                   53565: <dd>
                   53566: <p><a href="#parse1"><ins class="diff-new">Parse error</ins></a>
                   53567: .<ins class="diff-new">Switch the</ins> <span><ins class=
                   53568: "diff-new">insertion mode</ins></span> <ins class="diff-new">to
                   53569: "</ins> <a href="#in-frameset" title=
                   53570: "insertion mode: in frameset"><ins class="diff-new">in
                   53571: frameset</ins></a> <ins class="diff-new">" and reprocess the
                   53572: token.</ins></p>
                   53573: </dd>
                   53574: </dl>
                   53575: <h4 id="the-end"><span class="secno"><del class=
                   53576: "diff-old">8.2.5.</del> <ins class="diff-chg">8.2.6</ins></span>
                   53577: The <del class="diff-old">End</del> <ins class=
                   53578: "diff-chg">end</ins></h4>
                   53579: <p>Once the user agent <dfn id="stops" title="stop parsing">stops
                   53580: parsing</dfn> the document, the user agent must follow the steps in
                   53581: this section.</p>
                   53582: <p>First, the <a href="#current"><ins class="diff-new">current
                   53583: document readiness</ins></a> <ins class="diff-new">must be set to
                   53584: "interactive".</ins></p>
                   53585: <p><ins class="diff-new">Then, the</ins> rules for <a href=
                   53586: "#when-a">when a script completes loading</a> start applying
                   53587: (script execution is no longer managed by the parser).</p>
                   53588: <p>If any of the scripts in the <a href="#list-of1">list of scripts
                   53589: that will execute as soon as possible</a> have <span>completed
                   53590: loading</span> , or if the <a href="#list-of0">list of scripts that
                   53591: will execute asynchronously</a> is not empty and the first script
                   53592: in that list has <span>completed loading</span> , then the user
                   53593: agent must act as if those scripts just completed loading,
                   53594: following the rules given for that in the <code><a href=
                   53595: "#script1">script</a></code> element definition.</p>
                   53596: <p>Then, if the <a href="#list-of">list of scripts that will
                   53597: execute when the document has finished parsing</a> is not empty,
                   53598: and the first item in this list has already <span>completed
                   53599: loading</span> , then the user agent must act as if that script
                   53600: just finished loading.</p>
                   53601: <p>By this point, there will be no scripts that have loaded but
                   53602: have not yet been executed.</p>
                   53603: <p>The user agent must then <a href="#firing2">fire a simple
                   53604: event</a> called <code title=
                   53605: "event-DOMContentLoaded">DOMContentLoaded</code> at the
                   53606: <code>Document</code> .</p>
                   53607: <p>Once everything that <dfn id="delays" title=
                   53608: "delay the load event">delays the load event</dfn> has completed,
                   53609: the user agent must <ins class="diff-new">set the</ins> <a href=
                   53610: "#current"><ins class="diff-new">current document
                   53611: readiness</ins></a> <ins class="diff-new">to "complete", and
                   53612: then</ins> <a href="#firing4" title="fire a load event">fire a
                   53613: <code title="event-load">load</code> event</a> at <a href=
                   53614: "#the-body1">the <code>body</code> element</a> .</p>
                   53615: <p class="big-issue">delaying the load event for things like image
                   53616: loads allows for intranet port scans (even without javascript!).
                   53617: Should we really encode that into the spec?</p>
                   53618: <h3 id="namespaces"><span class="secno"><del class=
                   53619: "diff-old">8.3.</del> <ins class="diff-chg">8.3</ins></span>
                   53620: Namespaces</h3>
                   53621: <p>The <dfn id="html-namespace0">HTML namespace</dfn> is:
                   53622: <code>http://www.w3.org/1999/xhtml</code></p>
                   53623: <p><ins class="diff-chg">The</ins> <dfn id="mathml0"><ins class=
                   53624: "diff-chg">MathML namespace</ins></dfn> <ins class=
                   53625: "diff-chg">is:</ins> <code><ins class=
                   53626: "diff-chg">http://www.w3.org/1998/Math/MathML</ins></code></p>
                   53627: <p><ins class="diff-chg">The</ins> <dfn id=
                   53628: "svg-namespace"><ins class="diff-chg">SVG namespace</ins></dfn>
                   53629: <ins class="diff-chg">is:</ins> <code><ins class=
                   53630: "diff-chg">http://www.w3.org/2000/svg</ins></code></p>
                   53631: <p><ins class="diff-chg">The</ins> <dfn id="xlink"><ins class=
                   53632: "diff-chg">XLink namespace</ins></dfn> <ins class=
                   53633: "diff-chg">is:</ins> <code><ins class=
                   53634: "diff-chg">http://www.w3.org/1999/xlink</ins></code></p>
                   53635: <p><ins class="diff-chg">The</ins> <dfn id=
                   53636: "xml-namespace"><ins class="diff-chg">XML namespace</ins></dfn>
                   53637: <ins class="diff-chg">is:</ins> <code><ins class=
                   53638: "diff-chg">http://www.w3.org/XML/1998/namespace</ins></code></p>
                   53639: <p><ins class="diff-chg">The</ins> <dfn id="xmlns"><ins class=
                   53640: "diff-chg">XMLNS namespace</ins></dfn> <ins class=
                   53641: "diff-chg">is:</ins> <code><ins class=
                   53642: "diff-chg">http://www.w3.org/2000/xmlns/</ins></code></p>
                   53643: <h3 id="serializing"><span class="secno"><del class=
                   53644: "diff-old">8.4.</del> <ins class="diff-chg">8.4</ins></span>
                   53645: <del class="diff-old">Serialising</del> <ins class=
                   53646: "diff-chg">Serializing</ins> HTML fragments</h3>
                   53647: <p>The following steps form the <dfn id="html-fragment">HTML
                   53648: fragment <del class="diff-old">serialisation</del> <ins class=
                   53649: "diff-chg">serialization</ins> algorithm</dfn> . The algorithm
                   53650: takes as input a DOM <code>Element</code> or <code>Document</code>
                   53651: , referred to as <var title="">the node</var> , and either returns
                   53652: a string or raises an exception.</p>
                   53653: <p class="note">This algorithm <del class=
                   53654: "diff-old">serialises</del> <ins class="diff-chg">serializes</ins>
                   53655: the <em>children</em> of the node being <del class=
                   53656: "diff-old">serialised,</del> <ins class=
                   53657: "diff-chg">serialized,</ins> not the node itself.</p>
                   53658: <ol>
                   53659: <li>
                   53660: <p>Let <var title="">s</var> be a string, and initialise it to the
                   53661: empty string.</p>
                   53662: </li>
                   53663: <li>
                   53664: <p>For each child node <del class="diff-old">child</del> of
                   53665: <var title="">the node</var> , in <a href="#tree-order">tree
                   53666: order</a> , <del class="diff-old">append</del> <ins class=
                   53667: "diff-chg">run the following steps:</ins></p>
                   53668: <ol>
                   53669: <li>
                   53670: <p><ins class="diff-chg">Let</ins> <var title=""><ins class=
                   53671: "diff-chg">current node</ins></var> <ins class="diff-chg">be the
                   53672: child node being processed.</ins></p>
                   53673: </li>
                   53674: <li>
                   53675: <p><ins class="diff-chg">Append</ins> the appropriate string from
                   53676: the following list to <var title="">s</var> :</p>
                   53677: <dl class="switch">
                   53678: <dt>If <del class="diff-old">the child</del> <var title=
                   53679: ""><ins class="diff-chg">current</ins> node</var> is an
                   53680: <code title="">Element</code></dt>
                   53681: <dd>
                   53682: <p>Append a U+003C LESS-THAN SIGN ( <code title="">&lt;</code> )
                   53683: character, followed by the element's tag name. (For nodes created
                   53684: by the <a href="#html-0">HTML parser</a> , <code title=
                   53685: "">Document.createElement()</code> , or <code title=
                   53686: "">Document.renameNode()</code> , the tag name will be
                   53687: lowercase.)</p>
                   53688: <p>For each attribute that the element has, append a U+0020 SPACE
                   53689: character, the attribute's name (which, for attributes set by the
                   53690: <a href="#html-0">HTML parser</a> or by <code title=
                   53691: "">Element.setAttributeNode()</code> or <code title=
                   53692: "">Element.setAttribute()</code> , will be lowercase), a U+003D
                   53693: EQUALS SIGN ( <code title="">=</code> ) character, a U+0022
                   53694: QUOTATION MARK ( <code title="">"</code> ) character, the
                   53695: attribute's value, <a href="#escapingString" title=
                   53696: "escaping a string">escaped as described below <del class=
                   53697: "diff-old">,</del></a> <ins class="diff-chg">in</ins>
                   53698: <i><ins class="diff-chg">attribute mode</ins></i> , and a second
                   53699: U+0022 QUOTATION MARK ( <code title="">"</code> ) character.</p>
                   53700: <p>While the exact order of attributes is UA-defined, and may
                   53701: depend on factors such as the order that the attributes were given
                   53702: in the original markup, the sort order must be stable, such that
                   53703: consecutive invocations of this algorithm <del class=
                   53704: "diff-old">serialise</del> <ins class="diff-chg">serialize</ins> an
                   53705: element's attributes in the same order.</p>
                   53706: <p>Append a U+003E GREATER-THAN SIGN ( <code title="">&gt;</code> )
                   53707: character.</p>
                   53708: <p>If <del class="diff-old">the child</del> <var title=
                   53709: ""><ins class="diff-chg">current</ins> node</var> is an
                   53710: <code><a href="#area">area</a></code> , <code><a href=
                   53711: "#base">base</a></code> , <code>basefont</code> ,
                   53712: <code>bgsound</code> , <code><a href="#br">br</a></code> ,
                   53713: <code><a href="#col">col</a></code> , <code><a href=
                   53714: "#embed">embed</a></code> , <code>frame</code> , <code><a href=
                   53715: "#hr">hr</a></code> , <code><a href="#img">img</a></code> ,
                   53716: <code>input</code> , <code><a href="#link">link</a></code> ,
                   53717: <code><a href="#meta0">meta</a></code> , <code><a href=
                   53718: "#param">param</a></code> , <code>spacer</code> , or
                   53719: <code>wbr</code> element, then continue on to the next child node
                   53720: at this point.</p>
                   53721: <p>If <del class="diff-old">the child</del> <var title=
                   53722: ""><ins class="diff-chg">current</ins> node</var> is a
                   53723: <code><a href="#pre">pre</a></code> <del class="diff-old">or</del>
                   53724: <code>textarea</code> , <ins class="diff-new">or</ins>
                   53725: <code><ins class="diff-new">listing</ins></code> element, append a
                   53726: U+000A LINE FEED (LF) character.</p>
                   53727: <p>Append the value of running the <a href="#html-fragment">HTML
                   53728: fragment <del class="diff-old">serialisation</del> <ins class=
                   53729: "diff-chg">serialization</ins> algorithm</a> on the <var title=
                   53730: ""><del class="diff-old">child</del> <ins class="diff-chg">current
                   53731: node</ins></var> element (thus recursing into this algorithm for
                   53732: that element), followed by a U+003C LESS-THAN SIGN ( <code title=
                   53733: "">&lt;</code> ) character, a U+002F SOLIDUS ( <code title=
                   53734: "">/</code> ) character, the element's tag name again, and finally
                   53735: a U+003E GREATER-THAN SIGN ( <code title="">&gt;</code> )
                   53736: character.</p>
                   53737: </dd>
                   53738: <dt>If <del class="diff-old">the child</del> <var title=
                   53739: ""><ins class="diff-chg">current</ins> node</var> is a <code title=
                   53740: "">Text</code> or <code title="">CDATASection</code> node</dt>
                   53741: <dd>
                   53742: <p>If one of the ancestors of <del class="diff-old">the child</del>
                   53743: <var title=""><ins class="diff-chg">current</ins> node</var> is a
                   53744: <code><a href="#style1">style</a></code> , <code><a href=
                   53745: "#script1">script</a></code> , <code>xmp</code> , <code><a href=
                   53746: "#iframe">iframe</a></code> , <code>noembed</code> ,
                   53747: <code>noframes</code> , <code><a href=
                   53748: "#noscript">noscript</a></code> , or <code>plaintext</code>
                   53749: element, then append the value of <del class="diff-old">the</del>
                   53750: <var title=""><del class="diff-old">child</del> <ins class=
                   53751: "diff-chg">current node</ins></var> <del class=
                   53752: "diff-old">node's</del> <ins class="diff-chg">'s</ins> <code title=
                   53753: "">data</code> DOM attribute literally.</p>
                   53754: <p>Otherwise, append the value of <del class="diff-old">the</del>
                   53755: <var title=""><del class="diff-old">child</del> <ins class=
                   53756: "diff-chg">current node</ins></var> <del class=
                   53757: "diff-old">node's</del> <ins class="diff-chg">'s</ins> <code title=
                   53758: "">data</code> DOM attribute, <a href="#escapingString" title=
                   53759: "escaping a string">escaped as described below</a> .</p>
                   53760: </dd>
                   53761: <dt>If <del class="diff-old">the child</del> <var title=
                   53762: ""><ins class="diff-chg">current</ins> node</var> is a <code title=
                   53763: "">Comment</code></dt>
                   53764: <dd>
                   53765: <p>Append the literal string <code>&lt;!--</code> (U+003C LESS-THAN
                   53766: SIGN, U+0021 EXCLAMATION MARK, U+002D HYPHEN-MINUS, U+002D
                   53767: HYPHEN-MINUS), followed by the value of <del class=
                   53768: "diff-old">the</del> <var title=""><del class=
                   53769: "diff-old">child</del> <ins class="diff-chg">current
                   53770: node</ins></var> <del class="diff-old">node's</del> <ins class=
                   53771: "diff-chg">'s</ins> <code title="">data</code> DOM attribute,
                   53772: followed by the literal string <code>--&gt;</code> (U+002D
                   53773: HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN).</p>
                   53774: </dd>
                   53775: <dt>If <var title=""><ins class="diff-new">current node</ins></var>
                   53776: <ins class="diff-new">is a</ins> <code title=""><ins class=
                   53777: "diff-new">ProcessingInstruction</ins></code></dt>
                   53778: <dd>
                   53779: <p><ins class="diff-new">Append</ins> the <del class=
                   53780: "diff-old">child</del> <ins class="diff-chg">literal string</ins>
                   53781: <code><ins class="diff-chg">&lt;?</ins></code> <ins class=
                   53782: "diff-chg">(U+003C LESS-THAN SIGN, U+003F QUESTION MARK), followed
1.2     ! mike     53783: by the value of</ins> <var title=""><ins class=
        !          53784: "diff-chg">current</ins> node</var> <ins class="diff-new">'s</ins>
        !          53785: <code title=""><ins class="diff-new">target</ins></code>
        !          53786: <ins class="diff-new">DOM attribute, followed by a single U+0020
        !          53787: SPACE character, followed by the value of</ins> <var title=
        !          53788: ""><ins class="diff-new">current node</ins></var> <ins class=
        !          53789: "diff-new">'s</ins> <code title=""><ins class=
        !          53790: "diff-new">data</ins></code> <ins class="diff-new">DOM attribute,
        !          53791: followed by a single U+003E GREATER-THAN SIGN character ('&gt;
        !          53792: ').</ins></p>
1.1       mike     53793: </dd>
1.2     ! mike     53794: <dt><ins class="diff-new">If</ins> <var title=""><ins class=
        !          53795: "diff-new">current node</ins></var> is a <code title=
1.1       mike     53796: "">DocumentType</code></dt>
                   53797: <dd>
                   53798: <p>Append the literal string <code>&lt;!DOCTYPE</code> (U+003C
                   53799: LESS-THAN SIGN, U+0021 EXCLAMATION MARK, U+0044 LATIN CAPITAL
                   53800: LETTER D, U+004F LATIN CAPITAL LETTER O, U+0043 LATIN CAPITAL
                   53801: LETTER C, U+0054 LATIN CAPITAL LETTER T, U+0059 LATIN CAPITAL
                   53802: LETTER Y, U+0050 LATIN CAPITAL LETTER P, U+0045 LATIN CAPITAL
                   53803: LETTER E), followed by a space (U+0020 SPACE), followed by the
                   53804: value of <del class="diff-old">the</del> <var title=""><del class=
                   53805: "diff-old">child</del> <ins class="diff-chg">current
                   53806: node</ins></var> <del class="diff-old">node's</del> <ins class=
                   53807: "diff-chg">'s</ins> <code title="">name</code> DOM attribute,
                   53808: followed by the literal string <code>&gt;</code> (U+003E
                   53809: GREATER-THAN SIGN).</p>
                   53810: </dd>
                   53811: </dl>
                   53812: <p>Other <del class="diff-old">nodes</del> <ins class=
                   53813: "diff-chg">node</ins> types (e.g. <code title="">Attr</code> )
                   53814: cannot occur as children of elements. <del class=
                   53815: "diff-old">If</del> <ins class="diff-chg">If, despite this,</ins>
                   53816: they <del class="diff-old">do,</del> <ins class="diff-chg">somehow
                   53817: do occur,</ins> this algorithm must raise an
                   53818: <code>INVALID_STATE_ERR</code> exception.</p>
                   53819: </li>
                   53820: </ol>
                   53821: </li>
                   53822: <li>
                   53823: <p>The result of the algorithm is the string <var title="">s</var>
                   53824: .</p>
                   53825: </li>
                   53826: </ol>
                   53827: <p><dfn id="escapingString">Escaping a string</dfn> (for the
                   53828: purposes of the algorithm above) consists of replacing any
                   53829: <del class="diff-old">occurances</del> <ins class=
                   53830: "diff-chg">occurrences</ins> of the " <code title="">&amp;</code> "
                   53831: character by the string " <code title="">&amp;amp;</code> ", any
                   53832: <del class="diff-old">occurances</del> <ins class=
                   53833: "diff-chg">occurrences</ins> of the " <code title="">&lt;</code> "
                   53834: character by the string " <code title="">&amp;lt;</code> ", any
                   53835: <del class="diff-old">occurances</del> <ins class=
                   53836: "diff-chg">occurrences</ins> of the " <code title="">&gt;</code> "
                   53837: character by the string " <code title="">&amp;gt;</code> ",
                   53838: <del class="diff-old">and</del> any <del class=
                   53839: "diff-old">occurances</del> <ins class="diff-chg">occurrences of
                   53840: the U+00A0 NO-BREAK SPACE character by the string "</ins>
                   53841: <code title=""><ins class="diff-chg">&amp;nbsp;</ins></code>
                   53842: <ins class="diff-chg">", and, if the algorithm was invoked in
                   53843: the</ins> <i><ins class="diff-chg">attribute mode</ins></i>
                   53844: ,<ins class="diff-chg">any occurrences</ins> of the " <code title=
                   53845: "">"</code> " character by the string " <code title=
                   53846: "">&amp;quot;</code> ".</p>
                   53847: <p class="note">Entity reference nodes are <a href=
                   53848: "#entity-references">assumed to be expanded</a> by the user agent,
                   53849: and are therefore not covered in the algorithm above.</p>
                   53850: <p class="note">It is possible that the output of this algorithm,
                   53851: if parsed with an <a href="#html-0">HTML parser</a> , will not
                   53852: return the original tree structure. For instance, if a
                   53853: <code>textarea</code> element to which a <code title=
                   53854: "">Comment</code> node has been appended is <del class=
                   53855: "diff-old">serialised</del> <ins class="diff-chg">serialized</ins>
                   53856: and the output is then reparsed, the comment will end up being
                   53857: displayed in the text field. Similarly, if, as a result of DOM
                   53858: manipulation, an element contains a comment that contains the
                   53859: literal string " <code title="">--&gt;</code> ", then when the
                   53860: result of <del class="diff-old">serialising</del> <ins class=
                   53861: "diff-chg">serializing</ins> the element is parsed, the comment
                   53862: will be truncated at that point and the rest of the comment will be
                   53863: interpreted as markup. More examples would be making a
                   53864: <code><a href="#script1">script</a></code> element contain a text
                   53865: node with the text string " <code>&lt;/script&gt;</code> ", or
                   53866: having a <code><a href="#p">p</a></code> element that contains a
                   53867: <code><a href="#ul">ul</a></code> element (as the <code><a href=
                   53868: "#ul">ul</a></code> element's <span title="syntax-start-tag">start
                   53869: tag</span> would imply the end tag for the <code><a href=
                   53870: "#p">p</a></code> ).</p>
                   53871: <h3 id="parsing2"><span class="secno"><del class=
                   53872: "diff-old">8.5.</del> <ins class="diff-chg">8.5</ins></span>
                   53873: Parsing HTML fragments</h3>
                   53874: <p>The following steps form the <dfn id="html-fragment0">HTML
                   53875: fragment parsing algorithm</dfn> . The algorithm takes as input a
                   53876: DOM <code>Element</code> , referred to as <ins class=
                   53877: "diff-new">the</ins> <var title="">context <del class=
                   53878: "diff-old">,</del></var> <ins class="diff-chg">element,</ins> which
                   53879: gives the context for the parser, as well as <var title=
                   53880: "">input</var> , a string to parse, and returns a list of zero or
                   53881: more nodes.</p>
                   53882: <p class="note">Parts marked <dfn id="fragment">fragment case</dfn>
                   53883: in algorithms in the parser section are parts that only occur if
                   53884: the parser was created for the purposes of this algorithm. The
                   53885: algorithms have been annotated with such markings for informational
                   53886: purposes only; such markings have no normative weight. If it is
                   53887: possible for a condition described as a <a href=
                   53888: "#fragment">fragment case</a> to occur even when the parser wasn't
                   53889: created for the purposes of handling this algorithm, then that is
                   53890: an error in the specification.</p>
                   53891: <ol>
                   53892: <li>
                   53893: <p>Create a new <code>Document</code> node, and mark it as being an
                   53894: <a href="#html-" title="HTML documents">HTML document</a> .</p>
                   53895: </li>
                   53896: <li>
                   53897: <p>Create a new <a href="#html-0">HTML parser</a> , and associate
                   53898: it with the just created <code>Document</code> node.</p>
                   53899: </li>
                   53900: <li>
                   53901: <p>Set the <a href="#html-0">HTML parser</a> 's <a href=
                   53902: "#tokenisation0">tokenisation</a> stage's <a href=
                   53903: "#content2">content model flag</a> according to the <var title=
                   53904: "">context</var> element, as follows:</p>
                   53905: <dl class="switch">
                   53906: <dt>If it is a <code><a href="#title1">title</a></code> or
                   53907: <code>textarea</code> element</dt>
                   53908: <dd>Set the <a href="#content2">content model flag</a> to
                   53909: <em>RCDATA</em> .</dd>
                   53910: <dt>If it is a <code><a href="#style1">style</a></code> ,
                   53911: <code><a href="#script1">script</a></code> , <code>xmp</code> ,
                   53912: <code><a href="#iframe">iframe</a></code> , <code>noembed</code> ,
                   53913: or <code>noframes</code> element</dt>
                   53914: <dd>Set the <a href="#content2">content model flag</a> to
                   53915: <em>CDATA</em> .</dd>
                   53916: <dt>If it is a <code><a href="#noscript">noscript</a></code>
                   53917: element</dt>
                   53918: <dd>If <ins class="diff-new">the</ins> <a href=
                   53919: "#scripting2">scripting <ins class="diff-new">flag</ins></a> is
                   53920: <del class="diff-old">enabled ,</del> <ins class=
                   53921: "diff-chg">enabled,</ins> set the <a href="#content2">content model
                   53922: flag</a> to <em>CDATA</em> . Otherwise, set the <a href=
                   53923: "#content2">content model flag</a> to <em>PCDATA</em> .</dd>
                   53924: <dt>If it is a <code>plaintext</code> element</dt>
                   53925: <dd>Set the <a href="#content2">content model flag</a> to
                   53926: <em>PLAINTEXT</em> .</dd>
                   53927: <dt>Otherwise</dt>
                   53928: <dd>Set the <a href="#content2">content model flag</a> to
                   53929: <em>PCDATA</em> .</dd>
                   53930: </dl>
                   53931: </li>
                   53932: <li>
                   53933: <p><del class="diff-old">Switch the HTML parser 's tree
                   53934: construction stage to the main phase .</del> Let <var title=
                   53935: "">root</var> be a new <code><a href="#html">html</a></code>
                   53936: element with no attributes.</p>
                   53937: </li>
                   53938: <li>
                   53939: <p>Append the element <var title="">root</var> to the
                   53940: <code>Document</code> node created above.</p>
                   53941: </li>
                   53942: <li>
                   53943: <p>Set up the parser's <a href="#stack">stack of open elements</a>
                   53944: so that it contains just the single element <var title=
                   53945: "">root</var> .</p>
                   53946: </li>
                   53947: <li>
                   53948: <p><a href="#reset" title=
                   53949: "reset the insertion mode appropriately">Reset the parser's
                   53950: insertion mode appropriately</a> .</p>
                   53951: <p class="note">The parser will reference the <var title=
                   53952: "">context</var> <del class="diff-old">node</del> <ins class=
                   53953: "diff-chg">element</ins> as part of that algorithm.</p>
                   53954: </li>
                   53955: <li>
                   53956: <p>Set the parser's <a href="#form-element"><code>form</code>
                   53957: element pointer</a> to the nearest node to the <var title=
                   53958: "">context</var> <ins class="diff-new">element</ins> that is a
                   53959: <code>form</code> element (going straight up the ancestor chain,
                   53960: and including the element itself, if it is a <code>form</code>
                   53961: element), or, if there is no such <code>form</code> element, to
                   53962: null.</p>
                   53963: </li>
                   53964: <li>
                   53965: <p>Place into the <a href="#input0">input stream</a> for the
                   53966: <a href="#html-0">HTML parser</a> just created the <var title=
                   53967: "">input</var> .</p>
                   53968: </li>
                   53969: <li>
                   53970: <p>Start the parser and let it run until it has consumed all the
                   53971: characters just inserted into the input stream.</p>
                   53972: </li>
                   53973: <li>
                   53974: <p>Return all the child nodes of <var title="">root</var> ,
                   53975: preserving the document order.</p>
                   53976: </li>
                   53977: </ol>
                   53978: <h3 id="named"><span class="secno"><del class="diff-old">8.6.</del>
                   53979: <ins class="diff-chg">8.6</ins></span> <del class=
                   53980: "diff-old">Entities</del> <dfn id="named0"><ins class=
                   53981: "diff-chg">Named character references</ins></dfn></h3>
                   53982: <p>This table lists the <del class="diff-old">entity</del>
                   53983: <ins class="diff-chg">character reference</ins> names that are
                   53984: supported by HTML, and the code points to which they refer. It is
                   53985: referenced by the previous sections.</p>
                   53986: <div class="tall-and-narrow">
                   53987: <table>
                   53988: <thead>
                   53989: <tr>
                   53990: <th><del class="diff-old">Entity</del> Name</th>
                   53991: <th>Character</th>
                   53992: </tr>
                   53993: </thead>
                   53994: <tbody>
                   53995: <tr>
                   53996: <td><code title="">AElig;</code></td>
                   53997: <td><del class="diff-old">U+00C6</del> <ins class=
                   53998: "diff-chg">U+000C6</ins></td>
                   53999: </tr>
                   54000: <tr>
                   54001: <td><code title="">AElig</code></td>
                   54002: <td><del class="diff-old">U+00C6</del> <ins class=
                   54003: "diff-chg">U+000C6</ins></td>
                   54004: </tr>
                   54005: <tr>
                   54006: <td><code title="">AMP;</code></td>
                   54007: <td><del class="diff-old">U+0026</del> <ins class=
                   54008: "diff-chg">U+00026</ins></td>
                   54009: </tr>
                   54010: <tr>
                   54011: <td><code title="">AMP</code></td>
                   54012: <td><del class="diff-old">U+0026</del> <ins class=
                   54013: "diff-chg">U+00026</ins></td>
                   54014: </tr>
                   54015: <tr>
                   54016: <td><code title="">Aacute;</code></td>
                   54017: <td><del class="diff-old">U+00C1</del> <ins class=
                   54018: "diff-chg">U+000C1</ins></td>
                   54019: </tr>
                   54020: <tr>
                   54021: <td><code title="">Aacute</code></td>
1.2     ! mike     54022: <td><del class="diff-old">U+00C1</del> <ins class=
        !          54023: "diff-chg">U+000C1</ins></td>
1.1       mike     54024: </tr>
                   54025: <tr>
1.2     ! mike     54026: <td><code title=""><ins class="diff-chg">Abreve;</ins></code></td>
        !          54027: <td><ins class="diff-chg">U+00102</ins></td>
1.1       mike     54028: </tr>
                   54029: <tr>
                   54030: <td><code title="">Acirc;</code></td>
                   54031: <td><del class="diff-old">U+00C2</del> <ins class=
                   54032: "diff-chg">U+000C2</ins></td>
                   54033: </tr>
                   54034: <tr>
                   54035: <td><code title="">Acirc</code></td>
                   54036: <td><del class="diff-old">U+00C2</del> <ins class=
                   54037: "diff-chg">U+000C2</ins></td>
                   54038: </tr>
                   54039: <tr>
                   54040: <td><code title=""><ins class="diff-chg">Acy;</ins></code></td>
                   54041: <td><ins class="diff-chg">U+00410</ins></td>
                   54042: </tr>
                   54043: <tr>
                   54044: <td><code title=""><ins class="diff-chg">Afr;</ins></code></td>
                   54045: <td><ins class="diff-chg">U+1D504</ins></td>
                   54046: </tr>
                   54047: <tr>
                   54048: <td><code title="">Agrave;</code></td>
                   54049: <td><del class="diff-old">U+00C0</del> <ins class=
                   54050: "diff-chg">U+000C0</ins></td>
                   54051: </tr>
                   54052: <tr>
                   54053: <td><code title="">Agrave</code></td>
                   54054: <td><del class="diff-old">U+00C0</del> <ins class=
                   54055: "diff-chg">U+000C0</ins></td>
                   54056: </tr>
                   54057: <tr>
                   54058: <td><code title="">Alpha;</code></td>
                   54059: <td><del class="diff-old">U+0391</del> <ins class=
                   54060: "diff-chg">U+00391</ins></td>
                   54061: </tr>
                   54062: <tr>
                   54063: <td><code title=""><ins class="diff-chg">Amacr;</ins></code></td>
                   54064: <td><ins class="diff-chg">U+00100</ins></td>
                   54065: </tr>
                   54066: <tr>
                   54067: <td><code title=""><ins class="diff-chg">And;</ins></code></td>
                   54068: <td><ins class="diff-chg">U+02A53</ins></td>
                   54069: </tr>
                   54070: <tr>
                   54071: <td><code title=""><ins class="diff-chg">Aogon;</ins></code></td>
                   54072: <td><ins class="diff-chg">U+00104</ins></td>
                   54073: </tr>
                   54074: <tr>
                   54075: <td><code title=""><ins class="diff-chg">Aopf;</ins></code></td>
                   54076: <td><ins class="diff-chg">U+1D538</ins></td>
                   54077: </tr>
                   54078: <tr>
                   54079: <td><code title=""><ins class=
                   54080: "diff-chg">ApplyFunction;</ins></code></td>
                   54081: <td><ins class="diff-chg">U+02061</ins></td>
                   54082: </tr>
                   54083: <tr>
                   54084: <td><code title="">Aring;</code></td>
                   54085: <td><del class="diff-old">U+00C5</del> <ins class=
                   54086: "diff-chg">U+000C5</ins></td>
                   54087: </tr>
                   54088: <tr>
                   54089: <td><code title="">Aring</code></td>
                   54090: <td><del class="diff-old">U+00C5</del> <ins class=
                   54091: "diff-chg">U+000C5</ins></td>
                   54092: </tr>
                   54093: <tr>
                   54094: <td><code title=""><ins class="diff-chg">Ascr;</ins></code></td>
                   54095: <td><ins class="diff-chg">U+1D49C</ins></td>
                   54096: </tr>
                   54097: <tr>
                   54098: <td><code title=""><ins class="diff-chg">Assign;</ins></code></td>
                   54099: <td><ins class="diff-chg">U+02254</ins></td>
                   54100: </tr>
                   54101: <tr>
                   54102: <td><code title="">Atilde;</code></td>
                   54103: <td><del class="diff-old">U+00C3</del> <ins class=
                   54104: "diff-chg">U+000C3</ins></td>
                   54105: </tr>
                   54106: <tr>
                   54107: <td><code title="">Atilde</code></td>
                   54108: <td><del class="diff-old">U+00C3</del> <ins class=
                   54109: "diff-chg">U+000C3</ins></td>
                   54110: </tr>
                   54111: <tr>
                   54112: <td><code title="">Auml;</code></td>
                   54113: <td><del class="diff-old">U+00C4</del> <ins class=
                   54114: "diff-chg">U+000C4</ins></td>
                   54115: </tr>
                   54116: <tr>
                   54117: <td><code title="">Auml</code></td>
                   54118: <td><del class="diff-old">U+00C4</del> <ins class=
                   54119: "diff-chg">U+000C4</ins></td>
                   54120: </tr>
                   54121: <tr>
                   54122: <td><code title=""><ins class=
                   54123: "diff-chg">Backslash;</ins></code></td>
                   54124: <td><ins class="diff-chg">U+02216</ins></td>
                   54125: </tr>
                   54126: <tr>
                   54127: <td><code title=""><ins class="diff-chg">Barv;</ins></code></td>
                   54128: <td><ins class="diff-chg">U+02AE7</ins></td>
                   54129: </tr>
                   54130: <tr>
                   54131: <td><code title=""><ins class="diff-chg">Barwed;</ins></code></td>
                   54132: <td><ins class="diff-chg">U+02306</ins></td>
                   54133: </tr>
                   54134: <tr>
                   54135: <td><code title=""><ins class="diff-chg">Bcy;</ins></code></td>
                   54136: <td><ins class="diff-chg">U+00411</ins></td>
                   54137: </tr>
                   54138: <tr>
                   54139: <td><code title=""><ins class="diff-chg">Because;</ins></code></td>
                   54140: <td><ins class="diff-chg">U+02235</ins></td>
                   54141: </tr>
                   54142: <tr>
                   54143: <td><code title=""><ins class=
                   54144: "diff-chg">Bernoullis;</ins></code></td>
                   54145: <td><ins class="diff-chg">U+0212C</ins></td>
                   54146: </tr>
                   54147: <tr>
                   54148: <td><code title="">Beta;</code></td>
                   54149: <td><del class="diff-old">U+0392</del> <ins class=
                   54150: "diff-chg">U+00392</ins></td>
                   54151: </tr>
                   54152: <tr>
                   54153: <td><code title=""><ins class="diff-chg">Bfr;</ins></code></td>
                   54154: <td><ins class="diff-chg">U+1D505</ins></td>
                   54155: </tr>
                   54156: <tr>
                   54157: <td><code title=""><ins class="diff-chg">Bopf;</ins></code></td>
                   54158: <td><ins class="diff-chg">U+1D539</ins></td>
                   54159: </tr>
                   54160: <tr>
                   54161: <td><code title=""><ins class="diff-chg">Breve;</ins></code></td>
                   54162: <td><ins class="diff-chg">U+002D8</ins></td>
                   54163: </tr>
                   54164: <tr>
                   54165: <td><code title=""><ins class="diff-chg">Bscr;</ins></code></td>
                   54166: <td><ins class="diff-chg">U+0212C</ins></td>
                   54167: </tr>
                   54168: <tr>
                   54169: <td><code title=""><ins class="diff-chg">Bumpeq;</ins></code></td>
                   54170: <td><ins class="diff-chg">U+0224E</ins></td>
                   54171: </tr>
                   54172: <tr>
                   54173: <td><code title=""><ins class="diff-chg">CHcy;</ins></code></td>
                   54174: <td><ins class="diff-chg">U+00427</ins></td>
                   54175: </tr>
                   54176: <tr>
                   54177: <td><code title="">COPY;</code></td>
                   54178: <td><del class="diff-old">U+00A9</del> <ins class=
                   54179: "diff-chg">U+000A9</ins></td>
                   54180: </tr>
                   54181: <tr>
                   54182: <td><code title="">COPY</code></td>
                   54183: <td><del class="diff-old">U+00A9</del> <ins class=
                   54184: "diff-chg">U+000A9</ins></td>
                   54185: </tr>
                   54186: <tr>
                   54187: <td><code title=""><ins class="diff-chg">Cacute;</ins></code></td>
                   54188: <td><ins class="diff-chg">U+00106</ins></td>
                   54189: </tr>
                   54190: <tr>
                   54191: <td><code title=""><ins class="diff-chg">Cap;</ins></code></td>
                   54192: <td><ins class="diff-chg">U+022D2</ins></td>
                   54193: </tr>
                   54194: <tr>
                   54195: <td><code title=""><ins class=
                   54196: "diff-chg">CapitalDifferentialD;</ins></code></td>
                   54197: <td><ins class="diff-chg">U+02145</ins></td>
                   54198: </tr>
                   54199: <tr>
                   54200: <td><code title=""><ins class="diff-chg">Cayleys;</ins></code></td>
                   54201: <td><ins class="diff-chg">U+0212D</ins></td>
                   54202: </tr>
                   54203: <tr>
                   54204: <td><code title=""><ins class="diff-chg">Ccaron;</ins></code></td>
                   54205: <td><ins class="diff-chg">U+0010C</ins></td>
                   54206: </tr>
                   54207: <tr>
                   54208: <td><code title="">Ccedil;</code></td>
                   54209: <td><del class="diff-old">U+00C7</del> <ins class=
                   54210: "diff-chg">U+000C7</ins></td>
                   54211: </tr>
                   54212: <tr>
                   54213: <td><code title="">Ccedil</code></td>
                   54214: <td><del class="diff-old">U+00C7</del> <ins class=
                   54215: "diff-chg">U+000C7</ins></td>
                   54216: </tr>
                   54217: <tr>
                   54218: <td><code title=""><ins class="diff-chg">Ccirc;</ins></code></td>
                   54219: <td><ins class="diff-chg">U+00108</ins></td>
                   54220: </tr>
                   54221: <tr>
                   54222: <td><code title=""><ins class="diff-chg">Cconint;</ins></code></td>
                   54223: <td><ins class="diff-chg">U+02230</ins></td>
                   54224: </tr>
                   54225: <tr>
                   54226: <td><code title=""><ins class="diff-chg">Cdot;</ins></code></td>
                   54227: <td><ins class="diff-chg">U+0010A</ins></td>
                   54228: </tr>
                   54229: <tr>
                   54230: <td><code title=""><ins class="diff-chg">Cedilla;</ins></code></td>
                   54231: <td><ins class="diff-chg">U+000B8</ins></td>
                   54232: </tr>
                   54233: <tr>
                   54234: <td><code title=""><ins class=
                   54235: "diff-chg">CenterDot;</ins></code></td>
                   54236: <td><ins class="diff-chg">U+000B7</ins></td>
                   54237: </tr>
                   54238: <tr>
                   54239: <td><code title=""><ins class="diff-chg">Cfr;</ins></code></td>
                   54240: <td><ins class="diff-chg">U+0212D</ins></td>
                   54241: </tr>
                   54242: <tr>
                   54243: <td><code title="">Chi;</code></td>
                   54244: <td><del class="diff-old">U+03A7</del> <ins class=
                   54245: "diff-chg">U+003A7</ins></td>
                   54246: </tr>
                   54247: <tr>
                   54248: <td><code title=""><ins class=
                   54249: "diff-chg">CircleDot;</ins></code></td>
                   54250: <td><ins class="diff-chg">U+02299</ins></td>
                   54251: </tr>
                   54252: <tr>
                   54253: <td><code title=""><ins class=
                   54254: "diff-chg">CircleMinus;</ins></code></td>
                   54255: <td><ins class="diff-chg">U+02296</ins></td>
                   54256: </tr>
                   54257: <tr>
                   54258: <td><code title=""><ins class=
                   54259: "diff-chg">CirclePlus;</ins></code></td>
                   54260: <td><ins class="diff-chg">U+02295</ins></td>
                   54261: </tr>
                   54262: <tr>
                   54263: <td><code title=""><ins class=
                   54264: "diff-chg">CircleTimes;</ins></code></td>
                   54265: <td><ins class="diff-chg">U+02297</ins></td>
                   54266: </tr>
                   54267: <tr>
                   54268: <td><code title=""><ins class=
                   54269: "diff-chg">ClockwiseContourIntegral;</ins></code></td>
                   54270: <td><ins class="diff-chg">U+02232</ins></td>
                   54271: </tr>
                   54272: <tr>
                   54273: <td><code title=""><ins class=
                   54274: "diff-chg">CloseCurlyDoubleQuote;</ins></code></td>
                   54275: <td><ins class="diff-chg">U+0201D</ins></td>
                   54276: </tr>
                   54277: <tr>
                   54278: <td><code title=""><ins class=
                   54279: "diff-chg">CloseCurlyQuote;</ins></code></td>
                   54280: <td><ins class="diff-chg">U+02019</ins></td>
                   54281: </tr>
                   54282: <tr>
                   54283: <td><code title=""><ins class="diff-chg">Colon;</ins></code></td>
                   54284: <td><ins class="diff-chg">U+02237</ins></td>
                   54285: </tr>
                   54286: <tr>
                   54287: <td><code title=""><ins class="diff-chg">Colone;</ins></code></td>
                   54288: <td><ins class="diff-chg">U+02A74</ins></td>
                   54289: </tr>
                   54290: <tr>
                   54291: <td><code title=""><ins class=
                   54292: "diff-chg">Congruent;</ins></code></td>
                   54293: <td><ins class="diff-chg">U+02261</ins></td>
                   54294: </tr>
                   54295: <tr>
                   54296: <td><code title=""><ins class="diff-chg">Conint;</ins></code></td>
                   54297: <td><ins class="diff-chg">U+0222F</ins></td>
                   54298: </tr>
                   54299: <tr>
                   54300: <td><code title=""><ins class=
                   54301: "diff-chg">ContourIntegral;</ins></code></td>
                   54302: <td><ins class="diff-chg">U+0222E</ins></td>
                   54303: </tr>
                   54304: <tr>
                   54305: <td><code title=""><ins class="diff-chg">Copf;</ins></code></td>
                   54306: <td><ins class="diff-chg">U+02102</ins></td>
                   54307: </tr>
                   54308: <tr>
                   54309: <td><code title=""><ins class=
                   54310: "diff-chg">Coproduct;</ins></code></td>
                   54311: <td><ins class="diff-chg">U+02210</ins></td>
                   54312: </tr>
                   54313: <tr>
                   54314: <td><code title=""><ins class=
                   54315: "diff-chg">CounterClockwiseContourIntegral;</ins></code></td>
                   54316: <td><ins class="diff-chg">U+02233</ins></td>
                   54317: </tr>
                   54318: <tr>
                   54319: <td><code title=""><ins class="diff-chg">Cross;</ins></code></td>
                   54320: <td><ins class="diff-chg">U+02A2F</ins></td>
                   54321: </tr>
                   54322: <tr>
                   54323: <td><code title=""><ins class="diff-chg">Cscr;</ins></code></td>
                   54324: <td><ins class="diff-chg">U+1D49E</ins></td>
                   54325: </tr>
                   54326: <tr>
                   54327: <td><code title=""><ins class="diff-chg">Cup;</ins></code></td>
                   54328: <td><ins class="diff-chg">U+022D3</ins></td>
                   54329: </tr>
                   54330: <tr>
                   54331: <td><code title=""><ins class="diff-chg">CupCap;</ins></code></td>
                   54332: <td><ins class="diff-chg">U+0224D</ins></td>
                   54333: </tr>
                   54334: <tr>
                   54335: <td><code title=""><ins class="diff-chg">DD;</ins></code></td>
                   54336: <td><ins class="diff-chg">U+02145</ins></td>
                   54337: </tr>
                   54338: <tr>
                   54339: <td><code title=""><ins class=
                   54340: "diff-chg">DDotrahd;</ins></code></td>
                   54341: <td><ins class="diff-chg">U+02911</ins></td>
                   54342: </tr>
                   54343: <tr>
                   54344: <td><code title=""><ins class="diff-chg">DJcy;</ins></code></td>
                   54345: <td><ins class="diff-chg">U+00402</ins></td>
                   54346: </tr>
                   54347: <tr>
                   54348: <td><code title=""><ins class="diff-chg">DScy;</ins></code></td>
                   54349: <td><ins class="diff-chg">U+00405</ins></td>
                   54350: </tr>
                   54351: <tr>
                   54352: <td><code title=""><ins class="diff-chg">DZcy;</ins></code></td>
                   54353: <td><ins class="diff-chg">U+0040F</ins></td>
                   54354: </tr>
                   54355: <tr>
                   54356: <td><code title="">Dagger;</code></td>
                   54357: <td><del class="diff-old">U+2021</del> <ins class=
                   54358: "diff-chg">U+02021</ins></td>
                   54359: </tr>
                   54360: <tr>
                   54361: <td><code title=""><ins class="diff-chg">Darr;</ins></code></td>
                   54362: <td><ins class="diff-chg">U+021A1</ins></td>
                   54363: </tr>
                   54364: <tr>
                   54365: <td><code title=""><ins class="diff-chg">Dashv;</ins></code></td>
                   54366: <td><ins class="diff-chg">U+02AE4</ins></td>
                   54367: </tr>
                   54368: <tr>
                   54369: <td><code title=""><ins class="diff-chg">Dcaron;</ins></code></td>
                   54370: <td><ins class="diff-chg">U+0010E</ins></td>
                   54371: </tr>
                   54372: <tr>
                   54373: <td><code title=""><ins class="diff-chg">Dcy;</ins></code></td>
                   54374: <td><ins class="diff-chg">U+00414</ins></td>
                   54375: </tr>
                   54376: <tr>
                   54377: <td><code title=""><ins class="diff-chg">Del;</ins></code></td>
                   54378: <td><ins class="diff-chg">U+02207</ins></td>
                   54379: </tr>
                   54380: <tr>
                   54381: <td><code title="">Delta;</code></td>
                   54382: <td><del class="diff-old">U+0394</del> <ins class=
                   54383: "diff-chg">U+00394</ins></td>
                   54384: </tr>
                   54385: <tr>
                   54386: <td><code title=""><ins class="diff-chg">Dfr;</ins></code></td>
                   54387: <td><ins class="diff-chg">U+1D507</ins></td>
                   54388: </tr>
                   54389: <tr>
                   54390: <td><code title=""><ins class=
                   54391: "diff-chg">DiacriticalAcute;</ins></code></td>
                   54392: <td><ins class="diff-chg">U+000B4</ins></td>
                   54393: </tr>
                   54394: <tr>
                   54395: <td><code title=""><ins class=
                   54396: "diff-chg">DiacriticalDot;</ins></code></td>
                   54397: <td><ins class="diff-chg">U+002D9</ins></td>
                   54398: </tr>
                   54399: <tr>
                   54400: <td><code title=""><ins class=
                   54401: "diff-chg">DiacriticalDoubleAcute;</ins></code></td>
                   54402: <td><ins class="diff-chg">U+002DD</ins></td>
                   54403: </tr>
                   54404: <tr>
                   54405: <td><code title=""><ins class=
                   54406: "diff-chg">DiacriticalGrave;</ins></code></td>
                   54407: <td><ins class="diff-chg">U+00060</ins></td>
                   54408: </tr>
                   54409: <tr>
                   54410: <td><code title=""><ins class=
                   54411: "diff-chg">DiacriticalTilde;</ins></code></td>
                   54412: <td><ins class="diff-chg">U+002DC</ins></td>
                   54413: </tr>
                   54414: <tr>
                   54415: <td><code title=""><ins class="diff-chg">Diamond;</ins></code></td>
                   54416: <td><ins class="diff-chg">U+022C4</ins></td>
                   54417: </tr>
                   54418: <tr>
                   54419: <td><code title=""><ins class=
                   54420: "diff-chg">DifferentialD;</ins></code></td>
                   54421: <td><ins class="diff-chg">U+02146</ins></td>
                   54422: </tr>
                   54423: <tr>
                   54424: <td><code title=""><ins class="diff-chg">Dopf;</ins></code></td>
                   54425: <td><ins class="diff-chg">U+1D53B</ins></td>
                   54426: </tr>
                   54427: <tr>
                   54428: <td><code title=""><ins class="diff-chg">Dot;</ins></code></td>
                   54429: <td><ins class="diff-chg">U+000A8</ins></td>
                   54430: </tr>
                   54431: <tr>
                   54432: <td><code title=""><ins class="diff-chg">DotDot;</ins></code></td>
                   54433: <td><ins class="diff-chg">U+020DC</ins></td>
                   54434: </tr>
                   54435: <tr>
                   54436: <td><code title=""><ins class=
                   54437: "diff-chg">DotEqual;</ins></code></td>
                   54438: <td><ins class="diff-chg">U+02250</ins></td>
                   54439: </tr>
                   54440: <tr>
                   54441: <td><code title=""><ins class=
                   54442: "diff-chg">DoubleContourIntegral;</ins></code></td>
                   54443: <td><ins class="diff-chg">U+0222F</ins></td>
                   54444: </tr>
                   54445: <tr>
                   54446: <td><code title=""><ins class=
                   54447: "diff-chg">DoubleDot;</ins></code></td>
                   54448: <td><ins class="diff-chg">U+000A8</ins></td>
                   54449: </tr>
                   54450: <tr>
                   54451: <td><code title=""><ins class=
                   54452: "diff-chg">DoubleDownArrow;</ins></code></td>
                   54453: <td><ins class="diff-chg">U+021D3</ins></td>
                   54454: </tr>
                   54455: <tr>
                   54456: <td><code title=""><ins class=
                   54457: "diff-chg">DoubleLeftArrow;</ins></code></td>
                   54458: <td><ins class="diff-chg">U+021D0</ins></td>
                   54459: </tr>
                   54460: <tr>
                   54461: <td><code title=""><ins class=
                   54462: "diff-chg">DoubleLeftRightArrow;</ins></code></td>
                   54463: <td><ins class="diff-chg">U+021D4</ins></td>
                   54464: </tr>
                   54465: <tr>
                   54466: <td><code title=""><ins class=
                   54467: "diff-chg">DoubleLeftTee;</ins></code></td>
                   54468: <td><ins class="diff-chg">U+02AE4</ins></td>
                   54469: </tr>
                   54470: <tr>
                   54471: <td><code title=""><ins class=
                   54472: "diff-chg">DoubleLongLeftArrow;</ins></code></td>
                   54473: <td><ins class="diff-chg">U+027F8</ins></td>
                   54474: </tr>
                   54475: <tr>
                   54476: <td><code title=""><ins class=
                   54477: "diff-chg">DoubleLongLeftRightArrow;</ins></code></td>
                   54478: <td><ins class="diff-chg">U+027FA</ins></td>
                   54479: </tr>
                   54480: <tr>
                   54481: <td><code title=""><ins class=
                   54482: "diff-chg">DoubleLongRightArrow;</ins></code></td>
                   54483: <td><ins class="diff-chg">U+027F9</ins></td>
                   54484: </tr>
                   54485: <tr>
                   54486: <td><code title=""><ins class=
                   54487: "diff-chg">DoubleRightArrow;</ins></code></td>
                   54488: <td><ins class="diff-chg">U+021D2</ins></td>
                   54489: </tr>
                   54490: <tr>
                   54491: <td><code title=""><ins class=
                   54492: "diff-chg">DoubleRightTee;</ins></code></td>
                   54493: <td><ins class="diff-chg">U+022A8</ins></td>
                   54494: </tr>
                   54495: <tr>
                   54496: <td><code title=""><ins class=
                   54497: "diff-chg">DoubleUpArrow;</ins></code></td>
                   54498: <td><ins class="diff-chg">U+021D1</ins></td>
                   54499: </tr>
                   54500: <tr>
                   54501: <td><code title=""><ins class=
                   54502: "diff-chg">DoubleUpDownArrow;</ins></code></td>
                   54503: <td><ins class="diff-chg">U+021D5</ins></td>
                   54504: </tr>
                   54505: <tr>
                   54506: <td><code title=""><ins class=
                   54507: "diff-chg">DoubleVerticalBar;</ins></code></td>
                   54508: <td><ins class="diff-chg">U+02225</ins></td>
                   54509: </tr>
                   54510: <tr>
                   54511: <td><code title=""><ins class=
                   54512: "diff-chg">DownArrow;</ins></code></td>
                   54513: <td><ins class="diff-chg">U+02193</ins></td>
                   54514: </tr>
                   54515: <tr>
                   54516: <td><code title=""><ins class=
                   54517: "diff-chg">DownArrowBar;</ins></code></td>
                   54518: <td><ins class="diff-chg">U+02913</ins></td>
                   54519: </tr>
                   54520: <tr>
                   54521: <td><code title=""><ins class=
                   54522: "diff-chg">DownArrowUpArrow;</ins></code></td>
                   54523: <td><ins class="diff-chg">U+021F5</ins></td>
                   54524: </tr>
                   54525: <tr>
                   54526: <td><code title=""><ins class=
                   54527: "diff-chg">DownBreve;</ins></code></td>
                   54528: <td><ins class="diff-chg">U+00311</ins></td>
                   54529: </tr>
                   54530: <tr>
                   54531: <td><code title=""><ins class=
                   54532: "diff-chg">DownLeftRightVector;</ins></code></td>
                   54533: <td><ins class="diff-chg">U+02950</ins></td>
                   54534: </tr>
                   54535: <tr>
                   54536: <td><code title=""><ins class=
                   54537: "diff-chg">DownLeftTeeVector;</ins></code></td>
                   54538: <td><ins class="diff-chg">U+0295E</ins></td>
                   54539: </tr>
                   54540: <tr>
                   54541: <td><code title=""><ins class=
                   54542: "diff-chg">DownLeftVector;</ins></code></td>
                   54543: <td><ins class="diff-chg">U+021BD</ins></td>
                   54544: </tr>
                   54545: <tr>
                   54546: <td><code title=""><ins class=
                   54547: "diff-chg">DownLeftVectorBar;</ins></code></td>
                   54548: <td><ins class="diff-chg">U+02956</ins></td>
                   54549: </tr>
                   54550: <tr>
                   54551: <td><code title=""><ins class=
                   54552: "diff-chg">DownRightTeeVector;</ins></code></td>
                   54553: <td><ins class="diff-chg">U+0295F</ins></td>
                   54554: </tr>
                   54555: <tr>
                   54556: <td><code title=""><ins class=
                   54557: "diff-chg">DownRightVector;</ins></code></td>
                   54558: <td><ins class="diff-chg">U+021C1</ins></td>
                   54559: </tr>
                   54560: <tr>
                   54561: <td><code title=""><ins class=
                   54562: "diff-chg">DownRightVectorBar;</ins></code></td>
                   54563: <td><ins class="diff-chg">U+02957</ins></td>
                   54564: </tr>
                   54565: <tr>
                   54566: <td><code title=""><ins class="diff-chg">DownTee;</ins></code></td>
                   54567: <td><ins class="diff-chg">U+022A4</ins></td>
                   54568: </tr>
                   54569: <tr>
                   54570: <td><code title=""><ins class=
                   54571: "diff-chg">DownTeeArrow;</ins></code></td>
                   54572: <td><ins class="diff-chg">U+021A7</ins></td>
                   54573: </tr>
                   54574: <tr>
                   54575: <td><code title=""><ins class=
                   54576: "diff-chg">Downarrow;</ins></code></td>
                   54577: <td><ins class="diff-chg">U+021D3</ins></td>
                   54578: </tr>
                   54579: <tr>
                   54580: <td><code title=""><ins class="diff-chg">Dscr;</ins></code></td>
                   54581: <td><ins class="diff-chg">U+1D49F</ins></td>
                   54582: </tr>
                   54583: <tr>
                   54584: <td><code title=""><ins class="diff-chg">Dstrok;</ins></code></td>
                   54585: <td><ins class="diff-chg">U+00110</ins></td>
                   54586: </tr>
                   54587: <tr>
                   54588: <td><code title=""><ins class="diff-chg">ENG;</ins></code></td>
                   54589: <td><ins class="diff-chg">U+0014A</ins></td>
                   54590: </tr>
                   54591: <tr>
                   54592: <td><code title="">ETH;</code></td>
                   54593: <td><del class="diff-old">U+00D0</del> <ins class=
                   54594: "diff-chg">U+000D0</ins></td>
                   54595: </tr>
                   54596: <tr>
                   54597: <td><code title="">ETH</code></td>
                   54598: <td><del class="diff-old">U+00D0</del> <ins class=
                   54599: "diff-chg">U+000D0</ins></td>
                   54600: </tr>
                   54601: <tr>
                   54602: <td><code title="">Eacute;</code></td>
                   54603: <td><del class="diff-old">U+00C9</del> <ins class=
                   54604: "diff-chg">U+000C9</ins></td>
                   54605: </tr>
                   54606: <tr>
                   54607: <td><code title="">Eacute</code></td>
                   54608: <td><del class="diff-old">U+00C9</del> <ins class=
                   54609: "diff-chg">U+000C9</ins></td>
                   54610: </tr>
                   54611: <tr>
                   54612: <td><code title=""><ins class="diff-chg">Ecaron;</ins></code></td>
                   54613: <td><ins class="diff-chg">U+0011A</ins></td>
                   54614: </tr>
                   54615: <tr>
                   54616: <td><code title="">Ecirc;</code></td>
                   54617: <td><del class="diff-old">U+00CA</del> <ins class=
                   54618: "diff-chg">U+000CA</ins></td>
                   54619: </tr>
                   54620: <tr>
                   54621: <td><code title="">Ecirc</code></td>
                   54622: <td><del class="diff-old">U+00CA</del> <ins class=
                   54623: "diff-chg">U+000CA</ins></td>
                   54624: </tr>
                   54625: <tr>
                   54626: <td><code title=""><ins class="diff-chg">Ecy;</ins></code></td>
                   54627: <td><ins class="diff-chg">U+0042D</ins></td>
                   54628: </tr>
                   54629: <tr>
                   54630: <td><code title=""><ins class="diff-chg">Edot;</ins></code></td>
                   54631: <td><ins class="diff-chg">U+00116</ins></td>
                   54632: </tr>
                   54633: <tr>
                   54634: <td><code title=""><ins class="diff-chg">Efr;</ins></code></td>
                   54635: <td><ins class="diff-chg">U+1D508</ins></td>
                   54636: </tr>
                   54637: <tr>
                   54638: <td><code title="">Egrave;</code></td>
                   54639: <td><del class="diff-old">U+00C8</del> <ins class=
                   54640: "diff-chg">U+000C8</ins></td>
                   54641: </tr>
                   54642: <tr>
                   54643: <td><code title="">Egrave</code></td>
                   54644: <td><del class="diff-old">U+00C8</del> <ins class=
                   54645: "diff-chg">U+000C8</ins></td>
                   54646: </tr>
                   54647: <tr>
                   54648: <td><code title=""><ins class="diff-chg">Element;</ins></code></td>
                   54649: <td><ins class="diff-chg">U+02208</ins></td>
                   54650: </tr>
                   54651: <tr>
                   54652: <td><code title=""><ins class="diff-chg">Emacr;</ins></code></td>
                   54653: <td><ins class="diff-chg">U+00112</ins></td>
                   54654: </tr>
                   54655: <tr>
                   54656: <td><code title=""><ins class=
                   54657: "diff-chg">EmptySmallSquare;</ins></code></td>
                   54658: <td><ins class="diff-chg">U+025FB</ins></td>
                   54659: </tr>
                   54660: <tr>
                   54661: <td><code title=""><ins class=
                   54662: "diff-chg">EmptyVerySmallSquare;</ins></code></td>
                   54663: <td><ins class="diff-chg">U+025AB</ins></td>
                   54664: </tr>
                   54665: <tr>
                   54666: <td><code title=""><ins class="diff-chg">Eogon;</ins></code></td>
                   54667: <td><ins class="diff-chg">U+00118</ins></td>
                   54668: </tr>
                   54669: <tr>
                   54670: <td><code title=""><ins class="diff-chg">Eopf;</ins></code></td>
                   54671: <td><ins class="diff-chg">U+1D53C</ins></td>
                   54672: </tr>
                   54673: <tr>
                   54674: <td><code title="">Epsilon;</code></td>
                   54675: <td><del class="diff-old">U+0395</del> <ins class=
                   54676: "diff-chg">U+00395</ins></td>
                   54677: </tr>
                   54678: <tr>
                   54679: <td><code title=""><ins class="diff-chg">Equal;</ins></code></td>
                   54680: <td><ins class="diff-chg">U+02A75</ins></td>
                   54681: </tr>
                   54682: <tr>
                   54683: <td><code title=""><ins class=
                   54684: "diff-chg">EqualTilde;</ins></code></td>
                   54685: <td><ins class="diff-chg">U+02242</ins></td>
                   54686: </tr>
                   54687: <tr>
                   54688: <td><code title=""><ins class=
                   54689: "diff-chg">Equilibrium;</ins></code></td>
                   54690: <td><ins class="diff-chg">U+021CC</ins></td>
                   54691: </tr>
                   54692: <tr>
                   54693: <td><code title=""><ins class="diff-chg">Escr;</ins></code></td>
                   54694: <td><ins class="diff-chg">U+02130</ins></td>
                   54695: </tr>
                   54696: <tr>
                   54697: <td><code title=""><ins class="diff-chg">Esim;</ins></code></td>
                   54698: <td><ins class="diff-chg">U+02A73</ins></td>
                   54699: </tr>
                   54700: <tr>
                   54701: <td><code title="">Eta;</code></td>
                   54702: <td><del class="diff-old">U+0397</del> <ins class=
                   54703: "diff-chg">U+00397</ins></td>
                   54704: </tr>
                   54705: <tr>
                   54706: <td><code title="">Euml;</code></td>
                   54707: <td><del class="diff-old">U+00CB</del> <ins class=
                   54708: "diff-chg">U+000CB</ins></td>
                   54709: </tr>
                   54710: <tr>
                   54711: <td><code title="">Euml</code></td>
                   54712: <td><del class="diff-old">U+00CB</del> <ins class=
                   54713: "diff-chg">U+000CB</ins></td>
                   54714: </tr>
                   54715: <tr>
                   54716: <td><code title=""><ins class="diff-chg">Exists;</ins></code></td>
                   54717: <td><ins class="diff-chg">U+02203</ins></td>
                   54718: </tr>
                   54719: <tr>
                   54720: <td><code title=""><ins class=
                   54721: "diff-chg">ExponentialE;</ins></code></td>
                   54722: <td><ins class="diff-chg">U+02147</ins></td>
                   54723: </tr>
                   54724: <tr>
                   54725: <td><code title=""><ins class="diff-chg">Fcy;</ins></code></td>
                   54726: <td><ins class="diff-chg">U+00424</ins></td>
                   54727: </tr>
                   54728: <tr>
                   54729: <td><code title=""><ins class="diff-chg">Ffr;</ins></code></td>
                   54730: <td><ins class="diff-chg">U+1D509</ins></td>
                   54731: </tr>
                   54732: <tr>
                   54733: <td><code title=""><ins class=
                   54734: "diff-chg">FilledSmallSquare;</ins></code></td>
                   54735: <td><ins class="diff-chg">U+025FC</ins></td>
                   54736: </tr>
                   54737: <tr>
                   54738: <td><code title=""><ins class=
                   54739: "diff-chg">FilledVerySmallSquare;</ins></code></td>
                   54740: <td><ins class="diff-chg">U+025AA</ins></td>
                   54741: </tr>
                   54742: <tr>
                   54743: <td><code title=""><ins class="diff-chg">Fopf;</ins></code></td>
                   54744: <td><ins class="diff-chg">U+1D53D</ins></td>
                   54745: </tr>
                   54746: <tr>
                   54747: <td><code title=""><ins class="diff-chg">ForAll;</ins></code></td>
                   54748: <td><ins class="diff-chg">U+02200</ins></td>
                   54749: </tr>
                   54750: <tr>
                   54751: <td><code title=""><ins class=
                   54752: "diff-chg">Fouriertrf;</ins></code></td>
                   54753: <td><ins class="diff-chg">U+02131</ins></td>
                   54754: </tr>
                   54755: <tr>
                   54756: <td><code title=""><ins class="diff-chg">Fscr;</ins></code></td>
                   54757: <td><ins class="diff-chg">U+02131</ins></td>
                   54758: </tr>
                   54759: <tr>
                   54760: <td><code title=""><ins class="diff-chg">GJcy;</ins></code></td>
                   54761: <td><ins class="diff-chg">U+00403</ins></td>
                   54762: </tr>
                   54763: <tr>
                   54764: <td><code title="">GT;</code></td>
                   54765: <td><del class="diff-old">U+003E</del> <ins class=
                   54766: "diff-chg">U+0003E</ins></td>
                   54767: </tr>
                   54768: <tr>
                   54769: <td><code title="">GT</code></td>
                   54770: <td><del class="diff-old">U+003E</del> <ins class=
                   54771: "diff-chg">U+0003E</ins></td>
                   54772: </tr>
                   54773: <tr>
                   54774: <td><code title="">Gamma;</code></td>
                   54775: <td><del class="diff-old">U+0393</del> <ins class=
                   54776: "diff-chg">U+00393</ins></td>
                   54777: </tr>
                   54778: <tr>
                   54779: <td><code title=""><ins class="diff-chg">Gammad;</ins></code></td>
                   54780: <td><ins class="diff-chg">U+003DC</ins></td>
                   54781: </tr>
                   54782: <tr>
                   54783: <td><code title=""><ins class="diff-chg">Gbreve;</ins></code></td>
                   54784: <td><ins class="diff-chg">U+0011E</ins></td>
                   54785: </tr>
                   54786: <tr>
                   54787: <td><code title=""><ins class="diff-chg">Gcedil;</ins></code></td>
                   54788: <td><ins class="diff-chg">U+00122</ins></td>
                   54789: </tr>
                   54790: <tr>
                   54791: <td><code title=""><ins class="diff-chg">Gcirc;</ins></code></td>
                   54792: <td><ins class="diff-chg">U+0011C</ins></td>
                   54793: </tr>
                   54794: <tr>
                   54795: <td><code title=""><ins class="diff-chg">Gcy;</ins></code></td>
                   54796: <td><ins class="diff-chg">U+00413</ins></td>
                   54797: </tr>
                   54798: <tr>
                   54799: <td><code title=""><ins class="diff-chg">Gdot;</ins></code></td>
                   54800: <td><ins class="diff-chg">U+00120</ins></td>
                   54801: </tr>
                   54802: <tr>
                   54803: <td><code title=""><ins class="diff-chg">Gfr;</ins></code></td>
                   54804: <td><ins class="diff-chg">U+1D50A</ins></td>
                   54805: </tr>
                   54806: <tr>
                   54807: <td><code title=""><ins class="diff-chg">Gg;</ins></code></td>
                   54808: <td><ins class="diff-chg">U+022D9</ins></td>
                   54809: </tr>
                   54810: <tr>
                   54811: <td><code title=""><ins class="diff-chg">Gopf;</ins></code></td>
                   54812: <td><ins class="diff-chg">U+1D53E</ins></td>
                   54813: </tr>
                   54814: <tr>
                   54815: <td><code title=""><ins class=
                   54816: "diff-chg">GreaterEqual;</ins></code></td>
                   54817: <td><ins class="diff-chg">U+02265</ins></td>
                   54818: </tr>
                   54819: <tr>
                   54820: <td><code title=""><ins class=
                   54821: "diff-chg">GreaterEqualLess;</ins></code></td>
                   54822: <td><ins class="diff-chg">U+022DB</ins></td>
                   54823: </tr>
                   54824: <tr>
                   54825: <td><code title=""><ins class=
                   54826: "diff-chg">GreaterFullEqual;</ins></code></td>
                   54827: <td><ins class="diff-chg">U+02267</ins></td>
                   54828: </tr>
                   54829: <tr>
                   54830: <td><code title=""><ins class=
                   54831: "diff-chg">GreaterGreater;</ins></code></td>
                   54832: <td><ins class="diff-chg">U+02AA2</ins></td>
                   54833: </tr>
                   54834: <tr>
                   54835: <td><code title=""><ins class=
                   54836: "diff-chg">GreaterLess;</ins></code></td>
                   54837: <td><ins class="diff-chg">U+02277</ins></td>
                   54838: </tr>
                   54839: <tr>
                   54840: <td><code title=""><ins class=
                   54841: "diff-chg">GreaterSlantEqual;</ins></code></td>
                   54842: <td><ins class="diff-chg">U+02A7E</ins></td>
                   54843: </tr>
                   54844: <tr>
                   54845: <td><code title=""><ins class=
                   54846: "diff-chg">GreaterTilde;</ins></code></td>
                   54847: <td><ins class="diff-chg">U+02273</ins></td>
                   54848: </tr>
                   54849: <tr>
                   54850: <td><code title=""><ins class="diff-chg">Gscr;</ins></code></td>
                   54851: <td><ins class="diff-chg">U+1D4A2</ins></td>
                   54852: </tr>
                   54853: <tr>
                   54854: <td><code title=""><ins class="diff-chg">Gt;</ins></code></td>
                   54855: <td><ins class="diff-chg">U+0226B</ins></td>
                   54856: </tr>
                   54857: <tr>
                   54858: <td><code title=""><ins class="diff-chg">HARDcy;</ins></code></td>
                   54859: <td><ins class="diff-chg">U+0042A</ins></td>
                   54860: </tr>
                   54861: <tr>
                   54862: <td><code title=""><ins class="diff-chg">Hacek;</ins></code></td>
                   54863: <td><ins class="diff-chg">U+002C7</ins></td>
                   54864: </tr>
                   54865: <tr>
                   54866: <td><code title=""><ins class="diff-chg">Hat;</ins></code></td>
                   54867: <td><ins class="diff-chg">U+0005E</ins></td>
                   54868: </tr>
                   54869: <tr>
                   54870: <td><code title=""><ins class="diff-chg">Hcirc;</ins></code></td>
                   54871: <td><ins class="diff-chg">U+00124</ins></td>
                   54872: </tr>
                   54873: <tr>
                   54874: <td><code title=""><ins class="diff-chg">Hfr;</ins></code></td>
                   54875: <td><ins class="diff-chg">U+0210C</ins></td>
                   54876: </tr>
                   54877: <tr>
                   54878: <td><code title=""><ins class=
                   54879: "diff-chg">HilbertSpace;</ins></code></td>
                   54880: <td><ins class="diff-chg">U+0210B</ins></td>
                   54881: </tr>
                   54882: <tr>
                   54883: <td><code title=""><ins class="diff-chg">Hopf;</ins></code></td>
                   54884: <td><ins class="diff-chg">U+0210D</ins></td>
                   54885: </tr>
                   54886: <tr>
                   54887: <td><code title=""><ins class=
                   54888: "diff-chg">HorizontalLine;</ins></code></td>
                   54889: <td><ins class="diff-chg">U+02500</ins></td>
                   54890: </tr>
                   54891: <tr>
                   54892: <td><code title=""><ins class="diff-chg">Hscr;</ins></code></td>
                   54893: <td><ins class="diff-chg">U+0210B</ins></td>
                   54894: </tr>
                   54895: <tr>
                   54896: <td><code title=""><ins class="diff-chg">Hstrok;</ins></code></td>
                   54897: <td><ins class="diff-chg">U+00126</ins></td>
                   54898: </tr>
                   54899: <tr>
                   54900: <td><code title=""><ins class=
                   54901: "diff-chg">HumpDownHump;</ins></code></td>
                   54902: <td><ins class="diff-chg">U+0224E</ins></td>
                   54903: </tr>
                   54904: <tr>
                   54905: <td><code title=""><ins class=
                   54906: "diff-chg">HumpEqual;</ins></code></td>
                   54907: <td><ins class="diff-chg">U+0224F</ins></td>
                   54908: </tr>
                   54909: <tr>
                   54910: <td><code title=""><ins class="diff-chg">IEcy;</ins></code></td>
                   54911: <td><ins class="diff-chg">U+00415</ins></td>
                   54912: </tr>
                   54913: <tr>
                   54914: <td><code title=""><ins class="diff-chg">IJlig;</ins></code></td>
                   54915: <td><ins class="diff-chg">U+00132</ins></td>
                   54916: </tr>
                   54917: <tr>
                   54918: <td><code title=""><ins class="diff-chg">IOcy;</ins></code></td>
                   54919: <td><ins class="diff-chg">U+00401</ins></td>
                   54920: </tr>
                   54921: <tr>
                   54922: <td><code title="">Iacute;</code></td>
                   54923: <td><del class="diff-old">U+00CD</del> <ins class=
                   54924: "diff-chg">U+000CD</ins></td>
                   54925: </tr>
                   54926: <tr>
                   54927: <td><code title="">Iacute</code></td>
                   54928: <td><del class="diff-old">U+00CD</del> <ins class=
                   54929: "diff-chg">U+000CD</ins></td>
                   54930: </tr>
                   54931: <tr>
                   54932: <td><code title="">Icirc;</code></td>
                   54933: <td><del class="diff-old">U+00CE</del> <ins class=
                   54934: "diff-chg">U+000CE</ins></td>
                   54935: </tr>
                   54936: <tr>
                   54937: <td><code title="">Icirc</code></td>
1.2     ! mike     54938: <td><del class="diff-old">U+00CE</del> <ins class=
        !          54939: "diff-chg">U+000CE</ins></td>
1.1       mike     54940: </tr>
                   54941: <tr>
1.2     ! mike     54942: <td><code title=""><ins class="diff-chg">Icy;</ins></code></td>
        !          54943: <td><ins class="diff-chg">U+00418</ins></td>
1.1       mike     54944: </tr>
                   54945: <tr>
                   54946: <td><code title=""><ins class="diff-chg">Idot;</ins></code></td>
                   54947: <td><ins class="diff-chg">U+00130</ins></td>
                   54948: </tr>
                   54949: <tr>
                   54950: <td><code title=""><ins class="diff-chg">Ifr;</ins></code></td>
                   54951: <td><ins class="diff-chg">U+02111</ins></td>
                   54952: </tr>
                   54953: <tr>
                   54954: <td><code title="">Igrave;</code></td>
                   54955: <td><del class="diff-old">U+00CC</del> <ins class=
                   54956: "diff-chg">U+000CC</ins></td>
                   54957: </tr>
                   54958: <tr>
                   54959: <td><code title="">Igrave</code></td>
                   54960: <td><del class="diff-old">U+00CC</del> <ins class=
                   54961: "diff-chg">U+000CC</ins></td>
                   54962: </tr>
                   54963: <tr>
                   54964: <td><code title=""><ins class="diff-chg">Im;</ins></code></td>
                   54965: <td><ins class="diff-chg">U+02111</ins></td>
                   54966: </tr>
                   54967: <tr>
                   54968: <td><code title=""><ins class="diff-chg">Imacr;</ins></code></td>
                   54969: <td><ins class="diff-chg">U+0012A</ins></td>
                   54970: </tr>
                   54971: <tr>
                   54972: <td><code title=""><ins class=
                   54973: "diff-chg">ImaginaryI;</ins></code></td>
                   54974: <td><ins class="diff-chg">U+02148</ins></td>
                   54975: </tr>
                   54976: <tr>
                   54977: <td><code title=""><ins class="diff-chg">Implies;</ins></code></td>
                   54978: <td><ins class="diff-chg">U+021D2</ins></td>
                   54979: </tr>
                   54980: <tr>
                   54981: <td><code title=""><ins class="diff-chg">Int;</ins></code></td>
                   54982: <td><ins class="diff-chg">U+0222C</ins></td>
                   54983: </tr>
                   54984: <tr>
                   54985: <td><code title=""><ins class=
                   54986: "diff-chg">Integral;</ins></code></td>
                   54987: <td><ins class="diff-chg">U+0222B</ins></td>
                   54988: </tr>
                   54989: <tr>
                   54990: <td><code title=""><ins class=
                   54991: "diff-chg">Intersection;</ins></code></td>
                   54992: <td><ins class="diff-chg">U+022C2</ins></td>
                   54993: </tr>
                   54994: <tr>
                   54995: <td><code title=""><ins class=
                   54996: "diff-chg">InvisibleComma;</ins></code></td>
                   54997: <td><ins class="diff-chg">U+02063</ins></td>
                   54998: </tr>
                   54999: <tr>
                   55000: <td><code title=""><ins class=
                   55001: "diff-chg">InvisibleTimes;</ins></code></td>
                   55002: <td><ins class="diff-chg">U+02062</ins></td>
                   55003: </tr>
                   55004: <tr>
                   55005: <td><code title=""><ins class="diff-chg">Iogon;</ins></code></td>
                   55006: <td><ins class="diff-chg">U+0012E</ins></td>
                   55007: </tr>
                   55008: <tr>
                   55009: <td><code title=""><ins class="diff-chg">Iopf;</ins></code></td>
                   55010: <td><ins class="diff-chg">U+1D540</ins></td>
                   55011: </tr>
                   55012: <tr>
                   55013: <td><code title="">Iota;</code></td>
                   55014: <td><del class="diff-old">U+0399</del> <ins class=
                   55015: "diff-chg">U+00399</ins></td>
                   55016: </tr>
                   55017: <tr>
                   55018: <td><code title=""><ins class="diff-chg">Iscr;</ins></code></td>
                   55019: <td><ins class="diff-chg">U+02110</ins></td>
                   55020: </tr>
                   55021: <tr>
                   55022: <td><code title=""><ins class="diff-chg">Itilde;</ins></code></td>
                   55023: <td><ins class="diff-chg">U+00128</ins></td>
                   55024: </tr>
                   55025: <tr>
                   55026: <td><code title=""><ins class="diff-chg">Iukcy;</ins></code></td>
                   55027: <td><ins class="diff-chg">U+00406</ins></td>
                   55028: </tr>
                   55029: <tr>
                   55030: <td><code title="">Iuml;</code></td>
                   55031: <td><del class="diff-old">U+00CF</del> <ins class=
                   55032: "diff-chg">U+000CF</ins></td>
                   55033: </tr>
                   55034: <tr>
                   55035: <td><code title="">Iuml</code></td>
1.2     ! mike     55036: <td><del class="diff-old">U+00CF</del> <ins class=
        !          55037: "diff-chg">U+000CF</ins></td>
1.1       mike     55038: </tr>
                   55039: <tr>
1.2     ! mike     55040: <td><code title=""><ins class="diff-chg">Jcirc;</ins></code></td>
        !          55041: <td><ins class="diff-chg">U+00134</ins></td>
1.1       mike     55042: </tr>
                   55043: <tr>
                   55044: <td><code title=""><ins class="diff-chg">Jcy;</ins></code></td>
                   55045: <td><ins class="diff-chg">U+00419</ins></td>
                   55046: </tr>
                   55047: <tr>
                   55048: <td><code title=""><ins class="diff-chg">Jfr;</ins></code></td>
                   55049: <td><ins class="diff-chg">U+1D50D</ins></td>
                   55050: </tr>
                   55051: <tr>
                   55052: <td><code title=""><ins class="diff-chg">Jopf;</ins></code></td>
                   55053: <td><ins class="diff-chg">U+1D541</ins></td>
                   55054: </tr>
                   55055: <tr>
                   55056: <td><code title=""><ins class="diff-chg">Jscr;</ins></code></td>
                   55057: <td><ins class="diff-chg">U+1D4A5</ins></td>
                   55058: </tr>
                   55059: <tr>
                   55060: <td><code title=""><ins class="diff-chg">Jsercy;</ins></code></td>
                   55061: <td><ins class="diff-chg">U+00408</ins></td>
                   55062: </tr>
                   55063: <tr>
                   55064: <td><code title=""><ins class="diff-chg">Jukcy;</ins></code></td>
                   55065: <td><ins class="diff-chg">U+00404</ins></td>
                   55066: </tr>
                   55067: <tr>
                   55068: <td><code title=""><ins class="diff-chg">KHcy;</ins></code></td>
                   55069: <td><ins class="diff-chg">U+00425</ins></td>
                   55070: </tr>
                   55071: <tr>
                   55072: <td><code title=""><ins class="diff-chg">KJcy;</ins></code></td>
                   55073: <td><ins class="diff-chg">U+0040C</ins></td>
                   55074: </tr>
                   55075: <tr>
                   55076: <td><code title="">Kappa;</code></td>
                   55077: <td><del class="diff-old">U+039A</del> <ins class=
                   55078: "diff-chg">U+0039A</ins></td>
                   55079: </tr>
                   55080: <tr>
                   55081: <td><code title=""><ins class="diff-chg">Kcedil;</ins></code></td>
                   55082: <td><ins class="diff-chg">U+00136</ins></td>
                   55083: </tr>
                   55084: <tr>
                   55085: <td><code title=""><ins class="diff-chg">Kcy;</ins></code></td>
                   55086: <td><ins class="diff-chg">U+0041A</ins></td>
                   55087: </tr>
                   55088: <tr>
                   55089: <td><code title=""><ins class="diff-chg">Kfr;</ins></code></td>
                   55090: <td><ins class="diff-chg">U+1D50E</ins></td>
                   55091: </tr>
                   55092: <tr>
                   55093: <td><code title=""><ins class="diff-chg">Kopf;</ins></code></td>
                   55094: <td><ins class="diff-chg">U+1D542</ins></td>
                   55095: </tr>
                   55096: <tr>
                   55097: <td><code title=""><ins class="diff-chg">Kscr;</ins></code></td>
                   55098: <td><ins class="diff-chg">U+1D4A6</ins></td>
                   55099: </tr>
                   55100: <tr>
                   55101: <td><code title=""><ins class="diff-chg">LJcy;</ins></code></td>
                   55102: <td><ins class="diff-chg">U+00409</ins></td>
                   55103: </tr>
                   55104: <tr>
                   55105: <td><code title="">LT;</code></td>
                   55106: <td><del class="diff-old">U+003C</del> <ins class=
                   55107: "diff-chg">U+0003C</ins></td>
                   55108: </tr>
                   55109: <tr>
                   55110: <td><code title="">LT</code></td>
                   55111: <td><del class="diff-old">U+003C</del> <ins class=
                   55112: "diff-chg">U+0003C</ins></td>
                   55113: </tr>
                   55114: <tr>
                   55115: <td><code title=""><ins class="diff-chg">Lacute;</ins></code></td>
                   55116: <td><ins class="diff-chg">U+00139</ins></td>
                   55117: </tr>
                   55118: <tr>
                   55119: <td><code title="">Lambda;</code></td>
                   55120: <td><del class="diff-old">U+039B</del> <ins class=
                   55121: "diff-chg">U+0039B</ins></td>
                   55122: </tr>
                   55123: <tr>
                   55124: <td><code title=""><ins class="diff-chg">Lang;</ins></code></td>
                   55125: <td><ins class="diff-chg">U+027EA</ins></td>
                   55126: </tr>
                   55127: <tr>
                   55128: <td><code title=""><ins class=
                   55129: "diff-chg">Laplacetrf;</ins></code></td>
                   55130: <td><ins class="diff-chg">U+02112</ins></td>
                   55131: </tr>
                   55132: <tr>
                   55133: <td><code title=""><ins class="diff-chg">Larr;</ins></code></td>
                   55134: <td><ins class="diff-chg">U+0219E</ins></td>
                   55135: </tr>
                   55136: <tr>
                   55137: <td><code title=""><ins class="diff-chg">Lcaron;</ins></code></td>
                   55138: <td><ins class="diff-chg">U+0013D</ins></td>
                   55139: </tr>
                   55140: <tr>
                   55141: <td><code title=""><ins class="diff-chg">Lcedil;</ins></code></td>
                   55142: <td><ins class="diff-chg">U+0013B</ins></td>
                   55143: </tr>
                   55144: <tr>
                   55145: <td><code title=""><ins class="diff-chg">Lcy;</ins></code></td>
                   55146: <td><ins class="diff-chg">U+0041B</ins></td>
                   55147: </tr>
                   55148: <tr>
                   55149: <td><code title=""><ins class=
                   55150: "diff-chg">LeftAngleBracket;</ins></code></td>
                   55151: <td><ins class="diff-chg">U+027E8</ins></td>
                   55152: </tr>
                   55153: <tr>
                   55154: <td><code title=""><ins class=
                   55155: "diff-chg">LeftArrow;</ins></code></td>
                   55156: <td><ins class="diff-chg">U+02190</ins></td>
                   55157: </tr>
                   55158: <tr>
                   55159: <td><code title=""><ins class=
                   55160: "diff-chg">LeftArrowBar;</ins></code></td>
                   55161: <td><ins class="diff-chg">U+021E4</ins></td>
                   55162: </tr>
                   55163: <tr>
                   55164: <td><code title=""><ins class=
                   55165: "diff-chg">LeftArrowRightArrow;</ins></code></td>
                   55166: <td><ins class="diff-chg">U+021C6</ins></td>
                   55167: </tr>
                   55168: <tr>
                   55169: <td><code title=""><ins class=
                   55170: "diff-chg">LeftCeiling;</ins></code></td>
                   55171: <td><ins class="diff-chg">U+02308</ins></td>
                   55172: </tr>
                   55173: <tr>
                   55174: <td><code title=""><ins class=
                   55175: "diff-chg">LeftDoubleBracket;</ins></code></td>
                   55176: <td><ins class="diff-chg">U+027E6</ins></td>
                   55177: </tr>
                   55178: <tr>
                   55179: <td><code title=""><ins class=
                   55180: "diff-chg">LeftDownTeeVector;</ins></code></td>
                   55181: <td><ins class="diff-chg">U+02961</ins></td>
                   55182: </tr>
                   55183: <tr>
                   55184: <td><code title=""><ins class=
                   55185: "diff-chg">LeftDownVector;</ins></code></td>
                   55186: <td><ins class="diff-chg">U+021C3</ins></td>
                   55187: </tr>
                   55188: <tr>
                   55189: <td><code title=""><ins class=
                   55190: "diff-chg">LeftDownVectorBar;</ins></code></td>
                   55191: <td><ins class="diff-chg">U+02959</ins></td>
                   55192: </tr>
                   55193: <tr>
                   55194: <td><code title=""><ins class=
                   55195: "diff-chg">LeftFloor;</ins></code></td>
                   55196: <td><ins class="diff-chg">U+0230A</ins></td>
                   55197: </tr>
                   55198: <tr>
                   55199: <td><code title=""><ins class=
                   55200: "diff-chg">LeftRightArrow;</ins></code></td>
                   55201: <td><ins class="diff-chg">U+02194</ins></td>
                   55202: </tr>
                   55203: <tr>
                   55204: <td><code title=""><ins class=
                   55205: "diff-chg">LeftRightVector;</ins></code></td>
                   55206: <td><ins class="diff-chg">U+0294E</ins></td>
                   55207: </tr>
                   55208: <tr>
                   55209: <td><code title=""><ins class="diff-chg">LeftTee;</ins></code></td>
                   55210: <td><ins class="diff-chg">U+022A3</ins></td>
                   55211: </tr>
                   55212: <tr>
                   55213: <td><code title=""><ins class=
                   55214: "diff-chg">LeftTeeArrow;</ins></code></td>
                   55215: <td><ins class="diff-chg">U+021A4</ins></td>
                   55216: </tr>
                   55217: <tr>
                   55218: <td><code title=""><ins class=
                   55219: "diff-chg">LeftTeeVector;</ins></code></td>
                   55220: <td><ins class="diff-chg">U+0295A</ins></td>
                   55221: </tr>
                   55222: <tr>
                   55223: <td><code title=""><ins class=
                   55224: "diff-chg">LeftTriangle;</ins></code></td>
                   55225: <td><ins class="diff-chg">U+022B2</ins></td>
                   55226: </tr>
                   55227: <tr>
                   55228: <td><code title=""><ins class=
                   55229: "diff-chg">LeftTriangleBar;</ins></code></td>
                   55230: <td><ins class="diff-chg">U+029CF</ins></td>
                   55231: </tr>
                   55232: <tr>
                   55233: <td><code title=""><ins class=
                   55234: "diff-chg">LeftTriangleEqual;</ins></code></td>
                   55235: <td><ins class="diff-chg">U+022B4</ins></td>
                   55236: </tr>
                   55237: <tr>
                   55238: <td><code title=""><ins class=
                   55239: "diff-chg">LeftUpDownVector;</ins></code></td>
                   55240: <td><ins class="diff-chg">U+02951</ins></td>
                   55241: </tr>
                   55242: <tr>
                   55243: <td><code title=""><ins class=
                   55244: "diff-chg">LeftUpTeeVector;</ins></code></td>
                   55245: <td><ins class="diff-chg">U+02960</ins></td>
                   55246: </tr>
                   55247: <tr>
                   55248: <td><code title=""><ins class=
                   55249: "diff-chg">LeftUpVector;</ins></code></td>
                   55250: <td><ins class="diff-chg">U+021BF</ins></td>
                   55251: </tr>
                   55252: <tr>
                   55253: <td><code title=""><ins class=
                   55254: "diff-chg">LeftUpVectorBar;</ins></code></td>
                   55255: <td><ins class="diff-chg">U+02958</ins></td>
                   55256: </tr>
                   55257: <tr>
                   55258: <td><code title=""><ins class=
                   55259: "diff-chg">LeftVector;</ins></code></td>
                   55260: <td><ins class="diff-chg">U+021BC</ins></td>
                   55261: </tr>
                   55262: <tr>
                   55263: <td><code title=""><ins class=
                   55264: "diff-chg">LeftVectorBar;</ins></code></td>
                   55265: <td><ins class="diff-chg">U+02952</ins></td>
                   55266: </tr>
                   55267: <tr>
                   55268: <td><code title=""><ins class=
                   55269: "diff-chg">Leftarrow;</ins></code></td>
                   55270: <td><ins class="diff-chg">U+021D0</ins></td>
                   55271: </tr>
                   55272: <tr>
                   55273: <td><code title=""><ins class=
                   55274: "diff-chg">Leftrightarrow;</ins></code></td>
                   55275: <td><ins class="diff-chg">U+021D4</ins></td>
                   55276: </tr>
                   55277: <tr>
                   55278: <td><code title=""><ins class=
                   55279: "diff-chg">LessEqualGreater;</ins></code></td>
                   55280: <td><ins class="diff-chg">U+022DA</ins></td>
                   55281: </tr>
                   55282: <tr>
                   55283: <td><code title=""><ins class=
                   55284: "diff-chg">LessFullEqual;</ins></code></td>
                   55285: <td><ins class="diff-chg">U+02266</ins></td>
                   55286: </tr>
                   55287: <tr>
                   55288: <td><code title=""><ins class=
                   55289: "diff-chg">LessGreater;</ins></code></td>
                   55290: <td><ins class="diff-chg">U+02276</ins></td>
                   55291: </tr>
                   55292: <tr>
                   55293: <td><code title=""><ins class=
                   55294: "diff-chg">LessLess;</ins></code></td>
                   55295: <td><ins class="diff-chg">U+02AA1</ins></td>
                   55296: </tr>
                   55297: <tr>
                   55298: <td><code title=""><ins class=
                   55299: "diff-chg">LessSlantEqual;</ins></code></td>
                   55300: <td><ins class="diff-chg">U+02A7D</ins></td>
                   55301: </tr>
                   55302: <tr>
                   55303: <td><code title=""><ins class=
                   55304: "diff-chg">LessTilde;</ins></code></td>
                   55305: <td><ins class="diff-chg">U+02272</ins></td>
                   55306: </tr>
                   55307: <tr>
                   55308: <td><code title=""><ins class="diff-chg">Lfr;</ins></code></td>
                   55309: <td><ins class="diff-chg">U+1D50F</ins></td>
                   55310: </tr>
                   55311: <tr>
                   55312: <td><code title=""><ins class="diff-chg">Ll;</ins></code></td>
                   55313: <td><ins class="diff-chg">U+022D8</ins></td>
                   55314: </tr>
                   55315: <tr>
                   55316: <td><code title=""><ins class=
                   55317: "diff-chg">Lleftarrow;</ins></code></td>
                   55318: <td><ins class="diff-chg">U+021DA</ins></td>
                   55319: </tr>
                   55320: <tr>
                   55321: <td><code title=""><ins class="diff-chg">Lmidot;</ins></code></td>
                   55322: <td><ins class="diff-chg">U+0013F</ins></td>
                   55323: </tr>
                   55324: <tr>
                   55325: <td><code title=""><ins class=
                   55326: "diff-chg">LongLeftArrow;</ins></code></td>
                   55327: <td><ins class="diff-chg">U+027F5</ins></td>
                   55328: </tr>
                   55329: <tr>
                   55330: <td><code title=""><ins class=
                   55331: "diff-chg">LongLeftRightArrow;</ins></code></td>
                   55332: <td><ins class="diff-chg">U+027F7</ins></td>
                   55333: </tr>
                   55334: <tr>
                   55335: <td><code title=""><ins class=
                   55336: "diff-chg">LongRightArrow;</ins></code></td>
                   55337: <td><ins class="diff-chg">U+027F6</ins></td>
                   55338: </tr>
                   55339: <tr>
                   55340: <td><code title=""><ins class=
                   55341: "diff-chg">Longleftarrow;</ins></code></td>
                   55342: <td><ins class="diff-chg">U+027F8</ins></td>
                   55343: </tr>
                   55344: <tr>
                   55345: <td><code title=""><ins class=
                   55346: "diff-chg">Longleftrightarrow;</ins></code></td>
                   55347: <td><ins class="diff-chg">U+027FA</ins></td>
                   55348: </tr>
                   55349: <tr>
                   55350: <td><code title=""><ins class=
                   55351: "diff-chg">Longrightarrow;</ins></code></td>
                   55352: <td><ins class="diff-chg">U+027F9</ins></td>
                   55353: </tr>
                   55354: <tr>
                   55355: <td><code title=""><ins class="diff-chg">Lopf;</ins></code></td>
                   55356: <td><ins class="diff-chg">U+1D543</ins></td>
                   55357: </tr>
                   55358: <tr>
                   55359: <td><code title=""><ins class=
                   55360: "diff-chg">LowerLeftArrow;</ins></code></td>
                   55361: <td><ins class="diff-chg">U+02199</ins></td>
                   55362: </tr>
                   55363: <tr>
                   55364: <td><code title=""><ins class=
                   55365: "diff-chg">LowerRightArrow;</ins></code></td>
                   55366: <td><ins class="diff-chg">U+02198</ins></td>
                   55367: </tr>
                   55368: <tr>
                   55369: <td><code title=""><ins class="diff-chg">Lscr;</ins></code></td>
                   55370: <td><ins class="diff-chg">U+02112</ins></td>
                   55371: </tr>
                   55372: <tr>
                   55373: <td><code title=""><ins class="diff-chg">Lsh;</ins></code></td>
                   55374: <td><ins class="diff-chg">U+021B0</ins></td>
                   55375: </tr>
                   55376: <tr>
                   55377: <td><code title=""><ins class="diff-chg">Lstrok;</ins></code></td>
                   55378: <td><ins class="diff-chg">U+00141</ins></td>
                   55379: </tr>
                   55380: <tr>
                   55381: <td><code title=""><ins class="diff-chg">Lt;</ins></code></td>
                   55382: <td><ins class="diff-chg">U+0226A</ins></td>
                   55383: </tr>
                   55384: <tr>
                   55385: <td><code title=""><ins class="diff-chg">Map;</ins></code></td>
                   55386: <td><ins class="diff-chg">U+02905</ins></td>
                   55387: </tr>
                   55388: <tr>
                   55389: <td><code title=""><ins class="diff-chg">Mcy;</ins></code></td>
                   55390: <td><ins class="diff-chg">U+0041C</ins></td>
                   55391: </tr>
                   55392: <tr>
                   55393: <td><code title=""><ins class=
                   55394: "diff-chg">MediumSpace;</ins></code></td>
                   55395: <td><ins class="diff-chg">U+0205F</ins></td>
                   55396: </tr>
                   55397: <tr>
                   55398: <td><code title=""><ins class=
                   55399: "diff-chg">Mellintrf;</ins></code></td>
                   55400: <td><ins class="diff-chg">U+02133</ins></td>
                   55401: </tr>
                   55402: <tr>
                   55403: <td><code title=""><ins class="diff-chg">Mfr;</ins></code></td>
                   55404: <td><ins class="diff-chg">U+1D510</ins></td>
                   55405: </tr>
                   55406: <tr>
                   55407: <td><code title=""><ins class=
                   55408: "diff-chg">MinusPlus;</ins></code></td>
                   55409: <td><ins class="diff-chg">U+02213</ins></td>
                   55410: </tr>
                   55411: <tr>
                   55412: <td><code title=""><ins class="diff-chg">Mopf;</ins></code></td>
                   55413: <td><ins class="diff-chg">U+1D544</ins></td>
                   55414: </tr>
                   55415: <tr>
                   55416: <td><code title=""><ins class="diff-chg">Mscr;</ins></code></td>
                   55417: <td><ins class="diff-chg">U+02133</ins></td>
                   55418: </tr>
                   55419: <tr>
                   55420: <td><code title="">Mu;</code></td>
                   55421: <td><del class="diff-old">U+039C</del> <ins class=
                   55422: "diff-chg">U+0039C</ins></td>
                   55423: </tr>
                   55424: <tr>
                   55425: <td><code title=""><ins class="diff-chg">NJcy;</ins></code></td>
                   55426: <td><ins class="diff-chg">U+0040A</ins></td>
                   55427: </tr>
                   55428: <tr>
                   55429: <td><code title=""><ins class="diff-chg">Nacute;</ins></code></td>
                   55430: <td><ins class="diff-chg">U+00143</ins></td>
                   55431: </tr>
                   55432: <tr>
                   55433: <td><code title=""><ins class="diff-chg">Ncaron;</ins></code></td>
                   55434: <td><ins class="diff-chg">U+00147</ins></td>
                   55435: </tr>
                   55436: <tr>
                   55437: <td><code title=""><ins class="diff-chg">Ncedil;</ins></code></td>
                   55438: <td><ins class="diff-chg">U+00145</ins></td>
                   55439: </tr>
                   55440: <tr>
                   55441: <td><code title=""><ins class="diff-chg">Ncy;</ins></code></td>
                   55442: <td><ins class="diff-chg">U+0041D</ins></td>
                   55443: </tr>
                   55444: <tr>
                   55445: <td><code title=""><ins class=
                   55446: "diff-chg">NegativeMediumSpace;</ins></code></td>
                   55447: <td><ins class="diff-chg">U+0200B</ins></td>
                   55448: </tr>
                   55449: <tr>
                   55450: <td><code title=""><ins class=
                   55451: "diff-chg">NegativeThickSpace;</ins></code></td>
                   55452: <td><ins class="diff-chg">U+0200B</ins></td>
                   55453: </tr>
                   55454: <tr>
                   55455: <td><code title=""><ins class=
                   55456: "diff-chg">NegativeThinSpace;</ins></code></td>
                   55457: <td><ins class="diff-chg">U+0200B</ins></td>
                   55458: </tr>
                   55459: <tr>
                   55460: <td><code title=""><ins class=
                   55461: "diff-chg">NegativeVeryThinSpace;</ins></code></td>
                   55462: <td><ins class="diff-chg">U+0200B</ins></td>
                   55463: </tr>
                   55464: <tr>
                   55465: <td><code title=""><ins class=
                   55466: "diff-chg">NestedGreaterGreater;</ins></code></td>
                   55467: <td><ins class="diff-chg">U+0226B</ins></td>
                   55468: </tr>
                   55469: <tr>
                   55470: <td><code title=""><ins class=
                   55471: "diff-chg">NestedLessLess;</ins></code></td>
                   55472: <td><ins class="diff-chg">U+0226A</ins></td>
                   55473: </tr>
                   55474: <tr>
                   55475: <td><code title=""><ins class="diff-chg">NewLine;</ins></code></td>
                   55476: <td><ins class="diff-chg">U+0000A</ins></td>
                   55477: </tr>
                   55478: <tr>
                   55479: <td><code title=""><ins class="diff-chg">Nfr;</ins></code></td>
                   55480: <td><ins class="diff-chg">U+1D511</ins></td>
                   55481: </tr>
                   55482: <tr>
                   55483: <td><code title=""><ins class="diff-chg">NoBreak;</ins></code></td>
                   55484: <td><ins class="diff-chg">U+02060</ins></td>
                   55485: </tr>
                   55486: <tr>
                   55487: <td><code title=""><ins class=
                   55488: "diff-chg">NonBreakingSpace;</ins></code></td>
                   55489: <td><ins class="diff-chg">U+000A0</ins></td>
                   55490: </tr>
                   55491: <tr>
                   55492: <td><code title=""><ins class="diff-chg">Nopf;</ins></code></td>
                   55493: <td><ins class="diff-chg">U+02115</ins></td>
                   55494: </tr>
                   55495: <tr>
                   55496: <td><code title=""><ins class="diff-chg">Not;</ins></code></td>
                   55497: <td><ins class="diff-chg">U+02AEC</ins></td>
                   55498: </tr>
                   55499: <tr>
                   55500: <td><code title=""><ins class=
                   55501: "diff-chg">NotCongruent;</ins></code></td>
                   55502: <td><ins class="diff-chg">U+02262</ins></td>
                   55503: </tr>
                   55504: <tr>
                   55505: <td><code title=""><ins class=
                   55506: "diff-chg">NotCupCap;</ins></code></td>
                   55507: <td><ins class="diff-chg">U+0226D</ins></td>
                   55508: </tr>
                   55509: <tr>
                   55510: <td><code title=""><ins class=
                   55511: "diff-chg">NotDoubleVerticalBar;</ins></code></td>
                   55512: <td><ins class="diff-chg">U+02226</ins></td>
                   55513: </tr>
                   55514: <tr>
                   55515: <td><code title=""><ins class=
                   55516: "diff-chg">NotElement;</ins></code></td>
                   55517: <td><ins class="diff-chg">U+02209</ins></td>
                   55518: </tr>
                   55519: <tr>
                   55520: <td><code title=""><ins class=
                   55521: "diff-chg">NotEqual;</ins></code></td>
                   55522: <td><ins class="diff-chg">U+02260</ins></td>
                   55523: </tr>
                   55524: <tr>
                   55525: <td><code title=""><ins class=
                   55526: "diff-chg">NotExists;</ins></code></td>
                   55527: <td><ins class="diff-chg">U+02204</ins></td>
                   55528: </tr>
                   55529: <tr>
                   55530: <td><code title=""><ins class=
                   55531: "diff-chg">NotGreater;</ins></code></td>
                   55532: <td><ins class="diff-chg">U+0226F</ins></td>
                   55533: </tr>
                   55534: <tr>
                   55535: <td><code title=""><ins class=
                   55536: "diff-chg">NotGreaterEqual;</ins></code></td>
                   55537: <td><ins class="diff-chg">U+02271</ins></td>
                   55538: </tr>
                   55539: <tr>
                   55540: <td><code title=""><ins class=
                   55541: "diff-chg">NotGreaterLess;</ins></code></td>
                   55542: <td><ins class="diff-chg">U+02279</ins></td>
                   55543: </tr>
                   55544: <tr>
                   55545: <td><code title=""><ins class=
                   55546: "diff-chg">NotGreaterTilde;</ins></code></td>
                   55547: <td><ins class="diff-chg">U+02275</ins></td>
                   55548: </tr>
                   55549: <tr>
                   55550: <td><code title=""><ins class=
                   55551: "diff-chg">NotLeftTriangle;</ins></code></td>
                   55552: <td><ins class="diff-chg">U+022EA</ins></td>
                   55553: </tr>
                   55554: <tr>
                   55555: <td><code title=""><ins class=
                   55556: "diff-chg">NotLeftTriangleEqual;</ins></code></td>
                   55557: <td><ins class="diff-chg">U+022EC</ins></td>
                   55558: </tr>
                   55559: <tr>
                   55560: <td><code title=""><ins class="diff-chg">NotLess;</ins></code></td>
                   55561: <td><ins class="diff-chg">U+0226E</ins></td>
                   55562: </tr>
                   55563: <tr>
                   55564: <td><code title=""><ins class=
                   55565: "diff-chg">NotLessEqual;</ins></code></td>
                   55566: <td><ins class="diff-chg">U+02270</ins></td>
                   55567: </tr>
                   55568: <tr>
                   55569: <td><code title=""><ins class=
                   55570: "diff-chg">NotLessGreater;</ins></code></td>
                   55571: <td><ins class="diff-chg">U+02278</ins></td>
                   55572: </tr>
                   55573: <tr>
                   55574: <td><code title=""><ins class=
                   55575: "diff-chg">NotLessTilde;</ins></code></td>
                   55576: <td><ins class="diff-chg">U+02274</ins></td>
                   55577: </tr>
                   55578: <tr>
                   55579: <td><code title=""><ins class=
                   55580: "diff-chg">NotPrecedes;</ins></code></td>
                   55581: <td><ins class="diff-chg">U+02280</ins></td>
                   55582: </tr>
                   55583: <tr>
                   55584: <td><code title=""><ins class=
                   55585: "diff-chg">NotPrecedesSlantEqual;</ins></code></td>
                   55586: <td><ins class="diff-chg">U+022E0</ins></td>
                   55587: </tr>
                   55588: <tr>
                   55589: <td><code title=""><ins class=
                   55590: "diff-chg">NotReverseElement;</ins></code></td>
                   55591: <td><ins class="diff-chg">U+0220C</ins></td>
                   55592: </tr>
                   55593: <tr>
                   55594: <td><code title=""><ins class=
                   55595: "diff-chg">NotRightTriangle;</ins></code></td>
                   55596: <td><ins class="diff-chg">U+022EB</ins></td>
                   55597: </tr>
                   55598: <tr>
                   55599: <td><code title=""><ins class=
                   55600: "diff-chg">NotRightTriangleEqual;</ins></code></td>
                   55601: <td><ins class="diff-chg">U+022ED</ins></td>
                   55602: </tr>
                   55603: <tr>
                   55604: <td><code title=""><ins class=
                   55605: "diff-chg">NotSquareSubsetEqual;</ins></code></td>
                   55606: <td><ins class="diff-chg">U+022E2</ins></td>
                   55607: </tr>
                   55608: <tr>
                   55609: <td><code title=""><ins class=
                   55610: "diff-chg">NotSquareSupersetEqual;</ins></code></td>
                   55611: <td><ins class="diff-chg">U+022E3</ins></td>
                   55612: </tr>
                   55613: <tr>
                   55614: <td><code title=""><ins class=
                   55615: "diff-chg">NotSubsetEqual;</ins></code></td>
                   55616: <td><ins class="diff-chg">U+02288</ins></td>
                   55617: </tr>
                   55618: <tr>
                   55619: <td><code title=""><ins class=
                   55620: "diff-chg">NotSucceeds;</ins></code></td>
                   55621: <td><ins class="diff-chg">U+02281</ins></td>
                   55622: </tr>
                   55623: <tr>
                   55624: <td><code title=""><ins class=
                   55625: "diff-chg">NotSucceedsSlantEqual;</ins></code></td>
                   55626: <td><ins class="diff-chg">U+022E1</ins></td>
                   55627: </tr>
                   55628: <tr>
                   55629: <td><code title=""><ins class=
                   55630: "diff-chg">NotSupersetEqual;</ins></code></td>
                   55631: <td><ins class="diff-chg">U+02289</ins></td>
                   55632: </tr>
                   55633: <tr>
                   55634: <td><code title=""><ins class=
                   55635: "diff-chg">NotTilde;</ins></code></td>
                   55636: <td><ins class="diff-chg">U+02241</ins></td>
                   55637: </tr>
                   55638: <tr>
                   55639: <td><code title=""><ins class=
                   55640: "diff-chg">NotTildeEqual;</ins></code></td>
                   55641: <td><ins class="diff-chg">U+02244</ins></td>
                   55642: </tr>
                   55643: <tr>
                   55644: <td><code title=""><ins class=
                   55645: "diff-chg">NotTildeFullEqual;</ins></code></td>
                   55646: <td><ins class="diff-chg">U+02247</ins></td>
                   55647: </tr>
                   55648: <tr>
                   55649: <td><code title=""><ins class=
                   55650: "diff-chg">NotTildeTilde;</ins></code></td>
                   55651: <td><ins class="diff-chg">U+02249</ins></td>
                   55652: </tr>
                   55653: <tr>
                   55654: <td><code title=""><ins class=
                   55655: "diff-chg">NotVerticalBar;</ins></code></td>
                   55656: <td><ins class="diff-chg">U+02224</ins></td>
                   55657: </tr>
                   55658: <tr>
                   55659: <td><code title=""><ins class="diff-chg">Nscr;</ins></code></td>
                   55660: <td><ins class="diff-chg">U+1D4A9</ins></td>
                   55661: </tr>
                   55662: <tr>
                   55663: <td><code title="">Ntilde;</code></td>
                   55664: <td><del class="diff-old">U+00D1</del> <ins class=
                   55665: "diff-chg">U+000D1</ins></td>
                   55666: </tr>
                   55667: <tr>
                   55668: <td><code title="">Ntilde</code></td>
                   55669: <td><del class="diff-old">U+00D1</del> <ins class=
                   55670: "diff-chg">U+000D1</ins></td>
                   55671: </tr>
                   55672: <tr>
                   55673: <td><code title="">Nu;</code></td>
                   55674: <td><del class="diff-old">U+039D</del> <ins class=
                   55675: "diff-chg">U+0039D</ins></td>
                   55676: </tr>
                   55677: <tr>
                   55678: <td><code title="">OElig;</code></td>
                   55679: <td><del class="diff-old">U+0152</del> <ins class=
                   55680: "diff-chg">U+00152</ins></td>
                   55681: </tr>
                   55682: <tr>
                   55683: <td><code title="">Oacute;</code></td>
                   55684: <td><del class="diff-old">U+00D3</del> <ins class=
                   55685: "diff-chg">U+000D3</ins></td>
                   55686: </tr>
                   55687: <tr>
                   55688: <td><code title="">Oacute</code></td>
                   55689: <td><del class="diff-old">U+00D3</del> <ins class=
                   55690: "diff-chg">U+000D3</ins></td>
                   55691: </tr>
                   55692: <tr>
                   55693: <td><code title="">Ocirc;</code></td>
                   55694: <td><del class="diff-old">U+00D4</del> <ins class=
                   55695: "diff-chg">U+000D4</ins></td>
                   55696: </tr>
                   55697: <tr>
                   55698: <td><code title="">Ocirc</code></td>
                   55699: <td><del class="diff-old">U+00D4</del> <ins class=
                   55700: "diff-chg">U+000D4</ins></td>
                   55701: </tr>
                   55702: <tr>
                   55703: <td><code title=""><ins class="diff-chg">Ocy;</ins></code></td>
                   55704: <td><ins class="diff-chg">U+0041E</ins></td>
                   55705: </tr>
                   55706: <tr>
                   55707: <td><code title=""><ins class="diff-chg">Odblac;</ins></code></td>
                   55708: <td><ins class="diff-chg">U+00150</ins></td>
                   55709: </tr>
                   55710: <tr>
                   55711: <td><code title=""><ins class="diff-chg">Ofr;</ins></code></td>
                   55712: <td><ins class="diff-chg">U+1D512</ins></td>
                   55713: </tr>
                   55714: <tr>
                   55715: <td><code title="">Ograve;</code></td>
                   55716: <td><del class="diff-old">U+00D2</del> <ins class=
                   55717: "diff-chg">U+000D2</ins></td>
                   55718: </tr>
                   55719: <tr>
                   55720: <td><code title="">Ograve</code></td>
                   55721: <td><del class="diff-old">U+00D2</del> <ins class=
                   55722: "diff-chg">U+000D2</ins></td>
                   55723: </tr>
                   55724: <tr>
                   55725: <td><code title=""><ins class="diff-chg">Omacr;</ins></code></td>
                   55726: <td><ins class="diff-chg">U+0014C</ins></td>
                   55727: </tr>
                   55728: <tr>
                   55729: <td><code title="">Omega;</code></td>
                   55730: <td><del class="diff-old">U+03A9</del> <ins class=
                   55731: "diff-chg">U+003A9</ins></td>
                   55732: </tr>
                   55733: <tr>
                   55734: <td><code title="">Omicron;</code></td>
1.2     ! mike     55735: <td><del class="diff-old">U+039F</del> <ins class=
        !          55736: "diff-chg">U+0039F</ins></td>
1.1       mike     55737: </tr>
                   55738: <tr>
1.2     ! mike     55739: <td><code title=""><ins class="diff-chg">Oopf;</ins></code></td>
        !          55740: <td><ins class="diff-chg">U+1D546</ins></td>
1.1       mike     55741: </tr>
                   55742: <tr>
                   55743: <td><code title=""><ins class=
                   55744: "diff-chg">OpenCurlyDoubleQuote;</ins></code></td>
                   55745: <td><ins class="diff-chg">U+0201C</ins></td>
                   55746: </tr>
                   55747: <tr>
                   55748: <td><code title=""><ins class=
                   55749: "diff-chg">OpenCurlyQuote;</ins></code></td>
                   55750: <td><ins class="diff-chg">U+02018</ins></td>
                   55751: </tr>
                   55752: <tr>
                   55753: <td><code title=""><ins class="diff-chg">Or;</ins></code></td>
                   55754: <td><ins class="diff-chg">U+02A54</ins></td>
                   55755: </tr>
                   55756: <tr>
                   55757: <td><code title=""><ins class="diff-chg">Oscr;</ins></code></td>
                   55758: <td><ins class="diff-chg">U+1D4AA</ins></td>
                   55759: </tr>
                   55760: <tr>
                   55761: <td><code title="">Oslash;</code></td>
                   55762: <td><del class="diff-old">U+00D8</del> <ins class=
                   55763: "diff-chg">U+000D8</ins></td>
                   55764: </tr>
                   55765: <tr>
                   55766: <td><code title="">Oslash</code></td>
                   55767: <td><del class="diff-old">U+00D8</del> <ins class=
                   55768: "diff-chg">U+000D8</ins></td>
                   55769: </tr>
                   55770: <tr>
                   55771: <td><code title="">Otilde;</code></td>
                   55772: <td><del class="diff-old">U+00D5</del> <ins class=
                   55773: "diff-chg">U+000D5</ins></td>
                   55774: </tr>
                   55775: <tr>
                   55776: <td><code title="">Otilde</code></td>
                   55777: <td><del class="diff-old">U+00D5</del> <ins class=
                   55778: "diff-chg">U+000D5</ins></td>
                   55779: </tr>
                   55780: <tr>
                   55781: <td><code title=""><ins class="diff-chg">Otimes;</ins></code></td>
                   55782: <td><ins class="diff-chg">U+02A37</ins></td>
                   55783: </tr>
                   55784: <tr>
                   55785: <td><code title="">Ouml;</code></td>
                   55786: <td><del class="diff-old">U+00D6</del> <ins class=
                   55787: "diff-chg">U+000D6</ins></td>
                   55788: </tr>
                   55789: <tr>
                   55790: <td><code title="">Ouml</code></td>
                   55791: <td><del class="diff-old">U+00D6</del> <ins class=
                   55792: "diff-chg">U+000D6</ins></td>
                   55793: </tr>
                   55794: <tr>
                   55795: <td><code title=""><ins class="diff-chg">OverBar;</ins></code></td>
                   55796: <td><ins class="diff-chg">U+000AF</ins></td>
                   55797: </tr>
                   55798: <tr>
                   55799: <td><code title=""><ins class=
                   55800: "diff-chg">OverBrace;</ins></code></td>
                   55801: <td><ins class="diff-chg">U+023DE</ins></td>
                   55802: </tr>
                   55803: <tr>
                   55804: <td><code title=""><ins class=
                   55805: "diff-chg">OverBracket;</ins></code></td>
                   55806: <td><ins class="diff-chg">U+023B4</ins></td>
                   55807: </tr>
                   55808: <tr>
                   55809: <td><code title=""><ins class=
                   55810: "diff-chg">OverParenthesis;</ins></code></td>
                   55811: <td><ins class="diff-chg">U+023DC</ins></td>
                   55812: </tr>
                   55813: <tr>
                   55814: <td><code title=""><ins class=
                   55815: "diff-chg">PartialD;</ins></code></td>
                   55816: <td><ins class="diff-chg">U+02202</ins></td>
                   55817: </tr>
                   55818: <tr>
                   55819: <td><code title=""><ins class="diff-chg">Pcy;</ins></code></td>
                   55820: <td><ins class="diff-chg">U+0041F</ins></td>
                   55821: </tr>
                   55822: <tr>
                   55823: <td><code title=""><ins class="diff-chg">Pfr;</ins></code></td>
                   55824: <td><ins class="diff-chg">U+1D513</ins></td>
                   55825: </tr>
                   55826: <tr>
                   55827: <td><code title="">Phi;</code></td>
                   55828: <td><del class="diff-old">U+03A6</del> <ins class=
                   55829: "diff-chg">U+003A6</ins></td>
                   55830: </tr>
                   55831: <tr>
                   55832: <td><code title="">Pi;</code></td>
                   55833: <td><del class="diff-old">U+03A0</del> <ins class=
                   55834: "diff-chg">U+003A0</ins></td>
                   55835: </tr>
                   55836: <tr>
                   55837: <td><code title=""><ins class=
                   55838: "diff-chg">PlusMinus;</ins></code></td>
                   55839: <td><ins class="diff-chg">U+000B1</ins></td>
                   55840: </tr>
                   55841: <tr>
                   55842: <td><code title=""><ins class=
                   55843: "diff-chg">Poincareplane;</ins></code></td>
                   55844: <td><ins class="diff-chg">U+0210C</ins></td>
                   55845: </tr>
                   55846: <tr>
                   55847: <td><code title=""><ins class="diff-chg">Popf;</ins></code></td>
                   55848: <td><ins class="diff-chg">U+02119</ins></td>
                   55849: </tr>
                   55850: <tr>
                   55851: <td><code title=""><ins class="diff-chg">Pr;</ins></code></td>
                   55852: <td><ins class="diff-chg">U+02ABB</ins></td>
                   55853: </tr>
                   55854: <tr>
                   55855: <td><code title=""><ins class=
                   55856: "diff-chg">Precedes;</ins></code></td>
                   55857: <td><ins class="diff-chg">U+0227A</ins></td>
                   55858: </tr>
                   55859: <tr>
                   55860: <td><code title=""><ins class=
                   55861: "diff-chg">PrecedesEqual;</ins></code></td>
                   55862: <td><ins class="diff-chg">U+02AAF</ins></td>
                   55863: </tr>
                   55864: <tr>
                   55865: <td><code title=""><ins class=
                   55866: "diff-chg">PrecedesSlantEqual;</ins></code></td>
                   55867: <td><ins class="diff-chg">U+0227C</ins></td>
                   55868: </tr>
                   55869: <tr>
                   55870: <td><code title=""><ins class=
                   55871: "diff-chg">PrecedesTilde;</ins></code></td>
                   55872: <td><ins class="diff-chg">U+0227E</ins></td>
                   55873: </tr>
                   55874: <tr>
                   55875: <td><code title="">Prime;</code></td>
                   55876: <td><del class="diff-old">U+2033</del> <ins class=
                   55877: "diff-chg">U+02033</ins></td>
                   55878: </tr>
                   55879: <tr>
                   55880: <td><code title=""><ins class="diff-chg">Product;</ins></code></td>
                   55881: <td><ins class="diff-chg">U+0220F</ins></td>
                   55882: </tr>
                   55883: <tr>
                   55884: <td><code title=""><ins class=
                   55885: "diff-chg">Proportion;</ins></code></td>
                   55886: <td><ins class="diff-chg">U+02237</ins></td>
                   55887: </tr>
                   55888: <tr>
                   55889: <td><code title=""><ins class=
                   55890: "diff-chg">Proportional;</ins></code></td>
                   55891: <td><ins class="diff-chg">U+0221D</ins></td>
                   55892: </tr>
                   55893: <tr>
                   55894: <td><code title=""><ins class="diff-chg">Pscr;</ins></code></td>
                   55895: <td><ins class="diff-chg">U+1D4AB</ins></td>
                   55896: </tr>
                   55897: <tr>
                   55898: <td><code title="">Psi;</code></td>
                   55899: <td><del class="diff-old">U+03A8</del> <ins class=
                   55900: "diff-chg">U+003A8</ins></td>
                   55901: </tr>
                   55902: <tr>
                   55903: <td><code title="">QUOT;</code></td>
                   55904: <td><del class="diff-old">U+0022</del> <ins class=
                   55905: "diff-chg">U+00022</ins></td>
                   55906: </tr>
                   55907: <tr>
                   55908: <td><code title="">QUOT</code></td>
                   55909: <td><del class="diff-old">U+0022</del> <ins class=
                   55910: "diff-chg">U+00022</ins></td>
                   55911: </tr>
                   55912: <tr>
                   55913: <td><code title=""><ins class="diff-chg">Qfr;</ins></code></td>
                   55914: <td><ins class="diff-chg">U+1D514</ins></td>
                   55915: </tr>
                   55916: <tr>
                   55917: <td><code title=""><ins class="diff-chg">Qopf;</ins></code></td>
                   55918: <td><ins class="diff-chg">U+0211A</ins></td>
                   55919: </tr>
                   55920: <tr>
                   55921: <td><code title=""><ins class="diff-chg">Qscr;</ins></code></td>
                   55922: <td><ins class="diff-chg">U+1D4AC</ins></td>
                   55923: </tr>
                   55924: <tr>
                   55925: <td><code title=""><ins class="diff-chg">RBarr;</ins></code></td>
                   55926: <td><ins class="diff-chg">U+02910</ins></td>
                   55927: </tr>
                   55928: <tr>
                   55929: <td><code title="">REG;</code></td>
                   55930: <td><del class="diff-old">U+00AE</del> <ins class=
                   55931: "diff-chg">U+000AE</ins></td>
                   55932: </tr>
                   55933: <tr>
                   55934: <td><code title="">REG</code></td>
                   55935: <td><del class="diff-old">U+00AE</del> <ins class=
                   55936: "diff-chg">U+000AE</ins></td>
                   55937: </tr>
                   55938: <tr>
                   55939: <td><code title=""><ins class="diff-chg">Racute;</ins></code></td>
                   55940: <td><ins class="diff-chg">U+00154</ins></td>
                   55941: </tr>
                   55942: <tr>
                   55943: <td><code title=""><ins class="diff-chg">Rang;</ins></code></td>
                   55944: <td><ins class="diff-chg">U+027EB</ins></td>
                   55945: </tr>
                   55946: <tr>
                   55947: <td><code title=""><ins class="diff-chg">Rarr;</ins></code></td>
                   55948: <td><ins class="diff-chg">U+021A0</ins></td>
                   55949: </tr>
                   55950: <tr>
                   55951: <td><code title=""><ins class="diff-chg">Rarrtl;</ins></code></td>
                   55952: <td><ins class="diff-chg">U+02916</ins></td>
                   55953: </tr>
                   55954: <tr>
                   55955: <td><code title=""><ins class="diff-chg">Rcaron;</ins></code></td>
                   55956: <td><ins class="diff-chg">U+00158</ins></td>
                   55957: </tr>
                   55958: <tr>
                   55959: <td><code title=""><ins class="diff-chg">Rcedil;</ins></code></td>
                   55960: <td><ins class="diff-chg">U+00156</ins></td>
                   55961: </tr>
                   55962: <tr>
                   55963: <td><code title=""><ins class="diff-chg">Rcy;</ins></code></td>
                   55964: <td><ins class="diff-chg">U+00420</ins></td>
                   55965: </tr>
                   55966: <tr>
                   55967: <td><code title=""><ins class="diff-chg">Re;</ins></code></td>
                   55968: <td><ins class="diff-chg">U+0211C</ins></td>
                   55969: </tr>
                   55970: <tr>
                   55971: <td><code title=""><ins class=
                   55972: "diff-chg">ReverseElement;</ins></code></td>
                   55973: <td><ins class="diff-chg">U+0220B</ins></td>
                   55974: </tr>
                   55975: <tr>
                   55976: <td><code title=""><ins class=
                   55977: "diff-chg">ReverseEquilibrium;</ins></code></td>
                   55978: <td><ins class="diff-chg">U+021CB</ins></td>
                   55979: </tr>
                   55980: <tr>
                   55981: <td><code title=""><ins class=
                   55982: "diff-chg">ReverseUpEquilibrium;</ins></code></td>
                   55983: <td><ins class="diff-chg">U+0296F</ins></td>
                   55984: </tr>
                   55985: <tr>
                   55986: <td><code title=""><ins class="diff-chg">Rfr;</ins></code></td>
                   55987: <td><ins class="diff-chg">U+0211C</ins></td>
                   55988: </tr>
                   55989: <tr>
                   55990: <td><code title="">Rho;</code></td>
                   55991: <td><del class="diff-old">U+03A1</del> <ins class=
                   55992: "diff-chg">U+003A1</ins></td>
                   55993: </tr>
                   55994: <tr>
                   55995: <td><code title=""><ins class=
                   55996: "diff-chg">RightAngleBracket;</ins></code></td>
                   55997: <td><ins class="diff-chg">U+027E9</ins></td>
                   55998: </tr>
                   55999: <tr>
                   56000: <td><code title=""><ins class=
                   56001: "diff-chg">RightArrow;</ins></code></td>
                   56002: <td><ins class="diff-chg">U+02192</ins></td>
                   56003: </tr>
                   56004: <tr>
                   56005: <td><code title=""><ins class=
                   56006: "diff-chg">RightArrowBar;</ins></code></td>
                   56007: <td><ins class="diff-chg">U+021E5</ins></td>
                   56008: </tr>
                   56009: <tr>
                   56010: <td><code title=""><ins class=
                   56011: "diff-chg">RightArrowLeftArrow;</ins></code></td>
                   56012: <td><ins class="diff-chg">U+021C4</ins></td>
                   56013: </tr>
                   56014: <tr>
                   56015: <td><code title=""><ins class=
                   56016: "diff-chg">RightCeiling;</ins></code></td>
                   56017: <td><ins class="diff-chg">U+02309</ins></td>
                   56018: </tr>
                   56019: <tr>
                   56020: <td><code title=""><ins class=
                   56021: "diff-chg">RightDoubleBracket;</ins></code></td>
                   56022: <td><ins class="diff-chg">U+027E7</ins></td>
                   56023: </tr>
                   56024: <tr>
                   56025: <td><code title=""><ins class=
                   56026: "diff-chg">RightDownTeeVector;</ins></code></td>
                   56027: <td><ins class="diff-chg">U+0295D</ins></td>
                   56028: </tr>
                   56029: <tr>
                   56030: <td><code title=""><ins class=
                   56031: "diff-chg">RightDownVector;</ins></code></td>
                   56032: <td><ins class="diff-chg">U+021C2</ins></td>
                   56033: </tr>
                   56034: <tr>
                   56035: <td><code title=""><ins class=
                   56036: "diff-chg">RightDownVectorBar;</ins></code></td>
                   56037: <td><ins class="diff-chg">U+02955</ins></td>
                   56038: </tr>
                   56039: <tr>
                   56040: <td><code title=""><ins class=
                   56041: "diff-chg">RightFloor;</ins></code></td>
                   56042: <td><ins class="diff-chg">U+0230B</ins></td>
                   56043: </tr>
                   56044: <tr>
                   56045: <td><code title=""><ins class=
                   56046: "diff-chg">RightTee;</ins></code></td>
                   56047: <td><ins class="diff-chg">U+022A2</ins></td>
                   56048: </tr>
                   56049: <tr>
                   56050: <td><code title=""><ins class=
                   56051: "diff-chg">RightTeeArrow;</ins></code></td>
                   56052: <td><ins class="diff-chg">U+021A6</ins></td>
                   56053: </tr>
                   56054: <tr>
                   56055: <td><code title=""><ins class=
                   56056: "diff-chg">RightTeeVector;</ins></code></td>
                   56057: <td><ins class="diff-chg">U+0295B</ins></td>
                   56058: </tr>
                   56059: <tr>
                   56060: <td><code title=""><ins class=
                   56061: "diff-chg">RightTriangle;</ins></code></td>
                   56062: <td><ins class="diff-chg">U+022B3</ins></td>
                   56063: </tr>
                   56064: <tr>
                   56065: <td><code title=""><ins class=
                   56066: "diff-chg">RightTriangleBar;</ins></code></td>
                   56067: <td><ins class="diff-chg">U+029D0</ins></td>
                   56068: </tr>
                   56069: <tr>
                   56070: <td><code title=""><ins class=
                   56071: "diff-chg">RightTriangleEqual;</ins></code></td>
                   56072: <td><ins class="diff-chg">U+022B5</ins></td>
                   56073: </tr>
                   56074: <tr>
                   56075: <td><code title=""><ins class=
                   56076: "diff-chg">RightUpDownVector;</ins></code></td>
                   56077: <td><ins class="diff-chg">U+0294F</ins></td>
                   56078: </tr>
                   56079: <tr>
                   56080: <td><code title=""><ins class=
                   56081: "diff-chg">RightUpTeeVector;</ins></code></td>
                   56082: <td><ins class="diff-chg">U+0295C</ins></td>
                   56083: </tr>
                   56084: <tr>
                   56085: <td><code title=""><ins class=
                   56086: "diff-chg">RightUpVector;</ins></code></td>
                   56087: <td><ins class="diff-chg">U+021BE</ins></td>
                   56088: </tr>
                   56089: <tr>
                   56090: <td><code title=""><ins class=
                   56091: "diff-chg">RightUpVectorBar;</ins></code></td>
                   56092: <td><ins class="diff-chg">U+02954</ins></td>
                   56093: </tr>
                   56094: <tr>
                   56095: <td><code title=""><ins class=
                   56096: "diff-chg">RightVector;</ins></code></td>
                   56097: <td><ins class="diff-chg">U+021C0</ins></td>
                   56098: </tr>
                   56099: <tr>
                   56100: <td><code title=""><ins class=
                   56101: "diff-chg">RightVectorBar;</ins></code></td>
                   56102: <td><ins class="diff-chg">U+02953</ins></td>
                   56103: </tr>
                   56104: <tr>
                   56105: <td><code title=""><ins class=
                   56106: "diff-chg">Rightarrow;</ins></code></td>
                   56107: <td><ins class="diff-chg">U+021D2</ins></td>
                   56108: </tr>
                   56109: <tr>
                   56110: <td><code title=""><ins class="diff-chg">Ropf;</ins></code></td>
                   56111: <td><ins class="diff-chg">U+0211D</ins></td>
                   56112: </tr>
                   56113: <tr>
                   56114: <td><code title=""><ins class=
                   56115: "diff-chg">RoundImplies;</ins></code></td>
                   56116: <td><ins class="diff-chg">U+02970</ins></td>
                   56117: </tr>
                   56118: <tr>
                   56119: <td><code title=""><ins class=
                   56120: "diff-chg">Rrightarrow;</ins></code></td>
                   56121: <td><ins class="diff-chg">U+021DB</ins></td>
                   56122: </tr>
                   56123: <tr>
                   56124: <td><code title=""><ins class="diff-chg">Rscr;</ins></code></td>
                   56125: <td><ins class="diff-chg">U+0211B</ins></td>
                   56126: </tr>
                   56127: <tr>
                   56128: <td><code title=""><ins class="diff-chg">Rsh;</ins></code></td>
                   56129: <td><ins class="diff-chg">U+021B1</ins></td>
                   56130: </tr>
                   56131: <tr>
                   56132: <td><code title=""><ins class=
                   56133: "diff-chg">RuleDelayed;</ins></code></td>
                   56134: <td><ins class="diff-chg">U+029F4</ins></td>
                   56135: </tr>
                   56136: <tr>
                   56137: <td><code title=""><ins class="diff-chg">SHCHcy;</ins></code></td>
                   56138: <td><ins class="diff-chg">U+00429</ins></td>
                   56139: </tr>
                   56140: <tr>
                   56141: <td><code title=""><ins class="diff-chg">SHcy;</ins></code></td>
                   56142: <td><ins class="diff-chg">U+00428</ins></td>
                   56143: </tr>
                   56144: <tr>
                   56145: <td><code title=""><ins class="diff-chg">SOFTcy;</ins></code></td>
                   56146: <td><ins class="diff-chg">U+0042C</ins></td>
                   56147: </tr>
                   56148: <tr>
                   56149: <td><code title=""><ins class="diff-chg">Sacute;</ins></code></td>
                   56150: <td><ins class="diff-chg">U+0015A</ins></td>
                   56151: </tr>
                   56152: <tr>
                   56153: <td><code title=""><ins class="diff-chg">Sc;</ins></code></td>
                   56154: <td><ins class="diff-chg">U+02ABC</ins></td>
                   56155: </tr>
                   56156: <tr>
                   56157: <td><code title="">Scaron;</code></td>
1.2     ! mike     56158: <td><del class="diff-old">U+0160</del> <ins class=
        !          56159: "diff-chg">U+00160</ins></td>
1.1       mike     56160: </tr>
                   56161: <tr>
1.2     ! mike     56162: <td><code title=""><ins class="diff-chg">Scedil;</ins></code></td>
        !          56163: <td><ins class="diff-chg">U+0015E</ins></td>
1.1       mike     56164: </tr>
                   56165: <tr>
                   56166: <td><code title=""><ins class="diff-chg">Scirc;</ins></code></td>
                   56167: <td><ins class="diff-chg">U+0015C</ins></td>
                   56168: </tr>
                   56169: <tr>
                   56170: <td><code title=""><ins class="diff-chg">Scy;</ins></code></td>
                   56171: <td><ins class="diff-chg">U+00421</ins></td>
                   56172: </tr>
                   56173: <tr>
                   56174: <td><code title=""><ins class="diff-chg">Sfr;</ins></code></td>
                   56175: <td><ins class="diff-chg">U+1D516</ins></td>
                   56176: </tr>
                   56177: <tr>
                   56178: <td><code title=""><ins class=
                   56179: "diff-chg">ShortDownArrow;</ins></code></td>
                   56180: <td><ins class="diff-chg">U+02193</ins></td>
                   56181: </tr>
                   56182: <tr>
                   56183: <td><code title=""><ins class=
                   56184: "diff-chg">ShortLeftArrow;</ins></code></td>
                   56185: <td><ins class="diff-chg">U+02190</ins></td>
                   56186: </tr>
                   56187: <tr>
                   56188: <td><code title=""><ins class=
                   56189: "diff-chg">ShortRightArrow;</ins></code></td>
                   56190: <td><ins class="diff-chg">U+02192</ins></td>
                   56191: </tr>
                   56192: <tr>
                   56193: <td><code title=""><ins class=
                   56194: "diff-chg">ShortUpArrow;</ins></code></td>
                   56195: <td><ins class="diff-chg">U+02191</ins></td>
                   56196: </tr>
                   56197: <tr>
                   56198: <td><code title="">Sigma;</code></td>
                   56199: <td><del class="diff-old">U+03A3</del> <ins class=
                   56200: "diff-chg">U+003A3</ins></td>
                   56201: </tr>
                   56202: <tr>
                   56203: <td><code title=""><ins class=
                   56204: "diff-chg">SmallCircle;</ins></code></td>
                   56205: <td><ins class="diff-chg">U+02218</ins></td>
                   56206: </tr>
                   56207: <tr>
                   56208: <td><code title=""><ins class="diff-chg">Sopf;</ins></code></td>
                   56209: <td><ins class="diff-chg">U+1D54A</ins></td>
                   56210: </tr>
                   56211: <tr>
                   56212: <td><code title=""><ins class="diff-chg">Sqrt;</ins></code></td>
                   56213: <td><ins class="diff-chg">U+0221A</ins></td>
                   56214: </tr>
                   56215: <tr>
                   56216: <td><code title=""><ins class="diff-chg">Square;</ins></code></td>
                   56217: <td><ins class="diff-chg">U+025A1</ins></td>
                   56218: </tr>
                   56219: <tr>
                   56220: <td><code title=""><ins class=
                   56221: "diff-chg">SquareIntersection;</ins></code></td>
                   56222: <td><ins class="diff-chg">U+02293</ins></td>
                   56223: </tr>
                   56224: <tr>
                   56225: <td><code title=""><ins class=
                   56226: "diff-chg">SquareSubset;</ins></code></td>
                   56227: <td><ins class="diff-chg">U+0228F</ins></td>
                   56228: </tr>
                   56229: <tr>
                   56230: <td><code title=""><ins class=
                   56231: "diff-chg">SquareSubsetEqual;</ins></code></td>
                   56232: <td><ins class="diff-chg">U+02291</ins></td>
                   56233: </tr>
                   56234: <tr>
                   56235: <td><code title=""><ins class=
                   56236: "diff-chg">SquareSuperset;</ins></code></td>
                   56237: <td><ins class="diff-chg">U+02290</ins></td>
                   56238: </tr>
                   56239: <tr>
                   56240: <td><code title=""><ins class=
                   56241: "diff-chg">SquareSupersetEqual;</ins></code></td>
                   56242: <td><ins class="diff-chg">U+02292</ins></td>
                   56243: </tr>
                   56244: <tr>
                   56245: <td><code title=""><ins class=
                   56246: "diff-chg">SquareUnion;</ins></code></td>
                   56247: <td><ins class="diff-chg">U+02294</ins></td>
                   56248: </tr>
                   56249: <tr>
                   56250: <td><code title=""><ins class="diff-chg">Sscr;</ins></code></td>
                   56251: <td><ins class="diff-chg">U+1D4AE</ins></td>
                   56252: </tr>
                   56253: <tr>
                   56254: <td><code title=""><ins class="diff-chg">Star;</ins></code></td>
                   56255: <td><ins class="diff-chg">U+022C6</ins></td>
                   56256: </tr>
                   56257: <tr>
                   56258: <td><code title=""><ins class="diff-chg">Sub;</ins></code></td>
                   56259: <td><ins class="diff-chg">U+022D0</ins></td>
                   56260: </tr>
                   56261: <tr>
                   56262: <td><code title=""><ins class="diff-chg">Subset;</ins></code></td>
                   56263: <td><ins class="diff-chg">U+022D0</ins></td>
                   56264: </tr>
                   56265: <tr>
                   56266: <td><code title=""><ins class=
                   56267: "diff-chg">SubsetEqual;</ins></code></td>
                   56268: <td><ins class="diff-chg">U+02286</ins></td>
                   56269: </tr>
                   56270: <tr>
                   56271: <td><code title=""><ins class=
                   56272: "diff-chg">Succeeds;</ins></code></td>
                   56273: <td><ins class="diff-chg">U+0227B</ins></td>
                   56274: </tr>
                   56275: <tr>
                   56276: <td><code title=""><ins class=
                   56277: "diff-chg">SucceedsEqual;</ins></code></td>
                   56278: <td><ins class="diff-chg">U+02AB0</ins></td>
                   56279: </tr>
                   56280: <tr>
                   56281: <td><code title=""><ins class=
                   56282: "diff-chg">SucceedsSlantEqual;</ins></code></td>
                   56283: <td><ins class="diff-chg">U+0227D</ins></td>
                   56284: </tr>
                   56285: <tr>
                   56286: <td><code title=""><ins class=
                   56287: "diff-chg">SucceedsTilde;</ins></code></td>
                   56288: <td><ins class="diff-chg">U+0227F</ins></td>
                   56289: </tr>
                   56290: <tr>
                   56291: <td><code title=""><ins class=
                   56292: "diff-chg">SuchThat;</ins></code></td>
                   56293: <td><ins class="diff-chg">U+0220B</ins></td>
                   56294: </tr>
                   56295: <tr>
                   56296: <td><code title=""><ins class="diff-chg">Sum;</ins></code></td>
                   56297: <td><ins class="diff-chg">U+02211</ins></td>
                   56298: </tr>
                   56299: <tr>
                   56300: <td><code title=""><ins class="diff-chg">Sup;</ins></code></td>
                   56301: <td><ins class="diff-chg">U+022D1</ins></td>
                   56302: </tr>
                   56303: <tr>
                   56304: <td><code title=""><ins class=
                   56305: "diff-chg">Superset;</ins></code></td>
                   56306: <td><ins class="diff-chg">U+02283</ins></td>
                   56307: </tr>
                   56308: <tr>
                   56309: <td><code title=""><ins class=
                   56310: "diff-chg">SupersetEqual;</ins></code></td>
                   56311: <td><ins class="diff-chg">U+02287</ins></td>
                   56312: </tr>
                   56313: <tr>
                   56314: <td><code title=""><ins class="diff-chg">Supset;</ins></code></td>
                   56315: <td><ins class="diff-chg">U+022D1</ins></td>
                   56316: </tr>
                   56317: <tr>
                   56318: <td><code title="">THORN;</code></td>
                   56319: <td><del class="diff-old">U+00DE</del> <ins class=
                   56320: "diff-chg">U+000DE</ins></td>
                   56321: </tr>
                   56322: <tr>
                   56323: <td><code title="">THORN</code></td>
                   56324: <td><del class="diff-old">U+00DE</del> <ins class=
                   56325: "diff-chg">U+000DE</ins></td>
                   56326: </tr>
                   56327: <tr>
                   56328: <td><code title="">TRADE;</code></td>
                   56329: <td><del class="diff-old">U+2122</del> <ins class=
                   56330: "diff-chg">U+02122</ins></td>
                   56331: </tr>
                   56332: <tr>
                   56333: <td><code title=""><ins class="diff-chg">TSHcy;</ins></code></td>
                   56334: <td><ins class="diff-chg">U+0040B</ins></td>
                   56335: </tr>
                   56336: <tr>
                   56337: <td><code title=""><ins class="diff-chg">TScy;</ins></code></td>
                   56338: <td><ins class="diff-chg">U+00426</ins></td>
                   56339: </tr>
                   56340: <tr>
                   56341: <td><code title=""><ins class="diff-chg">Tab;</ins></code></td>
                   56342: <td><ins class="diff-chg">U+00009</ins></td>
                   56343: </tr>
                   56344: <tr>
                   56345: <td><code title="">Tau;</code></td>
                   56346: <td><del class="diff-old">U+03A4</del> <ins class=
                   56347: "diff-chg">U+003A4</ins></td>
                   56348: </tr>
                   56349: <tr>
                   56350: <td><code title=""><ins class="diff-chg">Tcaron;</ins></code></td>
                   56351: <td><ins class="diff-chg">U+00164</ins></td>
                   56352: </tr>
                   56353: <tr>
                   56354: <td><code title=""><ins class="diff-chg">Tcedil;</ins></code></td>
                   56355: <td><ins class="diff-chg">U+00162</ins></td>
                   56356: </tr>
                   56357: <tr>
                   56358: <td><code title=""><ins class="diff-chg">Tcy;</ins></code></td>
                   56359: <td><ins class="diff-chg">U+00422</ins></td>
                   56360: </tr>
                   56361: <tr>
                   56362: <td><code title=""><ins class="diff-chg">Tfr;</ins></code></td>
                   56363: <td><ins class="diff-chg">U+1D517</ins></td>
                   56364: </tr>
                   56365: <tr>
                   56366: <td><code title=""><ins class=
                   56367: "diff-chg">Therefore;</ins></code></td>
                   56368: <td><ins class="diff-chg">U+02234</ins></td>
                   56369: </tr>
                   56370: <tr>
                   56371: <td><code title="">Theta;</code></td>
                   56372: <td><del class="diff-old">U+0398</del> <ins class=
                   56373: "diff-chg">U+00398</ins></td>
                   56374: </tr>
                   56375: <tr>
                   56376: <td><code title=""><ins class=
                   56377: "diff-chg">ThinSpace;</ins></code></td>
                   56378: <td><ins class="diff-chg">U+02009</ins></td>
                   56379: </tr>
                   56380: <tr>
                   56381: <td><code title=""><ins class="diff-chg">Tilde;</ins></code></td>
                   56382: <td><ins class="diff-chg">U+0223C</ins></td>
                   56383: </tr>
                   56384: <tr>
                   56385: <td><code title=""><ins class=
                   56386: "diff-chg">TildeEqual;</ins></code></td>
                   56387: <td><ins class="diff-chg">U+02243</ins></td>
                   56388: </tr>
                   56389: <tr>
                   56390: <td><code title=""><ins class=
                   56391: "diff-chg">TildeFullEqual;</ins></code></td>
                   56392: <td><ins class="diff-chg">U+02245</ins></td>
                   56393: </tr>
                   56394: <tr>
                   56395: <td><code title=""><ins class=
                   56396: "diff-chg">TildeTilde;</ins></code></td>
                   56397: <td><ins class="diff-chg">U+02248</ins></td>
                   56398: </tr>
                   56399: <tr>
                   56400: <td><code title=""><ins class="diff-chg">Topf;</ins></code></td>
                   56401: <td><ins class="diff-chg">U+1D54B</ins></td>
                   56402: </tr>
                   56403: <tr>
                   56404: <td><code title=""><ins class=
                   56405: "diff-chg">TripleDot;</ins></code></td>
                   56406: <td><ins class="diff-chg">U+020DB</ins></td>
                   56407: </tr>
                   56408: <tr>
                   56409: <td><code title=""><ins class="diff-chg">Tscr;</ins></code></td>
                   56410: <td><ins class="diff-chg">U+1D4AF</ins></td>
                   56411: </tr>
                   56412: <tr>
                   56413: <td><code title=""><ins class="diff-chg">Tstrok;</ins></code></td>
                   56414: <td><ins class="diff-chg">U+00166</ins></td>
                   56415: </tr>
                   56416: <tr>
                   56417: <td><code title="">Uacute;</code></td>
                   56418: <td><del class="diff-old">U+00DA</del> <ins class=
                   56419: "diff-chg">U+000DA</ins></td>
                   56420: </tr>
                   56421: <tr>
                   56422: <td><code title="">Uacute</code></td>
                   56423: <td><del class="diff-old">U+00DA</del> <ins class=
                   56424: "diff-chg">U+000DA</ins></td>
                   56425: </tr>
                   56426: <tr>
                   56427: <td><code title=""><ins class="diff-chg">Uarr;</ins></code></td>
                   56428: <td><ins class="diff-chg">U+0219F</ins></td>
                   56429: </tr>
                   56430: <tr>
                   56431: <td><code title=""><ins class=
                   56432: "diff-chg">Uarrocir;</ins></code></td>
                   56433: <td><ins class="diff-chg">U+02949</ins></td>
                   56434: </tr>
                   56435: <tr>
                   56436: <td><code title=""><ins class="diff-chg">Ubrcy;</ins></code></td>
                   56437: <td><ins class="diff-chg">U+0040E</ins></td>
                   56438: </tr>
                   56439: <tr>
                   56440: <td><code title=""><ins class="diff-chg">Ubreve;</ins></code></td>
                   56441: <td><ins class="diff-chg">U+0016C</ins></td>
                   56442: </tr>
                   56443: <tr>
                   56444: <td><code title="">Ucirc;</code></td>
                   56445: <td><del class="diff-old">U+00DB</del> <ins class=
                   56446: "diff-chg">U+000DB</ins></td>
                   56447: </tr>
                   56448: <tr>
                   56449: <td><code title="">Ucirc</code></td>
                   56450: <td><del class="diff-old">U+00DB</del> <ins class=
                   56451: "diff-chg">U+000DB</ins></td>
                   56452: </tr>
                   56453: <tr>
                   56454: <td><code title=""><ins class="diff-chg">Ucy;</ins></code></td>
                   56455: <td><ins class="diff-chg">U+00423</ins></td>
                   56456: </tr>
                   56457: <tr>
                   56458: <td><code title=""><ins class="diff-chg">Udblac;</ins></code></td>
                   56459: <td><ins class="diff-chg">U+00170</ins></td>
                   56460: </tr>
                   56461: <tr>
                   56462: <td><code title=""><ins class="diff-chg">Ufr;</ins></code></td>
                   56463: <td><ins class="diff-chg">U+1D518</ins></td>
                   56464: </tr>
                   56465: <tr>
                   56466: <td><code title="">Ugrave;</code></td>
                   56467: <td><del class="diff-old">U+00D9</del> <ins class=
                   56468: "diff-chg">U+000D9</ins></td>
                   56469: </tr>
                   56470: <tr>
                   56471: <td><code title="">Ugrave</code></td>
                   56472: <td><del class="diff-old">U+00D9</del> <ins class=
                   56473: "diff-chg">U+000D9</ins></td>
                   56474: </tr>
                   56475: <tr>
                   56476: <td><code title=""><ins class="diff-chg">Umacr;</ins></code></td>
                   56477: <td><ins class="diff-chg">U+0016A</ins></td>
                   56478: </tr>
                   56479: <tr>
                   56480: <td><code title=""><ins class=
                   56481: "diff-chg">UnderBar;</ins></code></td>
                   56482: <td><ins class="diff-chg">U+00332</ins></td>
                   56483: </tr>
                   56484: <tr>
                   56485: <td><code title=""><ins class=
                   56486: "diff-chg">UnderBrace;</ins></code></td>
                   56487: <td><ins class="diff-chg">U+023DF</ins></td>
                   56488: </tr>
                   56489: <tr>
                   56490: <td><code title=""><ins class=
                   56491: "diff-chg">UnderBracket;</ins></code></td>
                   56492: <td><ins class="diff-chg">U+023B5</ins></td>
                   56493: </tr>
                   56494: <tr>
                   56495: <td><code title=""><ins class=
                   56496: "diff-chg">UnderParenthesis;</ins></code></td>
                   56497: <td><ins class="diff-chg">U+023DD</ins></td>
                   56498: </tr>
                   56499: <tr>
                   56500: <td><code title=""><ins class="diff-chg">Union;</ins></code></td>
                   56501: <td><ins class="diff-chg">U+022C3</ins></td>
                   56502: </tr>
                   56503: <tr>
                   56504: <td><code title=""><ins class=
                   56505: "diff-chg">UnionPlus;</ins></code></td>
                   56506: <td><ins class="diff-chg">U+0228E</ins></td>
                   56507: </tr>
                   56508: <tr>
                   56509: <td><code title=""><ins class="diff-chg">Uogon;</ins></code></td>
                   56510: <td><ins class="diff-chg">U+00172</ins></td>
                   56511: </tr>
                   56512: <tr>
                   56513: <td><code title=""><ins class="diff-chg">Uopf;</ins></code></td>
                   56514: <td><ins class="diff-chg">U+1D54C</ins></td>
                   56515: </tr>
                   56516: <tr>
                   56517: <td><code title=""><ins class="diff-chg">UpArrow;</ins></code></td>
                   56518: <td><ins class="diff-chg">U+02191</ins></td>
                   56519: </tr>
                   56520: <tr>
                   56521: <td><code title=""><ins class=
                   56522: "diff-chg">UpArrowBar;</ins></code></td>
                   56523: <td><ins class="diff-chg">U+02912</ins></td>
                   56524: </tr>
                   56525: <tr>
                   56526: <td><code title=""><ins class=
                   56527: "diff-chg">UpArrowDownArrow;</ins></code></td>
                   56528: <td><ins class="diff-chg">U+021C5</ins></td>
                   56529: </tr>
                   56530: <tr>
                   56531: <td><code title=""><ins class=
                   56532: "diff-chg">UpDownArrow;</ins></code></td>
                   56533: <td><ins class="diff-chg">U+02195</ins></td>
                   56534: </tr>
                   56535: <tr>
                   56536: <td><code title=""><ins class=
                   56537: "diff-chg">UpEquilibrium;</ins></code></td>
                   56538: <td><ins class="diff-chg">U+0296E</ins></td>
                   56539: </tr>
                   56540: <tr>
                   56541: <td><code title=""><ins class="diff-chg">UpTee;</ins></code></td>
                   56542: <td><ins class="diff-chg">U+022A5</ins></td>
                   56543: </tr>
                   56544: <tr>
                   56545: <td><code title=""><ins class=
                   56546: "diff-chg">UpTeeArrow;</ins></code></td>
                   56547: <td><ins class="diff-chg">U+021A5</ins></td>
                   56548: </tr>
                   56549: <tr>
                   56550: <td><code title=""><ins class="diff-chg">Uparrow;</ins></code></td>
                   56551: <td><ins class="diff-chg">U+021D1</ins></td>
                   56552: </tr>
                   56553: <tr>
                   56554: <td><code title=""><ins class=
                   56555: "diff-chg">Updownarrow;</ins></code></td>
                   56556: <td><ins class="diff-chg">U+021D5</ins></td>
                   56557: </tr>
                   56558: <tr>
                   56559: <td><code title=""><ins class=
                   56560: "diff-chg">UpperLeftArrow;</ins></code></td>
                   56561: <td><ins class="diff-chg">U+02196</ins></td>
                   56562: </tr>
                   56563: <tr>
                   56564: <td><code title=""><ins class=
                   56565: "diff-chg">UpperRightArrow;</ins></code></td>
                   56566: <td><ins class="diff-chg">U+02197</ins></td>
                   56567: </tr>
                   56568: <tr>
                   56569: <td><code title=""><ins class="diff-chg">Upsi;</ins></code></td>
                   56570: <td><ins class="diff-chg">U+003D2</ins></td>
                   56571: </tr>
                   56572: <tr>
                   56573: <td><code title="">Upsilon;</code></td>
                   56574: <td><del class="diff-old">U+03A5</del> <ins class=
                   56575: "diff-chg">U+003A5</ins></td>
                   56576: </tr>
                   56577: <tr>
                   56578: <td><code title=""><ins class="diff-chg">Uring;</ins></code></td>
                   56579: <td><ins class="diff-chg">U+0016E</ins></td>
                   56580: </tr>
                   56581: <tr>
                   56582: <td><code title=""><ins class="diff-chg">Uscr;</ins></code></td>
                   56583: <td><ins class="diff-chg">U+1D4B0</ins></td>
                   56584: </tr>
                   56585: <tr>
                   56586: <td><code title=""><ins class="diff-chg">Utilde;</ins></code></td>
                   56587: <td><ins class="diff-chg">U+00168</ins></td>
                   56588: </tr>
                   56589: <tr>
                   56590: <td><code title="">Uuml;</code></td>
                   56591: <td><del class="diff-old">U+00DC</del> <ins class=
                   56592: "diff-chg">U+000DC</ins></td>
                   56593: </tr>
                   56594: <tr>
                   56595: <td><code title="">Uuml</code></td>
                   56596: <td><del class="diff-old">U+00DC</del> <ins class=
                   56597: "diff-chg">U+000DC</ins></td>
                   56598: </tr>
                   56599: <tr>
                   56600: <td><code title=""><ins class="diff-chg">VDash;</ins></code></td>
                   56601: <td><ins class="diff-chg">U+022AB</ins></td>
                   56602: </tr>
                   56603: <tr>
                   56604: <td><code title=""><ins class="diff-chg">Vbar;</ins></code></td>
                   56605: <td><ins class="diff-chg">U+02AEB</ins></td>
                   56606: </tr>
                   56607: <tr>
                   56608: <td><code title=""><ins class="diff-chg">Vcy;</ins></code></td>
                   56609: <td><ins class="diff-chg">U+00412</ins></td>
                   56610: </tr>
                   56611: <tr>
                   56612: <td><code title=""><ins class="diff-chg">Vdash;</ins></code></td>
                   56613: <td><ins class="diff-chg">U+022A9</ins></td>
                   56614: </tr>
                   56615: <tr>
                   56616: <td><code title=""><ins class="diff-chg">Vdashl;</ins></code></td>
                   56617: <td><ins class="diff-chg">U+02AE6</ins></td>
                   56618: </tr>
                   56619: <tr>
                   56620: <td><code title=""><ins class="diff-chg">Vee;</ins></code></td>
                   56621: <td><ins class="diff-chg">U+022C1</ins></td>
                   56622: </tr>
                   56623: <tr>
                   56624: <td><code title=""><ins class="diff-chg">Verbar;</ins></code></td>
                   56625: <td><ins class="diff-chg">U+02016</ins></td>
                   56626: </tr>
                   56627: <tr>
                   56628: <td><code title=""><ins class="diff-chg">Vert;</ins></code></td>
                   56629: <td><ins class="diff-chg">U+02016</ins></td>
                   56630: </tr>
                   56631: <tr>
                   56632: <td><code title=""><ins class=
                   56633: "diff-chg">VerticalBar;</ins></code></td>
                   56634: <td><ins class="diff-chg">U+02223</ins></td>
                   56635: </tr>
                   56636: <tr>
                   56637: <td><code title=""><ins class=
                   56638: "diff-chg">VerticalLine;</ins></code></td>
                   56639: <td><ins class="diff-chg">U+0007C</ins></td>
                   56640: </tr>
                   56641: <tr>
                   56642: <td><code title=""><ins class=
                   56643: "diff-chg">VerticalSeparator;</ins></code></td>
                   56644: <td><ins class="diff-chg">U+02758</ins></td>
                   56645: </tr>
                   56646: <tr>
                   56647: <td><code title=""><ins class=
                   56648: "diff-chg">VerticalTilde;</ins></code></td>
                   56649: <td><ins class="diff-chg">U+02240</ins></td>
                   56650: </tr>
                   56651: <tr>
                   56652: <td><code title=""><ins class=
                   56653: "diff-chg">VeryThinSpace;</ins></code></td>
                   56654: <td><ins class="diff-chg">U+0200A</ins></td>
                   56655: </tr>
                   56656: <tr>
                   56657: <td><code title=""><ins class="diff-chg">Vfr;</ins></code></td>
                   56658: <td><ins class="diff-chg">U+1D519</ins></td>
                   56659: </tr>
                   56660: <tr>
                   56661: <td><code title=""><ins class="diff-chg">Vopf;</ins></code></td>
                   56662: <td><ins class="diff-chg">U+1D54D</ins></td>
                   56663: </tr>
                   56664: <tr>
                   56665: <td><code title=""><ins class="diff-chg">Vscr;</ins></code></td>
                   56666: <td><ins class="diff-chg">U+1D4B1</ins></td>
                   56667: </tr>
                   56668: <tr>
                   56669: <td><code title=""><ins class="diff-chg">Vvdash;</ins></code></td>
                   56670: <td><ins class="diff-chg">U+022AA</ins></td>
                   56671: </tr>
                   56672: <tr>
                   56673: <td><code title=""><ins class="diff-chg">Wcirc;</ins></code></td>
                   56674: <td><ins class="diff-chg">U+00174</ins></td>
                   56675: </tr>
                   56676: <tr>
                   56677: <td><code title=""><ins class="diff-chg">Wedge;</ins></code></td>
                   56678: <td><ins class="diff-chg">U+022C0</ins></td>
                   56679: </tr>
                   56680: <tr>
                   56681: <td><code title=""><ins class="diff-chg">Wfr;</ins></code></td>
                   56682: <td><ins class="diff-chg">U+1D51A</ins></td>
                   56683: </tr>
                   56684: <tr>
                   56685: <td><code title=""><ins class="diff-chg">Wopf;</ins></code></td>
                   56686: <td><ins class="diff-chg">U+1D54E</ins></td>
                   56687: </tr>
                   56688: <tr>
                   56689: <td><code title=""><ins class="diff-chg">Wscr;</ins></code></td>
                   56690: <td><ins class="diff-chg">U+1D4B2</ins></td>
                   56691: </tr>
                   56692: <tr>
                   56693: <td><code title=""><ins class="diff-chg">Xfr;</ins></code></td>
                   56694: <td><ins class="diff-chg">U+1D51B</ins></td>
                   56695: </tr>
                   56696: <tr>
                   56697: <td><code title="">Xi;</code></td>
                   56698: <td><del class="diff-old">U+039E</del> <ins class=
                   56699: "diff-chg">U+0039E</ins></td>
                   56700: </tr>
                   56701: <tr>
                   56702: <td><code title=""><ins class="diff-chg">Xopf;</ins></code></td>
                   56703: <td><ins class="diff-chg">U+1D54F</ins></td>
                   56704: </tr>
                   56705: <tr>
                   56706: <td><code title=""><ins class="diff-chg">Xscr;</ins></code></td>
                   56707: <td><ins class="diff-chg">U+1D4B3</ins></td>
                   56708: </tr>
                   56709: <tr>
                   56710: <td><code title=""><ins class="diff-chg">YAcy;</ins></code></td>
                   56711: <td><ins class="diff-chg">U+0042F</ins></td>
                   56712: </tr>
                   56713: <tr>
                   56714: <td><code title=""><ins class="diff-chg">YIcy;</ins></code></td>
                   56715: <td><ins class="diff-chg">U+00407</ins></td>
                   56716: </tr>
                   56717: <tr>
                   56718: <td><code title=""><ins class="diff-chg">YUcy;</ins></code></td>
                   56719: <td><ins class="diff-chg">U+0042E</ins></td>
                   56720: </tr>
                   56721: <tr>
                   56722: <td><code title="">Yacute;</code></td>
                   56723: <td><del class="diff-old">U+00DD</del> <ins class=
                   56724: "diff-chg">U+000DD</ins></td>
                   56725: </tr>
                   56726: <tr>
                   56727: <td><code title="">Yacute</code></td>
                   56728: <td><del class="diff-old">U+00DD</del> <ins class=
                   56729: "diff-chg">U+000DD</ins></td>
                   56730: </tr>
                   56731: <tr>
                   56732: <td><code title=""><ins class="diff-chg">Ycirc;</ins></code></td>
                   56733: <td><ins class="diff-chg">U+00176</ins></td>
                   56734: </tr>
                   56735: <tr>
                   56736: <td><code title=""><ins class="diff-chg">Ycy;</ins></code></td>
                   56737: <td><ins class="diff-chg">U+0042B</ins></td>
                   56738: </tr>
                   56739: <tr>
                   56740: <td><code title=""><ins class="diff-chg">Yfr;</ins></code></td>
                   56741: <td><ins class="diff-chg">U+1D51C</ins></td>
                   56742: </tr>
                   56743: <tr>
                   56744: <td><code title=""><ins class="diff-chg">Yopf;</ins></code></td>
                   56745: <td><ins class="diff-chg">U+1D550</ins></td>
                   56746: </tr>
                   56747: <tr>
                   56748: <td><code title=""><ins class="diff-chg">Yscr;</ins></code></td>
                   56749: <td><ins class="diff-chg">U+1D4B4</ins></td>
                   56750: </tr>
                   56751: <tr>
                   56752: <td><code title="">Yuml;</code></td>
                   56753: <td><del class="diff-old">U+0178</del> <ins class=
                   56754: "diff-chg">U+00178</ins></td>
                   56755: </tr>
                   56756: <tr>
                   56757: <td><code title=""><ins class="diff-chg">ZHcy;</ins></code></td>
                   56758: <td><ins class="diff-chg">U+00416</ins></td>
                   56759: </tr>
                   56760: <tr>
                   56761: <td><code title=""><ins class="diff-chg">Zacute;</ins></code></td>
                   56762: <td><ins class="diff-chg">U+00179</ins></td>
                   56763: </tr>
                   56764: <tr>
                   56765: <td><code title=""><ins class="diff-chg">Zcaron;</ins></code></td>
                   56766: <td><ins class="diff-chg">U+0017D</ins></td>
                   56767: </tr>
                   56768: <tr>
                   56769: <td><code title=""><ins class="diff-chg">Zcy;</ins></code></td>
                   56770: <td><ins class="diff-chg">U+00417</ins></td>
                   56771: </tr>
                   56772: <tr>
                   56773: <td><code title=""><ins class="diff-chg">Zdot;</ins></code></td>
                   56774: <td><ins class="diff-chg">U+0017B</ins></td>
                   56775: </tr>
                   56776: <tr>
                   56777: <td><code title=""><ins class=
                   56778: "diff-chg">ZeroWidthSpace;</ins></code></td>
                   56779: <td><ins class="diff-chg">U+0200B</ins></td>
                   56780: </tr>
                   56781: <tr>
                   56782: <td><code title="">Zeta;</code></td>
                   56783: <td><del class="diff-old">U+0396</del> <ins class=
                   56784: "diff-chg">U+00396</ins></td>
                   56785: </tr>
                   56786: <tr>
                   56787: <td><code title=""><ins class="diff-chg">Zfr;</ins></code></td>
                   56788: <td><ins class="diff-chg">U+02128</ins></td>
                   56789: </tr>
                   56790: <tr>
                   56791: <td><code title=""><ins class="diff-chg">Zopf;</ins></code></td>
                   56792: <td><ins class="diff-chg">U+02124</ins></td>
                   56793: </tr>
                   56794: <tr>
                   56795: <td><code title=""><ins class="diff-chg">Zscr;</ins></code></td>
                   56796: <td><ins class="diff-chg">U+1D4B5</ins></td>
                   56797: </tr>
                   56798: <tr>
                   56799: <td><code title="">aacute;</code></td>
                   56800: <td><del class="diff-old">U+00E1</del> <ins class=
                   56801: "diff-chg">U+000E1</ins></td>
                   56802: </tr>
                   56803: <tr>
                   56804: <td><code title="">aacute</code></td>
                   56805: <td><del class="diff-old">U+00E1</del> <ins class=
                   56806: "diff-chg">U+000E1</ins></td>
                   56807: </tr>
                   56808: <tr>
                   56809: <td><code title=""><ins class="diff-chg">abreve;</ins></code></td>
                   56810: <td><ins class="diff-chg">U+00103</ins></td>
                   56811: </tr>
                   56812: <tr>
                   56813: <td><code title=""><ins class="diff-chg">ac;</ins></code></td>
                   56814: <td><ins class="diff-chg">U+0223E</ins></td>
                   56815: </tr>
                   56816: <tr>
                   56817: <td><code title=""><ins class="diff-chg">acd;</ins></code></td>
                   56818: <td><ins class="diff-chg">U+0223F</ins></td>
                   56819: </tr>
                   56820: <tr>
                   56821: <td><code title="">acirc;</code></td>
                   56822: <td><del class="diff-old">U+00E2</del> <ins class=
                   56823: "diff-chg">U+000E2</ins></td>
                   56824: </tr>
                   56825: <tr>
                   56826: <td><code title="">acirc</code></td>
                   56827: <td><del class="diff-old">U+00E2</del> <ins class=
                   56828: "diff-chg">U+000E2</ins></td>
                   56829: </tr>
                   56830: <tr>
                   56831: <td><code title="">acute;</code></td>
                   56832: <td><del class="diff-old">U+00B4</del> <ins class=
                   56833: "diff-chg">U+000B4</ins></td>
                   56834: </tr>
                   56835: <tr>
                   56836: <td><code title="">acute</code></td>
                   56837: <td><del class="diff-old">U+00B4</del> <ins class=
                   56838: "diff-chg">U+000B4</ins></td>
                   56839: </tr>
                   56840: <tr>
                   56841: <td><code title=""><ins class="diff-chg">acy;</ins></code></td>
                   56842: <td><ins class="diff-chg">U+00430</ins></td>
                   56843: </tr>
                   56844: <tr>
                   56845: <td><code title="">aelig;</code></td>
                   56846: <td><del class="diff-old">U+00E6</del> <ins class=
                   56847: "diff-chg">U+000E6</ins></td>
                   56848: </tr>
                   56849: <tr>
                   56850: <td><code title="">aelig</code></td>
                   56851: <td><del class="diff-old">U+00E6</del> <ins class=
                   56852: "diff-chg">U+000E6</ins></td>
                   56853: </tr>
                   56854: <tr>
                   56855: <td><code title=""><ins class="diff-chg">af;</ins></code></td>
                   56856: <td><ins class="diff-chg">U+02061</ins></td>
                   56857: </tr>
                   56858: <tr>
                   56859: <td><code title=""><ins class="diff-chg">afr;</ins></code></td>
                   56860: <td><ins class="diff-chg">U+1D51E</ins></td>
                   56861: </tr>
                   56862: <tr>
                   56863: <td><code title="">agrave;</code></td>
                   56864: <td><del class="diff-old">U+00E0</del> <ins class=
                   56865: "diff-chg">U+000E0</ins></td>
                   56866: </tr>
                   56867: <tr>
                   56868: <td><code title="">agrave</code></td>
                   56869: <td><del class="diff-old">U+00E0</del> <ins class=
                   56870: "diff-chg">U+000E0</ins></td>
                   56871: </tr>
                   56872: <tr>
                   56873: <td><code title="">alefsym;</code></td>
                   56874: <td><del class="diff-old">U+2135</del> <ins class=
                   56875: "diff-chg">U+02135</ins></td>
                   56876: </tr>
                   56877: <tr>
                   56878: <td><code title=""><ins class="diff-chg">aleph;</ins></code></td>
                   56879: <td><ins class="diff-chg">U+02135</ins></td>
                   56880: </tr>
                   56881: <tr>
                   56882: <td><code title="">alpha;</code></td>
                   56883: <td><del class="diff-old">U+03B1</del> <ins class=
                   56884: "diff-chg">U+003B1</ins></td>
                   56885: </tr>
                   56886: <tr>
                   56887: <td><code title=""><ins class="diff-chg">amacr;</ins></code></td>
                   56888: <td><ins class="diff-chg">U+00101</ins></td>
                   56889: </tr>
                   56890: <tr>
                   56891: <td><code title=""><ins class="diff-chg">amalg;</ins></code></td>
                   56892: <td><ins class="diff-chg">U+02A3F</ins></td>
                   56893: </tr>
                   56894: <tr>
                   56895: <td><code title="">amp;</code></td>
                   56896: <td><del class="diff-old">U+0026</del> <ins class=
                   56897: "diff-chg">U+00026</ins></td>
                   56898: </tr>
                   56899: <tr>
                   56900: <td><code title="">amp</code></td>
                   56901: <td><del class="diff-old">U+0026</del> <ins class=
                   56902: "diff-chg">U+00026</ins></td>
                   56903: </tr>
                   56904: <tr>
                   56905: <td><code title="">and;</code></td>
                   56906: <td><del class="diff-old">U+2227</del> <ins class=
                   56907: "diff-chg">U+02227</ins></td>
                   56908: </tr>
                   56909: <tr>
                   56910: <td><code title=""><ins class="diff-chg">andand;</ins></code></td>
                   56911: <td><ins class="diff-chg">U+02A55</ins></td>
                   56912: </tr>
                   56913: <tr>
                   56914: <td><code title=""><ins class="diff-chg">andd;</ins></code></td>
                   56915: <td><ins class="diff-chg">U+02A5C</ins></td>
                   56916: </tr>
                   56917: <tr>
                   56918: <td><code title=""><ins class=
                   56919: "diff-chg">andslope;</ins></code></td>
                   56920: <td><ins class="diff-chg">U+02A58</ins></td>
                   56921: </tr>
                   56922: <tr>
                   56923: <td><code title=""><ins class="diff-chg">andv;</ins></code></td>
                   56924: <td><ins class="diff-chg">U+02A5A</ins></td>
                   56925: </tr>
                   56926: <tr>
                   56927: <td><code title="">ang;</code></td>
                   56928: <td><del class="diff-old">U+2220</del> <ins class=
                   56929: "diff-chg">U+02220</ins></td>
                   56930: </tr>
                   56931: <tr>
                   56932: <td><code title=""><ins class="diff-chg">ange;</ins></code></td>
                   56933: <td><ins class="diff-chg">U+029A4</ins></td>
                   56934: </tr>
                   56935: <tr>
                   56936: <td><code title=""><ins class="diff-chg">angle;</ins></code></td>
                   56937: <td><ins class="diff-chg">U+02220</ins></td>
                   56938: </tr>
                   56939: <tr>
                   56940: <td><code title=""><ins class="diff-chg">angmsd;</ins></code></td>
                   56941: <td><ins class="diff-chg">U+02221</ins></td>
                   56942: </tr>
                   56943: <tr>
                   56944: <td><code title=""><ins class=
                   56945: "diff-chg">angmsdaa;</ins></code></td>
                   56946: <td><ins class="diff-chg">U+029A8</ins></td>
                   56947: </tr>
                   56948: <tr>
                   56949: <td><code title=""><ins class=
                   56950: "diff-chg">angmsdab;</ins></code></td>
                   56951: <td><ins class="diff-chg">U+029A9</ins></td>
                   56952: </tr>
                   56953: <tr>
                   56954: <td><code title=""><ins class=
                   56955: "diff-chg">angmsdac;</ins></code></td>
                   56956: <td><ins class="diff-chg">U+029AA</ins></td>
                   56957: </tr>
                   56958: <tr>
                   56959: <td><code title=""><ins class=
                   56960: "diff-chg">angmsdad;</ins></code></td>
                   56961: <td><ins class="diff-chg">U+029AB</ins></td>
                   56962: </tr>
                   56963: <tr>
                   56964: <td><code title=""><ins class=
                   56965: "diff-chg">angmsdae;</ins></code></td>
                   56966: <td><ins class="diff-chg">U+029AC</ins></td>
                   56967: </tr>
                   56968: <tr>
                   56969: <td><code title=""><ins class=
                   56970: "diff-chg">angmsdaf;</ins></code></td>
                   56971: <td><ins class="diff-chg">U+029AD</ins></td>
                   56972: </tr>
                   56973: <tr>
                   56974: <td><code title=""><ins class=
                   56975: "diff-chg">angmsdag;</ins></code></td>
                   56976: <td><ins class="diff-chg">U+029AE</ins></td>
                   56977: </tr>
                   56978: <tr>
                   56979: <td><code title=""><ins class=
                   56980: "diff-chg">angmsdah;</ins></code></td>
                   56981: <td><ins class="diff-chg">U+029AF</ins></td>
                   56982: </tr>
                   56983: <tr>
                   56984: <td><code title=""><ins class="diff-chg">angrt;</ins></code></td>
                   56985: <td><ins class="diff-chg">U+0221F</ins></td>
                   56986: </tr>
                   56987: <tr>
                   56988: <td><code title=""><ins class="diff-chg">angrtvb;</ins></code></td>
                   56989: <td><ins class="diff-chg">U+022BE</ins></td>
                   56990: </tr>
                   56991: <tr>
                   56992: <td><code title=""><ins class=
                   56993: "diff-chg">angrtvbd;</ins></code></td>
                   56994: <td><ins class="diff-chg">U+0299D</ins></td>
                   56995: </tr>
                   56996: <tr>
                   56997: <td><code title=""><ins class="diff-chg">angsph;</ins></code></td>
                   56998: <td><ins class="diff-chg">U+02222</ins></td>
                   56999: </tr>
                   57000: <tr>
                   57001: <td><code title=""><ins class="diff-chg">angst;</ins></code></td>
                   57002: <td><ins class="diff-chg">U+0212B</ins></td>
                   57003: </tr>
                   57004: <tr>
                   57005: <td><code title=""><ins class="diff-chg">angzarr;</ins></code></td>
                   57006: <td><ins class="diff-chg">U+0237C</ins></td>
                   57007: </tr>
                   57008: <tr>
                   57009: <td><code title=""><ins class="diff-chg">aogon;</ins></code></td>
                   57010: <td><ins class="diff-chg">U+00105</ins></td>
                   57011: </tr>
                   57012: <tr>
                   57013: <td><code title=""><ins class="diff-chg">aopf;</ins></code></td>
                   57014: <td><ins class="diff-chg">U+1D552</ins></td>
                   57015: </tr>
                   57016: <tr>
                   57017: <td><code title=""><ins class="diff-chg">ap;</ins></code></td>
                   57018: <td><ins class="diff-chg">U+02248</ins></td>
                   57019: </tr>
                   57020: <tr>
                   57021: <td><code title=""><ins class="diff-chg">apE;</ins></code></td>
                   57022: <td><ins class="diff-chg">U+02A70</ins></td>
                   57023: </tr>
                   57024: <tr>
                   57025: <td><code title=""><ins class="diff-chg">apacir;</ins></code></td>
                   57026: <td><ins class="diff-chg">U+02A6F</ins></td>
                   57027: </tr>
                   57028: <tr>
                   57029: <td><code title=""><ins class="diff-chg">ape;</ins></code></td>
                   57030: <td><ins class="diff-chg">U+0224A</ins></td>
                   57031: </tr>
                   57032: <tr>
                   57033: <td><code title=""><ins class="diff-chg">apid;</ins></code></td>
                   57034: <td><ins class="diff-chg">U+0224B</ins></td>
                   57035: </tr>
                   57036: <tr>
                   57037: <td><code title="">apos;</code></td>
                   57038: <td><del class="diff-old">U+0027</del> <ins class=
                   57039: "diff-chg">U+00027</ins></td>
                   57040: </tr>
                   57041: <tr>
                   57042: <td><code title=""><ins class="diff-chg">approx;</ins></code></td>
                   57043: <td><ins class="diff-chg">U+02248</ins></td>
                   57044: </tr>
                   57045: <tr>
                   57046: <td><code title=""><ins class=
                   57047: "diff-chg">approxeq;</ins></code></td>
                   57048: <td><ins class="diff-chg">U+0224A</ins></td>
                   57049: </tr>
                   57050: <tr>
                   57051: <td><code title="">aring;</code></td>
                   57052: <td><del class="diff-old">U+00E5</del> <ins class=
                   57053: "diff-chg">U+000E5</ins></td>
                   57054: </tr>
                   57055: <tr>
                   57056: <td><code title="">aring</code></td>
                   57057: <td><del class="diff-old">U+00E5</del> <ins class=
                   57058: "diff-chg">U+000E5</ins></td>
                   57059: </tr>
                   57060: <tr>
                   57061: <td><code title=""><ins class="diff-chg">ascr;</ins></code></td>
                   57062: <td><ins class="diff-chg">U+1D4B6</ins></td>
                   57063: </tr>
                   57064: <tr>
                   57065: <td><code title=""><ins class="diff-chg">ast;</ins></code></td>
                   57066: <td><ins class="diff-chg">U+0002A</ins></td>
                   57067: </tr>
                   57068: <tr>
                   57069: <td><code title="">asymp;</code></td>
                   57070: <td><del class="diff-old">U+2248</del> <ins class=
                   57071: "diff-chg">U+02248</ins></td>
                   57072: </tr>
                   57073: <tr>
                   57074: <td><code title=""><ins class="diff-chg">asympeq;</ins></code></td>
                   57075: <td><ins class="diff-chg">U+0224D</ins></td>
                   57076: </tr>
                   57077: <tr>
                   57078: <td><code title="">atilde;</code></td>
                   57079: <td><del class="diff-old">U+00E3</del> <ins class=
                   57080: "diff-chg">U+000E3</ins></td>
                   57081: </tr>
                   57082: <tr>
                   57083: <td><code title="">atilde</code></td>
                   57084: <td><del class="diff-old">U+00E3</del> <ins class=
                   57085: "diff-chg">U+000E3</ins></td>
                   57086: </tr>
                   57087: <tr>
                   57088: <td><code title="">auml;</code></td>
                   57089: <td><del class="diff-old">U+00E4</del> <ins class=
                   57090: "diff-chg">U+000E4</ins></td>
                   57091: </tr>
                   57092: <tr>
                   57093: <td><code title="">auml</code></td>
                   57094: <td><del class="diff-old">U+00E4</del> <ins class=
                   57095: "diff-chg">U+000E4</ins></td>
                   57096: </tr>
                   57097: <tr>
                   57098: <td><code title=""><ins class=
                   57099: "diff-chg">awconint;</ins></code></td>
                   57100: <td><ins class="diff-chg">U+02233</ins></td>
                   57101: </tr>
                   57102: <tr>
                   57103: <td><code title=""><ins class="diff-chg">awint;</ins></code></td>
                   57104: <td><ins class="diff-chg">U+02A11</ins></td>
                   57105: </tr>
                   57106: <tr>
                   57107: <td><code title=""><ins class="diff-chg">bNot;</ins></code></td>
                   57108: <td><ins class="diff-chg">U+02AED</ins></td>
                   57109: </tr>
                   57110: <tr>
                   57111: <td><code title=""><ins class=
                   57112: "diff-chg">backcong;</ins></code></td>
                   57113: <td><ins class="diff-chg">U+0224C</ins></td>
                   57114: </tr>
                   57115: <tr>
                   57116: <td><code title=""><ins class=
                   57117: "diff-chg">backepsilon;</ins></code></td>
                   57118: <td><ins class="diff-chg">U+003F6</ins></td>
                   57119: </tr>
                   57120: <tr>
                   57121: <td><code title=""><ins class=
                   57122: "diff-chg">backprime;</ins></code></td>
                   57123: <td><ins class="diff-chg">U+02035</ins></td>
                   57124: </tr>
                   57125: <tr>
                   57126: <td><code title=""><ins class="diff-chg">backsim;</ins></code></td>
                   57127: <td><ins class="diff-chg">U+0223D</ins></td>
                   57128: </tr>
                   57129: <tr>
                   57130: <td><code title=""><ins class=
                   57131: "diff-chg">backsimeq;</ins></code></td>
                   57132: <td><ins class="diff-chg">U+022CD</ins></td>
                   57133: </tr>
                   57134: <tr>
                   57135: <td><code title=""><ins class="diff-chg">barvee;</ins></code></td>
                   57136: <td><ins class="diff-chg">U+022BD</ins></td>
                   57137: </tr>
                   57138: <tr>
                   57139: <td><code title=""><ins class="diff-chg">barwed;</ins></code></td>
                   57140: <td><ins class="diff-chg">U+02305</ins></td>
                   57141: </tr>
                   57142: <tr>
                   57143: <td><code title=""><ins class=
                   57144: "diff-chg">barwedge;</ins></code></td>
                   57145: <td><ins class="diff-chg">U+02305</ins></td>
                   57146: </tr>
                   57147: <tr>
                   57148: <td><code title=""><ins class="diff-chg">bbrk;</ins></code></td>
                   57149: <td><ins class="diff-chg">U+023B5</ins></td>
                   57150: </tr>
                   57151: <tr>
                   57152: <td><code title=""><ins class=
                   57153: "diff-chg">bbrktbrk;</ins></code></td>
                   57154: <td><ins class="diff-chg">U+023B6</ins></td>
                   57155: </tr>
                   57156: <tr>
                   57157: <td><code title=""><ins class="diff-chg">bcong;</ins></code></td>
                   57158: <td><ins class="diff-chg">U+0224C</ins></td>
                   57159: </tr>
                   57160: <tr>
                   57161: <td><code title=""><ins class="diff-chg">bcy;</ins></code></td>
                   57162: <td><ins class="diff-chg">U+00431</ins></td>
                   57163: </tr>
                   57164: <tr>
                   57165: <td><code title="">bdquo;</code></td>
1.2     ! mike     57166: <td><del class="diff-old">U+201E</del> <ins class=
        !          57167: "diff-chg">U+0201E</ins></td>
1.1       mike     57168: </tr>
                   57169: <tr>
1.2     ! mike     57170: <td><code title=""><ins class="diff-chg">becaus;</ins></code></td>
        !          57171: <td><ins class="diff-chg">U+02235</ins></td>
1.1       mike     57172: </tr>
                   57173: <tr>
                   57174: <td><code title=""><ins class="diff-chg">because;</ins></code></td>
                   57175: <td><ins class="diff-chg">U+02235</ins></td>
                   57176: </tr>
                   57177: <tr>
                   57178: <td><code title=""><ins class="diff-chg">bemptyv;</ins></code></td>
                   57179: <td><ins class="diff-chg">U+029B0</ins></td>
                   57180: </tr>
                   57181: <tr>
                   57182: <td><code title=""><ins class="diff-chg">bepsi;</ins></code></td>
                   57183: <td><ins class="diff-chg">U+003F6</ins></td>
                   57184: </tr>
                   57185: <tr>
                   57186: <td><code title=""><ins class="diff-chg">bernou;</ins></code></td>
                   57187: <td><ins class="diff-chg">U+0212C</ins></td>
                   57188: </tr>
                   57189: <tr>
                   57190: <td><code title="">beta;</code></td>
                   57191: <td><del class="diff-old">U+03B2</del> <ins class=
                   57192: "diff-chg">U+003B2</ins></td>
                   57193: </tr>
                   57194: <tr>
                   57195: <td><code title=""><ins class="diff-chg">beth;</ins></code></td>
                   57196: <td><ins class="diff-chg">U+02136</ins></td>
                   57197: </tr>
                   57198: <tr>
                   57199: <td><code title=""><ins class="diff-chg">between;</ins></code></td>
                   57200: <td><ins class="diff-chg">U+0226C</ins></td>
                   57201: </tr>
                   57202: <tr>
                   57203: <td><code title=""><ins class="diff-chg">bfr;</ins></code></td>
                   57204: <td><ins class="diff-chg">U+1D51F</ins></td>
                   57205: </tr>
                   57206: <tr>
                   57207: <td><code title=""><ins class="diff-chg">bigcap;</ins></code></td>
                   57208: <td><ins class="diff-chg">U+022C2</ins></td>
                   57209: </tr>
                   57210: <tr>
                   57211: <td><code title=""><ins class="diff-chg">bigcirc;</ins></code></td>
                   57212: <td><ins class="diff-chg">U+025EF</ins></td>
                   57213: </tr>
                   57214: <tr>
                   57215: <td><code title=""><ins class="diff-chg">bigcup;</ins></code></td>
                   57216: <td><ins class="diff-chg">U+022C3</ins></td>
                   57217: </tr>
                   57218: <tr>
                   57219: <td><code title=""><ins class="diff-chg">bigodot;</ins></code></td>
                   57220: <td><ins class="diff-chg">U+02A00</ins></td>
                   57221: </tr>
                   57222: <tr>
                   57223: <td><code title=""><ins class=
                   57224: "diff-chg">bigoplus;</ins></code></td>
                   57225: <td><ins class="diff-chg">U+02A01</ins></td>
                   57226: </tr>
                   57227: <tr>
                   57228: <td><code title=""><ins class=
                   57229: "diff-chg">bigotimes;</ins></code></td>
                   57230: <td><ins class="diff-chg">U+02A02</ins></td>
                   57231: </tr>
                   57232: <tr>
                   57233: <td><code title=""><ins class=
                   57234: "diff-chg">bigsqcup;</ins></code></td>
                   57235: <td><ins class="diff-chg">U+02A06</ins></td>
                   57236: </tr>
                   57237: <tr>
                   57238: <td><code title=""><ins class="diff-chg">bigstar;</ins></code></td>
                   57239: <td><ins class="diff-chg">U+02605</ins></td>
                   57240: </tr>
                   57241: <tr>
                   57242: <td><code title=""><ins class=
                   57243: "diff-chg">bigtriangledown;</ins></code></td>
                   57244: <td><ins class="diff-chg">U+025BD</ins></td>
                   57245: </tr>
                   57246: <tr>
                   57247: <td><code title=""><ins class=
                   57248: "diff-chg">bigtriangleup;</ins></code></td>
                   57249: <td><ins class="diff-chg">U+025B3</ins></td>
                   57250: </tr>
                   57251: <tr>
                   57252: <td><code title=""><ins class=
                   57253: "diff-chg">biguplus;</ins></code></td>
                   57254: <td><ins class="diff-chg">U+02A04</ins></td>
                   57255: </tr>
                   57256: <tr>
                   57257: <td><code title=""><ins class="diff-chg">bigvee;</ins></code></td>
                   57258: <td><ins class="diff-chg">U+022C1</ins></td>
                   57259: </tr>
                   57260: <tr>
                   57261: <td><code title=""><ins class=
                   57262: "diff-chg">bigwedge;</ins></code></td>
                   57263: <td><ins class="diff-chg">U+022C0</ins></td>
                   57264: </tr>
                   57265: <tr>
                   57266: <td><code title=""><ins class="diff-chg">bkarow;</ins></code></td>
                   57267: <td><ins class="diff-chg">U+0290D</ins></td>
                   57268: </tr>
                   57269: <tr>
                   57270: <td><code title=""><ins class=
                   57271: "diff-chg">blacklozenge;</ins></code></td>
                   57272: <td><ins class="diff-chg">U+029EB</ins></td>
                   57273: </tr>
                   57274: <tr>
                   57275: <td><code title=""><ins class=
                   57276: "diff-chg">blacksquare;</ins></code></td>
                   57277: <td><ins class="diff-chg">U+025AA</ins></td>
                   57278: </tr>
                   57279: <tr>
                   57280: <td><code title=""><ins class=
                   57281: "diff-chg">blacktriangle;</ins></code></td>
                   57282: <td><ins class="diff-chg">U+025B4</ins></td>
                   57283: </tr>
                   57284: <tr>
                   57285: <td><code title=""><ins class=
                   57286: "diff-chg">blacktriangledown;</ins></code></td>
                   57287: <td><ins class="diff-chg">U+025BE</ins></td>
                   57288: </tr>
                   57289: <tr>
                   57290: <td><code title=""><ins class=
                   57291: "diff-chg">blacktriangleleft;</ins></code></td>
                   57292: <td><ins class="diff-chg">U+025C2</ins></td>
                   57293: </tr>
                   57294: <tr>
                   57295: <td><code title=""><ins class=
                   57296: "diff-chg">blacktriangleright;</ins></code></td>
                   57297: <td><ins class="diff-chg">U+025B8</ins></td>
                   57298: </tr>
                   57299: <tr>
                   57300: <td><code title=""><ins class="diff-chg">blank;</ins></code></td>
                   57301: <td><ins class="diff-chg">U+02423</ins></td>
                   57302: </tr>
                   57303: <tr>
                   57304: <td><code title=""><ins class="diff-chg">blk12;</ins></code></td>
                   57305: <td><ins class="diff-chg">U+02592</ins></td>
                   57306: </tr>
                   57307: <tr>
                   57308: <td><code title=""><ins class="diff-chg">blk14;</ins></code></td>
                   57309: <td><ins class="diff-chg">U+02591</ins></td>
                   57310: </tr>
                   57311: <tr>
                   57312: <td><code title=""><ins class="diff-chg">blk34;</ins></code></td>
                   57313: <td><ins class="diff-chg">U+02593</ins></td>
                   57314: </tr>
                   57315: <tr>
                   57316: <td><code title=""><ins class="diff-chg">block;</ins></code></td>
                   57317: <td><ins class="diff-chg">U+02588</ins></td>
                   57318: </tr>
                   57319: <tr>
                   57320: <td><code title=""><ins class="diff-chg">bnot;</ins></code></td>
                   57321: <td><ins class="diff-chg">U+02310</ins></td>
                   57322: </tr>
                   57323: <tr>
                   57324: <td><code title=""><ins class="diff-chg">bopf;</ins></code></td>
                   57325: <td><ins class="diff-chg">U+1D553</ins></td>
                   57326: </tr>
                   57327: <tr>
                   57328: <td><code title=""><ins class="diff-chg">bot;</ins></code></td>
                   57329: <td><ins class="diff-chg">U+022A5</ins></td>
                   57330: </tr>
                   57331: <tr>
                   57332: <td><code title=""><ins class="diff-chg">bottom;</ins></code></td>
                   57333: <td><ins class="diff-chg">U+022A5</ins></td>
                   57334: </tr>
                   57335: <tr>
                   57336: <td><code title=""><ins class="diff-chg">bowtie;</ins></code></td>
                   57337: <td><ins class="diff-chg">U+022C8</ins></td>
                   57338: </tr>
                   57339: <tr>
                   57340: <td><code title=""><ins class="diff-chg">boxDL;</ins></code></td>
                   57341: <td><ins class="diff-chg">U+02557</ins></td>
                   57342: </tr>
                   57343: <tr>
                   57344: <td><code title=""><ins class="diff-chg">boxDR;</ins></code></td>
                   57345: <td><ins class="diff-chg">U+02554</ins></td>
                   57346: </tr>
                   57347: <tr>
                   57348: <td><code title=""><ins class="diff-chg">boxDl;</ins></code></td>
                   57349: <td><ins class="diff-chg">U+02556</ins></td>
                   57350: </tr>
                   57351: <tr>
                   57352: <td><code title=""><ins class="diff-chg">boxDr;</ins></code></td>
                   57353: <td><ins class="diff-chg">U+02553</ins></td>
                   57354: </tr>
                   57355: <tr>
                   57356: <td><code title=""><ins class="diff-chg">boxH;</ins></code></td>
                   57357: <td><ins class="diff-chg">U+02550</ins></td>
                   57358: </tr>
                   57359: <tr>
                   57360: <td><code title=""><ins class="diff-chg">boxHD;</ins></code></td>
                   57361: <td><ins class="diff-chg">U+02566</ins></td>
                   57362: </tr>
                   57363: <tr>
                   57364: <td><code title=""><ins class="diff-chg">boxHU;</ins></code></td>
                   57365: <td><ins class="diff-chg">U+02569</ins></td>
                   57366: </tr>
                   57367: <tr>
                   57368: <td><code title=""><ins class="diff-chg">boxHd;</ins></code></td>
                   57369: <td><ins class="diff-chg">U+02564</ins></td>
                   57370: </tr>
                   57371: <tr>
                   57372: <td><code title=""><ins class="diff-chg">boxHu;</ins></code></td>
                   57373: <td><ins class="diff-chg">U+02567</ins></td>
                   57374: </tr>
                   57375: <tr>
                   57376: <td><code title=""><ins class="diff-chg">boxUL;</ins></code></td>
                   57377: <td><ins class="diff-chg">U+0255D</ins></td>
                   57378: </tr>
                   57379: <tr>
                   57380: <td><code title=""><ins class="diff-chg">boxUR;</ins></code></td>
                   57381: <td><ins class="diff-chg">U+0255A</ins></td>
                   57382: </tr>
                   57383: <tr>
                   57384: <td><code title=""><ins class="diff-chg">boxUl;</ins></code></td>
                   57385: <td><ins class="diff-chg">U+0255C</ins></td>
                   57386: </tr>
                   57387: <tr>
                   57388: <td><code title=""><ins class="diff-chg">boxUr;</ins></code></td>
                   57389: <td><ins class="diff-chg">U+02559</ins></td>
                   57390: </tr>
                   57391: <tr>
                   57392: <td><code title=""><ins class="diff-chg">boxV;</ins></code></td>
                   57393: <td><ins class="diff-chg">U+02551</ins></td>
                   57394: </tr>
                   57395: <tr>
                   57396: <td><code title=""><ins class="diff-chg">boxVH;</ins></code></td>
                   57397: <td><ins class="diff-chg">U+0256C</ins></td>
                   57398: </tr>
                   57399: <tr>
                   57400: <td><code title=""><ins class="diff-chg">boxVL;</ins></code></td>
                   57401: <td><ins class="diff-chg">U+02563</ins></td>
                   57402: </tr>
                   57403: <tr>
                   57404: <td><code title=""><ins class="diff-chg">boxVR;</ins></code></td>
                   57405: <td><ins class="diff-chg">U+02560</ins></td>
                   57406: </tr>
                   57407: <tr>
                   57408: <td><code title=""><ins class="diff-chg">boxVh;</ins></code></td>
                   57409: <td><ins class="diff-chg">U+0256B</ins></td>
                   57410: </tr>
                   57411: <tr>
                   57412: <td><code title=""><ins class="diff-chg">boxVl;</ins></code></td>
                   57413: <td><ins class="diff-chg">U+02562</ins></td>
                   57414: </tr>
                   57415: <tr>
                   57416: <td><code title=""><ins class="diff-chg">boxVr;</ins></code></td>
                   57417: <td><ins class="diff-chg">U+0255F</ins></td>
                   57418: </tr>
                   57419: <tr>
                   57420: <td><code title=""><ins class="diff-chg">boxbox;</ins></code></td>
                   57421: <td><ins class="diff-chg">U+029C9</ins></td>
                   57422: </tr>
                   57423: <tr>
                   57424: <td><code title=""><ins class="diff-chg">boxdL;</ins></code></td>
                   57425: <td><ins class="diff-chg">U+02555</ins></td>
                   57426: </tr>
                   57427: <tr>
                   57428: <td><code title=""><ins class="diff-chg">boxdR;</ins></code></td>
                   57429: <td><ins class="diff-chg">U+02552</ins></td>
                   57430: </tr>
                   57431: <tr>
                   57432: <td><code title=""><ins class="diff-chg">boxdl;</ins></code></td>
                   57433: <td><ins class="diff-chg">U+02510</ins></td>
                   57434: </tr>
                   57435: <tr>
                   57436: <td><code title=""><ins class="diff-chg">boxdr;</ins></code></td>
                   57437: <td><ins class="diff-chg">U+0250C</ins></td>
                   57438: </tr>
                   57439: <tr>
                   57440: <td><code title=""><ins class="diff-chg">boxh;</ins></code></td>
                   57441: <td><ins class="diff-chg">U+02500</ins></td>
                   57442: </tr>
                   57443: <tr>
                   57444: <td><code title=""><ins class="diff-chg">boxhD;</ins></code></td>
                   57445: <td><ins class="diff-chg">U+02565</ins></td>
                   57446: </tr>
                   57447: <tr>
                   57448: <td><code title=""><ins class="diff-chg">boxhU;</ins></code></td>
                   57449: <td><ins class="diff-chg">U+02568</ins></td>
                   57450: </tr>
                   57451: <tr>
                   57452: <td><code title=""><ins class="diff-chg">boxhd;</ins></code></td>
                   57453: <td><ins class="diff-chg">U+0252C</ins></td>
                   57454: </tr>
                   57455: <tr>
                   57456: <td><code title=""><ins class="diff-chg">boxhu;</ins></code></td>
                   57457: <td><ins class="diff-chg">U+02534</ins></td>
                   57458: </tr>
                   57459: <tr>
                   57460: <td><code title=""><ins class=
                   57461: "diff-chg">boxminus;</ins></code></td>
                   57462: <td><ins class="diff-chg">U+0229F</ins></td>
                   57463: </tr>
                   57464: <tr>
                   57465: <td><code title=""><ins class="diff-chg">boxplus;</ins></code></td>
                   57466: <td><ins class="diff-chg">U+0229E</ins></td>
                   57467: </tr>
                   57468: <tr>
                   57469: <td><code title=""><ins class=
                   57470: "diff-chg">boxtimes;</ins></code></td>
                   57471: <td><ins class="diff-chg">U+022A0</ins></td>
                   57472: </tr>
                   57473: <tr>
                   57474: <td><code title=""><ins class="diff-chg">boxuL;</ins></code></td>
                   57475: <td><ins class="diff-chg">U+0255B</ins></td>
                   57476: </tr>
                   57477: <tr>
                   57478: <td><code title=""><ins class="diff-chg">boxuR;</ins></code></td>
                   57479: <td><ins class="diff-chg">U+02558</ins></td>
                   57480: </tr>
                   57481: <tr>
                   57482: <td><code title=""><ins class="diff-chg">boxul;</ins></code></td>
                   57483: <td><ins class="diff-chg">U+02518</ins></td>
                   57484: </tr>
                   57485: <tr>
                   57486: <td><code title=""><ins class="diff-chg">boxur;</ins></code></td>
                   57487: <td><ins class="diff-chg">U+02514</ins></td>
                   57488: </tr>
                   57489: <tr>
                   57490: <td><code title=""><ins class="diff-chg">boxv;</ins></code></td>
                   57491: <td><ins class="diff-chg">U+02502</ins></td>
                   57492: </tr>
                   57493: <tr>
                   57494: <td><code title=""><ins class="diff-chg">boxvH;</ins></code></td>
                   57495: <td><ins class="diff-chg">U+0256A</ins></td>
                   57496: </tr>
                   57497: <tr>
                   57498: <td><code title=""><ins class="diff-chg">boxvL;</ins></code></td>
                   57499: <td><ins class="diff-chg">U+02561</ins></td>
                   57500: </tr>
                   57501: <tr>
                   57502: <td><code title=""><ins class="diff-chg">boxvR;</ins></code></td>
                   57503: <td><ins class="diff-chg">U+0255E</ins></td>
                   57504: </tr>
                   57505: <tr>
                   57506: <td><code title=""><ins class="diff-chg">boxvh;</ins></code></td>
                   57507: <td><ins class="diff-chg">U+0253C</ins></td>
                   57508: </tr>
                   57509: <tr>
                   57510: <td><code title=""><ins class="diff-chg">boxvl;</ins></code></td>
                   57511: <td><ins class="diff-chg">U+02524</ins></td>
                   57512: </tr>
                   57513: <tr>
                   57514: <td><code title=""><ins class="diff-chg">boxvr;</ins></code></td>
                   57515: <td><ins class="diff-chg">U+0251C</ins></td>
                   57516: </tr>
                   57517: <tr>
                   57518: <td><code title=""><ins class="diff-chg">bprime;</ins></code></td>
                   57519: <td><ins class="diff-chg">U+02035</ins></td>
                   57520: </tr>
                   57521: <tr>
                   57522: <td><code title=""><ins class="diff-chg">breve;</ins></code></td>
                   57523: <td><ins class="diff-chg">U+002D8</ins></td>
                   57524: </tr>
                   57525: <tr>
                   57526: <td><code title="">brvbar;</code></td>
                   57527: <td><del class="diff-old">U+00A6</del> <ins class=
                   57528: "diff-chg">U+000A6</ins></td>
                   57529: </tr>
                   57530: <tr>
                   57531: <td><code title="">brvbar</code></td>
                   57532: <td><del class="diff-old">U+00A6</del> <ins class=
                   57533: "diff-chg">U+000A6</ins></td>
                   57534: </tr>
                   57535: <tr>
                   57536: <td><code title=""><ins class="diff-chg">bscr;</ins></code></td>
                   57537: <td><ins class="diff-chg">U+1D4B7</ins></td>
                   57538: </tr>
                   57539: <tr>
                   57540: <td><code title=""><ins class="diff-chg">bsemi;</ins></code></td>
                   57541: <td><ins class="diff-chg">U+0204F</ins></td>
                   57542: </tr>
                   57543: <tr>
                   57544: <td><code title=""><ins class="diff-chg">bsim;</ins></code></td>
                   57545: <td><ins class="diff-chg">U+0223D</ins></td>
                   57546: </tr>
                   57547: <tr>
                   57548: <td><code title=""><ins class="diff-chg">bsime;</ins></code></td>
                   57549: <td><ins class="diff-chg">U+022CD</ins></td>
                   57550: </tr>
                   57551: <tr>
                   57552: <td><code title=""><ins class="diff-chg">bsol;</ins></code></td>
                   57553: <td><ins class="diff-chg">U+0005C</ins></td>
                   57554: </tr>
                   57555: <tr>
                   57556: <td><code title=""><ins class="diff-chg">bsolb;</ins></code></td>
                   57557: <td><ins class="diff-chg">U+029C5</ins></td>
                   57558: </tr>
                   57559: <tr>
                   57560: <td><code title="">bull;</code></td>
                   57561: <td><del class="diff-old">U+2022</del> <ins class=
                   57562: "diff-chg">U+02022</ins></td>
                   57563: </tr>
                   57564: <tr>
                   57565: <td><code title=""><ins class="diff-chg">bullet;</ins></code></td>
                   57566: <td><ins class="diff-chg">U+02022</ins></td>
                   57567: </tr>
                   57568: <tr>
                   57569: <td><code title=""><ins class="diff-chg">bump;</ins></code></td>
                   57570: <td><ins class="diff-chg">U+0224E</ins></td>
                   57571: </tr>
                   57572: <tr>
                   57573: <td><code title=""><ins class="diff-chg">bumpE;</ins></code></td>
                   57574: <td><ins class="diff-chg">U+02AAE</ins></td>
                   57575: </tr>
                   57576: <tr>
                   57577: <td><code title=""><ins class="diff-chg">bumpe;</ins></code></td>
                   57578: <td><ins class="diff-chg">U+0224F</ins></td>
                   57579: </tr>
                   57580: <tr>
                   57581: <td><code title=""><ins class="diff-chg">bumpeq;</ins></code></td>
                   57582: <td><ins class="diff-chg">U+0224F</ins></td>
                   57583: </tr>
                   57584: <tr>
                   57585: <td><code title=""><ins class="diff-chg">cacute;</ins></code></td>
                   57586: <td><ins class="diff-chg">U+00107</ins></td>
                   57587: </tr>
                   57588: <tr>
                   57589: <td><code title="">cap;</code></td>
                   57590: <td><del class="diff-old">U+2229</del> <ins class=
                   57591: "diff-chg">U+02229</ins></td>
                   57592: </tr>
                   57593: <tr>
                   57594: <td><code title=""><ins class="diff-chg">capand;</ins></code></td>
                   57595: <td><ins class="diff-chg">U+02A44</ins></td>
                   57596: </tr>
                   57597: <tr>
                   57598: <td><code title=""><ins class=
                   57599: "diff-chg">capbrcup;</ins></code></td>
                   57600: <td><ins class="diff-chg">U+02A49</ins></td>
                   57601: </tr>
                   57602: <tr>
                   57603: <td><code title=""><ins class="diff-chg">capcap;</ins></code></td>
                   57604: <td><ins class="diff-chg">U+02A4B</ins></td>
                   57605: </tr>
                   57606: <tr>
                   57607: <td><code title=""><ins class="diff-chg">capcup;</ins></code></td>
                   57608: <td><ins class="diff-chg">U+02A47</ins></td>
                   57609: </tr>
                   57610: <tr>
                   57611: <td><code title=""><ins class="diff-chg">capdot;</ins></code></td>
                   57612: <td><ins class="diff-chg">U+02A40</ins></td>
                   57613: </tr>
                   57614: <tr>
                   57615: <td><code title=""><ins class="diff-chg">caret;</ins></code></td>
                   57616: <td><ins class="diff-chg">U+02041</ins></td>
                   57617: </tr>
                   57618: <tr>
                   57619: <td><code title=""><ins class="diff-chg">caron;</ins></code></td>
                   57620: <td><ins class="diff-chg">U+002C7</ins></td>
                   57621: </tr>
                   57622: <tr>
                   57623: <td><code title=""><ins class="diff-chg">ccaps;</ins></code></td>
                   57624: <td><ins class="diff-chg">U+02A4D</ins></td>
                   57625: </tr>
                   57626: <tr>
                   57627: <td><code title=""><ins class="diff-chg">ccaron;</ins></code></td>
                   57628: <td><ins class="diff-chg">U+0010D</ins></td>
                   57629: </tr>
                   57630: <tr>
                   57631: <td><code title="">ccedil;</code></td>
                   57632: <td><del class="diff-old">U+00E7</del> <ins class=
                   57633: "diff-chg">U+000E7</ins></td>
                   57634: </tr>
                   57635: <tr>
                   57636: <td><code title="">ccedil</code></td>
                   57637: <td><del class="diff-old">U+00E7</del> <ins class=
                   57638: "diff-chg">U+000E7</ins></td>
                   57639: </tr>
                   57640: <tr>
                   57641: <td><code title=""><ins class="diff-chg">ccirc;</ins></code></td>
                   57642: <td><ins class="diff-chg">U+00109</ins></td>
                   57643: </tr>
                   57644: <tr>
                   57645: <td><code title=""><ins class="diff-chg">ccups;</ins></code></td>
                   57646: <td><ins class="diff-chg">U+02A4C</ins></td>
                   57647: </tr>
                   57648: <tr>
                   57649: <td><code title=""><ins class="diff-chg">ccupssm;</ins></code></td>
                   57650: <td><ins class="diff-chg">U+02A50</ins></td>
                   57651: </tr>
                   57652: <tr>
                   57653: <td><code title=""><ins class="diff-chg">cdot;</ins></code></td>
                   57654: <td><ins class="diff-chg">U+0010B</ins></td>
                   57655: </tr>
                   57656: <tr>
                   57657: <td><code title="">cedil;</code></td>
                   57658: <td><del class="diff-old">U+00B8</del> <ins class=
                   57659: "diff-chg">U+000B8</ins></td>
                   57660: </tr>
                   57661: <tr>
                   57662: <td><code title="">cedil</code></td>
                   57663: <td><del class="diff-old">U+00B8</del> <ins class=
                   57664: "diff-chg">U+000B8</ins></td>
                   57665: </tr>
                   57666: <tr>
                   57667: <td><code title=""><ins class="diff-chg">cemptyv;</ins></code></td>
                   57668: <td><ins class="diff-chg">U+029B2</ins></td>
                   57669: </tr>
                   57670: <tr>
                   57671: <td><code title="">cent;</code></td>
                   57672: <td><del class="diff-old">U+00A2</del> <ins class=
                   57673: "diff-chg">U+000A2</ins></td>
                   57674: </tr>
                   57675: <tr>
                   57676: <td><code title="">cent</code></td>
1.2     ! mike     57677: <td><del class="diff-old">U+00A2</del> <ins class=
        !          57678: "diff-chg">U+000A2</ins></td>
1.1       mike     57679: </tr>
                   57680: <tr>
                   57681: <td><code title=""><ins class=
1.2     ! mike     57682: "diff-chg">centerdot;</ins></code></td>
        !          57683: <td><ins class="diff-chg">U+000B7</ins></td>
1.1       mike     57684: </tr>
                   57685: <tr>
                   57686: <td><code title=""><ins class="diff-chg">cfr;</ins></code></td>
                   57687: <td><ins class="diff-chg">U+1D520</ins></td>
                   57688: </tr>
                   57689: <tr>
                   57690: <td><code title=""><ins class="diff-chg">chcy;</ins></code></td>
                   57691: <td><ins class="diff-chg">U+00447</ins></td>
                   57692: </tr>
                   57693: <tr>
                   57694: <td><code title=""><ins class="diff-chg">check;</ins></code></td>
                   57695: <td><ins class="diff-chg">U+02713</ins></td>
                   57696: </tr>
                   57697: <tr>
                   57698: <td><code title=""><ins class=
                   57699: "diff-chg">checkmark;</ins></code></td>
                   57700: <td><ins class="diff-chg">U+02713</ins></td>
                   57701: </tr>
                   57702: <tr>
                   57703: <td><code title="">chi;</code></td>
                   57704: <td><del class="diff-old">U+03C7</del> <ins class=
                   57705: "diff-chg">U+003C7</ins></td>
                   57706: </tr>
                   57707: <tr>
                   57708: <td><code title=""><ins class="diff-chg">cir;</ins></code></td>
                   57709: <td><ins class="diff-chg">U+025CB</ins></td>
                   57710: </tr>
                   57711: <tr>
                   57712: <td><code title=""><ins class="diff-chg">cirE;</ins></code></td>
                   57713: <td><ins class="diff-chg">U+029C3</ins></td>
                   57714: </tr>
                   57715: <tr>
                   57716: <td><code title="">circ;</code></td>
                   57717: <td><del class="diff-old">U+02C6</del> <ins class=
                   57718: "diff-chg">U+002C6</ins></td>
                   57719: </tr>
                   57720: <tr>
                   57721: <td><code title=""><ins class="diff-chg">circeq;</ins></code></td>
                   57722: <td><ins class="diff-chg">U+02257</ins></td>
                   57723: </tr>
                   57724: <tr>
                   57725: <td><code title=""><ins class=
                   57726: "diff-chg">circlearrowleft;</ins></code></td>
                   57727: <td><ins class="diff-chg">U+021BA</ins></td>
                   57728: </tr>
                   57729: <tr>
                   57730: <td><code title=""><ins class=
                   57731: "diff-chg">circlearrowright;</ins></code></td>
                   57732: <td><ins class="diff-chg">U+021BB</ins></td>
                   57733: </tr>
                   57734: <tr>
                   57735: <td><code title=""><ins class=
                   57736: "diff-chg">circledR;</ins></code></td>
                   57737: <td><ins class="diff-chg">U+000AE</ins></td>
                   57738: </tr>
                   57739: <tr>
                   57740: <td><code title=""><ins class=
                   57741: "diff-chg">circledS;</ins></code></td>
                   57742: <td><ins class="diff-chg">U+024C8</ins></td>
                   57743: </tr>
                   57744: <tr>
                   57745: <td><code title=""><ins class=
                   57746: "diff-chg">circledast;</ins></code></td>
                   57747: <td><ins class="diff-chg">U+0229B</ins></td>
                   57748: </tr>
                   57749: <tr>
                   57750: <td><code title=""><ins class=
                   57751: "diff-chg">circledcirc;</ins></code></td>
                   57752: <td><ins class="diff-chg">U+0229A</ins></td>
                   57753: </tr>
                   57754: <tr>
                   57755: <td><code title=""><ins class=
                   57756: "diff-chg">circleddash;</ins></code></td>
                   57757: <td><ins class="diff-chg">U+0229D</ins></td>
                   57758: </tr>
                   57759: <tr>
                   57760: <td><code title=""><ins class="diff-chg">cire;</ins></code></td>
                   57761: <td><ins class="diff-chg">U+02257</ins></td>
                   57762: </tr>
                   57763: <tr>
                   57764: <td><code title=""><ins class=
                   57765: "diff-chg">cirfnint;</ins></code></td>
                   57766: <td><ins class="diff-chg">U+02A10</ins></td>
                   57767: </tr>
                   57768: <tr>
                   57769: <td><code title=""><ins class="diff-chg">cirmid;</ins></code></td>
                   57770: <td><ins class="diff-chg">U+02AEF</ins></td>
                   57771: </tr>
                   57772: <tr>
                   57773: <td><code title=""><ins class="diff-chg">cirscir;</ins></code></td>
                   57774: <td><ins class="diff-chg">U+029C2</ins></td>
                   57775: </tr>
                   57776: <tr>
                   57777: <td><code title="">clubs;</code></td>
                   57778: <td><del class="diff-old">U+2663</del> <ins class=
                   57779: "diff-chg">U+02663</ins></td>
                   57780: </tr>
                   57781: <tr>
                   57782: <td><code title=""><ins class=
                   57783: "diff-chg">clubsuit;</ins></code></td>
                   57784: <td><ins class="diff-chg">U+02663</ins></td>
                   57785: </tr>
                   57786: <tr>
                   57787: <td><code title=""><ins class="diff-chg">colon;</ins></code></td>
                   57788: <td><ins class="diff-chg">U+0003A</ins></td>
                   57789: </tr>
                   57790: <tr>
                   57791: <td><code title=""><ins class="diff-chg">colone;</ins></code></td>
                   57792: <td><ins class="diff-chg">U+02254</ins></td>
                   57793: </tr>
                   57794: <tr>
                   57795: <td><code title=""><ins class="diff-chg">coloneq;</ins></code></td>
                   57796: <td><ins class="diff-chg">U+02254</ins></td>
                   57797: </tr>
                   57798: <tr>
                   57799: <td><code title=""><ins class="diff-chg">comma;</ins></code></td>
                   57800: <td><ins class="diff-chg">U+0002C</ins></td>
                   57801: </tr>
                   57802: <tr>
                   57803: <td><code title=""><ins class="diff-chg">commat;</ins></code></td>
                   57804: <td><ins class="diff-chg">U+00040</ins></td>
                   57805: </tr>
                   57806: <tr>
                   57807: <td><code title=""><ins class="diff-chg">comp;</ins></code></td>
                   57808: <td><ins class="diff-chg">U+02201</ins></td>
                   57809: </tr>
                   57810: <tr>
                   57811: <td><code title=""><ins class="diff-chg">compfn;</ins></code></td>
                   57812: <td><ins class="diff-chg">U+02218</ins></td>
                   57813: </tr>
                   57814: <tr>
                   57815: <td><code title=""><ins class=
                   57816: "diff-chg">complement;</ins></code></td>
                   57817: <td><ins class="diff-chg">U+02201</ins></td>
                   57818: </tr>
                   57819: <tr>
                   57820: <td><code title=""><ins class=
                   57821: "diff-chg">complexes;</ins></code></td>
                   57822: <td><ins class="diff-chg">U+02102</ins></td>
                   57823: </tr>
                   57824: <tr>
                   57825: <td><code title="">cong;</code></td>
                   57826: <td><del class="diff-old">U+2245</del> <ins class=
                   57827: "diff-chg">U+02245</ins></td>
                   57828: </tr>
                   57829: <tr>
                   57830: <td><code title=""><ins class="diff-chg">congdot;</ins></code></td>
                   57831: <td><ins class="diff-chg">U+02A6D</ins></td>
                   57832: </tr>
                   57833: <tr>
                   57834: <td><code title=""><ins class="diff-chg">conint;</ins></code></td>
                   57835: <td><ins class="diff-chg">U+0222E</ins></td>
                   57836: </tr>
                   57837: <tr>
                   57838: <td><code title=""><ins class="diff-chg">copf;</ins></code></td>
                   57839: <td><ins class="diff-chg">U+1D554</ins></td>
                   57840: </tr>
                   57841: <tr>
                   57842: <td><code title=""><ins class="diff-chg">coprod;</ins></code></td>
                   57843: <td><ins class="diff-chg">U+02210</ins></td>
                   57844: </tr>
                   57845: <tr>
                   57846: <td><code title="">copy;</code></td>
                   57847: <td><del class="diff-old">U+00A9</del> <ins class=
                   57848: "diff-chg">U+000A9</ins></td>
                   57849: </tr>
                   57850: <tr>
                   57851: <td><code title="">copy</code></td>
                   57852: <td><del class="diff-old">U+00A9</del> <ins class=
                   57853: "diff-chg">U+000A9</ins></td>
                   57854: </tr>
                   57855: <tr>
                   57856: <td><code title=""><ins class="diff-chg">copysr;</ins></code></td>
                   57857: <td><ins class="diff-chg">U+02117</ins></td>
                   57858: </tr>
                   57859: <tr>
                   57860: <td><code title="">crarr;</code></td>
                   57861: <td><del class="diff-old">U+21B5</del> <ins class=
                   57862: "diff-chg">U+021B5</ins></td>
                   57863: </tr>
                   57864: <tr>
                   57865: <td><code title=""><ins class="diff-chg">cross;</ins></code></td>
                   57866: <td><ins class="diff-chg">U+02717</ins></td>
                   57867: </tr>
                   57868: <tr>
                   57869: <td><code title=""><ins class="diff-chg">cscr;</ins></code></td>
                   57870: <td><ins class="diff-chg">U+1D4B8</ins></td>
                   57871: </tr>
                   57872: <tr>
                   57873: <td><code title=""><ins class="diff-chg">csub;</ins></code></td>
                   57874: <td><ins class="diff-chg">U+02ACF</ins></td>
                   57875: </tr>
                   57876: <tr>
                   57877: <td><code title=""><ins class="diff-chg">csube;</ins></code></td>
                   57878: <td><ins class="diff-chg">U+02AD1</ins></td>
                   57879: </tr>
                   57880: <tr>
                   57881: <td><code title=""><ins class="diff-chg">csup;</ins></code></td>
                   57882: <td><ins class="diff-chg">U+02AD0</ins></td>
                   57883: </tr>
                   57884: <tr>
                   57885: <td><code title=""><ins class="diff-chg">csupe;</ins></code></td>
                   57886: <td><ins class="diff-chg">U+02AD2</ins></td>
                   57887: </tr>
                   57888: <tr>
                   57889: <td><code title=""><ins class="diff-chg">ctdot;</ins></code></td>
                   57890: <td><ins class="diff-chg">U+022EF</ins></td>
                   57891: </tr>
                   57892: <tr>
                   57893: <td><code title=""><ins class="diff-chg">cudarrl;</ins></code></td>
                   57894: <td><ins class="diff-chg">U+02938</ins></td>
                   57895: </tr>
                   57896: <tr>
                   57897: <td><code title=""><ins class="diff-chg">cudarrr;</ins></code></td>
                   57898: <td><ins class="diff-chg">U+02935</ins></td>
                   57899: </tr>
                   57900: <tr>
                   57901: <td><code title=""><ins class="diff-chg">cuepr;</ins></code></td>
                   57902: <td><ins class="diff-chg">U+022DE</ins></td>
                   57903: </tr>
                   57904: <tr>
                   57905: <td><code title=""><ins class="diff-chg">cuesc;</ins></code></td>
                   57906: <td><ins class="diff-chg">U+022DF</ins></td>
                   57907: </tr>
                   57908: <tr>
                   57909: <td><code title=""><ins class="diff-chg">cularr;</ins></code></td>
                   57910: <td><ins class="diff-chg">U+021B6</ins></td>
                   57911: </tr>
                   57912: <tr>
                   57913: <td><code title=""><ins class="diff-chg">cularrp;</ins></code></td>
                   57914: <td><ins class="diff-chg">U+0293D</ins></td>
                   57915: </tr>
                   57916: <tr>
                   57917: <td><code title="">cup;</code></td>
                   57918: <td><del class="diff-old">U+222A</del> <ins class=
                   57919: "diff-chg">U+0222A</ins></td>
                   57920: </tr>
                   57921: <tr>
                   57922: <td><code title=""><ins class=
                   57923: "diff-chg">cupbrcap;</ins></code></td>
                   57924: <td><ins class="diff-chg">U+02A48</ins></td>
                   57925: </tr>
                   57926: <tr>
                   57927: <td><code title=""><ins class="diff-chg">cupcap;</ins></code></td>
                   57928: <td><ins class="diff-chg">U+02A46</ins></td>
                   57929: </tr>
                   57930: <tr>
                   57931: <td><code title=""><ins class="diff-chg">cupcup;</ins></code></td>
                   57932: <td><ins class="diff-chg">U+02A4A</ins></td>
                   57933: </tr>
                   57934: <tr>
                   57935: <td><code title=""><ins class="diff-chg">cupdot;</ins></code></td>
                   57936: <td><ins class="diff-chg">U+0228D</ins></td>
                   57937: </tr>
                   57938: <tr>
                   57939: <td><code title=""><ins class="diff-chg">cupor;</ins></code></td>
                   57940: <td><ins class="diff-chg">U+02A45</ins></td>
                   57941: </tr>
                   57942: <tr>
                   57943: <td><code title=""><ins class="diff-chg">curarr;</ins></code></td>
                   57944: <td><ins class="diff-chg">U+021B7</ins></td>
                   57945: </tr>
                   57946: <tr>
                   57947: <td><code title=""><ins class="diff-chg">curarrm;</ins></code></td>
                   57948: <td><ins class="diff-chg">U+0293C</ins></td>
                   57949: </tr>
                   57950: <tr>
                   57951: <td><code title=""><ins class=
                   57952: "diff-chg">curlyeqprec;</ins></code></td>
                   57953: <td><ins class="diff-chg">U+022DE</ins></td>
                   57954: </tr>
                   57955: <tr>
                   57956: <td><code title=""><ins class=
                   57957: "diff-chg">curlyeqsucc;</ins></code></td>
                   57958: <td><ins class="diff-chg">U+022DF</ins></td>
                   57959: </tr>
                   57960: <tr>
                   57961: <td><code title=""><ins class=
                   57962: "diff-chg">curlyvee;</ins></code></td>
                   57963: <td><ins class="diff-chg">U+022CE</ins></td>
                   57964: </tr>
                   57965: <tr>
                   57966: <td><code title=""><ins class=
                   57967: "diff-chg">curlywedge;</ins></code></td>
                   57968: <td><ins class="diff-chg">U+022CF</ins></td>
                   57969: </tr>
                   57970: <tr>
                   57971: <td><code title="">curren;</code></td>
                   57972: <td><del class="diff-old">U+00A4</del> <ins class=
                   57973: "diff-chg">U+000A4</ins></td>
                   57974: </tr>
                   57975: <tr>
                   57976: <td><code title="">curren</code></td>
                   57977: <td><del class="diff-old">U+00A4</del> <ins class=
                   57978: "diff-chg">U+000A4</ins></td>
                   57979: </tr>
                   57980: <tr>
                   57981: <td><code title=""><ins class=
                   57982: "diff-chg">curvearrowleft;</ins></code></td>
                   57983: <td><ins class="diff-chg">U+021B6</ins></td>
                   57984: </tr>
                   57985: <tr>
                   57986: <td><code title=""><ins class=
                   57987: "diff-chg">curvearrowright;</ins></code></td>
                   57988: <td><ins class="diff-chg">U+021B7</ins></td>
                   57989: </tr>
                   57990: <tr>
                   57991: <td><code title=""><ins class="diff-chg">cuvee;</ins></code></td>
                   57992: <td><ins class="diff-chg">U+022CE</ins></td>
                   57993: </tr>
                   57994: <tr>
                   57995: <td><code title=""><ins class="diff-chg">cuwed;</ins></code></td>
                   57996: <td><ins class="diff-chg">U+022CF</ins></td>
                   57997: </tr>
                   57998: <tr>
                   57999: <td><code title=""><ins class=
                   58000: "diff-chg">cwconint;</ins></code></td>
                   58001: <td><ins class="diff-chg">U+02232</ins></td>
                   58002: </tr>
                   58003: <tr>
                   58004: <td><code title=""><ins class="diff-chg">cwint;</ins></code></td>
                   58005: <td><ins class="diff-chg">U+02231</ins></td>
                   58006: </tr>
                   58007: <tr>
                   58008: <td><code title=""><ins class="diff-chg">cylcty;</ins></code></td>
                   58009: <td><ins class="diff-chg">U+0232D</ins></td>
                   58010: </tr>
                   58011: <tr>
                   58012: <td><code title="">dArr;</code></td>
                   58013: <td><del class="diff-old">U+21D3</del> <ins class=
                   58014: "diff-chg">U+021D3</ins></td>
                   58015: </tr>
                   58016: <tr>
                   58017: <td><code title=""><ins class="diff-chg">dHar;</ins></code></td>
                   58018: <td><ins class="diff-chg">U+02965</ins></td>
                   58019: </tr>
                   58020: <tr>
                   58021: <td><code title="">dagger;</code></td>
                   58022: <td><del class="diff-old">U+2020</del> <ins class=
                   58023: "diff-chg">U+02020</ins></td>
                   58024: </tr>
                   58025: <tr>
                   58026: <td><code title=""><ins class="diff-chg">daleth;</ins></code></td>
                   58027: <td><ins class="diff-chg">U+02138</ins></td>
                   58028: </tr>
                   58029: <tr>
                   58030: <td><code title="">darr;</code></td>
                   58031: <td><del class="diff-old">U+2193</del> <ins class=
                   58032: "diff-chg">U+02193</ins></td>
                   58033: </tr>
                   58034: <tr>
                   58035: <td><code title=""><ins class="diff-chg">dash;</ins></code></td>
                   58036: <td><ins class="diff-chg">U+02010</ins></td>
                   58037: </tr>
                   58038: <tr>
                   58039: <td><code title=""><ins class="diff-chg">dashv;</ins></code></td>
                   58040: <td><ins class="diff-chg">U+022A3</ins></td>
                   58041: </tr>
                   58042: <tr>
                   58043: <td><code title=""><ins class="diff-chg">dbkarow;</ins></code></td>
                   58044: <td><ins class="diff-chg">U+0290F</ins></td>
                   58045: </tr>
                   58046: <tr>
                   58047: <td><code title=""><ins class="diff-chg">dblac;</ins></code></td>
                   58048: <td><ins class="diff-chg">U+002DD</ins></td>
                   58049: </tr>
                   58050: <tr>
                   58051: <td><code title=""><ins class="diff-chg">dcaron;</ins></code></td>
                   58052: <td><ins class="diff-chg">U+0010F</ins></td>
                   58053: </tr>
                   58054: <tr>
                   58055: <td><code title=""><ins class="diff-chg">dcy;</ins></code></td>
                   58056: <td><ins class="diff-chg">U+00434</ins></td>
                   58057: </tr>
                   58058: <tr>
                   58059: <td><code title=""><ins class="diff-chg">dd;</ins></code></td>
                   58060: <td><ins class="diff-chg">U+02146</ins></td>
                   58061: </tr>
                   58062: <tr>
                   58063: <td><code title=""><ins class="diff-chg">ddagger;</ins></code></td>
                   58064: <td><ins class="diff-chg">U+02021</ins></td>
                   58065: </tr>
                   58066: <tr>
                   58067: <td><code title=""><ins class="diff-chg">ddarr;</ins></code></td>
                   58068: <td><ins class="diff-chg">U+021CA</ins></td>
                   58069: </tr>
                   58070: <tr>
                   58071: <td><code title=""><ins class="diff-chg">ddotseq;</ins></code></td>
                   58072: <td><ins class="diff-chg">U+02A77</ins></td>
                   58073: </tr>
                   58074: <tr>
                   58075: <td><code title="">deg;</code></td>
                   58076: <td><del class="diff-old">U+00B0</del> <ins class=
                   58077: "diff-chg">U+000B0</ins></td>
                   58078: </tr>
                   58079: <tr>
                   58080: <td><code title="">deg</code></td>
                   58081: <td><del class="diff-old">U+00B0</del> <ins class=
                   58082: "diff-chg">U+000B0</ins></td>
                   58083: </tr>
                   58084: <tr>
                   58085: <td><code title="">delta;</code></td>
                   58086: <td><del class="diff-old">U+03B4</del> <ins class=
                   58087: "diff-chg">U+003B4</ins></td>
                   58088: </tr>
                   58089: <tr>
                   58090: <td><code title=""><ins class="diff-chg">demptyv;</ins></code></td>
                   58091: <td><ins class="diff-chg">U+029B1</ins></td>
                   58092: </tr>
                   58093: <tr>
                   58094: <td><code title=""><ins class="diff-chg">dfisht;</ins></code></td>
                   58095: <td><ins class="diff-chg">U+0297F</ins></td>
                   58096: </tr>
                   58097: <tr>
                   58098: <td><code title=""><ins class="diff-chg">dfr;</ins></code></td>
                   58099: <td><ins class="diff-chg">U+1D521</ins></td>
                   58100: </tr>
                   58101: <tr>
                   58102: <td><code title=""><ins class="diff-chg">dharl;</ins></code></td>
                   58103: <td><ins class="diff-chg">U+021C3</ins></td>
                   58104: </tr>
                   58105: <tr>
                   58106: <td><code title=""><ins class="diff-chg">dharr;</ins></code></td>
                   58107: <td><ins class="diff-chg">U+021C2</ins></td>
                   58108: </tr>
                   58109: <tr>
                   58110: <td><code title=""><ins class="diff-chg">diam;</ins></code></td>
                   58111: <td><ins class="diff-chg">U+022C4</ins></td>
                   58112: </tr>
                   58113: <tr>
                   58114: <td><code title=""><ins class="diff-chg">diamond;</ins></code></td>
                   58115: <td><ins class="diff-chg">U+022C4</ins></td>
                   58116: </tr>
                   58117: <tr>
                   58118: <td><code title=""><ins class=
                   58119: "diff-chg">diamondsuit;</ins></code></td>
                   58120: <td><ins class="diff-chg">U+02666</ins></td>
                   58121: </tr>
                   58122: <tr>
                   58123: <td><code title="">diams;</code></td>
                   58124: <td><del class="diff-old">U+2666</del> <ins class=
                   58125: "diff-chg">U+02666</ins></td>
                   58126: </tr>
                   58127: <tr>
                   58128: <td><code title=""><ins class="diff-chg">die;</ins></code></td>
                   58129: <td><ins class="diff-chg">U+000A8</ins></td>
                   58130: </tr>
                   58131: <tr>
                   58132: <td><code title=""><ins class="diff-chg">digamma;</ins></code></td>
                   58133: <td><ins class="diff-chg">U+003DD</ins></td>
                   58134: </tr>
                   58135: <tr>
                   58136: <td><code title=""><ins class="diff-chg">disin;</ins></code></td>
                   58137: <td><ins class="diff-chg">U+022F2</ins></td>
                   58138: </tr>
                   58139: <tr>
                   58140: <td><code title=""><ins class="diff-chg">div;</ins></code></td>
                   58141: <td><ins class="diff-chg">U+000F7</ins></td>
                   58142: </tr>
                   58143: <tr>
                   58144: <td><code title="">divide;</code></td>
                   58145: <td><del class="diff-old">U+00F7</del> <ins class=
                   58146: "diff-chg">U+000F7</ins></td>
                   58147: </tr>
                   58148: <tr>
                   58149: <td><code title="">divide</code></td>
                   58150: <td><del class="diff-old">U+00F7</del> <ins class=
                   58151: "diff-chg">U+000F7</ins></td>
                   58152: </tr>
                   58153: <tr>
                   58154: <td><code title=""><ins class=
                   58155: "diff-chg">divideontimes;</ins></code></td>
                   58156: <td><ins class="diff-chg">U+022C7</ins></td>
                   58157: </tr>
                   58158: <tr>
                   58159: <td><code title=""><ins class="diff-chg">divonx;</ins></code></td>
                   58160: <td><ins class="diff-chg">U+022C7</ins></td>
                   58161: </tr>
                   58162: <tr>
                   58163: <td><code title=""><ins class="diff-chg">djcy;</ins></code></td>
                   58164: <td><ins class="diff-chg">U+00452</ins></td>
                   58165: </tr>
                   58166: <tr>
                   58167: <td><code title=""><ins class="diff-chg">dlcorn;</ins></code></td>
                   58168: <td><ins class="diff-chg">U+0231E</ins></td>
                   58169: </tr>
                   58170: <tr>
                   58171: <td><code title=""><ins class="diff-chg">dlcrop;</ins></code></td>
                   58172: <td><ins class="diff-chg">U+0230D</ins></td>
                   58173: </tr>
                   58174: <tr>
                   58175: <td><code title=""><ins class="diff-chg">dollar;</ins></code></td>
                   58176: <td><ins class="diff-chg">U+00024</ins></td>
                   58177: </tr>
                   58178: <tr>
                   58179: <td><code title=""><ins class="diff-chg">dopf;</ins></code></td>
                   58180: <td><ins class="diff-chg">U+1D555</ins></td>
                   58181: </tr>
                   58182: <tr>
                   58183: <td><code title=""><ins class="diff-chg">dot;</ins></code></td>
                   58184: <td><ins class="diff-chg">U+002D9</ins></td>
                   58185: </tr>
                   58186: <tr>
                   58187: <td><code title=""><ins class="diff-chg">doteq;</ins></code></td>
                   58188: <td><ins class="diff-chg">U+02250</ins></td>
                   58189: </tr>
                   58190: <tr>
                   58191: <td><code title=""><ins class=
                   58192: "diff-chg">doteqdot;</ins></code></td>
                   58193: <td><ins class="diff-chg">U+02251</ins></td>
                   58194: </tr>
                   58195: <tr>
                   58196: <td><code title=""><ins class=
                   58197: "diff-chg">dotminus;</ins></code></td>
                   58198: <td><ins class="diff-chg">U+02238</ins></td>
                   58199: </tr>
                   58200: <tr>
                   58201: <td><code title=""><ins class="diff-chg">dotplus;</ins></code></td>
                   58202: <td><ins class="diff-chg">U+02214</ins></td>
                   58203: </tr>
                   58204: <tr>
                   58205: <td><code title=""><ins class=
                   58206: "diff-chg">dotsquare;</ins></code></td>
                   58207: <td><ins class="diff-chg">U+022A1</ins></td>
                   58208: </tr>
                   58209: <tr>
                   58210: <td><code title=""><ins class=
                   58211: "diff-chg">doublebarwedge;</ins></code></td>
                   58212: <td><ins class="diff-chg">U+02306</ins></td>
                   58213: </tr>
                   58214: <tr>
                   58215: <td><code title=""><ins class=
                   58216: "diff-chg">downarrow;</ins></code></td>
                   58217: <td><ins class="diff-chg">U+02193</ins></td>
                   58218: </tr>
                   58219: <tr>
                   58220: <td><code title=""><ins class=
                   58221: "diff-chg">downdownarrows;</ins></code></td>
                   58222: <td><ins class="diff-chg">U+021CA</ins></td>
                   58223: </tr>
                   58224: <tr>
                   58225: <td><code title=""><ins class=
                   58226: "diff-chg">downharpoonleft;</ins></code></td>
                   58227: <td><ins class="diff-chg">U+021C3</ins></td>
                   58228: </tr>
                   58229: <tr>
                   58230: <td><code title=""><ins class=
                   58231: "diff-chg">downharpoonright;</ins></code></td>
                   58232: <td><ins class="diff-chg">U+021C2</ins></td>
                   58233: </tr>
                   58234: <tr>
                   58235: <td><code title=""><ins class=
                   58236: "diff-chg">drbkarow;</ins></code></td>
                   58237: <td><ins class="diff-chg">U+02910</ins></td>
                   58238: </tr>
                   58239: <tr>
                   58240: <td><code title=""><ins class="diff-chg">drcorn;</ins></code></td>
                   58241: <td><ins class="diff-chg">U+0231F</ins></td>
                   58242: </tr>
                   58243: <tr>
                   58244: <td><code title=""><ins class="diff-chg">drcrop;</ins></code></td>
                   58245: <td><ins class="diff-chg">U+0230C</ins></td>
                   58246: </tr>
                   58247: <tr>
                   58248: <td><code title=""><ins class="diff-chg">dscr;</ins></code></td>
                   58249: <td><ins class="diff-chg">U+1D4B9</ins></td>
                   58250: </tr>
                   58251: <tr>
                   58252: <td><code title=""><ins class="diff-chg">dscy;</ins></code></td>
                   58253: <td><ins class="diff-chg">U+00455</ins></td>
                   58254: </tr>
                   58255: <tr>
                   58256: <td><code title=""><ins class="diff-chg">dsol;</ins></code></td>
                   58257: <td><ins class="diff-chg">U+029F6</ins></td>
                   58258: </tr>
                   58259: <tr>
                   58260: <td><code title=""><ins class="diff-chg">dstrok;</ins></code></td>
                   58261: <td><ins class="diff-chg">U+00111</ins></td>
                   58262: </tr>
                   58263: <tr>
                   58264: <td><code title=""><ins class="diff-chg">dtdot;</ins></code></td>
                   58265: <td><ins class="diff-chg">U+022F1</ins></td>
                   58266: </tr>
                   58267: <tr>
                   58268: <td><code title=""><ins class="diff-chg">dtri;</ins></code></td>
                   58269: <td><ins class="diff-chg">U+025BF</ins></td>
                   58270: </tr>
                   58271: <tr>
                   58272: <td><code title=""><ins class="diff-chg">dtrif;</ins></code></td>
                   58273: <td><ins class="diff-chg">U+025BE</ins></td>
                   58274: </tr>
                   58275: <tr>
                   58276: <td><code title=""><ins class="diff-chg">duarr;</ins></code></td>
                   58277: <td><ins class="diff-chg">U+021F5</ins></td>
                   58278: </tr>
                   58279: <tr>
                   58280: <td><code title=""><ins class="diff-chg">duhar;</ins></code></td>
                   58281: <td><ins class="diff-chg">U+0296F</ins></td>
                   58282: </tr>
                   58283: <tr>
                   58284: <td><code title=""><ins class="diff-chg">dwangle;</ins></code></td>
                   58285: <td><ins class="diff-chg">U+029A6</ins></td>
                   58286: </tr>
                   58287: <tr>
                   58288: <td><code title=""><ins class="diff-chg">dzcy;</ins></code></td>
                   58289: <td><ins class="diff-chg">U+0045F</ins></td>
                   58290: </tr>
                   58291: <tr>
                   58292: <td><code title=""><ins class=
                   58293: "diff-chg">dzigrarr;</ins></code></td>
                   58294: <td><ins class="diff-chg">U+027FF</ins></td>
                   58295: </tr>
                   58296: <tr>
                   58297: <td><code title=""><ins class="diff-chg">eDDot;</ins></code></td>
                   58298: <td><ins class="diff-chg">U+02A77</ins></td>
                   58299: </tr>
                   58300: <tr>
                   58301: <td><code title=""><ins class="diff-chg">eDot;</ins></code></td>
                   58302: <td><ins class="diff-chg">U+02251</ins></td>
                   58303: </tr>
                   58304: <tr>
                   58305: <td><code title="">eacute;</code></td>
                   58306: <td><del class="diff-old">U+00E9</del> <ins class=
                   58307: "diff-chg">U+000E9</ins></td>
                   58308: </tr>
                   58309: <tr>
                   58310: <td><code title="">eacute</code></td>
                   58311: <td><del class="diff-old">U+00E9</del> <ins class=
                   58312: "diff-chg">U+000E9</ins></td>
                   58313: </tr>
                   58314: <tr>
                   58315: <td><code title=""><ins class="diff-chg">easter;</ins></code></td>
                   58316: <td><ins class="diff-chg">U+02A6E</ins></td>
                   58317: </tr>
                   58318: <tr>
                   58319: <td><code title=""><ins class="diff-chg">ecaron;</ins></code></td>
                   58320: <td><ins class="diff-chg">U+0011B</ins></td>
                   58321: </tr>
                   58322: <tr>
                   58323: <td><code title=""><ins class="diff-chg">ecir;</ins></code></td>
                   58324: <td><ins class="diff-chg">U+02256</ins></td>
                   58325: </tr>
                   58326: <tr>
                   58327: <td><code title="">ecirc;</code></td>
                   58328: <td><del class="diff-old">U+00EA</del> <ins class=
                   58329: "diff-chg">U+000EA</ins></td>
                   58330: </tr>
                   58331: <tr>
                   58332: <td><code title="">ecirc</code></td>
                   58333: <td><del class="diff-old">U+00EA</del> <ins class=
                   58334: "diff-chg">U+000EA</ins></td>
                   58335: </tr>
                   58336: <tr>
                   58337: <td><code title=""><ins class="diff-chg">ecolon;</ins></code></td>
                   58338: <td><ins class="diff-chg">U+02255</ins></td>
                   58339: </tr>
                   58340: <tr>
                   58341: <td><code title=""><ins class="diff-chg">ecy;</ins></code></td>
                   58342: <td><ins class="diff-chg">U+0044D</ins></td>
                   58343: </tr>
                   58344: <tr>
                   58345: <td><code title=""><ins class="diff-chg">edot;</ins></code></td>
                   58346: <td><ins class="diff-chg">U+00117</ins></td>
                   58347: </tr>
                   58348: <tr>
                   58349: <td><code title=""><ins class="diff-chg">ee;</ins></code></td>
                   58350: <td><ins class="diff-chg">U+02147</ins></td>
                   58351: </tr>
                   58352: <tr>
                   58353: <td><code title=""><ins class="diff-chg">efDot;</ins></code></td>
                   58354: <td><ins class="diff-chg">U+02252</ins></td>
                   58355: </tr>
                   58356: <tr>
                   58357: <td><code title=""><ins class="diff-chg">efr;</ins></code></td>
                   58358: <td><ins class="diff-chg">U+1D522</ins></td>
                   58359: </tr>
                   58360: <tr>
                   58361: <td><code title=""><ins class="diff-chg">eg;</ins></code></td>
                   58362: <td><ins class="diff-chg">U+02A9A</ins></td>
                   58363: </tr>
                   58364: <tr>
                   58365: <td><code title="">egrave;</code></td>
                   58366: <td><del class="diff-old">U+00E8</del> <ins class=
                   58367: "diff-chg">U+000E8</ins></td>
                   58368: </tr>
                   58369: <tr>
                   58370: <td><code title="">egrave</code></td>
                   58371: <td><del class="diff-old">U+00E8</del> <ins class=
                   58372: "diff-chg">U+000E8</ins></td>
                   58373: </tr>
                   58374: <tr>
                   58375: <td><code title=""><ins class="diff-chg">egs;</ins></code></td>
                   58376: <td><ins class="diff-chg">U+02A96</ins></td>
                   58377: </tr>
                   58378: <tr>
                   58379: <td><code title=""><ins class="diff-chg">egsdot;</ins></code></td>
                   58380: <td><ins class="diff-chg">U+02A98</ins></td>
                   58381: </tr>
                   58382: <tr>
                   58383: <td><code title=""><ins class="diff-chg">el;</ins></code></td>
                   58384: <td><ins class="diff-chg">U+02A99</ins></td>
                   58385: </tr>
                   58386: <tr>
                   58387: <td><code title=""><ins class=
                   58388: "diff-chg">elinters;</ins></code></td>
                   58389: <td><ins class="diff-chg">U+023E7</ins></td>
                   58390: </tr>
                   58391: <tr>
                   58392: <td><code title=""><ins class="diff-chg">ell;</ins></code></td>
                   58393: <td><ins class="diff-chg">U+02113</ins></td>
                   58394: </tr>
                   58395: <tr>
                   58396: <td><code title=""><ins class="diff-chg">els;</ins></code></td>
                   58397: <td><ins class="diff-chg">U+02A95</ins></td>
                   58398: </tr>
                   58399: <tr>
                   58400: <td><code title=""><ins class="diff-chg">elsdot;</ins></code></td>
                   58401: <td><ins class="diff-chg">U+02A97</ins></td>
                   58402: </tr>
                   58403: <tr>
                   58404: <td><code title=""><ins class="diff-chg">emacr;</ins></code></td>
                   58405: <td><ins class="diff-chg">U+00113</ins></td>
                   58406: </tr>
                   58407: <tr>
                   58408: <td><code title="">empty;</code></td>
1.2     ! mike     58409: <td><ins class="diff-new">U+02205</ins></td>
1.1       mike     58410: </tr>
                   58411: <tr>
                   58412: <td><code title=""><ins class=
1.2     ! mike     58413: "diff-new">emptyset;</ins></code></td>
        !          58414: <td><del class="diff-old">U+2205</del> <ins class=
        !          58415: "diff-chg">U+02205</ins></td>
1.1       mike     58416: </tr>
                   58417: <tr>
                   58418: <td><code title=""><ins class="diff-chg">emptyv;</ins></code></td>
                   58419: <td><ins class="diff-chg">U+02205</ins></td>
                   58420: </tr>
                   58421: <tr>
                   58422: <td><code title=""><ins class="diff-chg">emsp13;</ins></code></td>
                   58423: <td><ins class="diff-chg">U+02004</ins></td>
                   58424: </tr>
                   58425: <tr>
                   58426: <td><code title=""><ins class="diff-chg">emsp14;</ins></code></td>
                   58427: <td><ins class="diff-chg">U+02005</ins></td>
                   58428: </tr>
                   58429: <tr>
                   58430: <td><code title="">emsp;</code></td>
                   58431: <td><del class="diff-old">U+2003</del> <ins class=
                   58432: "diff-chg">U+02003</ins></td>
                   58433: </tr>
                   58434: <tr>
                   58435: <td><code title=""><ins class="diff-chg">eng;</ins></code></td>
                   58436: <td><ins class="diff-chg">U+0014B</ins></td>
                   58437: </tr>
                   58438: <tr>
                   58439: <td><code title="">ensp;</code></td>
                   58440: <td><del class="diff-old">U+2002</del> <ins class=
                   58441: "diff-chg">U+02002</ins></td>
                   58442: </tr>
                   58443: <tr>
                   58444: <td><code title=""><ins class="diff-chg">eogon;</ins></code></td>
                   58445: <td><ins class="diff-chg">U+00119</ins></td>
                   58446: </tr>
                   58447: <tr>
                   58448: <td><code title=""><ins class="diff-chg">eopf;</ins></code></td>
                   58449: <td><ins class="diff-chg">U+1D556</ins></td>
                   58450: </tr>
                   58451: <tr>
                   58452: <td><code title=""><ins class="diff-chg">epar;</ins></code></td>
                   58453: <td><ins class="diff-chg">U+022D5</ins></td>
                   58454: </tr>
                   58455: <tr>
                   58456: <td><code title=""><ins class="diff-chg">eparsl;</ins></code></td>
                   58457: <td><ins class="diff-chg">U+029E3</ins></td>
                   58458: </tr>
                   58459: <tr>
                   58460: <td><code title=""><ins class="diff-chg">eplus;</ins></code></td>
                   58461: <td><ins class="diff-chg">U+02A71</ins></td>
                   58462: </tr>
                   58463: <tr>
                   58464: <td><code title=""><ins class="diff-chg">epsi;</ins></code></td>
                   58465: <td><ins class="diff-chg">U+003F5</ins></td>
                   58466: </tr>
                   58467: <tr>
                   58468: <td><code title="">epsilon;</code></td>
                   58469: <td><del class="diff-old">U+03B5</del> <ins class=
                   58470: "diff-chg">U+003B5</ins></td>
                   58471: </tr>
                   58472: <tr>
                   58473: <td><code title=""><ins class="diff-chg">epsiv;</ins></code></td>
                   58474: <td><ins class="diff-chg">U+003B5</ins></td>
                   58475: </tr>
                   58476: <tr>
                   58477: <td><code title=""><ins class="diff-chg">eqcirc;</ins></code></td>
                   58478: <td><ins class="diff-chg">U+02256</ins></td>
                   58479: </tr>
                   58480: <tr>
                   58481: <td><code title=""><ins class="diff-chg">eqcolon;</ins></code></td>
                   58482: <td><ins class="diff-chg">U+02255</ins></td>
                   58483: </tr>
                   58484: <tr>
                   58485: <td><code title=""><ins class="diff-chg">eqsim;</ins></code></td>
                   58486: <td><ins class="diff-chg">U+02242</ins></td>
                   58487: </tr>
                   58488: <tr>
                   58489: <td><code title=""><ins class=
                   58490: "diff-chg">eqslantgtr;</ins></code></td>
                   58491: <td><ins class="diff-chg">U+02A96</ins></td>
                   58492: </tr>
                   58493: <tr>
                   58494: <td><code title=""><ins class=
                   58495: "diff-chg">eqslantless;</ins></code></td>
                   58496: <td><ins class="diff-chg">U+02A95</ins></td>
                   58497: </tr>
                   58498: <tr>
                   58499: <td><code title=""><ins class="diff-chg">equals;</ins></code></td>
                   58500: <td><ins class="diff-chg">U+0003D</ins></td>
                   58501: </tr>
                   58502: <tr>
                   58503: <td><code title=""><ins class="diff-chg">equest;</ins></code></td>
                   58504: <td><ins class="diff-chg">U+0225F</ins></td>
                   58505: </tr>
                   58506: <tr>
                   58507: <td><code title="">equiv;</code></td>
                   58508: <td><del class="diff-old">U+2261</del> <ins class=
                   58509: "diff-chg">U+02261</ins></td>
                   58510: </tr>
                   58511: <tr>
                   58512: <td><code title=""><ins class="diff-chg">equivDD;</ins></code></td>
                   58513: <td><ins class="diff-chg">U+02A78</ins></td>
                   58514: </tr>
                   58515: <tr>
                   58516: <td><code title=""><ins class=
                   58517: "diff-chg">eqvparsl;</ins></code></td>
                   58518: <td><ins class="diff-chg">U+029E5</ins></td>
                   58519: </tr>
                   58520: <tr>
                   58521: <td><code title=""><ins class="diff-chg">erDot;</ins></code></td>
                   58522: <td><ins class="diff-chg">U+02253</ins></td>
                   58523: </tr>
                   58524: <tr>
                   58525: <td><code title=""><ins class="diff-chg">erarr;</ins></code></td>
                   58526: <td><ins class="diff-chg">U+02971</ins></td>
                   58527: </tr>
                   58528: <tr>
                   58529: <td><code title=""><ins class="diff-chg">escr;</ins></code></td>
                   58530: <td><ins class="diff-chg">U+0212F</ins></td>
                   58531: </tr>
                   58532: <tr>
                   58533: <td><code title=""><ins class="diff-chg">esdot;</ins></code></td>
                   58534: <td><ins class="diff-chg">U+02250</ins></td>
                   58535: </tr>
                   58536: <tr>
                   58537: <td><code title=""><ins class="diff-chg">esim;</ins></code></td>
                   58538: <td><ins class="diff-chg">U+02242</ins></td>
                   58539: </tr>
                   58540: <tr>
                   58541: <td><code title="">eta;</code></td>
                   58542: <td><del class="diff-old">U+03B7</del> <ins class=
                   58543: "diff-chg">U+003B7</ins></td>
                   58544: </tr>
                   58545: <tr>
                   58546: <td><code title="">eth;</code></td>
                   58547: <td><del class="diff-old">U+00F0</del> <ins class=
                   58548: "diff-chg">U+000F0</ins></td>
                   58549: </tr>
                   58550: <tr>
                   58551: <td><code title="">eth</code></td>
                   58552: <td><del class="diff-old">U+00F0</del> <ins class=
                   58553: "diff-chg">U+000F0</ins></td>
                   58554: </tr>
                   58555: <tr>
                   58556: <td><code title="">euml;</code></td>
                   58557: <td><del class="diff-old">U+00EB</del> <ins class=
                   58558: "diff-chg">U+000EB</ins></td>
                   58559: </tr>
                   58560: <tr>
                   58561: <td><code title="">euml</code></td>
                   58562: <td><del class="diff-old">U+00EB</del> <ins class=
                   58563: "diff-chg">U+000EB</ins></td>
                   58564: </tr>
                   58565: <tr>
                   58566: <td><code title="">euro;</code></td>
                   58567: <td><del class="diff-old">U+20AC</del> <ins class=
                   58568: "diff-chg">U+020AC</ins></td>
                   58569: </tr>
                   58570: <tr>
                   58571: <td><code title=""><ins class="diff-chg">excl;</ins></code></td>
                   58572: <td><ins class="diff-chg">U+00021</ins></td>
                   58573: </tr>
                   58574: <tr>
                   58575: <td><code title="">exist;</code></td>
                   58576: <td><del class="diff-old">U+2203</del> <ins class=
                   58577: "diff-chg">U+02203</ins></td>
                   58578: </tr>
                   58579: <tr>
                   58580: <td><code title=""><ins class=
                   58581: "diff-chg">expectation;</ins></code></td>
                   58582: <td><ins class="diff-chg">U+02130</ins></td>
                   58583: </tr>
                   58584: <tr>
                   58585: <td><code title=""><ins class=
                   58586: "diff-chg">exponentiale;</ins></code></td>
                   58587: <td><ins class="diff-chg">U+02147</ins></td>
                   58588: </tr>
                   58589: <tr>
                   58590: <td><code title=""><ins class=
                   58591: "diff-chg">fallingdotseq;</ins></code></td>
                   58592: <td><ins class="diff-chg">U+02252</ins></td>
                   58593: </tr>
                   58594: <tr>
                   58595: <td><code title=""><ins class="diff-chg">fcy;</ins></code></td>
                   58596: <td><ins class="diff-chg">U+00444</ins></td>
                   58597: </tr>
                   58598: <tr>
                   58599: <td><code title=""><ins class="diff-chg">female;</ins></code></td>
                   58600: <td><ins class="diff-chg">U+02640</ins></td>
                   58601: </tr>
                   58602: <tr>
                   58603: <td><code title=""><ins class="diff-chg">ffilig;</ins></code></td>
                   58604: <td><ins class="diff-chg">U+0FB03</ins></td>
                   58605: </tr>
                   58606: <tr>
                   58607: <td><code title=""><ins class="diff-chg">fflig;</ins></code></td>
                   58608: <td><ins class="diff-chg">U+0FB00</ins></td>
                   58609: </tr>
                   58610: <tr>
                   58611: <td><code title=""><ins class="diff-chg">ffllig;</ins></code></td>
                   58612: <td><ins class="diff-chg">U+0FB04</ins></td>
                   58613: </tr>
                   58614: <tr>
                   58615: <td><code title=""><ins class="diff-chg">ffr;</ins></code></td>
                   58616: <td><ins class="diff-chg">U+1D523</ins></td>
                   58617: </tr>
                   58618: <tr>
                   58619: <td><code title=""><ins class="diff-chg">filig;</ins></code></td>
                   58620: <td><ins class="diff-chg">U+0FB01</ins></td>
                   58621: </tr>
                   58622: <tr>
                   58623: <td><code title=""><ins class="diff-chg">flat;</ins></code></td>
                   58624: <td><ins class="diff-chg">U+0266D</ins></td>
                   58625: </tr>
                   58626: <tr>
                   58627: <td><code title=""><ins class="diff-chg">fllig;</ins></code></td>
                   58628: <td><ins class="diff-chg">U+0FB02</ins></td>
                   58629: </tr>
                   58630: <tr>
                   58631: <td><code title=""><ins class="diff-chg">fltns;</ins></code></td>
                   58632: <td><ins class="diff-chg">U+025B1</ins></td>
                   58633: </tr>
                   58634: <tr>
                   58635: <td><code title="">fnof;</code></td>
                   58636: <td><del class="diff-old">U+0192</del> <ins class=
                   58637: "diff-chg">U+00192</ins></td>
                   58638: </tr>
                   58639: <tr>
                   58640: <td><code title=""><ins class="diff-chg">fopf;</ins></code></td>
                   58641: <td><ins class="diff-chg">U+1D557</ins></td>
                   58642: </tr>
                   58643: <tr>
                   58644: <td><code title="">forall;</code></td>
1.2     ! mike     58645: <td><del class="diff-old">U+2200</del> <ins class=
        !          58646: "diff-chg">U+02200</ins></td>
1.1       mike     58647: </tr>
                   58648: <tr>
1.2     ! mike     58649: <td><code title=""><ins class="diff-chg">fork;</ins></code></td>
        !          58650: <td><ins class="diff-chg">U+022D4</ins></td>
1.1       mike     58651: </tr>
                   58652: <tr>
                   58653: <td><code title=""><ins class="diff-chg">forkv;</ins></code></td>
                   58654: <td><ins class="diff-chg">U+02AD9</ins></td>
                   58655: </tr>
                   58656: <tr>
                   58657: <td><code title=""><ins class=
                   58658: "diff-chg">fpartint;</ins></code></td>
                   58659: <td><ins class="diff-chg">U+02A0D</ins></td>
                   58660: </tr>
                   58661: <tr>
                   58662: <td><code title="">frac12;</code></td>
                   58663: <td><del class="diff-old">U+00BD</del> <ins class=
                   58664: "diff-chg">U+000BD</ins></td>
                   58665: </tr>
                   58666: <tr>
                   58667: <td><code title="">frac12</code></td>
                   58668: <td><del class="diff-old">U+00BD</del> <ins class=
                   58669: "diff-chg">U+000BD</ins></td>
                   58670: </tr>
                   58671: <tr>
                   58672: <td><code title=""><ins class="diff-chg">frac13;</ins></code></td>
                   58673: <td><ins class="diff-chg">U+02153</ins></td>
                   58674: </tr>
                   58675: <tr>
                   58676: <td><code title="">frac14;</code></td>
                   58677: <td><del class="diff-old">U+00BC</del> <ins class=
                   58678: "diff-chg">U+000BC</ins></td>
                   58679: </tr>
                   58680: <tr>
                   58681: <td><code title="">frac14</code></td>
1.2     ! mike     58682: <td><ins class="diff-new">U+000BC</ins></td>
1.1       mike     58683: </tr>
                   58684: <tr>
1.2     ! mike     58685: <td><code title=""><ins class="diff-new">frac15;</ins></code></td>
        !          58686: <td><del class="diff-old">U+00BC</del> <ins class=
        !          58687: "diff-chg">U+02155</ins></td>
1.1       mike     58688: </tr>
                   58689: <tr>
                   58690: <td><code title=""><ins class="diff-chg">frac16;</ins></code></td>
                   58691: <td><ins class="diff-chg">U+02159</ins></td>
                   58692: </tr>
                   58693: <tr>
                   58694: <td><code title=""><ins class="diff-chg">frac18;</ins></code></td>
                   58695: <td><ins class="diff-chg">U+0215B</ins></td>
                   58696: </tr>
                   58697: <tr>
                   58698: <td><code title=""><ins class="diff-chg">frac23;</ins></code></td>
                   58699: <td><ins class="diff-chg">U+02154</ins></td>
                   58700: </tr>
                   58701: <tr>
                   58702: <td><code title=""><ins class="diff-chg">frac25;</ins></code></td>
                   58703: <td><ins class="diff-chg">U+02156</ins></td>
                   58704: </tr>
                   58705: <tr>
                   58706: <td><code title="">frac34;</code></td>
                   58707: <td><del class="diff-old">U+00BE</del> <ins class=
                   58708: "diff-chg">U+000BE</ins></td>
                   58709: </tr>
                   58710: <tr>
                   58711: <td><code title="">frac34</code></td>
                   58712: <td><del class="diff-old">U+00BE</del> <ins class=
                   58713: "diff-chg">U+000BE</ins></td>
                   58714: </tr>
                   58715: <tr>
                   58716: <td><code title=""><ins class="diff-chg">frac35;</ins></code></td>
                   58717: <td><ins class="diff-chg">U+02157</ins></td>
                   58718: </tr>
                   58719: <tr>
                   58720: <td><code title=""><ins class="diff-chg">frac38;</ins></code></td>
                   58721: <td><ins class="diff-chg">U+0215C</ins></td>
                   58722: </tr>
                   58723: <tr>
                   58724: <td><code title=""><ins class="diff-chg">frac45;</ins></code></td>
                   58725: <td><ins class="diff-chg">U+02158</ins></td>
                   58726: </tr>
                   58727: <tr>
                   58728: <td><code title=""><ins class="diff-chg">frac56;</ins></code></td>
                   58729: <td><ins class="diff-chg">U+0215A</ins></td>
                   58730: </tr>
                   58731: <tr>
                   58732: <td><code title=""><ins class="diff-chg">frac58;</ins></code></td>
                   58733: <td><ins class="diff-chg">U+0215D</ins></td>
                   58734: </tr>
                   58735: <tr>
                   58736: <td><code title=""><ins class="diff-chg">frac78;</ins></code></td>
                   58737: <td><ins class="diff-chg">U+0215E</ins></td>
                   58738: </tr>
                   58739: <tr>
                   58740: <td><code title="">frasl;</code></td>
                   58741: <td><del class="diff-old">U+2044</del> <ins class=
                   58742: "diff-chg">U+02044</ins></td>
                   58743: </tr>
                   58744: <tr>
                   58745: <td><code title=""><ins class="diff-chg">frown;</ins></code></td>
                   58746: <td><ins class="diff-chg">U+02322</ins></td>
                   58747: </tr>
                   58748: <tr>
                   58749: <td><code title=""><ins class="diff-chg">fscr;</ins></code></td>
                   58750: <td><ins class="diff-chg">U+1D4BB</ins></td>
                   58751: </tr>
                   58752: <tr>
                   58753: <td><code title=""><ins class="diff-chg">gE;</ins></code></td>
                   58754: <td><ins class="diff-chg">U+02267</ins></td>
                   58755: </tr>
                   58756: <tr>
                   58757: <td><code title=""><ins class="diff-chg">gEl;</ins></code></td>
                   58758: <td><ins class="diff-chg">U+02A8C</ins></td>
                   58759: </tr>
                   58760: <tr>
                   58761: <td><code title=""><ins class="diff-chg">gacute;</ins></code></td>
                   58762: <td><ins class="diff-chg">U+001F5</ins></td>
                   58763: </tr>
                   58764: <tr>
                   58765: <td><code title="">gamma;</code></td>
                   58766: <td><del class="diff-old">U+03B3</del> <ins class=
                   58767: "diff-chg">U+003B3</ins></td>
                   58768: </tr>
                   58769: <tr>
                   58770: <td><code title=""><ins class="diff-chg">gammad;</ins></code></td>
                   58771: <td><ins class="diff-chg">U+003DD</ins></td>
                   58772: </tr>
                   58773: <tr>
                   58774: <td><code title=""><ins class="diff-chg">gap;</ins></code></td>
                   58775: <td><ins class="diff-chg">U+02A86</ins></td>
                   58776: </tr>
                   58777: <tr>
                   58778: <td><code title=""><ins class="diff-chg">gbreve;</ins></code></td>
                   58779: <td><ins class="diff-chg">U+0011F</ins></td>
                   58780: </tr>
                   58781: <tr>
                   58782: <td><code title=""><ins class="diff-chg">gcirc;</ins></code></td>
                   58783: <td><ins class="diff-chg">U+0011D</ins></td>
                   58784: </tr>
                   58785: <tr>
                   58786: <td><code title=""><ins class="diff-chg">gcy;</ins></code></td>
                   58787: <td><ins class="diff-chg">U+00433</ins></td>
                   58788: </tr>
                   58789: <tr>
                   58790: <td><code title=""><ins class="diff-chg">gdot;</ins></code></td>
                   58791: <td><ins class="diff-chg">U+00121</ins></td>
                   58792: </tr>
                   58793: <tr>
                   58794: <td><code title="">ge;</code></td>
                   58795: <td><del class="diff-old">U+2265</del> <ins class=
                   58796: "diff-chg">U+02265</ins></td>
                   58797: </tr>
                   58798: <tr>
                   58799: <td><code title=""><ins class="diff-chg">gel;</ins></code></td>
                   58800: <td><ins class="diff-chg">U+022DB</ins></td>
                   58801: </tr>
                   58802: <tr>
                   58803: <td><code title=""><ins class="diff-chg">geq;</ins></code></td>
                   58804: <td><ins class="diff-chg">U+02265</ins></td>
                   58805: </tr>
                   58806: <tr>
                   58807: <td><code title=""><ins class="diff-chg">geqq;</ins></code></td>
                   58808: <td><ins class="diff-chg">U+02267</ins></td>
                   58809: </tr>
                   58810: <tr>
                   58811: <td><code title=""><ins class=
                   58812: "diff-chg">geqslant;</ins></code></td>
                   58813: <td><ins class="diff-chg">U+02A7E</ins></td>
                   58814: </tr>
                   58815: <tr>
                   58816: <td><code title=""><ins class="diff-chg">ges;</ins></code></td>
                   58817: <td><ins class="diff-chg">U+02A7E</ins></td>
                   58818: </tr>
                   58819: <tr>
                   58820: <td><code title=""><ins class="diff-chg">gescc;</ins></code></td>
                   58821: <td><ins class="diff-chg">U+02AA9</ins></td>
                   58822: </tr>
                   58823: <tr>
                   58824: <td><code title=""><ins class="diff-chg">gesdot;</ins></code></td>
                   58825: <td><ins class="diff-chg">U+02A80</ins></td>
                   58826: </tr>
                   58827: <tr>
                   58828: <td><code title=""><ins class="diff-chg">gesdoto;</ins></code></td>
                   58829: <td><ins class="diff-chg">U+02A82</ins></td>
                   58830: </tr>
                   58831: <tr>
                   58832: <td><code title=""><ins class=
                   58833: "diff-chg">gesdotol;</ins></code></td>
                   58834: <td><ins class="diff-chg">U+02A84</ins></td>
                   58835: </tr>
                   58836: <tr>
                   58837: <td><code title=""><ins class="diff-chg">gesles;</ins></code></td>
                   58838: <td><ins class="diff-chg">U+02A94</ins></td>
                   58839: </tr>
                   58840: <tr>
                   58841: <td><code title=""><ins class="diff-chg">gfr;</ins></code></td>
                   58842: <td><ins class="diff-chg">U+1D524</ins></td>
                   58843: </tr>
                   58844: <tr>
                   58845: <td><code title=""><ins class="diff-chg">gg;</ins></code></td>
                   58846: <td><ins class="diff-chg">U+0226B</ins></td>
                   58847: </tr>
                   58848: <tr>
                   58849: <td><code title=""><ins class="diff-chg">ggg;</ins></code></td>
                   58850: <td><ins class="diff-chg">U+022D9</ins></td>
                   58851: </tr>
                   58852: <tr>
                   58853: <td><code title=""><ins class="diff-chg">gimel;</ins></code></td>
                   58854: <td><ins class="diff-chg">U+02137</ins></td>
                   58855: </tr>
                   58856: <tr>
                   58857: <td><code title=""><ins class="diff-chg">gjcy;</ins></code></td>
                   58858: <td><ins class="diff-chg">U+00453</ins></td>
                   58859: </tr>
                   58860: <tr>
                   58861: <td><code title=""><ins class="diff-chg">gl;</ins></code></td>
                   58862: <td><ins class="diff-chg">U+02277</ins></td>
                   58863: </tr>
                   58864: <tr>
                   58865: <td><code title=""><ins class="diff-chg">glE;</ins></code></td>
                   58866: <td><ins class="diff-chg">U+02A92</ins></td>
                   58867: </tr>
                   58868: <tr>
                   58869: <td><code title=""><ins class="diff-chg">gla;</ins></code></td>
                   58870: <td><ins class="diff-chg">U+02AA5</ins></td>
                   58871: </tr>
                   58872: <tr>
                   58873: <td><code title=""><ins class="diff-chg">glj;</ins></code></td>
                   58874: <td><ins class="diff-chg">U+02AA4</ins></td>
                   58875: </tr>
                   58876: <tr>
                   58877: <td><code title=""><ins class="diff-chg">gnE;</ins></code></td>
                   58878: <td><ins class="diff-chg">U+02269</ins></td>
                   58879: </tr>
                   58880: <tr>
                   58881: <td><code title=""><ins class="diff-chg">gnap;</ins></code></td>
                   58882: <td><ins class="diff-chg">U+02A8A</ins></td>
                   58883: </tr>
                   58884: <tr>
                   58885: <td><code title=""><ins class=
                   58886: "diff-chg">gnapprox;</ins></code></td>
                   58887: <td><ins class="diff-chg">U+02A8A</ins></td>
                   58888: </tr>
                   58889: <tr>
                   58890: <td><code title=""><ins class="diff-chg">gne;</ins></code></td>
                   58891: <td><ins class="diff-chg">U+02A88</ins></td>
                   58892: </tr>
                   58893: <tr>
                   58894: <td><code title=""><ins class="diff-chg">gneq;</ins></code></td>
                   58895: <td><ins class="diff-chg">U+02A88</ins></td>
                   58896: </tr>
                   58897: <tr>
                   58898: <td><code title=""><ins class="diff-chg">gneqq;</ins></code></td>
                   58899: <td><ins class="diff-chg">U+02269</ins></td>
                   58900: </tr>
                   58901: <tr>
                   58902: <td><code title=""><ins class="diff-chg">gnsim;</ins></code></td>
                   58903: <td><ins class="diff-chg">U+022E7</ins></td>
                   58904: </tr>
                   58905: <tr>
                   58906: <td><code title=""><ins class="diff-chg">gopf;</ins></code></td>
                   58907: <td><ins class="diff-chg">U+1D558</ins></td>
                   58908: </tr>
                   58909: <tr>
                   58910: <td><code title=""><ins class="diff-chg">grave;</ins></code></td>
                   58911: <td><ins class="diff-chg">U+00060</ins></td>
                   58912: </tr>
                   58913: <tr>
                   58914: <td><code title=""><ins class="diff-chg">gscr;</ins></code></td>
                   58915: <td><ins class="diff-chg">U+0210A</ins></td>
                   58916: </tr>
                   58917: <tr>
                   58918: <td><code title=""><ins class="diff-chg">gsim;</ins></code></td>
                   58919: <td><ins class="diff-chg">U+02273</ins></td>
                   58920: </tr>
                   58921: <tr>
                   58922: <td><code title=""><ins class="diff-chg">gsime;</ins></code></td>
                   58923: <td><ins class="diff-chg">U+02A8E</ins></td>
                   58924: </tr>
                   58925: <tr>
                   58926: <td><code title=""><ins class="diff-chg">gsiml;</ins></code></td>
                   58927: <td><ins class="diff-chg">U+02A90</ins></td>
                   58928: </tr>
                   58929: <tr>
                   58930: <td><code title="">gt;</code></td>
                   58931: <td><del class="diff-old">U+003E</del> <ins class=
                   58932: "diff-chg">U+0003E</ins></td>
                   58933: </tr>
                   58934: <tr>
                   58935: <td><code title="">gt</code></td>
                   58936: <td><del class="diff-old">U+003E</del> <ins class=
                   58937: "diff-chg">U+0003E</ins></td>
                   58938: </tr>
                   58939: <tr>
                   58940: <td><code title=""><ins class="diff-chg">gtcc;</ins></code></td>
                   58941: <td><ins class="diff-chg">U+02AA7</ins></td>
                   58942: </tr>
                   58943: <tr>
                   58944: <td><code title=""><ins class="diff-chg">gtcir;</ins></code></td>
                   58945: <td><ins class="diff-chg">U+02A7A</ins></td>
                   58946: </tr>
                   58947: <tr>
                   58948: <td><code title=""><ins class="diff-chg">gtdot;</ins></code></td>
                   58949: <td><ins class="diff-chg">U+022D7</ins></td>
                   58950: </tr>
                   58951: <tr>
                   58952: <td><code title=""><ins class="diff-chg">gtlPar;</ins></code></td>
                   58953: <td><ins class="diff-chg">U+02995</ins></td>
                   58954: </tr>
                   58955: <tr>
                   58956: <td><code title=""><ins class="diff-chg">gtquest;</ins></code></td>
                   58957: <td><ins class="diff-chg">U+02A7C</ins></td>
                   58958: </tr>
                   58959: <tr>
                   58960: <td><code title=""><ins class=
                   58961: "diff-chg">gtrapprox;</ins></code></td>
                   58962: <td><ins class="diff-chg">U+02A86</ins></td>
                   58963: </tr>
                   58964: <tr>
                   58965: <td><code title=""><ins class="diff-chg">gtrarr;</ins></code></td>
                   58966: <td><ins class="diff-chg">U+02978</ins></td>
                   58967: </tr>
                   58968: <tr>
                   58969: <td><code title=""><ins class="diff-chg">gtrdot;</ins></code></td>
                   58970: <td><ins class="diff-chg">U+022D7</ins></td>
                   58971: </tr>
                   58972: <tr>
                   58973: <td><code title=""><ins class=
                   58974: "diff-chg">gtreqless;</ins></code></td>
                   58975: <td><ins class="diff-chg">U+022DB</ins></td>
                   58976: </tr>
                   58977: <tr>
                   58978: <td><code title=""><ins class=
                   58979: "diff-chg">gtreqqless;</ins></code></td>
                   58980: <td><ins class="diff-chg">U+02A8C</ins></td>
                   58981: </tr>
                   58982: <tr>
                   58983: <td><code title=""><ins class="diff-chg">gtrless;</ins></code></td>
                   58984: <td><ins class="diff-chg">U+02277</ins></td>
                   58985: </tr>
                   58986: <tr>
                   58987: <td><code title=""><ins class="diff-chg">gtrsim;</ins></code></td>
                   58988: <td><ins class="diff-chg">U+02273</ins></td>
                   58989: </tr>
                   58990: <tr>
                   58991: <td><code title="">hArr;</code></td>
                   58992: <td><del class="diff-old">U+21D4</del> <ins class=
                   58993: "diff-chg">U+021D4</ins></td>
                   58994: </tr>
                   58995: <tr>
                   58996: <td><code title=""><ins class="diff-chg">hairsp;</ins></code></td>
                   58997: <td><ins class="diff-chg">U+0200A</ins></td>
                   58998: </tr>
                   58999: <tr>
                   59000: <td><code title=""><ins class="diff-chg">half;</ins></code></td>
                   59001: <td><ins class="diff-chg">U+000BD</ins></td>
                   59002: </tr>
                   59003: <tr>
                   59004: <td><code title=""><ins class="diff-chg">hamilt;</ins></code></td>
                   59005: <td><ins class="diff-chg">U+0210B</ins></td>
                   59006: </tr>
                   59007: <tr>
                   59008: <td><code title=""><ins class="diff-chg">hardcy;</ins></code></td>
                   59009: <td><ins class="diff-chg">U+0044A</ins></td>
                   59010: </tr>
                   59011: <tr>
                   59012: <td><code title="">harr;</code></td>
                   59013: <td><del class="diff-old">U+2194</del> <ins class=
                   59014: "diff-chg">U+02194</ins></td>
                   59015: </tr>
                   59016: <tr>
                   59017: <td><code title=""><ins class="diff-chg">harrcir;</ins></code></td>
                   59018: <td><ins class="diff-chg">U+02948</ins></td>
                   59019: </tr>
                   59020: <tr>
                   59021: <td><code title=""><ins class="diff-chg">harrw;</ins></code></td>
                   59022: <td><ins class="diff-chg">U+021AD</ins></td>
                   59023: </tr>
                   59024: <tr>
                   59025: <td><code title=""><ins class="diff-chg">hbar;</ins></code></td>
                   59026: <td><ins class="diff-chg">U+0210F</ins></td>
                   59027: </tr>
                   59028: <tr>
                   59029: <td><code title=""><ins class="diff-chg">hcirc;</ins></code></td>
                   59030: <td><ins class="diff-chg">U+00125</ins></td>
                   59031: </tr>
                   59032: <tr>
                   59033: <td><code title="">hearts;</code></td>
                   59034: <td><del class="diff-old">U+2665</del> <ins class=
                   59035: "diff-chg">U+02665</ins></td>
                   59036: </tr>
                   59037: <tr>
                   59038: <td><code title=""><ins class=
                   59039: "diff-chg">heartsuit;</ins></code></td>
                   59040: <td><ins class="diff-chg">U+02665</ins></td>
                   59041: </tr>
                   59042: <tr>
                   59043: <td><code title="">hellip;</code></td>
                   59044: <td><del class="diff-old">U+2026</del> <ins class=
                   59045: "diff-chg">U+02026</ins></td>
                   59046: </tr>
                   59047: <tr>
                   59048: <td><code title=""><ins class="diff-chg">hercon;</ins></code></td>
                   59049: <td><ins class="diff-chg">U+022B9</ins></td>
                   59050: </tr>
                   59051: <tr>
                   59052: <td><code title=""><ins class="diff-chg">hfr;</ins></code></td>
                   59053: <td><ins class="diff-chg">U+1D525</ins></td>
                   59054: </tr>
                   59055: <tr>
                   59056: <td><code title=""><ins class=
                   59057: "diff-chg">hksearow;</ins></code></td>
                   59058: <td><ins class="diff-chg">U+02925</ins></td>
                   59059: </tr>
                   59060: <tr>
                   59061: <td><code title=""><ins class=
                   59062: "diff-chg">hkswarow;</ins></code></td>
                   59063: <td><ins class="diff-chg">U+02926</ins></td>
                   59064: </tr>
                   59065: <tr>
                   59066: <td><code title=""><ins class="diff-chg">hoarr;</ins></code></td>
                   59067: <td><ins class="diff-chg">U+021FF</ins></td>
                   59068: </tr>
                   59069: <tr>
                   59070: <td><code title=""><ins class="diff-chg">homtht;</ins></code></td>
                   59071: <td><ins class="diff-chg">U+0223B</ins></td>
                   59072: </tr>
                   59073: <tr>
                   59074: <td><code title=""><ins class=
                   59075: "diff-chg">hookleftarrow;</ins></code></td>
                   59076: <td><ins class="diff-chg">U+021A9</ins></td>
                   59077: </tr>
                   59078: <tr>
                   59079: <td><code title=""><ins class=
                   59080: "diff-chg">hookrightarrow;</ins></code></td>
                   59081: <td><ins class="diff-chg">U+021AA</ins></td>
                   59082: </tr>
                   59083: <tr>
                   59084: <td><code title=""><ins class="diff-chg">hopf;</ins></code></td>
                   59085: <td><ins class="diff-chg">U+1D559</ins></td>
                   59086: </tr>
                   59087: <tr>
                   59088: <td><code title=""><ins class="diff-chg">horbar;</ins></code></td>
                   59089: <td><ins class="diff-chg">U+02015</ins></td>
                   59090: </tr>
                   59091: <tr>
                   59092: <td><code title=""><ins class="diff-chg">hscr;</ins></code></td>
                   59093: <td><ins class="diff-chg">U+1D4BD</ins></td>
                   59094: </tr>
                   59095: <tr>
                   59096: <td><code title=""><ins class="diff-chg">hslash;</ins></code></td>
                   59097: <td><ins class="diff-chg">U+0210F</ins></td>
                   59098: </tr>
                   59099: <tr>
                   59100: <td><code title=""><ins class="diff-chg">hstrok;</ins></code></td>
                   59101: <td><ins class="diff-chg">U+00127</ins></td>
                   59102: </tr>
                   59103: <tr>
                   59104: <td><code title=""><ins class="diff-chg">hybull;</ins></code></td>
                   59105: <td><ins class="diff-chg">U+02043</ins></td>
                   59106: </tr>
                   59107: <tr>
                   59108: <td><code title=""><ins class="diff-chg">hyphen;</ins></code></td>
                   59109: <td><ins class="diff-chg">U+02010</ins></td>
                   59110: </tr>
                   59111: <tr>
                   59112: <td><code title="">iacute;</code></td>
                   59113: <td><del class="diff-old">U+00ED</del> <ins class=
                   59114: "diff-chg">U+000ED</ins></td>
                   59115: </tr>
                   59116: <tr>
                   59117: <td><code title="">iacute</code></td>
1.2     ! mike     59118: <td><del class="diff-old">U+00ED</del> <ins class=
        !          59119: "diff-chg">U+000ED</ins></td>
1.1       mike     59120: </tr>
                   59121: <tr>
1.2     ! mike     59122: <td><code title=""><ins class="diff-chg">ic;</ins></code></td>
        !          59123: <td><ins class="diff-chg">U+02063</ins></td>
1.1       mike     59124: </tr>
                   59125: <tr>
                   59126: <td><code title="">icirc;</code></td>
                   59127: <td><del class="diff-old">U+00EE</del> <ins class=
                   59128: "diff-chg">U+000EE</ins></td>
                   59129: </tr>
                   59130: <tr>
                   59131: <td><code title="">icirc</code></td>
                   59132: <td><del class="diff-old">U+00EE</del> <ins class=
                   59133: "diff-chg">U+000EE</ins></td>
                   59134: </tr>
                   59135: <tr>
                   59136: <td><code title=""><ins class="diff-chg">icy;</ins></code></td>
                   59137: <td><ins class="diff-chg">U+00438</ins></td>
                   59138: </tr>
                   59139: <tr>
                   59140: <td><code title=""><ins class="diff-chg">iecy;</ins></code></td>
                   59141: <td><ins class="diff-chg">U+00435</ins></td>
                   59142: </tr>
                   59143: <tr>
                   59144: <td><code title="">iexcl;</code></td>
                   59145: <td><del class="diff-old">U+00A1</del> <ins class=
                   59146: "diff-chg">U+000A1</ins></td>
                   59147: </tr>
                   59148: <tr>
                   59149: <td><code title="">iexcl</code></td>
                   59150: <td><del class="diff-old">U+00A1</del> <ins class=
                   59151: "diff-chg">U+000A1</ins></td>
                   59152: </tr>
                   59153: <tr>
                   59154: <td><code title=""><ins class="diff-chg">iff;</ins></code></td>
                   59155: <td><ins class="diff-chg">U+021D4</ins></td>
                   59156: </tr>
                   59157: <tr>
                   59158: <td><code title=""><ins class="diff-chg">ifr;</ins></code></td>
                   59159: <td><ins class="diff-chg">U+1D526</ins></td>
                   59160: </tr>
                   59161: <tr>
                   59162: <td><code title="">igrave;</code></td>
                   59163: <td><del class="diff-old">U+00EC</del> <ins class=
                   59164: "diff-chg">U+000EC</ins></td>
                   59165: </tr>
                   59166: <tr>
                   59167: <td><code title="">igrave</code></td>
                   59168: <td><del class="diff-old">U+00EC</del> <ins class=
                   59169: "diff-chg">U+000EC</ins></td>
                   59170: </tr>
                   59171: <tr>
                   59172: <td><code title=""><ins class="diff-chg">ii;</ins></code></td>
                   59173: <td><ins class="diff-chg">U+02148</ins></td>
                   59174: </tr>
                   59175: <tr>
                   59176: <td><code title=""><ins class="diff-chg">iiiint;</ins></code></td>
                   59177: <td><ins class="diff-chg">U+02A0C</ins></td>
                   59178: </tr>
                   59179: <tr>
                   59180: <td><code title=""><ins class="diff-chg">iiint;</ins></code></td>
                   59181: <td><ins class="diff-chg">U+0222D</ins></td>
                   59182: </tr>
                   59183: <tr>
                   59184: <td><code title=""><ins class="diff-chg">iinfin;</ins></code></td>
                   59185: <td><ins class="diff-chg">U+029DC</ins></td>
                   59186: </tr>
                   59187: <tr>
                   59188: <td><code title=""><ins class="diff-chg">iiota;</ins></code></td>
                   59189: <td><ins class="diff-chg">U+02129</ins></td>
                   59190: </tr>
                   59191: <tr>
                   59192: <td><code title=""><ins class="diff-chg">ijlig;</ins></code></td>
                   59193: <td><ins class="diff-chg">U+00133</ins></td>
                   59194: </tr>
                   59195: <tr>
                   59196: <td><code title=""><ins class="diff-chg">imacr;</ins></code></td>
                   59197: <td><ins class="diff-chg">U+0012B</ins></td>
                   59198: </tr>
                   59199: <tr>
                   59200: <td><code title="">image;</code></td>
                   59201: <td><del class="diff-old">U+2111</del> <ins class=
                   59202: "diff-chg">U+02111</ins></td>
                   59203: </tr>
                   59204: <tr>
                   59205: <td><code title=""><ins class=
                   59206: "diff-chg">imagline;</ins></code></td>
                   59207: <td><ins class="diff-chg">U+02110</ins></td>
                   59208: </tr>
                   59209: <tr>
                   59210: <td><code title=""><ins class=
                   59211: "diff-chg">imagpart;</ins></code></td>
                   59212: <td><ins class="diff-chg">U+02111</ins></td>
                   59213: </tr>
                   59214: <tr>
                   59215: <td><code title=""><ins class="diff-chg">imath;</ins></code></td>
                   59216: <td><ins class="diff-chg">U+00131</ins></td>
                   59217: </tr>
                   59218: <tr>
                   59219: <td><code title=""><ins class="diff-chg">imof;</ins></code></td>
                   59220: <td><ins class="diff-chg">U+022B7</ins></td>
                   59221: </tr>
                   59222: <tr>
                   59223: <td><code title=""><ins class="diff-chg">imped;</ins></code></td>
                   59224: <td><ins class="diff-chg">U+001B5</ins></td>
                   59225: </tr>
                   59226: <tr>
                   59227: <td><code title=""><ins class="diff-chg">in;</ins></code></td>
                   59228: <td><ins class="diff-chg">U+02208</ins></td>
                   59229: </tr>
                   59230: <tr>
                   59231: <td><code title=""><ins class="diff-chg">incare;</ins></code></td>
                   59232: <td><ins class="diff-chg">U+02105</ins></td>
                   59233: </tr>
                   59234: <tr>
                   59235: <td><code title="">infin;</code></td>
                   59236: <td><del class="diff-old">U+221E</del> <ins class=
                   59237: "diff-chg">U+0221E</ins></td>
                   59238: </tr>
                   59239: <tr>
                   59240: <td><code title=""><ins class=
                   59241: "diff-chg">infintie;</ins></code></td>
                   59242: <td><ins class="diff-chg">U+029DD</ins></td>
                   59243: </tr>
                   59244: <tr>
                   59245: <td><code title=""><ins class="diff-chg">inodot;</ins></code></td>
                   59246: <td><ins class="diff-chg">U+00131</ins></td>
                   59247: </tr>
                   59248: <tr>
                   59249: <td><code title="">int;</code></td>
                   59250: <td><del class="diff-old">U+222B</del> <ins class=
                   59251: "diff-chg">U+0222B</ins></td>
                   59252: </tr>
                   59253: <tr>
                   59254: <td><code title=""><ins class="diff-chg">intcal;</ins></code></td>
                   59255: <td><ins class="diff-chg">U+022BA</ins></td>
                   59256: </tr>
                   59257: <tr>
                   59258: <td><code title=""><ins class=
                   59259: "diff-chg">integers;</ins></code></td>
                   59260: <td><ins class="diff-chg">U+02124</ins></td>
                   59261: </tr>
                   59262: <tr>
                   59263: <td><code title=""><ins class=
                   59264: "diff-chg">intercal;</ins></code></td>
                   59265: <td><ins class="diff-chg">U+022BA</ins></td>
                   59266: </tr>
                   59267: <tr>
                   59268: <td><code title=""><ins class=
                   59269: "diff-chg">intlarhk;</ins></code></td>
                   59270: <td><ins class="diff-chg">U+02A17</ins></td>
                   59271: </tr>
                   59272: <tr>
                   59273: <td><code title=""><ins class="diff-chg">intprod;</ins></code></td>
                   59274: <td><ins class="diff-chg">U+02A3C</ins></td>
                   59275: </tr>
                   59276: <tr>
                   59277: <td><code title=""><ins class="diff-chg">iocy;</ins></code></td>
                   59278: <td><ins class="diff-chg">U+00451</ins></td>
                   59279: </tr>
                   59280: <tr>
                   59281: <td><code title=""><ins class="diff-chg">iogon;</ins></code></td>
                   59282: <td><ins class="diff-chg">U+0012F</ins></td>
                   59283: </tr>
                   59284: <tr>
                   59285: <td><code title=""><ins class="diff-chg">iopf;</ins></code></td>
                   59286: <td><ins class="diff-chg">U+1D55A</ins></td>
                   59287: </tr>
                   59288: <tr>
                   59289: <td><code title="">iota;</code></td>
                   59290: <td><del class="diff-old">U+03B9</del> <ins class=
                   59291: "diff-chg">U+003B9</ins></td>
                   59292: </tr>
                   59293: <tr>
                   59294: <td><code title=""><ins class="diff-chg">iprod;</ins></code></td>
                   59295: <td><ins class="diff-chg">U+02A3C</ins></td>
                   59296: </tr>
                   59297: <tr>
                   59298: <td><code title="">iquest;</code></td>
                   59299: <td><del class="diff-old">U+00BF</del> <ins class=
                   59300: "diff-chg">U+000BF</ins></td>
                   59301: </tr>
                   59302: <tr>
                   59303: <td><code title="">iquest</code></td>
                   59304: <td><del class="diff-old">U+00BF</del> <ins class=
                   59305: "diff-chg">U+000BF</ins></td>
                   59306: </tr>
                   59307: <tr>
                   59308: <td><code title=""><ins class="diff-chg">iscr;</ins></code></td>
                   59309: <td><ins class="diff-chg">U+1D4BE</ins></td>
                   59310: </tr>
                   59311: <tr>
                   59312: <td><code title="">isin;</code></td>
                   59313: <td><del class="diff-old">U+2208</del> <ins class=
                   59314: "diff-chg">U+02208</ins></td>
                   59315: </tr>
                   59316: <tr>
                   59317: <td><code title=""><ins class="diff-chg">isinE;</ins></code></td>
                   59318: <td><ins class="diff-chg">U+022F9</ins></td>
                   59319: </tr>
                   59320: <tr>
                   59321: <td><code title=""><ins class="diff-chg">isindot;</ins></code></td>
                   59322: <td><ins class="diff-chg">U+022F5</ins></td>
                   59323: </tr>
                   59324: <tr>
                   59325: <td><code title=""><ins class="diff-chg">isins;</ins></code></td>
                   59326: <td><ins class="diff-chg">U+022F4</ins></td>
                   59327: </tr>
                   59328: <tr>
                   59329: <td><code title=""><ins class="diff-chg">isinsv;</ins></code></td>
                   59330: <td><ins class="diff-chg">U+022F3</ins></td>
                   59331: </tr>
                   59332: <tr>
                   59333: <td><code title=""><ins class="diff-chg">isinv;</ins></code></td>
                   59334: <td><ins class="diff-chg">U+02208</ins></td>
                   59335: </tr>
                   59336: <tr>
                   59337: <td><code title=""><ins class="diff-chg">it;</ins></code></td>
                   59338: <td><ins class="diff-chg">U+02062</ins></td>
                   59339: </tr>
                   59340: <tr>
                   59341: <td><code title=""><ins class="diff-chg">itilde;</ins></code></td>
                   59342: <td><ins class="diff-chg">U+00129</ins></td>
                   59343: </tr>
                   59344: <tr>
                   59345: <td><code title=""><ins class="diff-chg">iukcy;</ins></code></td>
                   59346: <td><ins class="diff-chg">U+00456</ins></td>
                   59347: </tr>
                   59348: <tr>
                   59349: <td><code title="">iuml;</code></td>
                   59350: <td><del class="diff-old">U+00EF</del> <ins class=
                   59351: "diff-chg">U+000EF</ins></td>
                   59352: </tr>
                   59353: <tr>
                   59354: <td><code title="">iuml</code></td>
                   59355: <td><del class="diff-old">U+00EF</del> <ins class=
                   59356: "diff-chg">U+000EF</ins></td>
                   59357: </tr>
                   59358: <tr>
                   59359: <td><code title=""><ins class="diff-chg">jcirc;</ins></code></td>
                   59360: <td><ins class="diff-chg">U+00135</ins></td>
                   59361: </tr>
                   59362: <tr>
                   59363: <td><code title=""><ins class="diff-chg">jcy;</ins></code></td>
                   59364: <td><ins class="diff-chg">U+00439</ins></td>
                   59365: </tr>
                   59366: <tr>
                   59367: <td><code title=""><ins class="diff-chg">jfr;</ins></code></td>
                   59368: <td><ins class="diff-chg">U+1D527</ins></td>
                   59369: </tr>
                   59370: <tr>
                   59371: <td><code title=""><ins class="diff-chg">jmath;</ins></code></td>
                   59372: <td><ins class="diff-chg">U+00237</ins></td>
                   59373: </tr>
                   59374: <tr>
                   59375: <td><code title=""><ins class="diff-chg">jopf;</ins></code></td>
                   59376: <td><ins class="diff-chg">U+1D55B</ins></td>
                   59377: </tr>
                   59378: <tr>
                   59379: <td><code title=""><ins class="diff-chg">jscr;</ins></code></td>
                   59380: <td><ins class="diff-chg">U+1D4BF</ins></td>
                   59381: </tr>
                   59382: <tr>
                   59383: <td><code title=""><ins class="diff-chg">jsercy;</ins></code></td>
                   59384: <td><ins class="diff-chg">U+00458</ins></td>
                   59385: </tr>
                   59386: <tr>
                   59387: <td><code title=""><ins class="diff-chg">jukcy;</ins></code></td>
                   59388: <td><ins class="diff-chg">U+00454</ins></td>
                   59389: </tr>
                   59390: <tr>
                   59391: <td><code title="">kappa;</code></td>
                   59392: <td><del class="diff-old">U+03BA</del> <ins class=
                   59393: "diff-chg">U+003BA</ins></td>
                   59394: </tr>
                   59395: <tr>
                   59396: <td><code title=""><ins class="diff-chg">kappav;</ins></code></td>
                   59397: <td><ins class="diff-chg">U+003F0</ins></td>
                   59398: </tr>
                   59399: <tr>
                   59400: <td><code title=""><ins class="diff-chg">kcedil;</ins></code></td>
                   59401: <td><ins class="diff-chg">U+00137</ins></td>
                   59402: </tr>
                   59403: <tr>
                   59404: <td><code title=""><ins class="diff-chg">kcy;</ins></code></td>
                   59405: <td><ins class="diff-chg">U+0043A</ins></td>
                   59406: </tr>
                   59407: <tr>
                   59408: <td><code title=""><ins class="diff-chg">kfr;</ins></code></td>
                   59409: <td><ins class="diff-chg">U+1D528</ins></td>
                   59410: </tr>
                   59411: <tr>
                   59412: <td><code title=""><ins class="diff-chg">kgreen;</ins></code></td>
                   59413: <td><ins class="diff-chg">U+00138</ins></td>
                   59414: </tr>
                   59415: <tr>
                   59416: <td><code title=""><ins class="diff-chg">khcy;</ins></code></td>
                   59417: <td><ins class="diff-chg">U+00445</ins></td>
                   59418: </tr>
                   59419: <tr>
                   59420: <td><code title=""><ins class="diff-chg">kjcy;</ins></code></td>
                   59421: <td><ins class="diff-chg">U+0045C</ins></td>
                   59422: </tr>
                   59423: <tr>
                   59424: <td><code title=""><ins class="diff-chg">kopf;</ins></code></td>
                   59425: <td><ins class="diff-chg">U+1D55C</ins></td>
                   59426: </tr>
                   59427: <tr>
                   59428: <td><code title=""><ins class="diff-chg">kscr;</ins></code></td>
                   59429: <td><ins class="diff-chg">U+1D4C0</ins></td>
                   59430: </tr>
                   59431: <tr>
                   59432: <td><code title=""><ins class="diff-chg">lAarr;</ins></code></td>
                   59433: <td><ins class="diff-chg">U+021DA</ins></td>
                   59434: </tr>
                   59435: <tr>
                   59436: <td><code title="">lArr;</code></td>
                   59437: <td><del class="diff-old">U+21D0</del> <ins class=
                   59438: "diff-chg">U+021D0</ins></td>
                   59439: </tr>
                   59440: <tr>
                   59441: <td><code title=""><ins class="diff-chg">lAtail;</ins></code></td>
                   59442: <td><ins class="diff-chg">U+0291B</ins></td>
                   59443: </tr>
                   59444: <tr>
                   59445: <td><code title=""><ins class="diff-chg">lBarr;</ins></code></td>
                   59446: <td><ins class="diff-chg">U+0290E</ins></td>
                   59447: </tr>
                   59448: <tr>
                   59449: <td><code title=""><ins class="diff-chg">lE;</ins></code></td>
                   59450: <td><ins class="diff-chg">U+02266</ins></td>
                   59451: </tr>
                   59452: <tr>
                   59453: <td><code title=""><ins class="diff-chg">lEg;</ins></code></td>
                   59454: <td><ins class="diff-chg">U+02A8B</ins></td>
                   59455: </tr>
                   59456: <tr>
                   59457: <td><code title=""><ins class="diff-chg">lHar;</ins></code></td>
                   59458: <td><ins class="diff-chg">U+02962</ins></td>
                   59459: </tr>
                   59460: <tr>
                   59461: <td><code title=""><ins class="diff-chg">lacute;</ins></code></td>
                   59462: <td><ins class="diff-chg">U+0013A</ins></td>
                   59463: </tr>
                   59464: <tr>
                   59465: <td><code title=""><ins class=
                   59466: "diff-chg">laemptyv;</ins></code></td>
                   59467: <td><ins class="diff-chg">U+029B4</ins></td>
                   59468: </tr>
                   59469: <tr>
                   59470: <td><code title=""><ins class="diff-chg">lagran;</ins></code></td>
                   59471: <td><ins class="diff-chg">U+02112</ins></td>
                   59472: </tr>
                   59473: <tr>
                   59474: <td><code title="">lambda;</code></td>
                   59475: <td><del class="diff-old">U+03BB</del> <ins class=
                   59476: "diff-chg">U+003BB</ins></td>
                   59477: </tr>
                   59478: <tr>
                   59479: <td><code title="">lang;</code></td>
                   59480: <td><del class="diff-old">U+3008</del> <ins class=
                   59481: "diff-chg">U+027E8</ins></td>
                   59482: </tr>
                   59483: <tr>
                   59484: <td><code title=""><ins class="diff-chg">langd;</ins></code></td>
                   59485: <td><ins class="diff-chg">U+02991</ins></td>
                   59486: </tr>
                   59487: <tr>
                   59488: <td><code title=""><ins class="diff-chg">langle;</ins></code></td>
                   59489: <td><ins class="diff-chg">U+027E8</ins></td>
                   59490: </tr>
                   59491: <tr>
                   59492: <td><code title=""><ins class="diff-chg">lap;</ins></code></td>
                   59493: <td><ins class="diff-chg">U+02A85</ins></td>
                   59494: </tr>
                   59495: <tr>
                   59496: <td><code title="">laquo;</code></td>
                   59497: <td><del class="diff-old">U+00AB</del> <ins class=
                   59498: "diff-chg">U+000AB</ins></td>
                   59499: </tr>
                   59500: <tr>
                   59501: <td><code title="">laquo</code></td>
                   59502: <td><del class="diff-old">U+00AB</del> <ins class=
                   59503: "diff-chg">U+000AB</ins></td>
                   59504: </tr>
                   59505: <tr>
                   59506: <td><code title="">larr;</code></td>
                   59507: <td><del class="diff-old">U+2190</del> <ins class=
                   59508: "diff-chg">U+02190</ins></td>
                   59509: </tr>
                   59510: <tr>
                   59511: <td><code title=""><ins class="diff-chg">larrb;</ins></code></td>
                   59512: <td><ins class="diff-chg">U+021E4</ins></td>
                   59513: </tr>
                   59514: <tr>
                   59515: <td><code title=""><ins class="diff-chg">larrbfs;</ins></code></td>
                   59516: <td><ins class="diff-chg">U+0291F</ins></td>
                   59517: </tr>
                   59518: <tr>
                   59519: <td><code title=""><ins class="diff-chg">larrfs;</ins></code></td>
                   59520: <td><ins class="diff-chg">U+0291D</ins></td>
                   59521: </tr>
                   59522: <tr>
                   59523: <td><code title=""><ins class="diff-chg">larrhk;</ins></code></td>
                   59524: <td><ins class="diff-chg">U+021A9</ins></td>
                   59525: </tr>
                   59526: <tr>
                   59527: <td><code title=""><ins class="diff-chg">larrlp;</ins></code></td>
                   59528: <td><ins class="diff-chg">U+021AB</ins></td>
                   59529: </tr>
                   59530: <tr>
                   59531: <td><code title=""><ins class="diff-chg">larrpl;</ins></code></td>
                   59532: <td><ins class="diff-chg">U+02939</ins></td>
                   59533: </tr>
                   59534: <tr>
                   59535: <td><code title=""><ins class="diff-chg">larrsim;</ins></code></td>
                   59536: <td><ins class="diff-chg">U+02973</ins></td>
                   59537: </tr>
                   59538: <tr>
                   59539: <td><code title=""><ins class="diff-chg">larrtl;</ins></code></td>
                   59540: <td><ins class="diff-chg">U+021A2</ins></td>
                   59541: </tr>
                   59542: <tr>
                   59543: <td><code title=""><ins class="diff-chg">lat;</ins></code></td>
                   59544: <td><ins class="diff-chg">U+02AAB</ins></td>
                   59545: </tr>
                   59546: <tr>
                   59547: <td><code title=""><ins class="diff-chg">latail;</ins></code></td>
                   59548: <td><ins class="diff-chg">U+02919</ins></td>
                   59549: </tr>
                   59550: <tr>
                   59551: <td><code title=""><ins class="diff-chg">late;</ins></code></td>
                   59552: <td><ins class="diff-chg">U+02AAD</ins></td>
                   59553: </tr>
                   59554: <tr>
                   59555: <td><code title=""><ins class="diff-chg">lbarr;</ins></code></td>
                   59556: <td><ins class="diff-chg">U+0290C</ins></td>
                   59557: </tr>
                   59558: <tr>
                   59559: <td><code title=""><ins class="diff-chg">lbbrk;</ins></code></td>
                   59560: <td><ins class="diff-chg">U+02772</ins></td>
                   59561: </tr>
                   59562: <tr>
                   59563: <td><code title=""><ins class="diff-chg">lbrace;</ins></code></td>
                   59564: <td><ins class="diff-chg">U+0007B</ins></td>
                   59565: </tr>
                   59566: <tr>
                   59567: <td><code title=""><ins class="diff-chg">lbrack;</ins></code></td>
                   59568: <td><ins class="diff-chg">U+0005B</ins></td>
                   59569: </tr>
                   59570: <tr>
                   59571: <td><code title=""><ins class="diff-chg">lbrke;</ins></code></td>
                   59572: <td><ins class="diff-chg">U+0298B</ins></td>
                   59573: </tr>
                   59574: <tr>
                   59575: <td><code title=""><ins class="diff-chg">lbrksld;</ins></code></td>
                   59576: <td><ins class="diff-chg">U+0298F</ins></td>
                   59577: </tr>
                   59578: <tr>
                   59579: <td><code title=""><ins class="diff-chg">lbrkslu;</ins></code></td>
                   59580: <td><ins class="diff-chg">U+0298D</ins></td>
                   59581: </tr>
                   59582: <tr>
                   59583: <td><code title=""><ins class="diff-chg">lcaron;</ins></code></td>
                   59584: <td><ins class="diff-chg">U+0013E</ins></td>
                   59585: </tr>
                   59586: <tr>
                   59587: <td><code title=""><ins class="diff-chg">lcedil;</ins></code></td>
                   59588: <td><ins class="diff-chg">U+0013C</ins></td>
                   59589: </tr>
                   59590: <tr>
                   59591: <td><code title="">lceil;</code></td>
                   59592: <td><del class="diff-old">U+2308</del> <ins class=
                   59593: "diff-chg">U+02308</ins></td>
                   59594: </tr>
                   59595: <tr>
                   59596: <td><code title=""><ins class="diff-chg">lcub;</ins></code></td>
                   59597: <td><ins class="diff-chg">U+0007B</ins></td>
                   59598: </tr>
                   59599: <tr>
                   59600: <td><code title=""><ins class="diff-chg">lcy;</ins></code></td>
                   59601: <td><ins class="diff-chg">U+0043B</ins></td>
                   59602: </tr>
                   59603: <tr>
                   59604: <td><code title=""><ins class="diff-chg">ldca;</ins></code></td>
                   59605: <td><ins class="diff-chg">U+02936</ins></td>
                   59606: </tr>
                   59607: <tr>
                   59608: <td><code title="">ldquo;</code></td>
                   59609: <td><del class="diff-old">U+201C</del> <ins class=
                   59610: "diff-chg">U+0201C</ins></td>
                   59611: </tr>
                   59612: <tr>
                   59613: <td><code title=""><ins class="diff-chg">ldquor;</ins></code></td>
                   59614: <td><ins class="diff-chg">U+0201E</ins></td>
                   59615: </tr>
                   59616: <tr>
                   59617: <td><code title=""><ins class="diff-chg">ldrdhar;</ins></code></td>
                   59618: <td><ins class="diff-chg">U+02967</ins></td>
                   59619: </tr>
                   59620: <tr>
                   59621: <td><code title=""><ins class=
                   59622: "diff-chg">ldrushar;</ins></code></td>
                   59623: <td><ins class="diff-chg">U+0294B</ins></td>
                   59624: </tr>
                   59625: <tr>
                   59626: <td><code title=""><ins class="diff-chg">ldsh;</ins></code></td>
                   59627: <td><ins class="diff-chg">U+021B2</ins></td>
                   59628: </tr>
                   59629: <tr>
                   59630: <td><code title="">le;</code></td>
                   59631: <td><del class="diff-old">U+2264</del> <ins class=
                   59632: "diff-chg">U+02264</ins></td>
                   59633: </tr>
                   59634: <tr>
                   59635: <td><code title=""><ins class=
                   59636: "diff-chg">leftarrow;</ins></code></td>
                   59637: <td><ins class="diff-chg">U+02190</ins></td>
                   59638: </tr>
                   59639: <tr>
                   59640: <td><code title=""><ins class=
                   59641: "diff-chg">leftarrowtail;</ins></code></td>
                   59642: <td><ins class="diff-chg">U+021A2</ins></td>
                   59643: </tr>
                   59644: <tr>
                   59645: <td><code title=""><ins class=
                   59646: "diff-chg">leftharpoondown;</ins></code></td>
                   59647: <td><ins class="diff-chg">U+021BD</ins></td>
                   59648: </tr>
                   59649: <tr>
                   59650: <td><code title=""><ins class=
                   59651: "diff-chg">leftharpoonup;</ins></code></td>
                   59652: <td><ins class="diff-chg">U+021BC</ins></td>
                   59653: </tr>
                   59654: <tr>
                   59655: <td><code title=""><ins class=
                   59656: "diff-chg">leftleftarrows;</ins></code></td>
                   59657: <td><ins class="diff-chg">U+021C7</ins></td>
                   59658: </tr>
                   59659: <tr>
                   59660: <td><code title=""><ins class=
                   59661: "diff-chg">leftrightarrow;</ins></code></td>
                   59662: <td><ins class="diff-chg">U+02194</ins></td>
                   59663: </tr>
                   59664: <tr>
                   59665: <td><code title=""><ins class=
                   59666: "diff-chg">leftrightarrows;</ins></code></td>
                   59667: <td><ins class="diff-chg">U+021C6</ins></td>
                   59668: </tr>
                   59669: <tr>
                   59670: <td><code title=""><ins class=
                   59671: "diff-chg">leftrightharpoons;</ins></code></td>
                   59672: <td><ins class="diff-chg">U+021CB</ins></td>
                   59673: </tr>
                   59674: <tr>
                   59675: <td><code title=""><ins class=
                   59676: "diff-chg">leftrightsquigarrow;</ins></code></td>
                   59677: <td><ins class="diff-chg">U+021AD</ins></td>
                   59678: </tr>
                   59679: <tr>
                   59680: <td><code title=""><ins class=
                   59681: "diff-chg">leftthreetimes;</ins></code></td>
                   59682: <td><ins class="diff-chg">U+022CB</ins></td>
                   59683: </tr>
                   59684: <tr>
                   59685: <td><code title=""><ins class="diff-chg">leg;</ins></code></td>
                   59686: <td><ins class="diff-chg">U+022DA</ins></td>
                   59687: </tr>
                   59688: <tr>
                   59689: <td><code title=""><ins class="diff-chg">leq;</ins></code></td>
                   59690: <td><ins class="diff-chg">U+02264</ins></td>
                   59691: </tr>
                   59692: <tr>
                   59693: <td><code title=""><ins class="diff-chg">leqq;</ins></code></td>
                   59694: <td><ins class="diff-chg">U+02266</ins></td>
                   59695: </tr>
                   59696: <tr>
                   59697: <td><code title=""><ins class=
                   59698: "diff-chg">leqslant;</ins></code></td>
                   59699: <td><ins class="diff-chg">U+02A7D</ins></td>
                   59700: </tr>
                   59701: <tr>
                   59702: <td><code title=""><ins class="diff-chg">les;</ins></code></td>
                   59703: <td><ins class="diff-chg">U+02A7D</ins></td>
                   59704: </tr>
                   59705: <tr>
                   59706: <td><code title=""><ins class="diff-chg">lescc;</ins></code></td>
                   59707: <td><ins class="diff-chg">U+02AA8</ins></td>
                   59708: </tr>
                   59709: <tr>
                   59710: <td><code title=""><ins class="diff-chg">lesdot;</ins></code></td>
                   59711: <td><ins class="diff-chg">U+02A7F</ins></td>
                   59712: </tr>
                   59713: <tr>
                   59714: <td><code title=""><ins class="diff-chg">lesdoto;</ins></code></td>
                   59715: <td><ins class="diff-chg">U+02A81</ins></td>
                   59716: </tr>
                   59717: <tr>
                   59718: <td><code title=""><ins class=
                   59719: "diff-chg">lesdotor;</ins></code></td>
                   59720: <td><ins class="diff-chg">U+02A83</ins></td>
                   59721: </tr>
                   59722: <tr>
                   59723: <td><code title=""><ins class="diff-chg">lesges;</ins></code></td>
                   59724: <td><ins class="diff-chg">U+02A93</ins></td>
                   59725: </tr>
                   59726: <tr>
                   59727: <td><code title=""><ins class=
                   59728: "diff-chg">lessapprox;</ins></code></td>
                   59729: <td><ins class="diff-chg">U+02A85</ins></td>
                   59730: </tr>
                   59731: <tr>
                   59732: <td><code title=""><ins class="diff-chg">lessdot;</ins></code></td>
                   59733: <td><ins class="diff-chg">U+022D6</ins></td>
                   59734: </tr>
                   59735: <tr>
                   59736: <td><code title=""><ins class=
                   59737: "diff-chg">lesseqgtr;</ins></code></td>
                   59738: <td><ins class="diff-chg">U+022DA</ins></td>
                   59739: </tr>
                   59740: <tr>
                   59741: <td><code title=""><ins class=
                   59742: "diff-chg">lesseqqgtr;</ins></code></td>
                   59743: <td><ins class="diff-chg">U+02A8B</ins></td>
                   59744: </tr>
                   59745: <tr>
                   59746: <td><code title=""><ins class="diff-chg">lessgtr;</ins></code></td>
                   59747: <td><ins class="diff-chg">U+02276</ins></td>
                   59748: </tr>
                   59749: <tr>
                   59750: <td><code title=""><ins class="diff-chg">lesssim;</ins></code></td>
                   59751: <td><ins class="diff-chg">U+02272</ins></td>
                   59752: </tr>
                   59753: <tr>
                   59754: <td><code title=""><ins class="diff-chg">lfisht;</ins></code></td>
                   59755: <td><ins class="diff-chg">U+0297C</ins></td>
                   59756: </tr>
                   59757: <tr>
                   59758: <td><code title="">lfloor;</code></td>
1.2     ! mike     59759: <td><del class="diff-old">U+230A</del> <ins class=
        !          59760: "diff-chg">U+0230A</ins></td>
1.1       mike     59761: </tr>
                   59762: <tr>
1.2     ! mike     59763: <td><code title=""><ins class="diff-chg">lfr;</ins></code></td>
        !          59764: <td><ins class="diff-chg">U+1D529</ins></td>
1.1       mike     59765: </tr>
                   59766: <tr>
                   59767: <td><code title=""><ins class="diff-chg">lg;</ins></code></td>
                   59768: <td><ins class="diff-chg">U+02276</ins></td>
                   59769: </tr>
                   59770: <tr>
                   59771: <td><code title=""><ins class="diff-chg">lgE;</ins></code></td>
                   59772: <td><ins class="diff-chg">U+02A91</ins></td>
                   59773: </tr>
                   59774: <tr>
                   59775: <td><code title=""><ins class="diff-chg">lhard;</ins></code></td>
                   59776: <td><ins class="diff-chg">U+021BD</ins></td>
                   59777: </tr>
                   59778: <tr>
                   59779: <td><code title=""><ins class="diff-chg">lharu;</ins></code></td>
                   59780: <td><ins class="diff-chg">U+021BC</ins></td>
                   59781: </tr>
                   59782: <tr>
                   59783: <td><code title=""><ins class="diff-chg">lharul;</ins></code></td>
                   59784: <td><ins class="diff-chg">U+0296A</ins></td>
                   59785: </tr>
                   59786: <tr>
                   59787: <td><code title=""><ins class="diff-chg">lhblk;</ins></code></td>
                   59788: <td><ins class="diff-chg">U+02584</ins></td>
                   59789: </tr>
                   59790: <tr>
                   59791: <td><code title=""><ins class="diff-chg">ljcy;</ins></code></td>
                   59792: <td><ins class="diff-chg">U+00459</ins></td>
                   59793: </tr>
                   59794: <tr>
                   59795: <td><code title=""><ins class="diff-chg">ll;</ins></code></td>
                   59796: <td><ins class="diff-chg">U+0226A</ins></td>
                   59797: </tr>
                   59798: <tr>
                   59799: <td><code title=""><ins class="diff-chg">llarr;</ins></code></td>
                   59800: <td><ins class="diff-chg">U+021C7</ins></td>
                   59801: </tr>
                   59802: <tr>
                   59803: <td><code title=""><ins class=
                   59804: "diff-chg">llcorner;</ins></code></td>
                   59805: <td><ins class="diff-chg">U+0231E</ins></td>
                   59806: </tr>
                   59807: <tr>
                   59808: <td><code title=""><ins class="diff-chg">llhard;</ins></code></td>
                   59809: <td><ins class="diff-chg">U+0296B</ins></td>
                   59810: </tr>
                   59811: <tr>
                   59812: <td><code title=""><ins class="diff-chg">lltri;</ins></code></td>
                   59813: <td><ins class="diff-chg">U+025FA</ins></td>
                   59814: </tr>
                   59815: <tr>
                   59816: <td><code title=""><ins class="diff-chg">lmidot;</ins></code></td>
                   59817: <td><ins class="diff-chg">U+00140</ins></td>
                   59818: </tr>
                   59819: <tr>
                   59820: <td><code title=""><ins class="diff-chg">lmoust;</ins></code></td>
                   59821: <td><ins class="diff-chg">U+023B0</ins></td>
                   59822: </tr>
                   59823: <tr>
                   59824: <td><code title=""><ins class=
                   59825: "diff-chg">lmoustache;</ins></code></td>
                   59826: <td><ins class="diff-chg">U+023B0</ins></td>
                   59827: </tr>
                   59828: <tr>
                   59829: <td><code title=""><ins class="diff-chg">lnE;</ins></code></td>
                   59830: <td><ins class="diff-chg">U+02268</ins></td>
                   59831: </tr>
                   59832: <tr>
                   59833: <td><code title=""><ins class="diff-chg">lnap;</ins></code></td>
                   59834: <td><ins class="diff-chg">U+02A89</ins></td>
                   59835: </tr>
                   59836: <tr>
                   59837: <td><code title=""><ins class=
                   59838: "diff-chg">lnapprox;</ins></code></td>
                   59839: <td><ins class="diff-chg">U+02A89</ins></td>
                   59840: </tr>
                   59841: <tr>
                   59842: <td><code title=""><ins class="diff-chg">lne;</ins></code></td>
                   59843: <td><ins class="diff-chg">U+02A87</ins></td>
                   59844: </tr>
                   59845: <tr>
                   59846: <td><code title=""><ins class="diff-chg">lneq;</ins></code></td>
                   59847: <td><ins class="diff-chg">U+02A87</ins></td>
                   59848: </tr>
                   59849: <tr>
                   59850: <td><code title=""><ins class="diff-chg">lneqq;</ins></code></td>
                   59851: <td><ins class="diff-chg">U+02268</ins></td>
                   59852: </tr>
                   59853: <tr>
                   59854: <td><code title=""><ins class="diff-chg">lnsim;</ins></code></td>
                   59855: <td><ins class="diff-chg">U+022E6</ins></td>
                   59856: </tr>
                   59857: <tr>
                   59858: <td><code title=""><ins class="diff-chg">loang;</ins></code></td>
                   59859: <td><ins class="diff-chg">U+027EC</ins></td>
                   59860: </tr>
                   59861: <tr>
                   59862: <td><code title=""><ins class="diff-chg">loarr;</ins></code></td>
                   59863: <td><ins class="diff-chg">U+021FD</ins></td>
                   59864: </tr>
                   59865: <tr>
                   59866: <td><code title=""><ins class="diff-chg">lobrk;</ins></code></td>
                   59867: <td><ins class="diff-chg">U+027E6</ins></td>
                   59868: </tr>
                   59869: <tr>
                   59870: <td><code title=""><ins class=
                   59871: "diff-chg">longleftarrow;</ins></code></td>
                   59872: <td><ins class="diff-chg">U+027F5</ins></td>
                   59873: </tr>
                   59874: <tr>
                   59875: <td><code title=""><ins class=
                   59876: "diff-chg">longleftrightarrow;</ins></code></td>
                   59877: <td><ins class="diff-chg">U+027F7</ins></td>
                   59878: </tr>
                   59879: <tr>
                   59880: <td><code title=""><ins class=
                   59881: "diff-chg">longmapsto;</ins></code></td>
                   59882: <td><ins class="diff-chg">U+027FC</ins></td>
                   59883: </tr>
                   59884: <tr>
                   59885: <td><code title=""><ins class=
                   59886: "diff-chg">longrightarrow;</ins></code></td>
                   59887: <td><ins class="diff-chg">U+027F6</ins></td>
                   59888: </tr>
                   59889: <tr>
                   59890: <td><code title=""><ins class=
                   59891: "diff-chg">looparrowleft;</ins></code></td>
                   59892: <td><ins class="diff-chg">U+021AB</ins></td>
                   59893: </tr>
                   59894: <tr>
                   59895: <td><code title=""><ins class=
                   59896: "diff-chg">looparrowright;</ins></code></td>
                   59897: <td><ins class="diff-chg">U+021AC</ins></td>
                   59898: </tr>
                   59899: <tr>
                   59900: <td><code title=""><ins class="diff-chg">lopar;</ins></code></td>
                   59901: <td><ins class="diff-chg">U+02985</ins></td>
                   59902: </tr>
                   59903: <tr>
                   59904: <td><code title=""><ins class="diff-chg">lopf;</ins></code></td>
                   59905: <td><ins class="diff-chg">U+1D55D</ins></td>
                   59906: </tr>
                   59907: <tr>
                   59908: <td><code title=""><ins class="diff-chg">loplus;</ins></code></td>
                   59909: <td><ins class="diff-chg">U+02A2D</ins></td>
                   59910: </tr>
                   59911: <tr>
                   59912: <td><code title=""><ins class="diff-chg">lotimes;</ins></code></td>
                   59913: <td><ins class="diff-chg">U+02A34</ins></td>
                   59914: </tr>
                   59915: <tr>
                   59916: <td><code title="">lowast;</code></td>
                   59917: <td><del class="diff-old">U+2217</del> <ins class=
                   59918: "diff-chg">U+02217</ins></td>
                   59919: </tr>
                   59920: <tr>
                   59921: <td><code title=""><ins class="diff-chg">lowbar;</ins></code></td>
                   59922: <td><ins class="diff-chg">U+0005F</ins></td>
                   59923: </tr>
                   59924: <tr>
                   59925: <td><code title="">loz;</code></td>
                   59926: <td><del class="diff-old">U+25CA</del> <ins class=
                   59927: "diff-chg">U+025CA</ins></td>
                   59928: </tr>
                   59929: <tr>
                   59930: <td><code title=""><ins class="diff-chg">lozenge;</ins></code></td>
                   59931: <td><ins class="diff-chg">U+025CA</ins></td>
                   59932: </tr>
                   59933: <tr>
                   59934: <td><code title=""><ins class="diff-chg">lozf;</ins></code></td>
                   59935: <td><ins class="diff-chg">U+029EB</ins></td>
                   59936: </tr>
                   59937: <tr>
                   59938: <td><code title=""><ins class="diff-chg">lpar;</ins></code></td>
                   59939: <td><ins class="diff-chg">U+00028</ins></td>
                   59940: </tr>
                   59941: <tr>
                   59942: <td><code title=""><ins class="diff-chg">lparlt;</ins></code></td>
                   59943: <td><ins class="diff-chg">U+02993</ins></td>
                   59944: </tr>
                   59945: <tr>
                   59946: <td><code title=""><ins class="diff-chg">lrarr;</ins></code></td>
                   59947: <td><ins class="diff-chg">U+021C6</ins></td>
                   59948: </tr>
                   59949: <tr>
                   59950: <td><code title=""><ins class=
                   59951: "diff-chg">lrcorner;</ins></code></td>
                   59952: <td><ins class="diff-chg">U+0231F</ins></td>
                   59953: </tr>
                   59954: <tr>
                   59955: <td><code title=""><ins class="diff-chg">lrhar;</ins></code></td>
                   59956: <td><ins class="diff-chg">U+021CB</ins></td>
                   59957: </tr>
                   59958: <tr>
                   59959: <td><code title=""><ins class="diff-chg">lrhard;</ins></code></td>
                   59960: <td><ins class="diff-chg">U+0296D</ins></td>
                   59961: </tr>
                   59962: <tr>
                   59963: <td><code title="">lrm;</code></td>
                   59964: <td><del class="diff-old">U+200E</del> <ins class=
                   59965: "diff-chg">U+0200E</ins></td>
                   59966: </tr>
                   59967: <tr>
                   59968: <td><code title=""><ins class="diff-chg">lrtri;</ins></code></td>
                   59969: <td><ins class="diff-chg">U+022BF</ins></td>
                   59970: </tr>
                   59971: <tr>
                   59972: <td><code title="">lsaquo;</code></td>
1.2     ! mike     59973: <td><del class="diff-old">U+2039</del> <ins class=
        !          59974: "diff-chg">U+02039</ins></td>
1.1       mike     59975: </tr>
                   59976: <tr>
1.2     ! mike     59977: <td><code title=""><ins class="diff-chg">lscr;</ins></code></td>
        !          59978: <td><ins class="diff-chg">U+1D4C1</ins></td>
1.1       mike     59979: </tr>
                   59980: <tr>
                   59981: <td><code title=""><ins class="diff-chg">lsh;</ins></code></td>
                   59982: <td><ins class="diff-chg">U+021B0</ins></td>
                   59983: </tr>
                   59984: <tr>
                   59985: <td><code title=""><ins class="diff-chg">lsim;</ins></code></td>
                   59986: <td><ins class="diff-chg">U+02272</ins></td>
                   59987: </tr>
                   59988: <tr>
                   59989: <td><code title=""><ins class="diff-chg">lsime;</ins></code></td>
                   59990: <td><ins class="diff-chg">U+02A8D</ins></td>
                   59991: </tr>
                   59992: <tr>
                   59993: <td><code title=""><ins class="diff-chg">lsimg;</ins></code></td>
                   59994: <td><ins class="diff-chg">U+02A8F</ins></td>
                   59995: </tr>
                   59996: <tr>
                   59997: <td><code title=""><ins class="diff-chg">lsqb;</ins></code></td>
                   59998: <td><ins class="diff-chg">U+0005B</ins></td>
                   59999: </tr>
                   60000: <tr>
                   60001: <td><code title="">lsquo;</code></td>
1.2     ! mike     60002: <td><del class="diff-old">U+2018</del> <ins class=
        !          60003: "diff-chg">U+02018</ins></td>
1.1       mike     60004: </tr>
                   60005: <tr>
1.2     ! mike     60006: <td><code title=""><ins class="diff-chg">lsquor;</ins></code></td>
        !          60007: <td><ins class="diff-chg">U+0201A</ins></td>
1.1       mike     60008: </tr>
                   60009: <tr>
                   60010: <td><code title=""><ins class="diff-chg">lstrok;</ins></code></td>
                   60011: <td><ins class="diff-chg">U+00142</ins></td>
                   60012: </tr>
                   60013: <tr>
                   60014: <td><code title="">lt;</code></td>
                   60015: <td><del class="diff-old">U+003C</del> <ins class=
                   60016: "diff-chg">U+0003C</ins></td>
                   60017: </tr>
                   60018: <tr>
                   60019: <td><code title="">lt</code></td>
                   60020: <td><del class="diff-old">U+003C</del> <ins class=
                   60021: "diff-chg">U+0003C</ins></td>
                   60022: </tr>
                   60023: <tr>
                   60024: <td><code title=""><ins class="diff-chg">ltcc;</ins></code></td>
                   60025: <td><ins class="diff-chg">U+02AA6</ins></td>
                   60026: </tr>
                   60027: <tr>
                   60028: <td><code title=""><ins class="diff-chg">ltcir;</ins></code></td>
                   60029: <td><ins class="diff-chg">U+02A79</ins></td>
                   60030: </tr>
                   60031: <tr>
                   60032: <td><code title=""><ins class="diff-chg">ltdot;</ins></code></td>
                   60033: <td><ins class="diff-chg">U+022D6</ins></td>
                   60034: </tr>
                   60035: <tr>
                   60036: <td><code title=""><ins class="diff-chg">lthree;</ins></code></td>
                   60037: <td><ins class="diff-chg">U+022CB</ins></td>
                   60038: </tr>
                   60039: <tr>
                   60040: <td><code title=""><ins class="diff-chg">ltimes;</ins></code></td>
                   60041: <td><ins class="diff-chg">U+022C9</ins></td>
                   60042: </tr>
                   60043: <tr>
                   60044: <td><code title=""><ins class="diff-chg">ltlarr;</ins></code></td>
                   60045: <td><ins class="diff-chg">U+02976</ins></td>
                   60046: </tr>
                   60047: <tr>
                   60048: <td><code title=""><ins class="diff-chg">ltquest;</ins></code></td>
                   60049: <td><ins class="diff-chg">U+02A7B</ins></td>
                   60050: </tr>
                   60051: <tr>
                   60052: <td><code title=""><ins class="diff-chg">ltrPar;</ins></code></td>
                   60053: <td><ins class="diff-chg">U+02996</ins></td>
                   60054: </tr>
                   60055: <tr>
                   60056: <td><code title=""><ins class="diff-chg">ltri;</ins></code></td>
                   60057: <td><ins class="diff-chg">U+025C3</ins></td>
                   60058: </tr>
                   60059: <tr>
                   60060: <td><code title=""><ins class="diff-chg">ltrie;</ins></code></td>
                   60061: <td><ins class="diff-chg">U+022B4</ins></td>
                   60062: </tr>
                   60063: <tr>
                   60064: <td><code title=""><ins class="diff-chg">ltrif;</ins></code></td>
                   60065: <td><ins class="diff-chg">U+025C2</ins></td>
                   60066: </tr>
                   60067: <tr>
                   60068: <td><code title=""><ins class=
                   60069: "diff-chg">lurdshar;</ins></code></td>
                   60070: <td><ins class="diff-chg">U+0294A</ins></td>
                   60071: </tr>
                   60072: <tr>
                   60073: <td><code title=""><ins class="diff-chg">luruhar;</ins></code></td>
                   60074: <td><ins class="diff-chg">U+02966</ins></td>
                   60075: </tr>
                   60076: <tr>
                   60077: <td><code title=""><ins class="diff-chg">mDDot;</ins></code></td>
                   60078: <td><ins class="diff-chg">U+0223A</ins></td>
                   60079: </tr>
                   60080: <tr>
                   60081: <td><code title="">macr;</code></td>
                   60082: <td><del class="diff-old">U+00AF</del> <ins class=
                   60083: "diff-chg">U+000AF</ins></td>
                   60084: </tr>
                   60085: <tr>
                   60086: <td><code title="">macr</code></td>
                   60087: <td><del class="diff-old">U+00AF</del> <ins class=
                   60088: "diff-chg">U+000AF</ins></td>
                   60089: </tr>
                   60090: <tr>
                   60091: <td><code title=""><ins class="diff-chg">male;</ins></code></td>
                   60092: <td><ins class="diff-chg">U+02642</ins></td>
                   60093: </tr>
                   60094: <tr>
                   60095: <td><code title=""><ins class="diff-chg">malt;</ins></code></td>
                   60096: <td><ins class="diff-chg">U+02720</ins></td>
                   60097: </tr>
                   60098: <tr>
                   60099: <td><code title=""><ins class="diff-chg">maltese;</ins></code></td>
                   60100: <td><ins class="diff-chg">U+02720</ins></td>
                   60101: </tr>
                   60102: <tr>
                   60103: <td><code title=""><ins class="diff-chg">map;</ins></code></td>
                   60104: <td><ins class="diff-chg">U+021A6</ins></td>
                   60105: </tr>
                   60106: <tr>
                   60107: <td><code title=""><ins class="diff-chg">mapsto;</ins></code></td>
                   60108: <td><ins class="diff-chg">U+021A6</ins></td>
                   60109: </tr>
                   60110: <tr>
                   60111: <td><code title=""><ins class=
                   60112: "diff-chg">mapstodown;</ins></code></td>
                   60113: <td><ins class="diff-chg">U+021A7</ins></td>
                   60114: </tr>
                   60115: <tr>
                   60116: <td><code title=""><ins class=
                   60117: "diff-chg">mapstoleft;</ins></code></td>
                   60118: <td><ins class="diff-chg">U+021A4</ins></td>
                   60119: </tr>
                   60120: <tr>
                   60121: <td><code title=""><ins class=
                   60122: "diff-chg">mapstoup;</ins></code></td>
                   60123: <td><ins class="diff-chg">U+021A5</ins></td>
                   60124: </tr>
                   60125: <tr>
                   60126: <td><code title=""><ins class="diff-chg">marker;</ins></code></td>
                   60127: <td><ins class="diff-chg">U+025AE</ins></td>
                   60128: </tr>
                   60129: <tr>
                   60130: <td><code title=""><ins class="diff-chg">mcomma;</ins></code></td>
                   60131: <td><ins class="diff-chg">U+02A29</ins></td>
                   60132: </tr>
                   60133: <tr>
                   60134: <td><code title=""><ins class="diff-chg">mcy;</ins></code></td>
                   60135: <td><ins class="diff-chg">U+0043C</ins></td>
                   60136: </tr>
                   60137: <tr>
                   60138: <td><code title="">mdash;</code></td>
                   60139: <td><del class="diff-old">U+2014</del> <ins class=
                   60140: "diff-chg">U+02014</ins></td>
                   60141: </tr>
                   60142: <tr>
                   60143: <td><code title=""><ins class=
                   60144: "diff-chg">measuredangle;</ins></code></td>
                   60145: <td><ins class="diff-chg">U+02221</ins></td>
                   60146: </tr>
                   60147: <tr>
                   60148: <td><code title=""><ins class="diff-chg">mfr;</ins></code></td>
                   60149: <td><ins class="diff-chg">U+1D52A</ins></td>
                   60150: </tr>
                   60151: <tr>
                   60152: <td><code title=""><ins class="diff-chg">mho;</ins></code></td>
                   60153: <td><ins class="diff-chg">U+02127</ins></td>
                   60154: </tr>
                   60155: <tr>
                   60156: <td><code title="">micro;</code></td>
                   60157: <td><del class="diff-old">U+00B5</del> <ins class=
                   60158: "diff-chg">U+000B5</ins></td>
                   60159: </tr>
                   60160: <tr>
                   60161: <td><code title="">micro</code></td>
                   60162: <td><del class="diff-old">U+00B5</del> <ins class=
                   60163: "diff-chg">U+000B5</ins></td>
                   60164: </tr>
                   60165: <tr>
                   60166: <td><code title=""><ins class="diff-chg">mid;</ins></code></td>
                   60167: <td><ins class="diff-chg">U+02223</ins></td>
                   60168: </tr>
                   60169: <tr>
                   60170: <td><code title=""><ins class="diff-chg">midast;</ins></code></td>
                   60171: <td><ins class="diff-chg">U+0002A</ins></td>
                   60172: </tr>
                   60173: <tr>
                   60174: <td><code title=""><ins class="diff-chg">midcir;</ins></code></td>
                   60175: <td><ins class="diff-chg">U+02AF0</ins></td>
                   60176: </tr>
                   60177: <tr>
                   60178: <td><code title="">middot;</code></td>
                   60179: <td><del class="diff-old">U+00B7</del> <ins class=
                   60180: "diff-chg">U+000B7</ins></td>
                   60181: </tr>
                   60182: <tr>
                   60183: <td><code title="">middot</code></td>
                   60184: <td><del class="diff-old">U+00B7</del> <ins class=
                   60185: "diff-chg">U+000B7</ins></td>
                   60186: </tr>
                   60187: <tr>
                   60188: <td><code title="">minus;</code></td>
                   60189: <td><del class="diff-old">U+2212</del> <ins class=
                   60190: "diff-chg">U+02212</ins></td>
                   60191: </tr>
                   60192: <tr>
                   60193: <td><code title=""><ins class="diff-chg">minusb;</ins></code></td>
                   60194: <td><ins class="diff-chg">U+0229F</ins></td>
                   60195: </tr>
                   60196: <tr>
                   60197: <td><code title=""><ins class="diff-chg">minusd;</ins></code></td>
                   60198: <td><ins class="diff-chg">U+02238</ins></td>
                   60199: </tr>
                   60200: <tr>
                   60201: <td><code title=""><ins class="diff-chg">minusdu;</ins></code></td>
                   60202: <td><ins class="diff-chg">U+02A2A</ins></td>
                   60203: </tr>
                   60204: <tr>
                   60205: <td><code title=""><ins class="diff-chg">mlcp;</ins></code></td>
                   60206: <td><ins class="diff-chg">U+02ADB</ins></td>
                   60207: </tr>
                   60208: <tr>
                   60209: <td><code title=""><ins class="diff-chg">mldr;</ins></code></td>
                   60210: <td><ins class="diff-chg">U+02026</ins></td>
                   60211: </tr>
                   60212: <tr>
                   60213: <td><code title=""><ins class="diff-chg">mnplus;</ins></code></td>
                   60214: <td><ins class="diff-chg">U+02213</ins></td>
                   60215: </tr>
                   60216: <tr>
                   60217: <td><code title=""><ins class="diff-chg">models;</ins></code></td>
                   60218: <td><ins class="diff-chg">U+022A7</ins></td>
                   60219: </tr>
                   60220: <tr>
                   60221: <td><code title=""><ins class="diff-chg">mopf;</ins></code></td>
                   60222: <td><ins class="diff-chg">U+1D55E</ins></td>
                   60223: </tr>
                   60224: <tr>
                   60225: <td><code title=""><ins class="diff-chg">mp;</ins></code></td>
                   60226: <td><ins class="diff-chg">U+02213</ins></td>
                   60227: </tr>
                   60228: <tr>
                   60229: <td><code title=""><ins class="diff-chg">mscr;</ins></code></td>
                   60230: <td><ins class="diff-chg">U+1D4C2</ins></td>
                   60231: </tr>
                   60232: <tr>
                   60233: <td><code title=""><ins class="diff-chg">mstpos;</ins></code></td>
                   60234: <td><ins class="diff-chg">U+0223E</ins></td>
                   60235: </tr>
                   60236: <tr>
                   60237: <td><code title="">mu;</code></td>
                   60238: <td><del class="diff-old">U+03BC</del> <ins class=
                   60239: "diff-chg">U+003BC</ins></td>
                   60240: </tr>
                   60241: <tr>
                   60242: <td><code title=""><ins class=
                   60243: "diff-chg">multimap;</ins></code></td>
                   60244: <td><ins class="diff-chg">U+022B8</ins></td>
                   60245: </tr>
                   60246: <tr>
                   60247: <td><code title=""><ins class="diff-chg">mumap;</ins></code></td>
                   60248: <td><ins class="diff-chg">U+022B8</ins></td>
                   60249: </tr>
                   60250: <tr>
                   60251: <td><code title=""><ins class=
                   60252: "diff-chg">nLeftarrow;</ins></code></td>
                   60253: <td><ins class="diff-chg">U+021CD</ins></td>
                   60254: </tr>
                   60255: <tr>
                   60256: <td><code title=""><ins class=
                   60257: "diff-chg">nLeftrightarrow;</ins></code></td>
                   60258: <td><ins class="diff-chg">U+021CE</ins></td>
                   60259: </tr>
                   60260: <tr>
                   60261: <td><code title=""><ins class=
                   60262: "diff-chg">nRightarrow;</ins></code></td>
                   60263: <td><ins class="diff-chg">U+021CF</ins></td>
                   60264: </tr>
                   60265: <tr>
                   60266: <td><code title=""><ins class="diff-chg">nVDash;</ins></code></td>
                   60267: <td><ins class="diff-chg">U+022AF</ins></td>
                   60268: </tr>
                   60269: <tr>
                   60270: <td><code title=""><ins class="diff-chg">nVdash;</ins></code></td>
                   60271: <td><ins class="diff-chg">U+022AE</ins></td>
                   60272: </tr>
                   60273: <tr>
                   60274: <td><code title="">nabla;</code></td>
                   60275: <td><del class="diff-old">U+2207</del> <ins class=
                   60276: "diff-chg">U+02207</ins></td>
                   60277: </tr>
                   60278: <tr>
                   60279: <td><code title=""><ins class="diff-chg">nacute;</ins></code></td>
                   60280: <td><ins class="diff-chg">U+00144</ins></td>
                   60281: </tr>
                   60282: <tr>
                   60283: <td><code title=""><ins class="diff-chg">nap;</ins></code></td>
                   60284: <td><ins class="diff-chg">U+02249</ins></td>
                   60285: </tr>
                   60286: <tr>
                   60287: <td><code title=""><ins class="diff-chg">napos;</ins></code></td>
                   60288: <td><ins class="diff-chg">U+00149</ins></td>
                   60289: </tr>
                   60290: <tr>
                   60291: <td><code title=""><ins class="diff-chg">napprox;</ins></code></td>
                   60292: <td><ins class="diff-chg">U+02249</ins></td>
                   60293: </tr>
                   60294: <tr>
                   60295: <td><code title=""><ins class="diff-chg">natur;</ins></code></td>
                   60296: <td><ins class="diff-chg">U+0266E</ins></td>
                   60297: </tr>
                   60298: <tr>
                   60299: <td><code title=""><ins class="diff-chg">natural;</ins></code></td>
                   60300: <td><ins class="diff-chg">U+0266E</ins></td>
                   60301: </tr>
                   60302: <tr>
                   60303: <td><code title=""><ins class=
                   60304: "diff-chg">naturals;</ins></code></td>
                   60305: <td><ins class="diff-chg">U+02115</ins></td>
                   60306: </tr>
                   60307: <tr>
                   60308: <td><code title="">nbsp;</code></td>
                   60309: <td><del class="diff-old">U+00A0</del> <ins class=
                   60310: "diff-chg">U+000A0</ins></td>
                   60311: </tr>
                   60312: <tr>
                   60313: <td><code title="">nbsp</code></td>
                   60314: <td><del class="diff-old">U+00A0</del> <ins class=
                   60315: "diff-chg">U+000A0</ins></td>
                   60316: </tr>
                   60317: <tr>
                   60318: <td><code title=""><ins class="diff-chg">ncap;</ins></code></td>
                   60319: <td><ins class="diff-chg">U+02A43</ins></td>
                   60320: </tr>
                   60321: <tr>
                   60322: <td><code title=""><ins class="diff-chg">ncaron;</ins></code></td>
                   60323: <td><ins class="diff-chg">U+00148</ins></td>
                   60324: </tr>
                   60325: <tr>
                   60326: <td><code title=""><ins class="diff-chg">ncedil;</ins></code></td>
                   60327: <td><ins class="diff-chg">U+00146</ins></td>
                   60328: </tr>
                   60329: <tr>
                   60330: <td><code title=""><ins class="diff-chg">ncong;</ins></code></td>
                   60331: <td><ins class="diff-chg">U+02247</ins></td>
                   60332: </tr>
                   60333: <tr>
                   60334: <td><code title=""><ins class="diff-chg">ncup;</ins></code></td>
                   60335: <td><ins class="diff-chg">U+02A42</ins></td>
                   60336: </tr>
                   60337: <tr>
                   60338: <td><code title=""><ins class="diff-chg">ncy;</ins></code></td>
                   60339: <td><ins class="diff-chg">U+0043D</ins></td>
                   60340: </tr>
                   60341: <tr>
                   60342: <td><code title="">ndash;</code></td>
                   60343: <td><del class="diff-old">U+2013</del> <ins class=
                   60344: "diff-chg">U+02013</ins></td>
                   60345: </tr>
                   60346: <tr>
                   60347: <td><code title="">ne;</code></td>
                   60348: <td><del class="diff-old">U+2260</del> <ins class=
                   60349: "diff-chg">U+02260</ins></td>
                   60350: </tr>
                   60351: <tr>
                   60352: <td><code title=""><ins class="diff-chg">neArr;</ins></code></td>
                   60353: <td><ins class="diff-chg">U+021D7</ins></td>
                   60354: </tr>
                   60355: <tr>
                   60356: <td><code title=""><ins class="diff-chg">nearhk;</ins></code></td>
                   60357: <td><ins class="diff-chg">U+02924</ins></td>
                   60358: </tr>
                   60359: <tr>
                   60360: <td><code title=""><ins class="diff-chg">nearr;</ins></code></td>
                   60361: <td><ins class="diff-chg">U+02197</ins></td>
                   60362: </tr>
                   60363: <tr>
                   60364: <td><code title=""><ins class="diff-chg">nearrow;</ins></code></td>
                   60365: <td><ins class="diff-chg">U+02197</ins></td>
                   60366: </tr>
                   60367: <tr>
                   60368: <td><code title=""><ins class="diff-chg">nequiv;</ins></code></td>
                   60369: <td><ins class="diff-chg">U+02262</ins></td>
                   60370: </tr>
                   60371: <tr>
                   60372: <td><code title=""><ins class="diff-chg">nesear;</ins></code></td>
                   60373: <td><ins class="diff-chg">U+02928</ins></td>
                   60374: </tr>
                   60375: <tr>
                   60376: <td><code title=""><ins class="diff-chg">nexist;</ins></code></td>
                   60377: <td><ins class="diff-chg">U+02204</ins></td>
                   60378: </tr>
                   60379: <tr>
                   60380: <td><code title=""><ins class="diff-chg">nexists;</ins></code></td>
                   60381: <td><ins class="diff-chg">U+02204</ins></td>
                   60382: </tr>
                   60383: <tr>
                   60384: <td><code title=""><ins class="diff-chg">nfr;</ins></code></td>
                   60385: <td><ins class="diff-chg">U+1D52B</ins></td>
                   60386: </tr>
                   60387: <tr>
                   60388: <td><code title=""><ins class="diff-chg">nge;</ins></code></td>
                   60389: <td><ins class="diff-chg">U+02271</ins></td>
                   60390: </tr>
                   60391: <tr>
                   60392: <td><code title=""><ins class="diff-chg">ngeq;</ins></code></td>
                   60393: <td><ins class="diff-chg">U+02271</ins></td>
                   60394: </tr>
                   60395: <tr>
                   60396: <td><code title=""><ins class="diff-chg">ngsim;</ins></code></td>
                   60397: <td><ins class="diff-chg">U+02275</ins></td>
                   60398: </tr>
                   60399: <tr>
                   60400: <td><code title=""><ins class="diff-chg">ngt;</ins></code></td>
                   60401: <td><ins class="diff-chg">U+0226F</ins></td>
                   60402: </tr>
                   60403: <tr>
                   60404: <td><code title=""><ins class="diff-chg">ngtr;</ins></code></td>
                   60405: <td><ins class="diff-chg">U+0226F</ins></td>
                   60406: </tr>
                   60407: <tr>
                   60408: <td><code title=""><ins class="diff-chg">nhArr;</ins></code></td>
                   60409: <td><ins class="diff-chg">U+021CE</ins></td>
                   60410: </tr>
                   60411: <tr>
                   60412: <td><code title=""><ins class="diff-chg">nharr;</ins></code></td>
                   60413: <td><ins class="diff-chg">U+021AE</ins></td>
                   60414: </tr>
                   60415: <tr>
                   60416: <td><code title=""><ins class="diff-chg">nhpar;</ins></code></td>
                   60417: <td><ins class="diff-chg">U+02AF2</ins></td>
                   60418: </tr>
                   60419: <tr>
                   60420: <td><code title="">ni;</code></td>
1.2     ! mike     60421: <td><del class="diff-old">U+220B</del> <ins class=
        !          60422: "diff-chg">U+0220B</ins></td>
1.1       mike     60423: </tr>
                   60424: <tr>
1.2     ! mike     60425: <td><code title=""><ins class="diff-chg">nis;</ins></code></td>
        !          60426: <td><ins class="diff-chg">U+022FC</ins></td>
1.1       mike     60427: </tr>
                   60428: <tr>
                   60429: <td><code title=""><ins class="diff-chg">nisd;</ins></code></td>
                   60430: <td><ins class="diff-chg">U+022FA</ins></td>
                   60431: </tr>
                   60432: <tr>
                   60433: <td><code title=""><ins class="diff-chg">niv;</ins></code></td>
                   60434: <td><ins class="diff-chg">U+0220B</ins></td>
                   60435: </tr>
                   60436: <tr>
                   60437: <td><code title=""><ins class="diff-chg">njcy;</ins></code></td>
                   60438: <td><ins class="diff-chg">U+0045A</ins></td>
                   60439: </tr>
                   60440: <tr>
                   60441: <td><code title=""><ins class="diff-chg">nlArr;</ins></code></td>
                   60442: <td><ins class="diff-chg">U+021CD</ins></td>
                   60443: </tr>
                   60444: <tr>
                   60445: <td><code title=""><ins class="diff-chg">nlarr;</ins></code></td>
                   60446: <td><ins class="diff-chg">U+0219A</ins></td>
                   60447: </tr>
                   60448: <tr>
                   60449: <td><code title=""><ins class="diff-chg">nldr;</ins></code></td>
                   60450: <td><ins class="diff-chg">U+02025</ins></td>
                   60451: </tr>
                   60452: <tr>
                   60453: <td><code title=""><ins class="diff-chg">nle;</ins></code></td>
                   60454: <td><ins class="diff-chg">U+02270</ins></td>
                   60455: </tr>
                   60456: <tr>
                   60457: <td><code title=""><ins class=
                   60458: "diff-chg">nleftarrow;</ins></code></td>
                   60459: <td><ins class="diff-chg">U+0219A</ins></td>
                   60460: </tr>
                   60461: <tr>
                   60462: <td><code title=""><ins class=
                   60463: "diff-chg">nleftrightarrow;</ins></code></td>
                   60464: <td><ins class="diff-chg">U+021AE</ins></td>
                   60465: </tr>
                   60466: <tr>
                   60467: <td><code title=""><ins class="diff-chg">nleq;</ins></code></td>
                   60468: <td><ins class="diff-chg">U+02270</ins></td>
                   60469: </tr>
                   60470: <tr>
                   60471: <td><code title=""><ins class="diff-chg">nless;</ins></code></td>
                   60472: <td><ins class="diff-chg">U+0226E</ins></td>
                   60473: </tr>
                   60474: <tr>
                   60475: <td><code title=""><ins class="diff-chg">nlsim;</ins></code></td>
                   60476: <td><ins class="diff-chg">U+02274</ins></td>
                   60477: </tr>
                   60478: <tr>
                   60479: <td><code title=""><ins class="diff-chg">nlt;</ins></code></td>
                   60480: <td><ins class="diff-chg">U+0226E</ins></td>
                   60481: </tr>
                   60482: <tr>
                   60483: <td><code title=""><ins class="diff-chg">nltri;</ins></code></td>
                   60484: <td><ins class="diff-chg">U+022EA</ins></td>
                   60485: </tr>
                   60486: <tr>
                   60487: <td><code title=""><ins class="diff-chg">nltrie;</ins></code></td>
                   60488: <td><ins class="diff-chg">U+022EC</ins></td>
                   60489: </tr>
                   60490: <tr>
                   60491: <td><code title=""><ins class="diff-chg">nmid;</ins></code></td>
                   60492: <td><ins class="diff-chg">U+02224</ins></td>
                   60493: </tr>
                   60494: <tr>
                   60495: <td><code title=""><ins class="diff-chg">nopf;</ins></code></td>
                   60496: <td><ins class="diff-chg">U+1D55F</ins></td>
                   60497: </tr>
                   60498: <tr>
                   60499: <td><code title="">not;</code></td>
                   60500: <td><del class="diff-old">U+00AC</del> <ins class=
                   60501: "diff-chg">U+000AC</ins></td>
                   60502: </tr>
                   60503: <tr>
                   60504: <td><code title="">not</code></td>
                   60505: <td><del class="diff-old">U+00AC</del> <ins class=
                   60506: "diff-chg">U+000AC</ins></td>
                   60507: </tr>
                   60508: <tr>
                   60509: <td><code title="">notin;</code></td>
1.2     ! mike     60510: <td><del class="diff-old">U+2209</del> <ins class=
        !          60511: "diff-chg">U+02209</ins></td>
1.1       mike     60512: </tr>
                   60513: <tr>
1.2     ! mike     60514: <td><code title=""><ins class="diff-chg">notinva;</ins></code></td>
        !          60515: <td><ins class="diff-chg">U+02209</ins></td>
1.1       mike     60516: </tr>
                   60517: <tr>
                   60518: <td><code title=""><ins class="diff-chg">notinvb;</ins></code></td>
                   60519: <td><ins class="diff-chg">U+022F7</ins></td>
                   60520: </tr>
                   60521: <tr>
                   60522: <td><code title=""><ins class="diff-chg">notinvc;</ins></code></td>
                   60523: <td><ins class="diff-chg">U+022F6</ins></td>
                   60524: </tr>
                   60525: <tr>
                   60526: <td><code title=""><ins class="diff-chg">notni;</ins></code></td>
                   60527: <td><ins class="diff-chg">U+0220C</ins></td>
                   60528: </tr>
                   60529: <tr>
                   60530: <td><code title=""><ins class="diff-chg">notniva;</ins></code></td>
                   60531: <td><ins class="diff-chg">U+0220C</ins></td>
                   60532: </tr>
                   60533: <tr>
                   60534: <td><code title=""><ins class="diff-chg">notnivb;</ins></code></td>
                   60535: <td><ins class="diff-chg">U+022FE</ins></td>
                   60536: </tr>
                   60537: <tr>
                   60538: <td><code title=""><ins class="diff-chg">notnivc;</ins></code></td>
                   60539: <td><ins class="diff-chg">U+022FD</ins></td>
                   60540: </tr>
                   60541: <tr>
                   60542: <td><code title=""><ins class="diff-chg">npar;</ins></code></td>
                   60543: <td><ins class="diff-chg">U+02226</ins></td>
                   60544: </tr>
                   60545: <tr>
                   60546: <td><code title=""><ins class=
                   60547: "diff-chg">nparallel;</ins></code></td>
                   60548: <td><ins class="diff-chg">U+02226</ins></td>
                   60549: </tr>
                   60550: <tr>
                   60551: <td><code title=""><ins class="diff-chg">npolint;</ins></code></td>
                   60552: <td><ins class="diff-chg">U+02A14</ins></td>
                   60553: </tr>
                   60554: <tr>
                   60555: <td><code title=""><ins class="diff-chg">npr;</ins></code></td>
                   60556: <td><ins class="diff-chg">U+02280</ins></td>
                   60557: </tr>
                   60558: <tr>
                   60559: <td><code title=""><ins class="diff-chg">nprcue;</ins></code></td>
                   60560: <td><ins class="diff-chg">U+022E0</ins></td>
                   60561: </tr>
                   60562: <tr>
                   60563: <td><code title=""><ins class="diff-chg">nprec;</ins></code></td>
                   60564: <td><ins class="diff-chg">U+02280</ins></td>
                   60565: </tr>
                   60566: <tr>
                   60567: <td><code title=""><ins class="diff-chg">nrArr;</ins></code></td>
                   60568: <td><ins class="diff-chg">U+021CF</ins></td>
                   60569: </tr>
                   60570: <tr>
                   60571: <td><code title=""><ins class="diff-chg">nrarr;</ins></code></td>
                   60572: <td><ins class="diff-chg">U+0219B</ins></td>
                   60573: </tr>
                   60574: <tr>
                   60575: <td><code title=""><ins class=
                   60576: "diff-chg">nrightarrow;</ins></code></td>
                   60577: <td><ins class="diff-chg">U+0219B</ins></td>
                   60578: </tr>
                   60579: <tr>
                   60580: <td><code title=""><ins class="diff-chg">nrtri;</ins></code></td>
                   60581: <td><ins class="diff-chg">U+022EB</ins></td>
                   60582: </tr>
                   60583: <tr>
                   60584: <td><code title=""><ins class="diff-chg">nrtrie;</ins></code></td>
                   60585: <td><ins class="diff-chg">U+022ED</ins></td>
                   60586: </tr>
                   60587: <tr>
                   60588: <td><code title=""><ins class="diff-chg">nsc;</ins></code></td>
                   60589: <td><ins class="diff-chg">U+02281</ins></td>
                   60590: </tr>
                   60591: <tr>
                   60592: <td><code title=""><ins class="diff-chg">nsccue;</ins></code></td>
                   60593: <td><ins class="diff-chg">U+022E1</ins></td>
                   60594: </tr>
                   60595: <tr>
                   60596: <td><code title=""><ins class="diff-chg">nscr;</ins></code></td>
                   60597: <td><ins class="diff-chg">U+1D4C3</ins></td>
                   60598: </tr>
                   60599: <tr>
                   60600: <td><code title=""><ins class=
                   60601: "diff-chg">nshortmid;</ins></code></td>
                   60602: <td><ins class="diff-chg">U+02224</ins></td>
                   60603: </tr>
                   60604: <tr>
                   60605: <td><code title=""><ins class=
                   60606: "diff-chg">nshortparallel;</ins></code></td>
                   60607: <td><ins class="diff-chg">U+02226</ins></td>
                   60608: </tr>
                   60609: <tr>
                   60610: <td><code title=""><ins class="diff-chg">nsim;</ins></code></td>
                   60611: <td><ins class="diff-chg">U+02241</ins></td>
                   60612: </tr>
                   60613: <tr>
                   60614: <td><code title=""><ins class="diff-chg">nsime;</ins></code></td>
                   60615: <td><ins class="diff-chg">U+02244</ins></td>
                   60616: </tr>
                   60617: <tr>
                   60618: <td><code title=""><ins class="diff-chg">nsimeq;</ins></code></td>
                   60619: <td><ins class="diff-chg">U+02244</ins></td>
                   60620: </tr>
                   60621: <tr>
                   60622: <td><code title=""><ins class="diff-chg">nsmid;</ins></code></td>
                   60623: <td><ins class="diff-chg">U+02224</ins></td>
                   60624: </tr>
                   60625: <tr>
                   60626: <td><code title=""><ins class="diff-chg">nspar;</ins></code></td>
                   60627: <td><ins class="diff-chg">U+02226</ins></td>
                   60628: </tr>
                   60629: <tr>
                   60630: <td><code title=""><ins class="diff-chg">nsqsube;</ins></code></td>
                   60631: <td><ins class="diff-chg">U+022E2</ins></td>
                   60632: </tr>
                   60633: <tr>
                   60634: <td><code title=""><ins class="diff-chg">nsqsupe;</ins></code></td>
                   60635: <td><ins class="diff-chg">U+022E3</ins></td>
                   60636: </tr>
                   60637: <tr>
                   60638: <td><code title="">nsub;</code></td>
                   60639: <td><del class="diff-old">U+2284</del> <ins class=
                   60640: "diff-chg">U+02284</ins></td>
                   60641: </tr>
                   60642: <tr>
                   60643: <td><code title=""><ins class="diff-chg">nsube;</ins></code></td>
                   60644: <td><ins class="diff-chg">U+02288</ins></td>
                   60645: </tr>
                   60646: <tr>
                   60647: <td><code title=""><ins class=
                   60648: "diff-chg">nsubseteq;</ins></code></td>
                   60649: <td><ins class="diff-chg">U+02288</ins></td>
                   60650: </tr>
                   60651: <tr>
                   60652: <td><code title=""><ins class="diff-chg">nsucc;</ins></code></td>
                   60653: <td><ins class="diff-chg">U+02281</ins></td>
                   60654: </tr>
                   60655: <tr>
                   60656: <td><code title=""><ins class="diff-chg">nsup;</ins></code></td>
                   60657: <td><ins class="diff-chg">U+02285</ins></td>
                   60658: </tr>
                   60659: <tr>
                   60660: <td><code title=""><ins class="diff-chg">nsupe;</ins></code></td>
                   60661: <td><ins class="diff-chg">U+02289</ins></td>
                   60662: </tr>
                   60663: <tr>
                   60664: <td><code title=""><ins class=
                   60665: "diff-chg">nsupseteq;</ins></code></td>
                   60666: <td><ins class="diff-chg">U+02289</ins></td>
                   60667: </tr>
                   60668: <tr>
                   60669: <td><code title=""><ins class="diff-chg">ntgl;</ins></code></td>
                   60670: <td><ins class="diff-chg">U+02279</ins></td>
                   60671: </tr>
                   60672: <tr>
                   60673: <td><code title="">ntilde;</code></td>
                   60674: <td><del class="diff-old">U+00F1</del> <ins class=
                   60675: "diff-chg">U+000F1</ins></td>
                   60676: </tr>
                   60677: <tr>
                   60678: <td><code title="">ntilde</code></td>
                   60679: <td><del class="diff-old">U+00F1</del> <ins class=
                   60680: "diff-chg">U+000F1</ins></td>
                   60681: </tr>
                   60682: <tr>
                   60683: <td><code title=""><ins class="diff-chg">ntlg;</ins></code></td>
                   60684: <td><ins class="diff-chg">U+02278</ins></td>
                   60685: </tr>
                   60686: <tr>
                   60687: <td><code title=""><ins class=
                   60688: "diff-chg">ntriangleleft;</ins></code></td>
                   60689: <td><ins class="diff-chg">U+022EA</ins></td>
                   60690: </tr>
                   60691: <tr>
                   60692: <td><code title=""><ins class=
                   60693: "diff-chg">ntrianglelefteq;</ins></code></td>
                   60694: <td><ins class="diff-chg">U+022EC</ins></td>
                   60695: </tr>
                   60696: <tr>
                   60697: <td><code title=""><ins class=
                   60698: "diff-chg">ntriangleright;</ins></code></td>
                   60699: <td><ins class="diff-chg">U+022EB</ins></td>
                   60700: </tr>
                   60701: <tr>
                   60702: <td><code title=""><ins class=
                   60703: "diff-chg">ntrianglerighteq;</ins></code></td>
                   60704: <td><ins class="diff-chg">U+022ED</ins></td>
                   60705: </tr>
                   60706: <tr>
                   60707: <td><code title="">nu;</code></td>
                   60708: <td><del class="diff-old">U+03BD</del> <ins class=
                   60709: "diff-chg">U+003BD</ins></td>
                   60710: </tr>
                   60711: <tr>
                   60712: <td><code title=""><ins class="diff-chg">num;</ins></code></td>
                   60713: <td><ins class="diff-chg">U+00023</ins></td>
                   60714: </tr>
                   60715: <tr>
                   60716: <td><code title=""><ins class="diff-chg">numero;</ins></code></td>
                   60717: <td><ins class="diff-chg">U+02116</ins></td>
                   60718: </tr>
                   60719: <tr>
                   60720: <td><code title=""><ins class="diff-chg">numsp;</ins></code></td>
                   60721: <td><ins class="diff-chg">U+02007</ins></td>
                   60722: </tr>
                   60723: <tr>
                   60724: <td><code title=""><ins class="diff-chg">nvDash;</ins></code></td>
                   60725: <td><ins class="diff-chg">U+022AD</ins></td>
                   60726: </tr>
                   60727: <tr>
                   60728: <td><code title=""><ins class="diff-chg">nvHarr;</ins></code></td>
                   60729: <td><ins class="diff-chg">U+02904</ins></td>
                   60730: </tr>
                   60731: <tr>
                   60732: <td><code title=""><ins class="diff-chg">nvdash;</ins></code></td>
                   60733: <td><ins class="diff-chg">U+022AC</ins></td>
                   60734: </tr>
                   60735: <tr>
                   60736: <td><code title=""><ins class="diff-chg">nvinfin;</ins></code></td>
                   60737: <td><ins class="diff-chg">U+029DE</ins></td>
                   60738: </tr>
                   60739: <tr>
                   60740: <td><code title=""><ins class="diff-chg">nvlArr;</ins></code></td>
                   60741: <td><ins class="diff-chg">U+02902</ins></td>
                   60742: </tr>
                   60743: <tr>
                   60744: <td><code title=""><ins class="diff-chg">nvrArr;</ins></code></td>
                   60745: <td><ins class="diff-chg">U+02903</ins></td>
                   60746: </tr>
                   60747: <tr>
                   60748: <td><code title=""><ins class="diff-chg">nwArr;</ins></code></td>
                   60749: <td><ins class="diff-chg">U+021D6</ins></td>
                   60750: </tr>
                   60751: <tr>
                   60752: <td><code title=""><ins class="diff-chg">nwarhk;</ins></code></td>
                   60753: <td><ins class="diff-chg">U+02923</ins></td>
                   60754: </tr>
                   60755: <tr>
                   60756: <td><code title=""><ins class="diff-chg">nwarr;</ins></code></td>
                   60757: <td><ins class="diff-chg">U+02196</ins></td>
                   60758: </tr>
                   60759: <tr>
                   60760: <td><code title=""><ins class="diff-chg">nwarrow;</ins></code></td>
                   60761: <td><ins class="diff-chg">U+02196</ins></td>
                   60762: </tr>
                   60763: <tr>
                   60764: <td><code title=""><ins class="diff-chg">nwnear;</ins></code></td>
                   60765: <td><ins class="diff-chg">U+02927</ins></td>
                   60766: </tr>
                   60767: <tr>
                   60768: <td><code title=""><ins class="diff-chg">oS;</ins></code></td>
                   60769: <td><ins class="diff-chg">U+024C8</ins></td>
                   60770: </tr>
                   60771: <tr>
                   60772: <td><code title="">oacute;</code></td>
                   60773: <td><del class="diff-old">U+00F3</del> <ins class=
                   60774: "diff-chg">U+000F3</ins></td>
                   60775: </tr>
                   60776: <tr>
                   60777: <td><code title="">oacute</code></td>
                   60778: <td><del class="diff-old">U+00F3</del> <ins class=
                   60779: "diff-chg">U+000F3</ins></td>
                   60780: </tr>
                   60781: <tr>
                   60782: <td><code title=""><ins class="diff-chg">oast;</ins></code></td>
                   60783: <td><ins class="diff-chg">U+0229B</ins></td>
                   60784: </tr>
                   60785: <tr>
                   60786: <td><code title=""><ins class="diff-chg">ocir;</ins></code></td>
                   60787: <td><ins class="diff-chg">U+0229A</ins></td>
                   60788: </tr>
                   60789: <tr>
                   60790: <td><code title="">ocirc;</code></td>
                   60791: <td><del class="diff-old">U+00F4</del> <ins class=
                   60792: "diff-chg">U+000F4</ins></td>
                   60793: </tr>
                   60794: <tr>
                   60795: <td><code title="">ocirc</code></td>
1.2     ! mike     60796: <td><ins class="diff-new">U+000F4</ins></td>
1.1       mike     60797: </tr>
                   60798: <tr>
1.2     ! mike     60799: <td><code title=""><ins class="diff-new">ocy;</ins></code></td>
        !          60800: <td><del class="diff-old">U+00F4</del> <ins class=
        !          60801: "diff-chg">U+0043E</ins></td>
1.1       mike     60802: </tr>
                   60803: <tr>
                   60804: <td><code title=""><ins class="diff-chg">odash;</ins></code></td>
                   60805: <td><ins class="diff-chg">U+0229D</ins></td>
                   60806: </tr>
                   60807: <tr>
                   60808: <td><code title=""><ins class="diff-chg">odblac;</ins></code></td>
                   60809: <td><ins class="diff-chg">U+00151</ins></td>
                   60810: </tr>
                   60811: <tr>
                   60812: <td><code title=""><ins class="diff-chg">odiv;</ins></code></td>
                   60813: <td><ins class="diff-chg">U+02A38</ins></td>
                   60814: </tr>
                   60815: <tr>
                   60816: <td><code title=""><ins class="diff-chg">odot;</ins></code></td>
                   60817: <td><ins class="diff-chg">U+02299</ins></td>
                   60818: </tr>
                   60819: <tr>
                   60820: <td><code title=""><ins class="diff-chg">odsold;</ins></code></td>
                   60821: <td><ins class="diff-chg">U+029BC</ins></td>
                   60822: </tr>
                   60823: <tr>
                   60824: <td><code title="">oelig;</code></td>
                   60825: <td><del class="diff-old">U+0153</del> <ins class=
                   60826: "diff-chg">U+00153</ins></td>
                   60827: </tr>
                   60828: <tr>
                   60829: <td><code title=""><ins class="diff-chg">ofcir;</ins></code></td>
                   60830: <td><ins class="diff-chg">U+029BF</ins></td>
                   60831: </tr>
                   60832: <tr>
                   60833: <td><code title=""><ins class="diff-chg">ofr;</ins></code></td>
                   60834: <td><ins class="diff-chg">U+1D52C</ins></td>
                   60835: </tr>
                   60836: <tr>
                   60837: <td><code title=""><ins class="diff-chg">ogon;</ins></code></td>
                   60838: <td><ins class="diff-chg">U+002DB</ins></td>
                   60839: </tr>
                   60840: <tr>
                   60841: <td><code title="">ograve;</code></td>
                   60842: <td><del class="diff-old">U+00F2</del> <ins class=
                   60843: "diff-chg">U+000F2</ins></td>
                   60844: </tr>
                   60845: <tr>
                   60846: <td><code title="">ograve</code></td>
                   60847: <td><del class="diff-old">U+00F2</del> <ins class=
                   60848: "diff-chg">U+000F2</ins></td>
                   60849: </tr>
                   60850: <tr>
                   60851: <td><code title=""><ins class="diff-chg">ogt;</ins></code></td>
                   60852: <td><ins class="diff-chg">U+029C1</ins></td>
                   60853: </tr>
                   60854: <tr>
                   60855: <td><code title=""><ins class="diff-chg">ohbar;</ins></code></td>
                   60856: <td><ins class="diff-chg">U+029B5</ins></td>
                   60857: </tr>
                   60858: <tr>
                   60859: <td><code title=""><ins class="diff-chg">ohm;</ins></code></td>
                   60860: <td><ins class="diff-chg">U+02126</ins></td>
                   60861: </tr>
                   60862: <tr>
                   60863: <td><code title=""><ins class="diff-chg">oint;</ins></code></td>
                   60864: <td><ins class="diff-chg">U+0222E</ins></td>
                   60865: </tr>
                   60866: <tr>
                   60867: <td><code title=""><ins class="diff-chg">olarr;</ins></code></td>
                   60868: <td><ins class="diff-chg">U+021BA</ins></td>
                   60869: </tr>
                   60870: <tr>
                   60871: <td><code title=""><ins class="diff-chg">olcir;</ins></code></td>
                   60872: <td><ins class="diff-chg">U+029BE</ins></td>
                   60873: </tr>
                   60874: <tr>
                   60875: <td><code title=""><ins class="diff-chg">olcross;</ins></code></td>
                   60876: <td><ins class="diff-chg">U+029BB</ins></td>
                   60877: </tr>
                   60878: <tr>
                   60879: <td><code title="">oline;</code></td>
                   60880: <td><del class="diff-old">U+203E</del> <ins class=
                   60881: "diff-chg">U+0203E</ins></td>
                   60882: </tr>
                   60883: <tr>
                   60884: <td><code title=""><ins class="diff-chg">olt;</ins></code></td>
                   60885: <td><ins class="diff-chg">U+029C0</ins></td>
                   60886: </tr>
                   60887: <tr>
                   60888: <td><code title=""><ins class="diff-chg">omacr;</ins></code></td>
                   60889: <td><ins class="diff-chg">U+0014D</ins></td>
                   60890: </tr>
                   60891: <tr>
                   60892: <td><code title="">omega;</code></td>
                   60893: <td><del class="diff-old">U+03C9</del> <ins class=
                   60894: "diff-chg">U+003C9</ins></td>
                   60895: </tr>
                   60896: <tr>
                   60897: <td><code title="">omicron;</code></td>
                   60898: <td><del class="diff-old">U+03BF</del> <ins class=
                   60899: "diff-chg">U+003BF</ins></td>
                   60900: </tr>
                   60901: <tr>
                   60902: <td><code title=""><ins class="diff-chg">omid;</ins></code></td>
                   60903: <td><ins class="diff-chg">U+029B6</ins></td>
                   60904: </tr>
                   60905: <tr>
                   60906: <td><code title=""><ins class="diff-chg">ominus;</ins></code></td>
                   60907: <td><ins class="diff-chg">U+02296</ins></td>
                   60908: </tr>
                   60909: <tr>
                   60910: <td><code title=""><ins class="diff-chg">oopf;</ins></code></td>
                   60911: <td><ins class="diff-chg">U+1D560</ins></td>
                   60912: </tr>
                   60913: <tr>
                   60914: <td><code title=""><ins class="diff-chg">opar;</ins></code></td>
                   60915: <td><ins class="diff-chg">U+029B7</ins></td>
                   60916: </tr>
                   60917: <tr>
                   60918: <td><code title=""><ins class="diff-chg">operp;</ins></code></td>
                   60919: <td><ins class="diff-chg">U+029B9</ins></td>
                   60920: </tr>
                   60921: <tr>
                   60922: <td><code title="">oplus;</code></td>
                   60923: <td><del class="diff-old">U+2295</del> <ins class=
                   60924: "diff-chg">U+02295</ins></td>
                   60925: </tr>
                   60926: <tr>
                   60927: <td><code title="">or;</code></td>
                   60928: <td><del class="diff-old">U+2228</del> <ins class=
                   60929: "diff-chg">U+02228</ins></td>
                   60930: </tr>
                   60931: <tr>
                   60932: <td><code title=""><ins class="diff-chg">orarr;</ins></code></td>
                   60933: <td><ins class="diff-chg">U+021BB</ins></td>
                   60934: </tr>
                   60935: <tr>
                   60936: <td><code title=""><ins class="diff-chg">ord;</ins></code></td>
                   60937: <td><ins class="diff-chg">U+02A5D</ins></td>
                   60938: </tr>
                   60939: <tr>
                   60940: <td><code title=""><ins class="diff-chg">order;</ins></code></td>
                   60941: <td><ins class="diff-chg">U+02134</ins></td>
                   60942: </tr>
                   60943: <tr>
                   60944: <td><code title=""><ins class="diff-chg">orderof;</ins></code></td>
                   60945: <td><ins class="diff-chg">U+02134</ins></td>
                   60946: </tr>
                   60947: <tr>
                   60948: <td><code title="">ordf;</code></td>
                   60949: <td><del class="diff-old">U+00AA</del> <ins class=
                   60950: "diff-chg">U+000AA</ins></td>
                   60951: </tr>
                   60952: <tr>
                   60953: <td><code title="">ordf</code></td>
                   60954: <td><del class="diff-old">U+00AA</del> <ins class=
                   60955: "diff-chg">U+000AA</ins></td>
                   60956: </tr>
                   60957: <tr>
                   60958: <td><code title="">ordm;</code></td>
                   60959: <td><del class="diff-old">U+00BA</del> <ins class=
                   60960: "diff-chg">U+000BA</ins></td>
                   60961: </tr>
                   60962: <tr>
                   60963: <td><code title="">ordm</code></td>
1.2     ! mike     60964: <td><del class="diff-old">U+00BA</del> <ins class=
        !          60965: "diff-chg">U+000BA</ins></td>
1.1       mike     60966: </tr>
                   60967: <tr>
1.2     ! mike     60968: <td><code title=""><ins class="diff-chg">origof;</ins></code></td>
        !          60969: <td><ins class="diff-chg">U+022B6</ins></td>
1.1       mike     60970: </tr>
                   60971: <tr>
                   60972: <td><code title=""><ins class="diff-chg">oror;</ins></code></td>
                   60973: <td><ins class="diff-chg">U+02A56</ins></td>
                   60974: </tr>
                   60975: <tr>
                   60976: <td><code title=""><ins class="diff-chg">orslope;</ins></code></td>
                   60977: <td><ins class="diff-chg">U+02A57</ins></td>
                   60978: </tr>
                   60979: <tr>
                   60980: <td><code title=""><ins class="diff-chg">orv;</ins></code></td>
                   60981: <td><ins class="diff-chg">U+02A5B</ins></td>
                   60982: </tr>
                   60983: <tr>
                   60984: <td><code title=""><ins class="diff-chg">oscr;</ins></code></td>
                   60985: <td><ins class="diff-chg">U+02134</ins></td>
                   60986: </tr>
                   60987: <tr>
                   60988: <td><code title="">oslash;</code></td>
                   60989: <td><del class="diff-old">U+00F8</del> <ins class=
                   60990: "diff-chg">U+000F8</ins></td>
                   60991: </tr>
                   60992: <tr>
                   60993: <td><code title="">oslash</code></td>
                   60994: <td><del class="diff-old">U+00F8</del> <ins class=
                   60995: "diff-chg">U+000F8</ins></td>
                   60996: </tr>
                   60997: <tr>
                   60998: <td><code title=""><ins class="diff-chg">osol;</ins></code></td>
                   60999: <td><ins class="diff-chg">U+02298</ins></td>
                   61000: </tr>
                   61001: <tr>
                   61002: <td><code title="">otilde;</code></td>
                   61003: <td><del class="diff-old">U+00F5</del> <ins class=
                   61004: "diff-chg">U+000F5</ins></td>
                   61005: </tr>
                   61006: <tr>
                   61007: <td><code title="">otilde</code></td>
                   61008: <td><del class="diff-old">U+00F5</del> <ins class=
                   61009: "diff-chg">U+000F5</ins></td>
                   61010: </tr>
                   61011: <tr>
                   61012: <td><code title="">otimes;</code></td>
                   61013: <td><del class="diff-old">U+2297</del> <ins class=
                   61014: "diff-chg">U+02297</ins></td>
                   61015: </tr>
                   61016: <tr>
                   61017: <td><code title=""><ins class=
                   61018: "diff-chg">otimesas;</ins></code></td>
                   61019: <td><ins class="diff-chg">U+02A36</ins></td>
                   61020: </tr>
                   61021: <tr>
                   61022: <td><code title="">ouml;</code></td>
                   61023: <td><del class="diff-old">U+00F6</del> <ins class=
                   61024: "diff-chg">U+000F6</ins></td>
                   61025: </tr>
                   61026: <tr>
                   61027: <td><code title="">ouml</code></td>
                   61028: <td><del class="diff-old">U+00F6</del> <ins class=
                   61029: "diff-chg">U+000F6</ins></td>
                   61030: </tr>
                   61031: <tr>
                   61032: <td><code title=""><ins class="diff-chg">ovbar;</ins></code></td>
                   61033: <td><ins class="diff-chg">U+0233D</ins></td>
                   61034: </tr>
                   61035: <tr>
                   61036: <td><code title=""><ins class="diff-chg">par;</ins></code></td>
                   61037: <td><ins class="diff-chg">U+02225</ins></td>
                   61038: </tr>
                   61039: <tr>
                   61040: <td><code title="">para;</code></td>
                   61041: <td><del class="diff-old">U+00B6</del> <ins class=
                   61042: "diff-chg">U+000B6</ins></td>
                   61043: </tr>
                   61044: <tr>
                   61045: <td><code title="">para</code></td>
                   61046: <td><del class="diff-old">U+00B6</del> <ins class=
                   61047: "diff-chg">U+000B6</ins></td>
                   61048: </tr>
                   61049: <tr>
                   61050: <td><code title=""><ins class=
                   61051: "diff-chg">parallel;</ins></code></td>
                   61052: <td><ins class="diff-chg">U+02225</ins></td>
                   61053: </tr>
                   61054: <tr>
                   61055: <td><code title=""><ins class="diff-chg">parsim;</ins></code></td>
                   61056: <td><ins class="diff-chg">U+02AF3</ins></td>
                   61057: </tr>
                   61058: <tr>
                   61059: <td><code title=""><ins class="diff-chg">parsl;</ins></code></td>
                   61060: <td><ins class="diff-chg">U+02AFD</ins></td>
                   61061: </tr>
                   61062: <tr>
                   61063: <td><code title="">part;</code></td>
                   61064: <td><del class="diff-old">U+2202</del> <ins class=
                   61065: "diff-chg">U+02202</ins></td>
                   61066: </tr>
                   61067: <tr>
                   61068: <td><code title=""><ins class="diff-chg">pcy;</ins></code></td>
                   61069: <td><ins class="diff-chg">U+0043F</ins></td>
                   61070: </tr>
                   61071: <tr>
                   61072: <td><code title=""><ins class="diff-chg">percnt;</ins></code></td>
                   61073: <td><ins class="diff-chg">U+00025</ins></td>
                   61074: </tr>
                   61075: <tr>
                   61076: <td><code title=""><ins class="diff-chg">period;</ins></code></td>
                   61077: <td><ins class="diff-chg">U+0002E</ins></td>
                   61078: </tr>
                   61079: <tr>
                   61080: <td><code title="">permil;</code></td>
                   61081: <td><del class="diff-old">U+2030</del> <ins class=
                   61082: "diff-chg">U+02030</ins></td>
                   61083: </tr>
                   61084: <tr>
                   61085: <td><code title="">perp;</code></td>
                   61086: <td><del class="diff-old">U+22A5</del> <ins class=
                   61087: "diff-chg">U+022A5</ins></td>
                   61088: </tr>
                   61089: <tr>
                   61090: <td><code title=""><ins class="diff-chg">pertenk;</ins></code></td>
                   61091: <td><ins class="diff-chg">U+02031</ins></td>
                   61092: </tr>
                   61093: <tr>
                   61094: <td><code title=""><ins class="diff-chg">pfr;</ins></code></td>
                   61095: <td><ins class="diff-chg">U+1D52D</ins></td>
                   61096: </tr>
                   61097: <tr>
                   61098: <td><code title="">phi;</code></td>
                   61099: <td><del class="diff-old">U+03C6</del> <ins class=
                   61100: "diff-chg">U+003C6</ins></td>
                   61101: </tr>
                   61102: <tr>
                   61103: <td><code title=""><ins class="diff-chg">phiv;</ins></code></td>
                   61104: <td><ins class="diff-chg">U+003C6</ins></td>
                   61105: </tr>
                   61106: <tr>
                   61107: <td><code title=""><ins class="diff-chg">phmmat;</ins></code></td>
                   61108: <td><ins class="diff-chg">U+02133</ins></td>
                   61109: </tr>
                   61110: <tr>
                   61111: <td><code title=""><ins class="diff-chg">phone;</ins></code></td>
                   61112: <td><ins class="diff-chg">U+0260E</ins></td>
                   61113: </tr>
                   61114: <tr>
                   61115: <td><code title="">pi;</code></td>
                   61116: <td><del class="diff-old">U+03C0</del> <ins class=
                   61117: "diff-chg">U+003C0</ins></td>
                   61118: </tr>
                   61119: <tr>
                   61120: <td><code title=""><ins class=
                   61121: "diff-chg">pitchfork;</ins></code></td>
                   61122: <td><ins class="diff-chg">U+022D4</ins></td>
                   61123: </tr>
                   61124: <tr>
                   61125: <td><code title="">piv;</code></td>
1.2     ! mike     61126: <td><del class="diff-old">U+03D6</del> <ins class=
        !          61127: "diff-chg">U+003D6</ins></td>
1.1       mike     61128: </tr>
                   61129: <tr>
1.2     ! mike     61130: <td><code title=""><ins class="diff-chg">planck;</ins></code></td>
        !          61131: <td><ins class="diff-chg">U+0210F</ins></td>
1.1       mike     61132: </tr>
                   61133: <tr>
                   61134: <td><code title=""><ins class="diff-chg">planckh;</ins></code></td>
                   61135: <td><ins class="diff-chg">U+0210E</ins></td>
                   61136: </tr>
                   61137: <tr>
                   61138: <td><code title=""><ins class="diff-chg">plankv;</ins></code></td>
                   61139: <td><ins class="diff-chg">U+0210F</ins></td>
                   61140: </tr>
                   61141: <tr>
                   61142: <td><code title=""><ins class="diff-chg">plus;</ins></code></td>
                   61143: <td><ins class="diff-chg">U+0002B</ins></td>
                   61144: </tr>
                   61145: <tr>
                   61146: <td><code title=""><ins class=
                   61147: "diff-chg">plusacir;</ins></code></td>
                   61148: <td><ins class="diff-chg">U+02A23</ins></td>
                   61149: </tr>
                   61150: <tr>
                   61151: <td><code title=""><ins class="diff-chg">plusb;</ins></code></td>
                   61152: <td><ins class="diff-chg">U+0229E</ins></td>
                   61153: </tr>
                   61154: <tr>
                   61155: <td><code title=""><ins class="diff-chg">pluscir;</ins></code></td>
                   61156: <td><ins class="diff-chg">U+02A22</ins></td>
                   61157: </tr>
                   61158: <tr>
                   61159: <td><code title=""><ins class="diff-chg">plusdo;</ins></code></td>
                   61160: <td><ins class="diff-chg">U+02214</ins></td>
                   61161: </tr>
                   61162: <tr>
                   61163: <td><code title=""><ins class="diff-chg">plusdu;</ins></code></td>
                   61164: <td><ins class="diff-chg">U+02A25</ins></td>
                   61165: </tr>
                   61166: <tr>
                   61167: <td><code title=""><ins class="diff-chg">pluse;</ins></code></td>
                   61168: <td><ins class="diff-chg">U+02A72</ins></td>
                   61169: </tr>
                   61170: <tr>
                   61171: <td><code title="">plusmn;</code></td>
                   61172: <td><del class="diff-old">U+00B1</del> <ins class=
                   61173: "diff-chg">U+000B1</ins></td>
                   61174: </tr>
                   61175: <tr>
                   61176: <td><code title="">plusmn</code></td>
                   61177: <td><del class="diff-old">U+00B1</del> <ins class=
                   61178: "diff-chg">U+000B1</ins></td>
                   61179: </tr>
                   61180: <tr>
                   61181: <td><code title=""><ins class="diff-chg">plussim;</ins></code></td>
                   61182: <td><ins class="diff-chg">U+02A26</ins></td>
                   61183: </tr>
                   61184: <tr>
                   61185: <td><code title=""><ins class="diff-chg">plustwo;</ins></code></td>
                   61186: <td><ins class="diff-chg">U+02A27</ins></td>
                   61187: </tr>
                   61188: <tr>
                   61189: <td><code title=""><ins class="diff-chg">pm;</ins></code></td>
                   61190: <td><ins class="diff-chg">U+000B1</ins></td>
                   61191: </tr>
                   61192: <tr>
                   61193: <td><code title=""><ins class=
                   61194: "diff-chg">pointint;</ins></code></td>
                   61195: <td><ins class="diff-chg">U+02A15</ins></td>
                   61196: </tr>
                   61197: <tr>
                   61198: <td><code title=""><ins class="diff-chg">popf;</ins></code></td>
                   61199: <td><ins class="diff-chg">U+1D561</ins></td>
                   61200: </tr>
                   61201: <tr>
                   61202: <td><code title="">pound;</code></td>
                   61203: <td><del class="diff-old">U+00A3</del> <ins class=
                   61204: "diff-chg">U+000A3</ins></td>
                   61205: </tr>
                   61206: <tr>
                   61207: <td><code title="">pound</code></td>
                   61208: <td><del class="diff-old">U+00A3</del> <ins class=
                   61209: "diff-chg">U+000A3</ins></td>
                   61210: </tr>
                   61211: <tr>
                   61212: <td><code title=""><ins class="diff-chg">pr;</ins></code></td>
                   61213: <td><ins class="diff-chg">U+0227A</ins></td>
                   61214: </tr>
                   61215: <tr>
                   61216: <td><code title=""><ins class="diff-chg">prE;</ins></code></td>
                   61217: <td><ins class="diff-chg">U+02AB3</ins></td>
                   61218: </tr>
                   61219: <tr>
                   61220: <td><code title=""><ins class="diff-chg">prap;</ins></code></td>
                   61221: <td><ins class="diff-chg">U+02AB7</ins></td>
                   61222: </tr>
                   61223: <tr>
                   61224: <td><code title=""><ins class="diff-chg">prcue;</ins></code></td>
                   61225: <td><ins class="diff-chg">U+0227C</ins></td>
                   61226: </tr>
                   61227: <tr>
                   61228: <td><code title=""><ins class="diff-chg">pre;</ins></code></td>
                   61229: <td><ins class="diff-chg">U+02AAF</ins></td>
                   61230: </tr>
                   61231: <tr>
                   61232: <td><code title=""><ins class="diff-chg">prec;</ins></code></td>
                   61233: <td><ins class="diff-chg">U+0227A</ins></td>
                   61234: </tr>
                   61235: <tr>
                   61236: <td><code title=""><ins class=
                   61237: "diff-chg">precapprox;</ins></code></td>
                   61238: <td><ins class="diff-chg">U+02AB7</ins></td>
                   61239: </tr>
                   61240: <tr>
                   61241: <td><code title=""><ins class=
                   61242: "diff-chg">preccurlyeq;</ins></code></td>
                   61243: <td><ins class="diff-chg">U+0227C</ins></td>
                   61244: </tr>
                   61245: <tr>
                   61246: <td><code title=""><ins class="diff-chg">preceq;</ins></code></td>
                   61247: <td><ins class="diff-chg">U+02AAF</ins></td>
                   61248: </tr>
                   61249: <tr>
                   61250: <td><code title=""><ins class=
                   61251: "diff-chg">precnapprox;</ins></code></td>
                   61252: <td><ins class="diff-chg">U+02AB9</ins></td>
                   61253: </tr>
                   61254: <tr>
                   61255: <td><code title=""><ins class=
                   61256: "diff-chg">precneqq;</ins></code></td>
                   61257: <td><ins class="diff-chg">U+02AB5</ins></td>
                   61258: </tr>
                   61259: <tr>
                   61260: <td><code title=""><ins class=
                   61261: "diff-chg">precnsim;</ins></code></td>
                   61262: <td><ins class="diff-chg">U+022E8</ins></td>
                   61263: </tr>
                   61264: <tr>
                   61265: <td><code title=""><ins class="diff-chg">precsim;</ins></code></td>
                   61266: <td><ins class="diff-chg">U+0227E</ins></td>
                   61267: </tr>
                   61268: <tr>
                   61269: <td><code title="">prime;</code></td>
                   61270: <td><del class="diff-old">U+2032</del> <ins class=
                   61271: "diff-chg">U+02032</ins></td>
                   61272: </tr>
                   61273: <tr>
                   61274: <td><code title=""><ins class="diff-chg">primes;</ins></code></td>
                   61275: <td><ins class="diff-chg">U+02119</ins></td>
                   61276: </tr>
                   61277: <tr>
                   61278: <td><code title=""><ins class="diff-chg">prnE;</ins></code></td>
                   61279: <td><ins class="diff-chg">U+02AB5</ins></td>
                   61280: </tr>
                   61281: <tr>
                   61282: <td><code title=""><ins class="diff-chg">prnap;</ins></code></td>
                   61283: <td><ins class="diff-chg">U+02AB9</ins></td>
                   61284: </tr>
                   61285: <tr>
                   61286: <td><code title=""><ins class="diff-chg">prnsim;</ins></code></td>
                   61287: <td><ins class="diff-chg">U+022E8</ins></td>
                   61288: </tr>
                   61289: <tr>
                   61290: <td><code title="">prod;</code></td>
                   61291: <td><del class="diff-old">U+220F</del> <ins class=
                   61292: "diff-chg">U+0220F</ins></td>
                   61293: </tr>
                   61294: <tr>
                   61295: <td><code title=""><ins class=
                   61296: "diff-chg">profalar;</ins></code></td>
                   61297: <td><ins class="diff-chg">U+0232E</ins></td>
                   61298: </tr>
                   61299: <tr>
                   61300: <td><code title=""><ins class=
                   61301: "diff-chg">profline;</ins></code></td>
                   61302: <td><ins class="diff-chg">U+02312</ins></td>
                   61303: </tr>
                   61304: <tr>
                   61305: <td><code title=""><ins class=
                   61306: "diff-chg">profsurf;</ins></code></td>
                   61307: <td><ins class="diff-chg">U+02313</ins></td>
                   61308: </tr>
                   61309: <tr>
                   61310: <td><code title="">prop;</code></td>
                   61311: <td><del class="diff-old">U+221D</del> <ins class=
                   61312: "diff-chg">U+0221D</ins></td>
                   61313: </tr>
                   61314: <tr>
                   61315: <td><code title=""><ins class="diff-chg">propto;</ins></code></td>
                   61316: <td><ins class="diff-chg">U+0221D</ins></td>
                   61317: </tr>
                   61318: <tr>
                   61319: <td><code title=""><ins class="diff-chg">prsim;</ins></code></td>
                   61320: <td><ins class="diff-chg">U+0227E</ins></td>
                   61321: </tr>
                   61322: <tr>
                   61323: <td><code title=""><ins class="diff-chg">prurel;</ins></code></td>
                   61324: <td><ins class="diff-chg">U+022B0</ins></td>
                   61325: </tr>
                   61326: <tr>
                   61327: <td><code title=""><ins class="diff-chg">pscr;</ins></code></td>
                   61328: <td><ins class="diff-chg">U+1D4C5</ins></td>
                   61329: </tr>
                   61330: <tr>
                   61331: <td><code title="">psi;</code></td>
                   61332: <td><del class="diff-old">U+03C8</del> <ins class=
                   61333: "diff-chg">U+003C8</ins></td>
                   61334: </tr>
                   61335: <tr>
                   61336: <td><code title=""><ins class="diff-chg">puncsp;</ins></code></td>
                   61337: <td><ins class="diff-chg">U+02008</ins></td>
                   61338: </tr>
                   61339: <tr>
                   61340: <td><code title=""><ins class="diff-chg">qfr;</ins></code></td>
                   61341: <td><ins class="diff-chg">U+1D52E</ins></td>
                   61342: </tr>
                   61343: <tr>
                   61344: <td><code title=""><ins class="diff-chg">qint;</ins></code></td>
                   61345: <td><ins class="diff-chg">U+02A0C</ins></td>
                   61346: </tr>
                   61347: <tr>
                   61348: <td><code title=""><ins class="diff-chg">qopf;</ins></code></td>
                   61349: <td><ins class="diff-chg">U+1D562</ins></td>
                   61350: </tr>
                   61351: <tr>
                   61352: <td><code title=""><ins class="diff-chg">qprime;</ins></code></td>
                   61353: <td><ins class="diff-chg">U+02057</ins></td>
                   61354: </tr>
                   61355: <tr>
                   61356: <td><code title=""><ins class="diff-chg">qscr;</ins></code></td>
                   61357: <td><ins class="diff-chg">U+1D4C6</ins></td>
                   61358: </tr>
                   61359: <tr>
                   61360: <td><code title=""><ins class=
                   61361: "diff-chg">quaternions;</ins></code></td>
                   61362: <td><ins class="diff-chg">U+0210D</ins></td>
                   61363: </tr>
                   61364: <tr>
                   61365: <td><code title=""><ins class="diff-chg">quatint;</ins></code></td>
                   61366: <td><ins class="diff-chg">U+02A16</ins></td>
                   61367: </tr>
                   61368: <tr>
                   61369: <td><code title=""><ins class="diff-chg">quest;</ins></code></td>
                   61370: <td><ins class="diff-chg">U+0003F</ins></td>
                   61371: </tr>
                   61372: <tr>
                   61373: <td><code title=""><ins class="diff-chg">questeq;</ins></code></td>
                   61374: <td><ins class="diff-chg">U+0225F</ins></td>
                   61375: </tr>
                   61376: <tr>
                   61377: <td><code title="">quot;</code></td>
                   61378: <td><del class="diff-old">U+0022</del> <ins class=
                   61379: "diff-chg">U+00022</ins></td>
                   61380: </tr>
                   61381: <tr>
                   61382: <td><code title="">quot</code></td>
                   61383: <td><del class="diff-old">U+0022</del> <ins class=
                   61384: "diff-chg">U+00022</ins></td>
                   61385: </tr>
                   61386: <tr>
                   61387: <td><code title=""><ins class="diff-chg">rAarr;</ins></code></td>
                   61388: <td><ins class="diff-chg">U+021DB</ins></td>
                   61389: </tr>
                   61390: <tr>
                   61391: <td><code title="">rArr;</code></td>
                   61392: <td><del class="diff-old">U+21D2</del> <ins class=
                   61393: "diff-chg">U+021D2</ins></td>
                   61394: </tr>
                   61395: <tr>
                   61396: <td><code title=""><ins class="diff-chg">rAtail;</ins></code></td>
                   61397: <td><ins class="diff-chg">U+0291C</ins></td>
                   61398: </tr>
                   61399: <tr>
                   61400: <td><code title=""><ins class="diff-chg">rBarr;</ins></code></td>
                   61401: <td><ins class="diff-chg">U+0290F</ins></td>
                   61402: </tr>
                   61403: <tr>
                   61404: <td><code title=""><ins class="diff-chg">rHar;</ins></code></td>
                   61405: <td><ins class="diff-chg">U+02964</ins></td>
                   61406: </tr>
                   61407: <tr>
                   61408: <td><code title=""><ins class="diff-chg">race;</ins></code></td>
                   61409: <td><ins class="diff-chg">U+029DA</ins></td>
                   61410: </tr>
                   61411: <tr>
                   61412: <td><code title=""><ins class="diff-chg">racute;</ins></code></td>
                   61413: <td><ins class="diff-chg">U+00155</ins></td>
                   61414: </tr>
                   61415: <tr>
                   61416: <td><code title="">radic;</code></td>
                   61417: <td><del class="diff-old">U+221A</del> <ins class=
                   61418: "diff-chg">U+0221A</ins></td>
                   61419: </tr>
                   61420: <tr>
                   61421: <td><code title=""><ins class=
                   61422: "diff-chg">raemptyv;</ins></code></td>
                   61423: <td><ins class="diff-chg">U+029B3</ins></td>
                   61424: </tr>
                   61425: <tr>
                   61426: <td><code title="">rang;</code></td>
                   61427: <td><del class="diff-old">U+3009</del> <ins class=
                   61428: "diff-chg">U+027E9</ins></td>
                   61429: </tr>
                   61430: <tr>
                   61431: <td><code title=""><ins class="diff-chg">rangd;</ins></code></td>
                   61432: <td><ins class="diff-chg">U+02992</ins></td>
                   61433: </tr>
                   61434: <tr>
                   61435: <td><code title=""><ins class="diff-chg">range;</ins></code></td>
                   61436: <td><ins class="diff-chg">U+029A5</ins></td>
                   61437: </tr>
                   61438: <tr>
                   61439: <td><code title=""><ins class="diff-chg">rangle;</ins></code></td>
                   61440: <td><ins class="diff-chg">U+027E9</ins></td>
                   61441: </tr>
                   61442: <tr>
                   61443: <td><code title="">raquo;</code></td>
                   61444: <td><del class="diff-old">U+00BB</del> <ins class=
                   61445: "diff-chg">U+000BB</ins></td>
                   61446: </tr>
                   61447: <tr>
                   61448: <td><code title="">raquo</code></td>
                   61449: <td><del class="diff-old">U+00BB</del> <ins class=
                   61450: "diff-chg">U+000BB</ins></td>
                   61451: </tr>
                   61452: <tr>
                   61453: <td><code title="">rarr;</code></td>
                   61454: <td><del class="diff-old">U+2192</del> <ins class=
                   61455: "diff-chg">U+02192</ins></td>
                   61456: </tr>
                   61457: <tr>
                   61458: <td><code title=""><ins class="diff-chg">rarrap;</ins></code></td>
                   61459: <td><ins class="diff-chg">U+02975</ins></td>
                   61460: </tr>
                   61461: <tr>
                   61462: <td><code title=""><ins class="diff-chg">rarrb;</ins></code></td>
                   61463: <td><ins class="diff-chg">U+021E5</ins></td>
                   61464: </tr>
                   61465: <tr>
                   61466: <td><code title=""><ins class="diff-chg">rarrbfs;</ins></code></td>
                   61467: <td><ins class="diff-chg">U+02920</ins></td>
                   61468: </tr>
                   61469: <tr>
                   61470: <td><code title=""><ins class="diff-chg">rarrc;</ins></code></td>
                   61471: <td><ins class="diff-chg">U+02933</ins></td>
                   61472: </tr>
                   61473: <tr>
                   61474: <td><code title=""><ins class="diff-chg">rarrfs;</ins></code></td>
                   61475: <td><ins class="diff-chg">U+0291E</ins></td>
                   61476: </tr>
                   61477: <tr>
                   61478: <td><code title=""><ins class="diff-chg">rarrhk;</ins></code></td>
                   61479: <td><ins class="diff-chg">U+021AA</ins></td>
                   61480: </tr>
                   61481: <tr>
                   61482: <td><code title=""><ins class="diff-chg">rarrlp;</ins></code></td>
                   61483: <td><ins class="diff-chg">U+021AC</ins></td>
                   61484: </tr>
                   61485: <tr>
                   61486: <td><code title=""><ins class="diff-chg">rarrpl;</ins></code></td>
                   61487: <td><ins class="diff-chg">U+02945</ins></td>
                   61488: </tr>
                   61489: <tr>
                   61490: <td><code title=""><ins class="diff-chg">rarrsim;</ins></code></td>
                   61491: <td><ins class="diff-chg">U+02974</ins></td>
                   61492: </tr>
                   61493: <tr>
                   61494: <td><code title=""><ins class="diff-chg">rarrtl;</ins></code></td>
                   61495: <td><ins class="diff-chg">U+021A3</ins></td>
                   61496: </tr>
                   61497: <tr>
                   61498: <td><code title=""><ins class="diff-chg">rarrw;</ins></code></td>
                   61499: <td><ins class="diff-chg">U+0219D</ins></td>
                   61500: </tr>
                   61501: <tr>
                   61502: <td><code title=""><ins class="diff-chg">ratail;</ins></code></td>
                   61503: <td><ins class="diff-chg">U+0291A</ins></td>
                   61504: </tr>
                   61505: <tr>
                   61506: <td><code title=""><ins class="diff-chg">ratio;</ins></code></td>
                   61507: <td><ins class="diff-chg">U+02236</ins></td>
                   61508: </tr>
                   61509: <tr>
                   61510: <td><code title=""><ins class=
                   61511: "diff-chg">rationals;</ins></code></td>
                   61512: <td><ins class="diff-chg">U+0211A</ins></td>
                   61513: </tr>
                   61514: <tr>
                   61515: <td><code title=""><ins class="diff-chg">rbarr;</ins></code></td>
                   61516: <td><ins class="diff-chg">U+0290D</ins></td>
                   61517: </tr>
                   61518: <tr>
                   61519: <td><code title=""><ins class="diff-chg">rbbrk;</ins></code></td>
                   61520: <td><ins class="diff-chg">U+02773</ins></td>
                   61521: </tr>
                   61522: <tr>
                   61523: <td><code title=""><ins class="diff-chg">rbrace;</ins></code></td>
                   61524: <td><ins class="diff-chg">U+0007D</ins></td>
                   61525: </tr>
                   61526: <tr>
                   61527: <td><code title=""><ins class="diff-chg">rbrack;</ins></code></td>
                   61528: <td><ins class="diff-chg">U+0005D</ins></td>
                   61529: </tr>
                   61530: <tr>
                   61531: <td><code title=""><ins class="diff-chg">rbrke;</ins></code></td>
                   61532: <td><ins class="diff-chg">U+0298C</ins></td>
                   61533: </tr>
                   61534: <tr>
                   61535: <td><code title=""><ins class="diff-chg">rbrksld;</ins></code></td>
                   61536: <td><ins class="diff-chg">U+0298E</ins></td>
                   61537: </tr>
                   61538: <tr>
                   61539: <td><code title=""><ins class="diff-chg">rbrkslu;</ins></code></td>
                   61540: <td><ins class="diff-chg">U+02990</ins></td>
                   61541: </tr>
                   61542: <tr>
                   61543: <td><code title=""><ins class="diff-chg">rcaron;</ins></code></td>
                   61544: <td><ins class="diff-chg">U+00159</ins></td>
                   61545: </tr>
                   61546: <tr>
                   61547: <td><code title=""><ins class="diff-chg">rcedil;</ins></code></td>
                   61548: <td><ins class="diff-chg">U+00157</ins></td>
                   61549: </tr>
                   61550: <tr>
                   61551: <td><code title="">rceil;</code></td>
                   61552: <td><del class="diff-old">U+2309</del> <ins class=
                   61553: "diff-chg">U+02309</ins></td>
                   61554: </tr>
                   61555: <tr>
                   61556: <td><code title=""><ins class="diff-chg">rcub;</ins></code></td>
                   61557: <td><ins class="diff-chg">U+0007D</ins></td>
                   61558: </tr>
                   61559: <tr>
                   61560: <td><code title=""><ins class="diff-chg">rcy;</ins></code></td>
                   61561: <td><ins class="diff-chg">U+00440</ins></td>
                   61562: </tr>
                   61563: <tr>
                   61564: <td><code title=""><ins class="diff-chg">rdca;</ins></code></td>
                   61565: <td><ins class="diff-chg">U+02937</ins></td>
                   61566: </tr>
                   61567: <tr>
                   61568: <td><code title=""><ins class="diff-chg">rdldhar;</ins></code></td>
                   61569: <td><ins class="diff-chg">U+02969</ins></td>
                   61570: </tr>
                   61571: <tr>
                   61572: <td><code title="">rdquo;</code></td>
                   61573: <td><del class="diff-old">U+201D</del> <ins class=
                   61574: "diff-chg">U+0201D</ins></td>
                   61575: </tr>
                   61576: <tr>
                   61577: <td><code title=""><ins class="diff-chg">rdquor;</ins></code></td>
                   61578: <td><ins class="diff-chg">U+0201D</ins></td>
                   61579: </tr>
                   61580: <tr>
                   61581: <td><code title=""><ins class="diff-chg">rdsh;</ins></code></td>
                   61582: <td><ins class="diff-chg">U+021B3</ins></td>
                   61583: </tr>
                   61584: <tr>
                   61585: <td><code title="">real;</code></td>
                   61586: <td><del class="diff-old">U+211C</del> <ins class=
                   61587: "diff-chg">U+0211C</ins></td>
                   61588: </tr>
                   61589: <tr>
                   61590: <td><code title=""><ins class="diff-chg">realine;</ins></code></td>
                   61591: <td><ins class="diff-chg">U+0211B</ins></td>
                   61592: </tr>
                   61593: <tr>
                   61594: <td><code title=""><ins class=
                   61595: "diff-chg">realpart;</ins></code></td>
                   61596: <td><ins class="diff-chg">U+0211C</ins></td>
                   61597: </tr>
                   61598: <tr>
                   61599: <td><code title=""><ins class="diff-chg">reals;</ins></code></td>
                   61600: <td><ins class="diff-chg">U+0211D</ins></td>
                   61601: </tr>
                   61602: <tr>
                   61603: <td><code title=""><ins class="diff-chg">rect;</ins></code></td>
                   61604: <td><ins class="diff-chg">U+025AD</ins></td>
                   61605: </tr>
                   61606: <tr>
                   61607: <td><code title="">reg;</code></td>
                   61608: <td><del class="diff-old">U+00AE</del> <ins class=
                   61609: "diff-chg">U+000AE</ins></td>
                   61610: </tr>
                   61611: <tr>
                   61612: <td><code title="">reg</code></td>
                   61613: <td><del class="diff-old">U+00AE</del> <ins class=
                   61614: "diff-chg">U+000AE</ins></td>
                   61615: </tr>
                   61616: <tr>
                   61617: <td><code title=""><ins class="diff-chg">rfisht;</ins></code></td>
                   61618: <td><ins class="diff-chg">U+0297D</ins></td>
                   61619: </tr>
                   61620: <tr>
                   61621: <td><code title="">rfloor;</code></td>
                   61622: <td><del class="diff-old">U+230B</del> <ins class=
                   61623: "diff-chg">U+0230B</ins></td>
                   61624: </tr>
                   61625: <tr>
                   61626: <td><code title=""><ins class="diff-chg">rfr;</ins></code></td>
                   61627: <td><ins class="diff-chg">U+1D52F</ins></td>
                   61628: </tr>
                   61629: <tr>
                   61630: <td><code title=""><ins class="diff-chg">rhard;</ins></code></td>
                   61631: <td><ins class="diff-chg">U+021C1</ins></td>
                   61632: </tr>
                   61633: <tr>
                   61634: <td><code title=""><ins class="diff-chg">rharu;</ins></code></td>
                   61635: <td><ins class="diff-chg">U+021C0</ins></td>
                   61636: </tr>
                   61637: <tr>
                   61638: <td><code title=""><ins class="diff-chg">rharul;</ins></code></td>
                   61639: <td><ins class="diff-chg">U+0296C</ins></td>
                   61640: </tr>
                   61641: <tr>
                   61642: <td><code title="">rho;</code></td>
                   61643: <td><del class="diff-old">U+03C1</del> <ins class=
                   61644: "diff-chg">U+003C1</ins></td>
                   61645: </tr>
                   61646: <tr>
                   61647: <td><code title=""><ins class="diff-chg">rhov;</ins></code></td>
                   61648: <td><ins class="diff-chg">U+003F1</ins></td>
                   61649: </tr>
                   61650: <tr>
                   61651: <td><code title=""><ins class=
                   61652: "diff-chg">rightarrow;</ins></code></td>
                   61653: <td><ins class="diff-chg">U+02192</ins></td>
                   61654: </tr>
                   61655: <tr>
                   61656: <td><code title=""><ins class=
                   61657: "diff-chg">rightarrowtail;</ins></code></td>
                   61658: <td><ins class="diff-chg">U+021A3</ins></td>
                   61659: </tr>
                   61660: <tr>
                   61661: <td><code title=""><ins class=
                   61662: "diff-chg">rightharpoondown;</ins></code></td>
                   61663: <td><ins class="diff-chg">U+021C1</ins></td>
                   61664: </tr>
                   61665: <tr>
                   61666: <td><code title=""><ins class=
                   61667: "diff-chg">rightharpoonup;</ins></code></td>
                   61668: <td><ins class="diff-chg">U+021C0</ins></td>
                   61669: </tr>
                   61670: <tr>
                   61671: <td><code title=""><ins class=
                   61672: "diff-chg">rightleftarrows;</ins></code></td>
                   61673: <td><ins class="diff-chg">U+021C4</ins></td>
                   61674: </tr>
                   61675: <tr>
                   61676: <td><code title=""><ins class=
                   61677: "diff-chg">rightleftharpoons;</ins></code></td>
                   61678: <td><ins class="diff-chg">U+021CC</ins></td>
                   61679: </tr>
                   61680: <tr>
                   61681: <td><code title=""><ins class=
                   61682: "diff-chg">rightrightarrows;</ins></code></td>
                   61683: <td><ins class="diff-chg">U+021C9</ins></td>
                   61684: </tr>
                   61685: <tr>
                   61686: <td><code title=""><ins class=
                   61687: "diff-chg">rightsquigarrow;</ins></code></td>
                   61688: <td><ins class="diff-chg">U+0219D</ins></td>
                   61689: </tr>
                   61690: <tr>
                   61691: <td><code title=""><ins class=
                   61692: "diff-chg">rightthreetimes;</ins></code></td>
                   61693: <td><ins class="diff-chg">U+022CC</ins></td>
                   61694: </tr>
                   61695: <tr>
                   61696: <td><code title=""><ins class="diff-chg">ring;</ins></code></td>
                   61697: <td><ins class="diff-chg">U+002DA</ins></td>
                   61698: </tr>
                   61699: <tr>
                   61700: <td><code title=""><ins class=
                   61701: "diff-chg">risingdotseq;</ins></code></td>
                   61702: <td><ins class="diff-chg">U+02253</ins></td>
                   61703: </tr>
                   61704: <tr>
                   61705: <td><code title=""><ins class="diff-chg">rlarr;</ins></code></td>
                   61706: <td><ins class="diff-chg">U+021C4</ins></td>
                   61707: </tr>
                   61708: <tr>
                   61709: <td><code title=""><ins class="diff-chg">rlhar;</ins></code></td>
                   61710: <td><ins class="diff-chg">U+021CC</ins></td>
                   61711: </tr>
                   61712: <tr>
                   61713: <td><code title="">rlm;</code></td>
1.2     ! mike     61714: <td><ins class="diff-new">U+0200F</ins></td>
1.1       mike     61715: </tr>
                   61716: <tr>
1.2     ! mike     61717: <td><code title=""><ins class="diff-new">rmoust;</ins></code></td>
        !          61718: <td><del class="diff-old">U+200F</del> <ins class=
        !          61719: "diff-chg">U+023B1</ins></td>
1.1       mike     61720: </tr>
                   61721: <tr>
                   61722: <td><code title=""><ins class=
                   61723: "diff-chg">rmoustache;</ins></code></td>
                   61724: <td><ins class="diff-chg">U+023B1</ins></td>
                   61725: </tr>
                   61726: <tr>
                   61727: <td><code title=""><ins class="diff-chg">rnmid;</ins></code></td>
                   61728: <td><ins class="diff-chg">U+02AEE</ins></td>
                   61729: </tr>
                   61730: <tr>
                   61731: <td><code title=""><ins class="diff-chg">roang;</ins></code></td>
                   61732: <td><ins class="diff-chg">U+027ED</ins></td>
                   61733: </tr>
                   61734: <tr>
                   61735: <td><code title=""><ins class="diff-chg">roarr;</ins></code></td>
                   61736: <td><ins class="diff-chg">U+021FE</ins></td>
                   61737: </tr>
                   61738: <tr>
                   61739: <td><code title=""><ins class="diff-chg">robrk;</ins></code></td>
                   61740: <td><ins class="diff-chg">U+027E7</ins></td>
                   61741: </tr>
                   61742: <tr>
                   61743: <td><code title=""><ins class="diff-chg">ropar;</ins></code></td>
                   61744: <td><ins class="diff-chg">U+02986</ins></td>
                   61745: </tr>
                   61746: <tr>
                   61747: <td><code title=""><ins class="diff-chg">ropf;</ins></code></td>
                   61748: <td><ins class="diff-chg">U+1D563</ins></td>
                   61749: </tr>
                   61750: <tr>
                   61751: <td><code title=""><ins class="diff-chg">roplus;</ins></code></td>
                   61752: <td><ins class="diff-chg">U+02A2E</ins></td>
                   61753: </tr>
                   61754: <tr>
                   61755: <td><code title=""><ins class="diff-chg">rotimes;</ins></code></td>
                   61756: <td><ins class="diff-chg">U+02A35</ins></td>
                   61757: </tr>
                   61758: <tr>
                   61759: <td><code title=""><ins class="diff-chg">rpar;</ins></code></td>
                   61760: <td><ins class="diff-chg">U+00029</ins></td>
                   61761: </tr>
                   61762: <tr>
                   61763: <td><code title=""><ins class="diff-chg">rpargt;</ins></code></td>
                   61764: <td><ins class="diff-chg">U+02994</ins></td>
                   61765: </tr>
                   61766: <tr>
                   61767: <td><code title=""><ins class=
                   61768: "diff-chg">rppolint;</ins></code></td>
                   61769: <td><ins class="diff-chg">U+02A12</ins></td>
                   61770: </tr>
                   61771: <tr>
                   61772: <td><code title=""><ins class="diff-chg">rrarr;</ins></code></td>
                   61773: <td><ins class="diff-chg">U+021C9</ins></td>
                   61774: </tr>
                   61775: <tr>
                   61776: <td><code title="">rsaquo;</code></td>
                   61777: <td><del class="diff-old">U+203A</del> <ins class=
                   61778: "diff-chg">U+0203A</ins></td>
                   61779: </tr>
                   61780: <tr>
                   61781: <td><code title=""><ins class="diff-chg">rscr;</ins></code></td>
                   61782: <td><ins class="diff-chg">U+1D4C7</ins></td>
                   61783: </tr>
                   61784: <tr>
                   61785: <td><code title=""><ins class="diff-chg">rsh;</ins></code></td>
                   61786: <td><ins class="diff-chg">U+021B1</ins></td>
                   61787: </tr>
                   61788: <tr>
                   61789: <td><code title=""><ins class="diff-chg">rsqb;</ins></code></td>
                   61790: <td><ins class="diff-chg">U+0005D</ins></td>
                   61791: </tr>
                   61792: <tr>
                   61793: <td><code title="">rsquo;</code></td>
                   61794: <td><del class="diff-old">U+2019</del> <ins class=
                   61795: "diff-chg">U+02019</ins></td>
                   61796: </tr>
                   61797: <tr>
                   61798: <td><code title=""><ins class="diff-chg">rsquor;</ins></code></td>
                   61799: <td><ins class="diff-chg">U+02019</ins></td>
                   61800: </tr>
                   61801: <tr>
                   61802: <td><code title=""><ins class="diff-chg">rthree;</ins></code></td>
                   61803: <td><ins class="diff-chg">U+022CC</ins></td>
                   61804: </tr>
                   61805: <tr>
                   61806: <td><code title=""><ins class="diff-chg">rtimes;</ins></code></td>
                   61807: <td><ins class="diff-chg">U+022CA</ins></td>
                   61808: </tr>
                   61809: <tr>
                   61810: <td><code title=""><ins class="diff-chg">rtri;</ins></code></td>
                   61811: <td><ins class="diff-chg">U+025B9</ins></td>
                   61812: </tr>
                   61813: <tr>
                   61814: <td><code title=""><ins class="diff-chg">rtrie;</ins></code></td>
                   61815: <td><ins class="diff-chg">U+022B5</ins></td>
                   61816: </tr>
                   61817: <tr>
                   61818: <td><code title=""><ins class="diff-chg">rtrif;</ins></code></td>
                   61819: <td><ins class="diff-chg">U+025B8</ins></td>
                   61820: </tr>
                   61821: <tr>
                   61822: <td><code title=""><ins class=
                   61823: "diff-chg">rtriltri;</ins></code></td>
                   61824: <td><ins class="diff-chg">U+029CE</ins></td>
                   61825: </tr>
                   61826: <tr>
                   61827: <td><code title=""><ins class="diff-chg">ruluhar;</ins></code></td>
                   61828: <td><ins class="diff-chg">U+02968</ins></td>
                   61829: </tr>
                   61830: <tr>
                   61831: <td><code title=""><ins class="diff-chg">rx;</ins></code></td>
                   61832: <td><ins class="diff-chg">U+0211E</ins></td>
                   61833: </tr>
                   61834: <tr>
                   61835: <td><code title=""><ins class="diff-chg">sacute;</ins></code></td>
                   61836: <td><ins class="diff-chg">U+0015B</ins></td>
                   61837: </tr>
                   61838: <tr>
                   61839: <td><code title="">sbquo;</code></td>
                   61840: <td><del class="diff-old">U+201A</del> <ins class=
                   61841: "diff-chg">U+0201A</ins></td>
                   61842: </tr>
                   61843: <tr>
                   61844: <td><code title=""><ins class="diff-chg">sc;</ins></code></td>
                   61845: <td><ins class="diff-chg">U+0227B</ins></td>
                   61846: </tr>
                   61847: <tr>
                   61848: <td><code title=""><ins class="diff-chg">scE;</ins></code></td>
                   61849: <td><ins class="diff-chg">U+02AB4</ins></td>
                   61850: </tr>
                   61851: <tr>
                   61852: <td><code title=""><ins class="diff-chg">scap;</ins></code></td>
                   61853: <td><ins class="diff-chg">U+02AB8</ins></td>
                   61854: </tr>
                   61855: <tr>
                   61856: <td><code title="">scaron;</code></td>
                   61857: <td><del class="diff-old">U+0161</del> <ins class=
                   61858: "diff-chg">U+00161</ins></td>
                   61859: </tr>
                   61860: <tr>
                   61861: <td><code title=""><ins class="diff-chg">sccue;</ins></code></td>
                   61862: <td><ins class="diff-chg">U+0227D</ins></td>
                   61863: </tr>
                   61864: <tr>
                   61865: <td><code title=""><ins class="diff-chg">sce;</ins></code></td>
                   61866: <td><ins class="diff-chg">U+02AB0</ins></td>
                   61867: </tr>
                   61868: <tr>
                   61869: <td><code title=""><ins class="diff-chg">scedil;</ins></code></td>
                   61870: <td><ins class="diff-chg">U+0015F</ins></td>
                   61871: </tr>
                   61872: <tr>
                   61873: <td><code title=""><ins class="diff-chg">scirc;</ins></code></td>
                   61874: <td><ins class="diff-chg">U+0015D</ins></td>
                   61875: </tr>
                   61876: <tr>
                   61877: <td><code title=""><ins class="diff-chg">scnE;</ins></code></td>
                   61878: <td><ins class="diff-chg">U+02AB6</ins></td>
                   61879: </tr>
                   61880: <tr>
                   61881: <td><code title=""><ins class="diff-chg">scnap;</ins></code></td>
                   61882: <td><ins class="diff-chg">U+02ABA</ins></td>
                   61883: </tr>
                   61884: <tr>
                   61885: <td><code title=""><ins class="diff-chg">scnsim;</ins></code></td>
                   61886: <td><ins class="diff-chg">U+022E9</ins></td>
                   61887: </tr>
                   61888: <tr>
                   61889: <td><code title=""><ins class=
                   61890: "diff-chg">scpolint;</ins></code></td>
                   61891: <td><ins class="diff-chg">U+02A13</ins></td>
                   61892: </tr>
                   61893: <tr>
                   61894: <td><code title=""><ins class="diff-chg">scsim;</ins></code></td>
                   61895: <td><ins class="diff-chg">U+0227F</ins></td>
                   61896: </tr>
                   61897: <tr>
                   61898: <td><code title=""><ins class="diff-chg">scy;</ins></code></td>
                   61899: <td><ins class="diff-chg">U+00441</ins></td>
                   61900: </tr>
                   61901: <tr>
                   61902: <td><code title="">sdot;</code></td>
                   61903: <td><del class="diff-old">U+22C5</del> <ins class=
                   61904: "diff-chg">U+022C5</ins></td>
                   61905: </tr>
                   61906: <tr>
                   61907: <td><code title=""><ins class="diff-chg">sdotb;</ins></code></td>
                   61908: <td><ins class="diff-chg">U+022A1</ins></td>
                   61909: </tr>
                   61910: <tr>
                   61911: <td><code title=""><ins class="diff-chg">sdote;</ins></code></td>
                   61912: <td><ins class="diff-chg">U+02A66</ins></td>
                   61913: </tr>
                   61914: <tr>
                   61915: <td><code title=""><ins class="diff-chg">seArr;</ins></code></td>
                   61916: <td><ins class="diff-chg">U+021D8</ins></td>
                   61917: </tr>
                   61918: <tr>
                   61919: <td><code title=""><ins class="diff-chg">searhk;</ins></code></td>
                   61920: <td><ins class="diff-chg">U+02925</ins></td>
                   61921: </tr>
                   61922: <tr>
                   61923: <td><code title=""><ins class="diff-chg">searr;</ins></code></td>
                   61924: <td><ins class="diff-chg">U+02198</ins></td>
                   61925: </tr>
                   61926: <tr>
                   61927: <td><code title=""><ins class="diff-chg">searrow;</ins></code></td>
                   61928: <td><ins class="diff-chg">U+02198</ins></td>
                   61929: </tr>
                   61930: <tr>
                   61931: <td><code title="">sect;</code></td>
                   61932: <td><del class="diff-old">U+00A7</del> <ins class=
                   61933: "diff-chg">U+000A7</ins></td>
                   61934: </tr>
                   61935: <tr>
                   61936: <td><code title="">sect</code></td>
                   61937: <td><del class="diff-old">U+00A7</del> <ins class=
                   61938: "diff-chg">U+000A7</ins></td>
                   61939: </tr>
                   61940: <tr>
                   61941: <td><code title=""><ins class="diff-chg">semi;</ins></code></td>
                   61942: <td><ins class="diff-chg">U+0003B</ins></td>
                   61943: </tr>
                   61944: <tr>
                   61945: <td><code title=""><ins class="diff-chg">seswar;</ins></code></td>
                   61946: <td><ins class="diff-chg">U+02929</ins></td>
                   61947: </tr>
                   61948: <tr>
                   61949: <td><code title=""><ins class=
                   61950: "diff-chg">setminus;</ins></code></td>
                   61951: <td><ins class="diff-chg">U+02216</ins></td>
                   61952: </tr>
                   61953: <tr>
                   61954: <td><code title=""><ins class="diff-chg">setmn;</ins></code></td>
                   61955: <td><ins class="diff-chg">U+02216</ins></td>
                   61956: </tr>
                   61957: <tr>
                   61958: <td><code title=""><ins class="diff-chg">sext;</ins></code></td>
                   61959: <td><ins class="diff-chg">U+02736</ins></td>
                   61960: </tr>
                   61961: <tr>
                   61962: <td><code title=""><ins class="diff-chg">sfr;</ins></code></td>
                   61963: <td><ins class="diff-chg">U+1D530</ins></td>
                   61964: </tr>
                   61965: <tr>
                   61966: <td><code title=""><ins class="diff-chg">sfrown;</ins></code></td>
                   61967: <td><ins class="diff-chg">U+02322</ins></td>
                   61968: </tr>
                   61969: <tr>
                   61970: <td><code title=""><ins class="diff-chg">sharp;</ins></code></td>
                   61971: <td><ins class="diff-chg">U+0266F</ins></td>
                   61972: </tr>
                   61973: <tr>
                   61974: <td><code title=""><ins class="diff-chg">shchcy;</ins></code></td>
                   61975: <td><ins class="diff-chg">U+00449</ins></td>
                   61976: </tr>
                   61977: <tr>
                   61978: <td><code title=""><ins class="diff-chg">shcy;</ins></code></td>
                   61979: <td><ins class="diff-chg">U+00448</ins></td>
                   61980: </tr>
                   61981: <tr>
                   61982: <td><code title=""><ins class=
                   61983: "diff-chg">shortmid;</ins></code></td>
                   61984: <td><ins class="diff-chg">U+02223</ins></td>
                   61985: </tr>
                   61986: <tr>
                   61987: <td><code title=""><ins class=
                   61988: "diff-chg">shortparallel;</ins></code></td>
                   61989: <td><ins class="diff-chg">U+02225</ins></td>
                   61990: </tr>
                   61991: <tr>
                   61992: <td><code title="">shy;</code></td>
                   61993: <td><del class="diff-old">U+00AD</del> <ins class=
                   61994: "diff-chg">U+000AD</ins></td>
                   61995: </tr>
                   61996: <tr>
                   61997: <td><code title="">shy</code></td>
                   61998: <td><del class="diff-old">U+00AD</del> <ins class=
                   61999: "diff-chg">U+000AD</ins></td>
                   62000: </tr>
                   62001: <tr>
                   62002: <td><code title="">sigma;</code></td>
                   62003: <td><del class="diff-old">U+03C3</del> <ins class=
                   62004: "diff-chg">U+003C3</ins></td>
                   62005: </tr>
                   62006: <tr>
                   62007: <td><code title="">sigmaf;</code></td>
                   62008: <td><del class="diff-old">U+03C2</del> <ins class=
                   62009: "diff-chg">U+003C2</ins></td>
                   62010: </tr>
                   62011: <tr>
                   62012: <td><code title=""><ins class="diff-chg">sigmav;</ins></code></td>
                   62013: <td><ins class="diff-chg">U+003C2</ins></td>
                   62014: </tr>
                   62015: <tr>
                   62016: <td><code title="">sim;</code></td>
                   62017: <td><del class="diff-old">U+223C</del> <ins class=
                   62018: "diff-chg">U+0223C</ins></td>
                   62019: </tr>
                   62020: <tr>
                   62021: <td><code title=""><ins class="diff-chg">simdot;</ins></code></td>
                   62022: <td><ins class="diff-chg">U+02A6A</ins></td>
                   62023: </tr>
                   62024: <tr>
                   62025: <td><code title=""><ins class="diff-chg">sime;</ins></code></td>
                   62026: <td><ins class="diff-chg">U+02243</ins></td>
                   62027: </tr>
                   62028: <tr>
                   62029: <td><code title=""><ins class="diff-chg">simeq;</ins></code></td>
                   62030: <td><ins class="diff-chg">U+02243</ins></td>
                   62031: </tr>
                   62032: <tr>
                   62033: <td><code title=""><ins class="diff-chg">simg;</ins></code></td>
                   62034: <td><ins class="diff-chg">U+02A9E</ins></td>
                   62035: </tr>
                   62036: <tr>
                   62037: <td><code title=""><ins class="diff-chg">simgE;</ins></code></td>
                   62038: <td><ins class="diff-chg">U+02AA0</ins></td>
                   62039: </tr>
                   62040: <tr>
                   62041: <td><code title=""><ins class="diff-chg">siml;</ins></code></td>
                   62042: <td><ins class="diff-chg">U+02A9D</ins></td>
                   62043: </tr>
                   62044: <tr>
                   62045: <td><code title=""><ins class="diff-chg">simlE;</ins></code></td>
                   62046: <td><ins class="diff-chg">U+02A9F</ins></td>
                   62047: </tr>
                   62048: <tr>
                   62049: <td><code title=""><ins class="diff-chg">simne;</ins></code></td>
                   62050: <td><ins class="diff-chg">U+02246</ins></td>
                   62051: </tr>
                   62052: <tr>
                   62053: <td><code title=""><ins class="diff-chg">simplus;</ins></code></td>
                   62054: <td><ins class="diff-chg">U+02A24</ins></td>
                   62055: </tr>
                   62056: <tr>
                   62057: <td><code title=""><ins class="diff-chg">simrarr;</ins></code></td>
                   62058: <td><ins class="diff-chg">U+02972</ins></td>
                   62059: </tr>
                   62060: <tr>
                   62061: <td><code title=""><ins class="diff-chg">slarr;</ins></code></td>
                   62062: <td><ins class="diff-chg">U+02190</ins></td>
                   62063: </tr>
                   62064: <tr>
                   62065: <td><code title=""><ins class=
                   62066: "diff-chg">smallsetminus;</ins></code></td>
                   62067: <td><ins class="diff-chg">U+02216</ins></td>
                   62068: </tr>
                   62069: <tr>
                   62070: <td><code title=""><ins class="diff-chg">smashp;</ins></code></td>
                   62071: <td><ins class="diff-chg">U+02A33</ins></td>
                   62072: </tr>
                   62073: <tr>
                   62074: <td><code title=""><ins class=
                   62075: "diff-chg">smeparsl;</ins></code></td>
                   62076: <td><ins class="diff-chg">U+029E4</ins></td>
                   62077: </tr>
                   62078: <tr>
                   62079: <td><code title=""><ins class="diff-chg">smid;</ins></code></td>
                   62080: <td><ins class="diff-chg">U+02223</ins></td>
                   62081: </tr>
                   62082: <tr>
                   62083: <td><code title=""><ins class="diff-chg">smile;</ins></code></td>
                   62084: <td><ins class="diff-chg">U+02323</ins></td>
                   62085: </tr>
                   62086: <tr>
                   62087: <td><code title=""><ins class="diff-chg">smt;</ins></code></td>
                   62088: <td><ins class="diff-chg">U+02AAA</ins></td>
                   62089: </tr>
                   62090: <tr>
                   62091: <td><code title=""><ins class="diff-chg">smte;</ins></code></td>
                   62092: <td><ins class="diff-chg">U+02AAC</ins></td>
                   62093: </tr>
                   62094: <tr>
                   62095: <td><code title=""><ins class="diff-chg">softcy;</ins></code></td>
                   62096: <td><ins class="diff-chg">U+0044C</ins></td>
                   62097: </tr>
                   62098: <tr>
                   62099: <td><code title=""><ins class="diff-chg">sol;</ins></code></td>
                   62100: <td><ins class="diff-chg">U+0002F</ins></td>
                   62101: </tr>
                   62102: <tr>
                   62103: <td><code title=""><ins class="diff-chg">solb;</ins></code></td>
                   62104: <td><ins class="diff-chg">U+029C4</ins></td>
                   62105: </tr>
                   62106: <tr>
                   62107: <td><code title=""><ins class="diff-chg">solbar;</ins></code></td>
                   62108: <td><ins class="diff-chg">U+0233F</ins></td>
                   62109: </tr>
                   62110: <tr>
                   62111: <td><code title=""><ins class="diff-chg">sopf;</ins></code></td>
                   62112: <td><ins class="diff-chg">U+1D564</ins></td>
                   62113: </tr>
                   62114: <tr>
                   62115: <td><code title="">spades;</code></td>
                   62116: <td><del class="diff-old">U+2660</del> <ins class=
                   62117: "diff-chg">U+02660</ins></td>
                   62118: </tr>
                   62119: <tr>
                   62120: <td><code title=""><ins class=
                   62121: "diff-chg">spadesuit;</ins></code></td>
                   62122: <td><ins class="diff-chg">U+02660</ins></td>
                   62123: </tr>
                   62124: <tr>
                   62125: <td><code title=""><ins class="diff-chg">spar;</ins></code></td>
                   62126: <td><ins class="diff-chg">U+02225</ins></td>
                   62127: </tr>
                   62128: <tr>
                   62129: <td><code title=""><ins class="diff-chg">sqcap;</ins></code></td>
                   62130: <td><ins class="diff-chg">U+02293</ins></td>
                   62131: </tr>
                   62132: <tr>
                   62133: <td><code title=""><ins class="diff-chg">sqcup;</ins></code></td>
                   62134: <td><ins class="diff-chg">U+02294</ins></td>
                   62135: </tr>
                   62136: <tr>
                   62137: <td><code title=""><ins class="diff-chg">sqsub;</ins></code></td>
                   62138: <td><ins class="diff-chg">U+0228F</ins></td>
                   62139: </tr>
                   62140: <tr>
                   62141: <td><code title=""><ins class="diff-chg">sqsube;</ins></code></td>
                   62142: <td><ins class="diff-chg">U+02291</ins></td>
                   62143: </tr>
                   62144: <tr>
                   62145: <td><code title=""><ins class=
                   62146: "diff-chg">sqsubset;</ins></code></td>
                   62147: <td><ins class="diff-chg">U+0228F</ins></td>
                   62148: </tr>
                   62149: <tr>
                   62150: <td><code title=""><ins class=
                   62151: "diff-chg">sqsubseteq;</ins></code></td>
                   62152: <td><ins class="diff-chg">U+02291</ins></td>
                   62153: </tr>
                   62154: <tr>
                   62155: <td><code title=""><ins class="diff-chg">sqsup;</ins></code></td>
                   62156: <td><ins class="diff-chg">U+02290</ins></td>
                   62157: </tr>
                   62158: <tr>
                   62159: <td><code title=""><ins class="diff-chg">sqsupe;</ins></code></td>
                   62160: <td><ins class="diff-chg">U+02292</ins></td>
                   62161: </tr>
                   62162: <tr>
                   62163: <td><code title=""><ins class=
                   62164: "diff-chg">sqsupset;</ins></code></td>
                   62165: <td><ins class="diff-chg">U+02290</ins></td>
                   62166: </tr>
                   62167: <tr>
                   62168: <td><code title=""><ins class=
                   62169: "diff-chg">sqsupseteq;</ins></code></td>
                   62170: <td><ins class="diff-chg">U+02292</ins></td>
                   62171: </tr>
                   62172: <tr>
                   62173: <td><code title=""><ins class="diff-chg">squ;</ins></code></td>
                   62174: <td><ins class="diff-chg">U+025A1</ins></td>
                   62175: </tr>
                   62176: <tr>
                   62177: <td><code title=""><ins class="diff-chg">square;</ins></code></td>
                   62178: <td><ins class="diff-chg">U+025A1</ins></td>
                   62179: </tr>
                   62180: <tr>
                   62181: <td><code title=""><ins class="diff-chg">squarf;</ins></code></td>
                   62182: <td><ins class="diff-chg">U+025AA</ins></td>
                   62183: </tr>
                   62184: <tr>
                   62185: <td><code title=""><ins class="diff-chg">squf;</ins></code></td>
                   62186: <td><ins class="diff-chg">U+025AA</ins></td>
                   62187: </tr>
                   62188: <tr>
                   62189: <td><code title=""><ins class="diff-chg">srarr;</ins></code></td>
                   62190: <td><ins class="diff-chg">U+02192</ins></td>
                   62191: </tr>
                   62192: <tr>
                   62193: <td><code title=""><ins class="diff-chg">sscr;</ins></code></td>
                   62194: <td><ins class="diff-chg">U+1D4C8</ins></td>
                   62195: </tr>
                   62196: <tr>
                   62197: <td><code title=""><ins class="diff-chg">ssetmn;</ins></code></td>
                   62198: <td><ins class="diff-chg">U+02216</ins></td>
                   62199: </tr>
                   62200: <tr>
                   62201: <td><code title=""><ins class="diff-chg">ssmile;</ins></code></td>
                   62202: <td><ins class="diff-chg">U+02323</ins></td>
                   62203: </tr>
                   62204: <tr>
                   62205: <td><code title=""><ins class="diff-chg">sstarf;</ins></code></td>
                   62206: <td><ins class="diff-chg">U+022C6</ins></td>
                   62207: </tr>
                   62208: <tr>
                   62209: <td><code title=""><ins class="diff-chg">star;</ins></code></td>
                   62210: <td><ins class="diff-chg">U+02606</ins></td>
                   62211: </tr>
                   62212: <tr>
                   62213: <td><code title=""><ins class="diff-chg">starf;</ins></code></td>
                   62214: <td><ins class="diff-chg">U+02605</ins></td>
                   62215: </tr>
                   62216: <tr>
                   62217: <td><code title=""><ins class=
                   62218: "diff-chg">straightepsilon;</ins></code></td>
                   62219: <td><ins class="diff-chg">U+003F5</ins></td>
                   62220: </tr>
                   62221: <tr>
                   62222: <td><code title=""><ins class=
                   62223: "diff-chg">straightphi;</ins></code></td>
                   62224: <td><ins class="diff-chg">U+003D5</ins></td>
                   62225: </tr>
                   62226: <tr>
                   62227: <td><code title=""><ins class="diff-chg">strns;</ins></code></td>
                   62228: <td><ins class="diff-chg">U+000AF</ins></td>
                   62229: </tr>
                   62230: <tr>
                   62231: <td><code title="">sub;</code></td>
                   62232: <td><del class="diff-old">U+2282</del> <ins class=
                   62233: "diff-chg">U+02282</ins></td>
                   62234: </tr>
                   62235: <tr>
                   62236: <td><code title=""><ins class="diff-chg">subE;</ins></code></td>
                   62237: <td><ins class="diff-chg">U+02AC5</ins></td>
                   62238: </tr>
                   62239: <tr>
                   62240: <td><code title=""><ins class="diff-chg">subdot;</ins></code></td>
                   62241: <td><ins class="diff-chg">U+02ABD</ins></td>
                   62242: </tr>
                   62243: <tr>
                   62244: <td><code title="">sube;</code></td>
                   62245: <td><del class="diff-old">U+2286</del> <ins class=
                   62246: "diff-chg">U+02286</ins></td>
                   62247: </tr>
                   62248: <tr>
                   62249: <td><code title=""><ins class="diff-chg">subedot;</ins></code></td>
                   62250: <td><ins class="diff-chg">U+02AC3</ins></td>
                   62251: </tr>
                   62252: <tr>
                   62253: <td><code title=""><ins class="diff-chg">submult;</ins></code></td>
                   62254: <td><ins class="diff-chg">U+02AC1</ins></td>
                   62255: </tr>
                   62256: <tr>
                   62257: <td><code title=""><ins class="diff-chg">subnE;</ins></code></td>
                   62258: <td><ins class="diff-chg">U+02ACB</ins></td>
                   62259: </tr>
                   62260: <tr>
                   62261: <td><code title=""><ins class="diff-chg">subne;</ins></code></td>
                   62262: <td><ins class="diff-chg">U+0228A</ins></td>
                   62263: </tr>
                   62264: <tr>
                   62265: <td><code title=""><ins class="diff-chg">subplus;</ins></code></td>
                   62266: <td><ins class="diff-chg">U+02ABF</ins></td>
                   62267: </tr>
                   62268: <tr>
                   62269: <td><code title=""><ins class="diff-chg">subrarr;</ins></code></td>
                   62270: <td><ins class="diff-chg">U+02979</ins></td>
                   62271: </tr>
                   62272: <tr>
                   62273: <td><code title=""><ins class="diff-chg">subset;</ins></code></td>
                   62274: <td><ins class="diff-chg">U+02282</ins></td>
                   62275: </tr>
                   62276: <tr>
                   62277: <td><code title=""><ins class=
                   62278: "diff-chg">subseteq;</ins></code></td>
                   62279: <td><ins class="diff-chg">U+02286</ins></td>
                   62280: </tr>
                   62281: <tr>
                   62282: <td><code title=""><ins class=
                   62283: "diff-chg">subseteqq;</ins></code></td>
                   62284: <td><ins class="diff-chg">U+02AC5</ins></td>
                   62285: </tr>
                   62286: <tr>
                   62287: <td><code title=""><ins class=
                   62288: "diff-chg">subsetneq;</ins></code></td>
                   62289: <td><ins class="diff-chg">U+0228A</ins></td>
                   62290: </tr>
                   62291: <tr>
                   62292: <td><code title=""><ins class=
                   62293: "diff-chg">subsetneqq;</ins></code></td>
                   62294: <td><ins class="diff-chg">U+02ACB</ins></td>
                   62295: </tr>
                   62296: <tr>
                   62297: <td><code title=""><ins class="diff-chg">subsim;</ins></code></td>
                   62298: <td><ins class="diff-chg">U+02AC7</ins></td>
                   62299: </tr>
                   62300: <tr>
                   62301: <td><code title=""><ins class="diff-chg">subsub;</ins></code></td>
                   62302: <td><ins class="diff-chg">U+02AD5</ins></td>
                   62303: </tr>
                   62304: <tr>
                   62305: <td><code title=""><ins class="diff-chg">subsup;</ins></code></td>
                   62306: <td><ins class="diff-chg">U+02AD3</ins></td>
                   62307: </tr>
                   62308: <tr>
                   62309: <td><code title=""><ins class="diff-chg">succ;</ins></code></td>
                   62310: <td><ins class="diff-chg">U+0227B</ins></td>
                   62311: </tr>
                   62312: <tr>
                   62313: <td><code title=""><ins class=
                   62314: "diff-chg">succapprox;</ins></code></td>
                   62315: <td><ins class="diff-chg">U+02AB8</ins></td>
                   62316: </tr>
                   62317: <tr>
                   62318: <td><code title=""><ins class=
                   62319: "diff-chg">succcurlyeq;</ins></code></td>
                   62320: <td><ins class="diff-chg">U+0227D</ins></td>
                   62321: </tr>
                   62322: <tr>
                   62323: <td><code title=""><ins class="diff-chg">succeq;</ins></code></td>
                   62324: <td><ins class="diff-chg">U+02AB0</ins></td>
                   62325: </tr>
                   62326: <tr>
                   62327: <td><code title=""><ins class=
                   62328: "diff-chg">succnapprox;</ins></code></td>
                   62329: <td><ins class="diff-chg">U+02ABA</ins></td>
                   62330: </tr>
                   62331: <tr>
                   62332: <td><code title=""><ins class=
                   62333: "diff-chg">succneqq;</ins></code></td>
                   62334: <td><ins class="diff-chg">U+02AB6</ins></td>
                   62335: </tr>
                   62336: <tr>
                   62337: <td><code title=""><ins class=
                   62338: "diff-chg">succnsim;</ins></code></td>
                   62339: <td><ins class="diff-chg">U+022E9</ins></td>
                   62340: </tr>
                   62341: <tr>
                   62342: <td><code title=""><ins class="diff-chg">succsim;</ins></code></td>
                   62343: <td><ins class="diff-chg">U+0227F</ins></td>
                   62344: </tr>
                   62345: <tr>
                   62346: <td><code title="">sum;</code></td>
                   62347: <td><del class="diff-old">U+2211</del> <ins class=
                   62348: "diff-chg">U+02211</ins></td>
                   62349: </tr>
                   62350: <tr>
                   62351: <td><code title=""><ins class="diff-chg">sung;</ins></code></td>
                   62352: <td><ins class="diff-chg">U+0266A</ins></td>
                   62353: </tr>
                   62354: <tr>
                   62355: <td><code title="">sup1;</code></td>
                   62356: <td><del class="diff-old">U+00B9</del> <ins class=
                   62357: "diff-chg">U+000B9</ins></td>
                   62358: </tr>
                   62359: <tr>
                   62360: <td><code title="">sup1</code></td>
                   62361: <td><del class="diff-old">U+00B9</del> <ins class=
                   62362: "diff-chg">U+000B9</ins></td>
                   62363: </tr>
                   62364: <tr>
                   62365: <td><code title="">sup2;</code></td>
                   62366: <td><del class="diff-old">U+00B2</del> <ins class=
                   62367: "diff-chg">U+000B2</ins></td>
                   62368: </tr>
                   62369: <tr>
                   62370: <td><code title="">sup2</code></td>
                   62371: <td><del class="diff-old">U+00B2</del> <ins class=
                   62372: "diff-chg">U+000B2</ins></td>
                   62373: </tr>
                   62374: <tr>
                   62375: <td><code title="">sup3;</code></td>
                   62376: <td><del class="diff-old">U+00B3</del> <ins class=
                   62377: "diff-chg">U+000B3</ins></td>
                   62378: </tr>
                   62379: <tr>
                   62380: <td><code title="">sup3</code></td>
                   62381: <td><del class="diff-old">U+00B3</del> <ins class=
                   62382: "diff-chg">U+000B3</ins></td>
                   62383: </tr>
                   62384: <tr>
                   62385: <td><code title="">sup;</code></td>
                   62386: <td><del class="diff-old">U+2283</del> <ins class=
                   62387: "diff-chg">U+02283</ins></td>
                   62388: </tr>
                   62389: <tr>
                   62390: <td><code title=""><ins class="diff-chg">supE;</ins></code></td>
                   62391: <td><ins class="diff-chg">U+02AC6</ins></td>
                   62392: </tr>
                   62393: <tr>
                   62394: <td><code title=""><ins class="diff-chg">supdot;</ins></code></td>
                   62395: <td><ins class="diff-chg">U+02ABE</ins></td>
                   62396: </tr>
                   62397: <tr>
                   62398: <td><code title=""><ins class="diff-chg">supdsub;</ins></code></td>
                   62399: <td><ins class="diff-chg">U+02AD8</ins></td>
                   62400: </tr>
                   62401: <tr>
                   62402: <td><code title="">supe;</code></td>
                   62403: <td><del class="diff-old">U+2287</del> <ins class=
                   62404: "diff-chg">U+02287</ins></td>
                   62405: </tr>
                   62406: <tr>
                   62407: <td><code title=""><ins class="diff-chg">supedot;</ins></code></td>
                   62408: <td><ins class="diff-chg">U+02AC4</ins></td>
                   62409: </tr>
                   62410: <tr>
                   62411: <td><code title=""><ins class="diff-chg">suphsub;</ins></code></td>
                   62412: <td><ins class="diff-chg">U+02AD7</ins></td>
                   62413: </tr>
                   62414: <tr>
                   62415: <td><code title=""><ins class="diff-chg">suplarr;</ins></code></td>
                   62416: <td><ins class="diff-chg">U+0297B</ins></td>
                   62417: </tr>
                   62418: <tr>
                   62419: <td><code title=""><ins class="diff-chg">supmult;</ins></code></td>
                   62420: <td><ins class="diff-chg">U+02AC2</ins></td>
                   62421: </tr>
                   62422: <tr>
                   62423: <td><code title=""><ins class="diff-chg">supnE;</ins></code></td>
                   62424: <td><ins class="diff-chg">U+02ACC</ins></td>
                   62425: </tr>
                   62426: <tr>
                   62427: <td><code title=""><ins class="diff-chg">supne;</ins></code></td>
                   62428: <td><ins class="diff-chg">U+0228B</ins></td>
                   62429: </tr>
                   62430: <tr>
                   62431: <td><code title=""><ins class="diff-chg">supplus;</ins></code></td>
                   62432: <td><ins class="diff-chg">U+02AC0</ins></td>
                   62433: </tr>
                   62434: <tr>
                   62435: <td><code title=""><ins class="diff-chg">supset;</ins></code></td>
                   62436: <td><ins class="diff-chg">U+02283</ins></td>
                   62437: </tr>
                   62438: <tr>
                   62439: <td><code title=""><ins class=
                   62440: "diff-chg">supseteq;</ins></code></td>
                   62441: <td><ins class="diff-chg">U+02287</ins></td>
                   62442: </tr>
                   62443: <tr>
                   62444: <td><code title=""><ins class=
                   62445: "diff-chg">supseteqq;</ins></code></td>
                   62446: <td><ins class="diff-chg">U+02AC6</ins></td>
                   62447: </tr>
                   62448: <tr>
                   62449: <td><code title=""><ins class=
                   62450: "diff-chg">supsetneq;</ins></code></td>
                   62451: <td><ins class="diff-chg">U+0228B</ins></td>
                   62452: </tr>
                   62453: <tr>
                   62454: <td><code title=""><ins class=
                   62455: "diff-chg">supsetneqq;</ins></code></td>
                   62456: <td><ins class="diff-chg">U+02ACC</ins></td>
                   62457: </tr>
                   62458: <tr>
                   62459: <td><code title=""><ins class="diff-chg">supsim;</ins></code></td>
                   62460: <td><ins class="diff-chg">U+02AC8</ins></td>
                   62461: </tr>
                   62462: <tr>
                   62463: <td><code title=""><ins class="diff-chg">supsub;</ins></code></td>
                   62464: <td><ins class="diff-chg">U+02AD4</ins></td>
                   62465: </tr>
                   62466: <tr>
                   62467: <td><code title=""><ins class="diff-chg">supsup;</ins></code></td>
                   62468: <td><ins class="diff-chg">U+02AD6</ins></td>
                   62469: </tr>
                   62470: <tr>
                   62471: <td><code title=""><ins class="diff-chg">swArr;</ins></code></td>
                   62472: <td><ins class="diff-chg">U+021D9</ins></td>
                   62473: </tr>
                   62474: <tr>
                   62475: <td><code title=""><ins class="diff-chg">swarhk;</ins></code></td>
                   62476: <td><ins class="diff-chg">U+02926</ins></td>
                   62477: </tr>
                   62478: <tr>
                   62479: <td><code title=""><ins class="diff-chg">swarr;</ins></code></td>
                   62480: <td><ins class="diff-chg">U+02199</ins></td>
                   62481: </tr>
                   62482: <tr>
                   62483: <td><code title=""><ins class="diff-chg">swarrow;</ins></code></td>
                   62484: <td><ins class="diff-chg">U+02199</ins></td>
                   62485: </tr>
                   62486: <tr>
                   62487: <td><code title=""><ins class="diff-chg">swnwar;</ins></code></td>
                   62488: <td><ins class="diff-chg">U+0292A</ins></td>
                   62489: </tr>
                   62490: <tr>
                   62491: <td><code title="">szlig;</code></td>
                   62492: <td><del class="diff-old">U+00DF</del> <ins class=
                   62493: "diff-chg">U+000DF</ins></td>
                   62494: </tr>
                   62495: <tr>
                   62496: <td><code title="">szlig</code></td>
1.2     ! mike     62497: <td><del class="diff-old">U+00DF</del> <ins class=
        !          62498: "diff-chg">U+000DF</ins></td>
1.1       mike     62499: </tr>
                   62500: <tr>
1.2     ! mike     62501: <td><code title=""><ins class="diff-chg">target;</ins></code></td>
        !          62502: <td><ins class="diff-chg">U+02316</ins></td>
1.1       mike     62503: </tr>
                   62504: <tr>
                   62505: <td><code title="">tau;</code></td>
                   62506: <td><del class="diff-old">U+03C4</del> <ins class=
                   62507: "diff-chg">U+003C4</ins></td>
                   62508: </tr>
                   62509: <tr>
                   62510: <td><code title=""><ins class="diff-chg">tbrk;</ins></code></td>
                   62511: <td><ins class="diff-chg">U+023B4</ins></td>
                   62512: </tr>
                   62513: <tr>
                   62514: <td><code title=""><ins class="diff-chg">tcaron;</ins></code></td>
                   62515: <td><ins class="diff-chg">U+00165</ins></td>
                   62516: </tr>
                   62517: <tr>
                   62518: <td><code title=""><ins class="diff-chg">tcedil;</ins></code></td>
                   62519: <td><ins class="diff-chg">U+00163</ins></td>
                   62520: </tr>
                   62521: <tr>
                   62522: <td><code title=""><ins class="diff-chg">tcy;</ins></code></td>
                   62523: <td><ins class="diff-chg">U+00442</ins></td>
                   62524: </tr>
                   62525: <tr>
                   62526: <td><code title=""><ins class="diff-chg">tdot;</ins></code></td>
                   62527: <td><ins class="diff-chg">U+020DB</ins></td>
                   62528: </tr>
                   62529: <tr>
                   62530: <td><code title=""><ins class="diff-chg">telrec;</ins></code></td>
                   62531: <td><ins class="diff-chg">U+02315</ins></td>
                   62532: </tr>
                   62533: <tr>
                   62534: <td><code title=""><ins class="diff-chg">tfr;</ins></code></td>
                   62535: <td><ins class="diff-chg">U+1D531</ins></td>
                   62536: </tr>
                   62537: <tr>
                   62538: <td><code title="">there4;</code></td>
                   62539: <td><del class="diff-old">U+2234</del> <ins class=
                   62540: "diff-chg">U+02234</ins></td>
                   62541: </tr>
                   62542: <tr>
                   62543: <td><code title=""><ins class=
                   62544: "diff-chg">therefore;</ins></code></td>
                   62545: <td><ins class="diff-chg">U+02234</ins></td>
                   62546: </tr>
                   62547: <tr>
                   62548: <td><code title="">theta;</code></td>
                   62549: <td><del class="diff-old">U+03B8</del> <ins class=
                   62550: "diff-chg">U+003B8</ins></td>
                   62551: </tr>
                   62552: <tr>
                   62553: <td><code title="">thetasym;</code></td>
                   62554: <td><del class="diff-old">U+03D1</del> <ins class=
                   62555: "diff-chg">U+003D1</ins></td>
                   62556: </tr>
                   62557: <tr>
                   62558: <td><code title=""><ins class="diff-chg">thetav;</ins></code></td>
                   62559: <td><ins class="diff-chg">U+003D1</ins></td>
                   62560: </tr>
                   62561: <tr>
                   62562: <td><code title=""><ins class=
                   62563: "diff-chg">thickapprox;</ins></code></td>
                   62564: <td><ins class="diff-chg">U+02248</ins></td>
                   62565: </tr>
                   62566: <tr>
                   62567: <td><code title=""><ins class=
                   62568: "diff-chg">thicksim;</ins></code></td>
                   62569: <td><ins class="diff-chg">U+0223C</ins></td>
                   62570: </tr>
                   62571: <tr>
                   62572: <td><code title="">thinsp;</code></td>
                   62573: <td><del class="diff-old">U+2009</del> <ins class=
                   62574: "diff-chg">U+02009</ins></td>
                   62575: </tr>
                   62576: <tr>
                   62577: <td><code title=""><ins class="diff-chg">thkap;</ins></code></td>
                   62578: <td><ins class="diff-chg">U+02248</ins></td>
                   62579: </tr>
                   62580: <tr>
                   62581: <td><code title=""><ins class="diff-chg">thksim;</ins></code></td>
                   62582: <td><ins class="diff-chg">U+0223C</ins></td>
                   62583: </tr>
                   62584: <tr>
                   62585: <td><code title="">thorn;</code></td>
                   62586: <td><del class="diff-old">U+00FE</del> <ins class=
                   62587: "diff-chg">U+000FE</ins></td>
                   62588: </tr>
                   62589: <tr>
                   62590: <td><code title="">thorn</code></td>
                   62591: <td><del class="diff-old">U+00FE</del> <ins class=
                   62592: "diff-chg">U+000FE</ins></td>
                   62593: </tr>
                   62594: <tr>
                   62595: <td><code title="">tilde;</code></td>
                   62596: <td><del class="diff-old">U+02DC</del> <ins class=
                   62597: "diff-chg">U+002DC</ins></td>
                   62598: </tr>
                   62599: <tr>
                   62600: <td><code title="">times;</code></td>
                   62601: <td><del class="diff-old">U+00D7</del> <ins class=
                   62602: "diff-chg">U+000D7</ins></td>
                   62603: </tr>
                   62604: <tr>
                   62605: <td><code title="">times</code></td>
                   62606: <td><del class="diff-old">U+00D7</del> <ins class=
                   62607: "diff-chg">U+000D7</ins></td>
                   62608: </tr>
                   62609: <tr>
                   62610: <td><code title=""><ins class="diff-chg">timesb;</ins></code></td>
                   62611: <td><ins class="diff-chg">U+022A0</ins></td>
                   62612: </tr>
                   62613: <tr>
                   62614: <td><code title=""><ins class=
                   62615: "diff-chg">timesbar;</ins></code></td>
                   62616: <td><ins class="diff-chg">U+02A31</ins></td>
                   62617: </tr>
                   62618: <tr>
                   62619: <td><code title=""><ins class="diff-chg">timesd;</ins></code></td>
                   62620: <td><ins class="diff-chg">U+02A30</ins></td>
                   62621: </tr>
                   62622: <tr>
                   62623: <td><code title=""><ins class="diff-chg">tint;</ins></code></td>
                   62624: <td><ins class="diff-chg">U+0222D</ins></td>
                   62625: </tr>
                   62626: <tr>
                   62627: <td><code title=""><ins class="diff-chg">toea;</ins></code></td>
                   62628: <td><ins class="diff-chg">U+02928</ins></td>
                   62629: </tr>
                   62630: <tr>
                   62631: <td><code title=""><ins class="diff-chg">top;</ins></code></td>
                   62632: <td><ins class="diff-chg">U+022A4</ins></td>
                   62633: </tr>
                   62634: <tr>
                   62635: <td><code title=""><ins class="diff-chg">topbot;</ins></code></td>
                   62636: <td><ins class="diff-chg">U+02336</ins></td>
                   62637: </tr>
                   62638: <tr>
                   62639: <td><code title=""><ins class="diff-chg">topcir;</ins></code></td>
                   62640: <td><ins class="diff-chg">U+02AF1</ins></td>
                   62641: </tr>
                   62642: <tr>
                   62643: <td><code title=""><ins class="diff-chg">topf;</ins></code></td>
                   62644: <td><ins class="diff-chg">U+1D565</ins></td>
                   62645: </tr>
                   62646: <tr>
                   62647: <td><code title=""><ins class="diff-chg">topfork;</ins></code></td>
                   62648: <td><ins class="diff-chg">U+02ADA</ins></td>
                   62649: </tr>
                   62650: <tr>
                   62651: <td><code title=""><ins class="diff-chg">tosa;</ins></code></td>
                   62652: <td><ins class="diff-chg">U+02929</ins></td>
                   62653: </tr>
                   62654: <tr>
                   62655: <td><code title=""><ins class="diff-chg">tprime;</ins></code></td>
                   62656: <td><ins class="diff-chg">U+02034</ins></td>
                   62657: </tr>
                   62658: <tr>
                   62659: <td><code title="">trade;</code></td>
                   62660: <td><del class="diff-old">U+2122</del> <ins class=
                   62661: "diff-chg">U+02122</ins></td>
                   62662: </tr>
                   62663: <tr>
                   62664: <td><code title=""><ins class=
                   62665: "diff-chg">triangle;</ins></code></td>
                   62666: <td><ins class="diff-chg">U+025B5</ins></td>
                   62667: </tr>
                   62668: <tr>
                   62669: <td><code title=""><ins class=
                   62670: "diff-chg">triangledown;</ins></code></td>
                   62671: <td><ins class="diff-chg">U+025BF</ins></td>
                   62672: </tr>
                   62673: <tr>
                   62674: <td><code title=""><ins class=
                   62675: "diff-chg">triangleleft;</ins></code></td>
                   62676: <td><ins class="diff-chg">U+025C3</ins></td>
                   62677: </tr>
                   62678: <tr>
                   62679: <td><code title=""><ins class=
                   62680: "diff-chg">trianglelefteq;</ins></code></td>
                   62681: <td><ins class="diff-chg">U+022B4</ins></td>
                   62682: </tr>
                   62683: <tr>
                   62684: <td><code title=""><ins class=
                   62685: "diff-chg">triangleq;</ins></code></td>
                   62686: <td><ins class="diff-chg">U+0225C</ins></td>
                   62687: </tr>
                   62688: <tr>
                   62689: <td><code title=""><ins class=
                   62690: "diff-chg">triangleright;</ins></code></td>
                   62691: <td><ins class="diff-chg">U+025B9</ins></td>
                   62692: </tr>
                   62693: <tr>
                   62694: <td><code title=""><ins class=
                   62695: "diff-chg">trianglerighteq;</ins></code></td>
                   62696: <td><ins class="diff-chg">U+022B5</ins></td>
                   62697: </tr>
                   62698: <tr>
                   62699: <td><code title=""><ins class="diff-chg">tridot;</ins></code></td>
                   62700: <td><ins class="diff-chg">U+025EC</ins></td>
                   62701: </tr>
                   62702: <tr>
                   62703: <td><code title=""><ins class="diff-chg">trie;</ins></code></td>
                   62704: <td><ins class="diff-chg">U+0225C</ins></td>
                   62705: </tr>
                   62706: <tr>
                   62707: <td><code title=""><ins class=
                   62708: "diff-chg">triminus;</ins></code></td>
                   62709: <td><ins class="diff-chg">U+02A3A</ins></td>
                   62710: </tr>
                   62711: <tr>
                   62712: <td><code title=""><ins class="diff-chg">triplus;</ins></code></td>
                   62713: <td><ins class="diff-chg">U+02A39</ins></td>
                   62714: </tr>
                   62715: <tr>
                   62716: <td><code title=""><ins class="diff-chg">trisb;</ins></code></td>
                   62717: <td><ins class="diff-chg">U+029CD</ins></td>
                   62718: </tr>
                   62719: <tr>
                   62720: <td><code title=""><ins class="diff-chg">tritime;</ins></code></td>
                   62721: <td><ins class="diff-chg">U+02A3B</ins></td>
                   62722: </tr>
                   62723: <tr>
                   62724: <td><code title=""><ins class=
                   62725: "diff-chg">trpezium;</ins></code></td>
                   62726: <td><ins class="diff-chg">U+023E2</ins></td>
                   62727: </tr>
                   62728: <tr>
                   62729: <td><code title=""><ins class="diff-chg">tscr;</ins></code></td>
                   62730: <td><ins class="diff-chg">U+1D4C9</ins></td>
                   62731: </tr>
                   62732: <tr>
                   62733: <td><code title=""><ins class="diff-chg">tscy;</ins></code></td>
                   62734: <td><ins class="diff-chg">U+00446</ins></td>
                   62735: </tr>
                   62736: <tr>
                   62737: <td><code title=""><ins class="diff-chg">tshcy;</ins></code></td>
                   62738: <td><ins class="diff-chg">U+0045B</ins></td>
                   62739: </tr>
                   62740: <tr>
                   62741: <td><code title=""><ins class="diff-chg">tstrok;</ins></code></td>
                   62742: <td><ins class="diff-chg">U+00167</ins></td>
                   62743: </tr>
                   62744: <tr>
                   62745: <td><code title=""><ins class="diff-chg">twixt;</ins></code></td>
                   62746: <td><ins class="diff-chg">U+0226C</ins></td>
                   62747: </tr>
                   62748: <tr>
                   62749: <td><code title=""><ins class=
                   62750: "diff-chg">twoheadleftarrow;</ins></code></td>
                   62751: <td><ins class="diff-chg">U+0219E</ins></td>
                   62752: </tr>
                   62753: <tr>
                   62754: <td><code title=""><ins class=
                   62755: "diff-chg">twoheadrightarrow;</ins></code></td>
                   62756: <td><ins class="diff-chg">U+021A0</ins></td>
                   62757: </tr>
                   62758: <tr>
                   62759: <td><code title="">uArr;</code></td>
                   62760: <td><del class="diff-old">U+21D1</del> <ins class=
                   62761: "diff-chg">U+021D1</ins></td>
                   62762: </tr>
                   62763: <tr>
                   62764: <td><code title=""><ins class="diff-chg">uHar;</ins></code></td>
                   62765: <td><ins class="diff-chg">U+02963</ins></td>
                   62766: </tr>
                   62767: <tr>
                   62768: <td><code title="">uacute;</code></td>
                   62769: <td><del class="diff-old">U+00FA</del> <ins class=
                   62770: "diff-chg">U+000FA</ins></td>
                   62771: </tr>
                   62772: <tr>
                   62773: <td><code title="">uacute</code></td>
                   62774: <td><del class="diff-old">U+00FA</del> <ins class=
                   62775: "diff-chg">U+000FA</ins></td>
                   62776: </tr>
                   62777: <tr>
                   62778: <td><code title="">uarr;</code></td>
                   62779: <td><del class="diff-old">U+2191</del> <ins class=
                   62780: "diff-chg">U+02191</ins></td>
                   62781: </tr>
                   62782: <tr>
                   62783: <td><code title=""><ins class="diff-chg">ubrcy;</ins></code></td>
                   62784: <td><ins class="diff-chg">U+0045E</ins></td>
                   62785: </tr>
                   62786: <tr>
                   62787: <td><code title=""><ins class="diff-chg">ubreve;</ins></code></td>
                   62788: <td><ins class="diff-chg">U+0016D</ins></td>
                   62789: </tr>
                   62790: <tr>
                   62791: <td><code title="">ucirc;</code></td>
                   62792: <td><del class="diff-old">U+00FB</del> <ins class=
                   62793: "diff-chg">U+000FB</ins></td>
                   62794: </tr>
                   62795: <tr>
                   62796: <td><code title="">ucirc</code></td>
                   62797: <td><del class="diff-old">U+00FB</del> <ins class=
                   62798: "diff-chg">U+000FB</ins></td>
                   62799: </tr>
                   62800: <tr>
                   62801: <td><code title=""><ins class="diff-chg">ucy;</ins></code></td>
                   62802: <td><ins class="diff-chg">U+00443</ins></td>
                   62803: </tr>
                   62804: <tr>
                   62805: <td><code title=""><ins class="diff-chg">udarr;</ins></code></td>
                   62806: <td><ins class="diff-chg">U+021C5</ins></td>
                   62807: </tr>
                   62808: <tr>
                   62809: <td><code title=""><ins class="diff-chg">udblac;</ins></code></td>
                   62810: <td><ins class="diff-chg">U+00171</ins></td>
                   62811: </tr>
                   62812: <tr>
                   62813: <td><code title=""><ins class="diff-chg">udhar;</ins></code></td>
                   62814: <td><ins class="diff-chg">U+0296E</ins></td>
                   62815: </tr>
                   62816: <tr>
                   62817: <td><code title=""><ins class="diff-chg">ufisht;</ins></code></td>
                   62818: <td><ins class="diff-chg">U+0297E</ins></td>
                   62819: </tr>
                   62820: <tr>
                   62821: <td><code title=""><ins class="diff-chg">ufr;</ins></code></td>
                   62822: <td><ins class="diff-chg">U+1D532</ins></td>
                   62823: </tr>
                   62824: <tr>
                   62825: <td><code title="">ugrave;</code></td>
                   62826: <td><del class="diff-old">U+00F9</del> <ins class=
                   62827: "diff-chg">U+000F9</ins></td>
                   62828: </tr>
                   62829: <tr>
                   62830: <td><code title="">ugrave</code></td>
                   62831: <td><del class="diff-old">U+00F9</del> <ins class=
                   62832: "diff-chg">U+000F9</ins></td>
                   62833: </tr>
                   62834: <tr>
                   62835: <td><code title=""><ins class="diff-chg">uharl;</ins></code></td>
                   62836: <td><ins class="diff-chg">U+021BF</ins></td>
                   62837: </tr>
                   62838: <tr>
                   62839: <td><code title=""><ins class="diff-chg">uharr;</ins></code></td>
                   62840: <td><ins class="diff-chg">U+021BE</ins></td>
                   62841: </tr>
                   62842: <tr>
                   62843: <td><code title=""><ins class="diff-chg">uhblk;</ins></code></td>
                   62844: <td><ins class="diff-chg">U+02580</ins></td>
                   62845: </tr>
                   62846: <tr>
                   62847: <td><code title=""><ins class="diff-chg">ulcorn;</ins></code></td>
                   62848: <td><ins class="diff-chg">U+0231C</ins></td>
                   62849: </tr>
                   62850: <tr>
                   62851: <td><code title=""><ins class=
                   62852: "diff-chg">ulcorner;</ins></code></td>
                   62853: <td><ins class="diff-chg">U+0231C</ins></td>
                   62854: </tr>
                   62855: <tr>
                   62856: <td><code title=""><ins class="diff-chg">ulcrop;</ins></code></td>
                   62857: <td><ins class="diff-chg">U+0230F</ins></td>
                   62858: </tr>
                   62859: <tr>
                   62860: <td><code title=""><ins class="diff-chg">ultri;</ins></code></td>
                   62861: <td><ins class="diff-chg">U+025F8</ins></td>
                   62862: </tr>
                   62863: <tr>
                   62864: <td><code title=""><ins class="diff-chg">umacr;</ins></code></td>
                   62865: <td><ins class="diff-chg">U+0016B</ins></td>
                   62866: </tr>
                   62867: <tr>
                   62868: <td><code title="">uml;</code></td>
                   62869: <td><del class="diff-old">U+00A8</del> <ins class=
                   62870: "diff-chg">U+000A8</ins></td>
                   62871: </tr>
                   62872: <tr>
                   62873: <td><code title="">uml</code></td>
                   62874: <td><del class="diff-old">U+00A8</del> <ins class=
                   62875: "diff-chg">U+000A8</ins></td>
                   62876: </tr>
                   62877: <tr>
                   62878: <td><code title=""><ins class="diff-chg">uogon;</ins></code></td>
                   62879: <td><ins class="diff-chg">U+00173</ins></td>
                   62880: </tr>
                   62881: <tr>
                   62882: <td><code title=""><ins class="diff-chg">uopf;</ins></code></td>
                   62883: <td><ins class="diff-chg">U+1D566</ins></td>
                   62884: </tr>
                   62885: <tr>
                   62886: <td><code title=""><ins class="diff-chg">uparrow;</ins></code></td>
                   62887: <td><ins class="diff-chg">U+02191</ins></td>
                   62888: </tr>
                   62889: <tr>
                   62890: <td><code title=""><ins class=
                   62891: "diff-chg">updownarrow;</ins></code></td>
                   62892: <td><ins class="diff-chg">U+02195</ins></td>
                   62893: </tr>
                   62894: <tr>
                   62895: <td><code title=""><ins class=
                   62896: "diff-chg">upharpoonleft;</ins></code></td>
                   62897: <td><ins class="diff-chg">U+021BF</ins></td>
                   62898: </tr>
                   62899: <tr>
                   62900: <td><code title=""><ins class=
                   62901: "diff-chg">upharpoonright;</ins></code></td>
                   62902: <td><ins class="diff-chg">U+021BE</ins></td>
                   62903: </tr>
                   62904: <tr>
                   62905: <td><code title=""><ins class="diff-chg">uplus;</ins></code></td>
                   62906: <td><ins class="diff-chg">U+0228E</ins></td>
                   62907: </tr>
                   62908: <tr>
                   62909: <td><code title=""><ins class="diff-chg">upsi;</ins></code></td>
                   62910: <td><ins class="diff-chg">U+003C5</ins></td>
                   62911: </tr>
                   62912: <tr>
                   62913: <td><code title="">upsih;</code></td>
                   62914: <td><del class="diff-old">U+03D2</del> <ins class=
                   62915: "diff-chg">U+003D2</ins></td>
                   62916: </tr>
                   62917: <tr>
                   62918: <td><code title="">upsilon;</code></td>
                   62919: <td><del class="diff-old">U+03C5</del> <ins class=
                   62920: "diff-chg">U+003C5</ins></td>
                   62921: </tr>
                   62922: <tr>
                   62923: <td><code title=""><ins class=
                   62924: "diff-chg">upuparrows;</ins></code></td>
                   62925: <td><ins class="diff-chg">U+021C8</ins></td>
                   62926: </tr>
                   62927: <tr>
                   62928: <td><code title=""><ins class="diff-chg">urcorn;</ins></code></td>
                   62929: <td><ins class="diff-chg">U+0231D</ins></td>
                   62930: </tr>
                   62931: <tr>
                   62932: <td><code title=""><ins class=
                   62933: "diff-chg">urcorner;</ins></code></td>
                   62934: <td><ins class="diff-chg">U+0231D</ins></td>
                   62935: </tr>
                   62936: <tr>
                   62937: <td><code title=""><ins class="diff-chg">urcrop;</ins></code></td>
                   62938: <td><ins class="diff-chg">U+0230E</ins></td>
                   62939: </tr>
                   62940: <tr>
                   62941: <td><code title=""><ins class="diff-chg">uring;</ins></code></td>
                   62942: <td><ins class="diff-chg">U+0016F</ins></td>
                   62943: </tr>
                   62944: <tr>
                   62945: <td><code title=""><ins class="diff-chg">urtri;</ins></code></td>
                   62946: <td><ins class="diff-chg">U+025F9</ins></td>
                   62947: </tr>
                   62948: <tr>
                   62949: <td><code title=""><ins class="diff-chg">uscr;</ins></code></td>
                   62950: <td><ins class="diff-chg">U+1D4CA</ins></td>
                   62951: </tr>
                   62952: <tr>
                   62953: <td><code title=""><ins class="diff-chg">utdot;</ins></code></td>
                   62954: <td><ins class="diff-chg">U+022F0</ins></td>
                   62955: </tr>
                   62956: <tr>
                   62957: <td><code title=""><ins class="diff-chg">utilde;</ins></code></td>
                   62958: <td><ins class="diff-chg">U+00169</ins></td>
                   62959: </tr>
                   62960: <tr>
                   62961: <td><code title=""><ins class="diff-chg">utri;</ins></code></td>
                   62962: <td><ins class="diff-chg">U+025B5</ins></td>
                   62963: </tr>
                   62964: <tr>
                   62965: <td><code title=""><ins class="diff-chg">utrif;</ins></code></td>
                   62966: <td><ins class="diff-chg">U+025B4</ins></td>
                   62967: </tr>
                   62968: <tr>
                   62969: <td><code title=""><ins class="diff-chg">uuarr;</ins></code></td>
                   62970: <td><ins class="diff-chg">U+021C8</ins></td>
                   62971: </tr>
                   62972: <tr>
                   62973: <td><code title="">uuml;</code></td>
                   62974: <td><del class="diff-old">U+00FC</del> <ins class=
                   62975: "diff-chg">U+000FC</ins></td>
                   62976: </tr>
                   62977: <tr>
                   62978: <td><code title="">uuml</code></td>
                   62979: <td><del class="diff-old">U+00FC</del> <ins class=
                   62980: "diff-chg">U+000FC</ins></td>
                   62981: </tr>
                   62982: <tr>
                   62983: <td><code title=""><ins class="diff-chg">uwangle;</ins></code></td>
                   62984: <td><ins class="diff-chg">U+029A7</ins></td>
                   62985: </tr>
                   62986: <tr>
                   62987: <td><code title=""><ins class="diff-chg">vArr;</ins></code></td>
                   62988: <td><ins class="diff-chg">U+021D5</ins></td>
                   62989: </tr>
                   62990: <tr>
                   62991: <td><code title=""><ins class="diff-chg">vBar;</ins></code></td>
                   62992: <td><ins class="diff-chg">U+02AE8</ins></td>
                   62993: </tr>
                   62994: <tr>
                   62995: <td><code title=""><ins class="diff-chg">vBarv;</ins></code></td>
                   62996: <td><ins class="diff-chg">U+02AE9</ins></td>
                   62997: </tr>
                   62998: <tr>
                   62999: <td><code title=""><ins class="diff-chg">vDash;</ins></code></td>
                   63000: <td><ins class="diff-chg">U+022A8</ins></td>
                   63001: </tr>
                   63002: <tr>
                   63003: <td><code title=""><ins class="diff-chg">vangrt;</ins></code></td>
                   63004: <td><ins class="diff-chg">U+0299C</ins></td>
                   63005: </tr>
                   63006: <tr>
                   63007: <td><code title=""><ins class=
                   63008: "diff-chg">varepsilon;</ins></code></td>
                   63009: <td><ins class="diff-chg">U+003B5</ins></td>
                   63010: </tr>
                   63011: <tr>
                   63012: <td><code title=""><ins class=
                   63013: "diff-chg">varkappa;</ins></code></td>
                   63014: <td><ins class="diff-chg">U+003F0</ins></td>
                   63015: </tr>
                   63016: <tr>
                   63017: <td><code title=""><ins class=
                   63018: "diff-chg">varnothing;</ins></code></td>
                   63019: <td><ins class="diff-chg">U+02205</ins></td>
                   63020: </tr>
                   63021: <tr>
                   63022: <td><code title=""><ins class="diff-chg">varphi;</ins></code></td>
                   63023: <td><ins class="diff-chg">U+003C6</ins></td>
                   63024: </tr>
                   63025: <tr>
                   63026: <td><code title=""><ins class="diff-chg">varpi;</ins></code></td>
                   63027: <td><ins class="diff-chg">U+003D6</ins></td>
                   63028: </tr>
                   63029: <tr>
                   63030: <td><code title=""><ins class=
                   63031: "diff-chg">varpropto;</ins></code></td>
                   63032: <td><ins class="diff-chg">U+0221D</ins></td>
                   63033: </tr>
                   63034: <tr>
                   63035: <td><code title=""><ins class="diff-chg">varr;</ins></code></td>
                   63036: <td><ins class="diff-chg">U+02195</ins></td>
                   63037: </tr>
                   63038: <tr>
                   63039: <td><code title=""><ins class="diff-chg">varrho;</ins></code></td>
                   63040: <td><ins class="diff-chg">U+003F1</ins></td>
                   63041: </tr>
                   63042: <tr>
                   63043: <td><code title=""><ins class=
                   63044: "diff-chg">varsigma;</ins></code></td>
                   63045: <td><ins class="diff-chg">U+003C2</ins></td>
                   63046: </tr>
                   63047: <tr>
                   63048: <td><code title=""><ins class=
                   63049: "diff-chg">vartheta;</ins></code></td>
                   63050: <td><ins class="diff-chg">U+003D1</ins></td>
                   63051: </tr>
                   63052: <tr>
                   63053: <td><code title=""><ins class=
                   63054: "diff-chg">vartriangleleft;</ins></code></td>
                   63055: <td><ins class="diff-chg">U+022B2</ins></td>
                   63056: </tr>
                   63057: <tr>
                   63058: <td><code title=""><ins class=
                   63059: "diff-chg">vartriangleright;</ins></code></td>
                   63060: <td><ins class="diff-chg">U+022B3</ins></td>
                   63061: </tr>
                   63062: <tr>
                   63063: <td><code title=""><ins class="diff-chg">vcy;</ins></code></td>
                   63064: <td><ins class="diff-chg">U+00432</ins></td>
                   63065: </tr>
                   63066: <tr>
                   63067: <td><code title=""><ins class="diff-chg">vdash;</ins></code></td>
                   63068: <td><ins class="diff-chg">U+022A2</ins></td>
                   63069: </tr>
                   63070: <tr>
                   63071: <td><code title=""><ins class="diff-chg">vee;</ins></code></td>
                   63072: <td><ins class="diff-chg">U+02228</ins></td>
                   63073: </tr>
                   63074: <tr>
                   63075: <td><code title=""><ins class="diff-chg">veebar;</ins></code></td>
                   63076: <td><ins class="diff-chg">U+022BB</ins></td>
                   63077: </tr>
                   63078: <tr>
                   63079: <td><code title=""><ins class="diff-chg">veeeq;</ins></code></td>
                   63080: <td><ins class="diff-chg">U+0225A</ins></td>
                   63081: </tr>
                   63082: <tr>
                   63083: <td><code title=""><ins class="diff-chg">vellip;</ins></code></td>
                   63084: <td><ins class="diff-chg">U+022EE</ins></td>
                   63085: </tr>
                   63086: <tr>
                   63087: <td><code title=""><ins class="diff-chg">verbar;</ins></code></td>
                   63088: <td><ins class="diff-chg">U+0007C</ins></td>
                   63089: </tr>
                   63090: <tr>
                   63091: <td><code title=""><ins class="diff-chg">vert;</ins></code></td>
                   63092: <td><ins class="diff-chg">U+0007C</ins></td>
                   63093: </tr>
                   63094: <tr>
                   63095: <td><code title=""><ins class="diff-chg">vfr;</ins></code></td>
                   63096: <td><ins class="diff-chg">U+1D533</ins></td>
                   63097: </tr>
                   63098: <tr>
                   63099: <td><code title=""><ins class="diff-chg">vltri;</ins></code></td>
                   63100: <td><ins class="diff-chg">U+022B2</ins></td>
                   63101: </tr>
                   63102: <tr>
                   63103: <td><code title=""><ins class="diff-chg">vopf;</ins></code></td>
                   63104: <td><ins class="diff-chg">U+1D567</ins></td>
                   63105: </tr>
                   63106: <tr>
                   63107: <td><code title=""><ins class="diff-chg">vprop;</ins></code></td>
                   63108: <td><ins class="diff-chg">U+0221D</ins></td>
                   63109: </tr>
                   63110: <tr>
                   63111: <td><code title=""><ins class="diff-chg">vrtri;</ins></code></td>
                   63112: <td><ins class="diff-chg">U+022B3</ins></td>
                   63113: </tr>
                   63114: <tr>
                   63115: <td><code title=""><ins class="diff-chg">vscr;</ins></code></td>
                   63116: <td><ins class="diff-chg">U+1D4CB</ins></td>
                   63117: </tr>
                   63118: <tr>
                   63119: <td><code title=""><ins class="diff-chg">vzigzag;</ins></code></td>
                   63120: <td><ins class="diff-chg">U+0299A</ins></td>
                   63121: </tr>
                   63122: <tr>
                   63123: <td><code title=""><ins class="diff-chg">wcirc;</ins></code></td>
                   63124: <td><ins class="diff-chg">U+00175</ins></td>
                   63125: </tr>
                   63126: <tr>
                   63127: <td><code title=""><ins class="diff-chg">wedbar;</ins></code></td>
                   63128: <td><ins class="diff-chg">U+02A5F</ins></td>
                   63129: </tr>
                   63130: <tr>
                   63131: <td><code title=""><ins class="diff-chg">wedge;</ins></code></td>
                   63132: <td><ins class="diff-chg">U+02227</ins></td>
                   63133: </tr>
                   63134: <tr>
                   63135: <td><code title=""><ins class="diff-chg">wedgeq;</ins></code></td>
                   63136: <td><ins class="diff-chg">U+02259</ins></td>
                   63137: </tr>
                   63138: <tr>
                   63139: <td><code title="">weierp;</code></td>
                   63140: <td><del class="diff-old">U+2118</del> <ins class=
                   63141: "diff-chg">U+02118</ins></td>
                   63142: </tr>
                   63143: <tr>
                   63144: <td><code title=""><ins class="diff-chg">wfr;</ins></code></td>
                   63145: <td><ins class="diff-chg">U+1D534</ins></td>
                   63146: </tr>
                   63147: <tr>
                   63148: <td><code title=""><ins class="diff-chg">wopf;</ins></code></td>
                   63149: <td><ins class="diff-chg">U+1D568</ins></td>
                   63150: </tr>
                   63151: <tr>
                   63152: <td><code title=""><ins class="diff-chg">wp;</ins></code></td>
                   63153: <td><ins class="diff-chg">U+02118</ins></td>
                   63154: </tr>
                   63155: <tr>
                   63156: <td><code title=""><ins class="diff-chg">wr;</ins></code></td>
                   63157: <td><ins class="diff-chg">U+02240</ins></td>
                   63158: </tr>
                   63159: <tr>
                   63160: <td><code title=""><ins class="diff-chg">wreath;</ins></code></td>
                   63161: <td><ins class="diff-chg">U+02240</ins></td>
                   63162: </tr>
                   63163: <tr>
                   63164: <td><code title=""><ins class="diff-chg">wscr;</ins></code></td>
                   63165: <td><ins class="diff-chg">U+1D4CC</ins></td>
                   63166: </tr>
                   63167: <tr>
                   63168: <td><code title=""><ins class="diff-chg">xcap;</ins></code></td>
                   63169: <td><ins class="diff-chg">U+022C2</ins></td>
                   63170: </tr>
                   63171: <tr>
                   63172: <td><code title=""><ins class="diff-chg">xcirc;</ins></code></td>
                   63173: <td><ins class="diff-chg">U+025EF</ins></td>
                   63174: </tr>
                   63175: <tr>
                   63176: <td><code title=""><ins class="diff-chg">xcup;</ins></code></td>
                   63177: <td><ins class="diff-chg">U+022C3</ins></td>
                   63178: </tr>
                   63179: <tr>
                   63180: <td><code title=""><ins class="diff-chg">xdtri;</ins></code></td>
                   63181: <td><ins class="diff-chg">U+025BD</ins></td>
                   63182: </tr>
                   63183: <tr>
                   63184: <td><code title=""><ins class="diff-chg">xfr;</ins></code></td>
                   63185: <td><ins class="diff-chg">U+1D535</ins></td>
                   63186: </tr>
                   63187: <tr>
                   63188: <td><code title=""><ins class="diff-chg">xhArr;</ins></code></td>
                   63189: <td><ins class="diff-chg">U+027FA</ins></td>
                   63190: </tr>
                   63191: <tr>
                   63192: <td><code title=""><ins class="diff-chg">xharr;</ins></code></td>
                   63193: <td><ins class="diff-chg">U+027F7</ins></td>
                   63194: </tr>
                   63195: <tr>
                   63196: <td><code title="">xi;</code></td>
                   63197: <td><del class="diff-old">U+03BE</del> <ins class=
                   63198: "diff-chg">U+003BE</ins></td>
                   63199: </tr>
                   63200: <tr>
                   63201: <td><code title=""><del class="diff-old">yacute;</del> <ins class=
                   63202: "diff-chg">xlArr;</ins></code></td>
                   63203: <td><del class="diff-old">U+00FD</del> <ins class=
                   63204: "diff-chg">U+027F8</ins></td>
                   63205: </tr>
                   63206: <tr>
                   63207: <td><code title=""><del class="diff-old">yacute</del> <ins class=
                   63208: "diff-chg">xlarr;</ins></code></td>
                   63209: <td><del class="diff-old">U+00FD</del> <ins class=
                   63210: "diff-chg">U+027F5</ins></td>
                   63211: </tr>
                   63212: <tr>
                   63213: <td><code title=""><del class="diff-old">yen;</del> <ins class=
                   63214: "diff-chg">xmap;</ins></code></td>
                   63215: <td><del class="diff-old">U+00A5</del> <ins class=
                   63216: "diff-chg">U+027FC</ins></td>
                   63217: </tr>
                   63218: <tr>
                   63219: <td><code title=""><del class="diff-old">yen</del> <ins class=
                   63220: "diff-chg">xnis;</ins></code></td>
                   63221: <td><del class="diff-old">U+00A5</del> <ins class=
                   63222: "diff-chg">U+022FB</ins></td>
                   63223: </tr>
                   63224: <tr>
                   63225: <td><code title=""><del class="diff-old">yuml;</del> <ins class=
                   63226: "diff-chg">xodot;</ins></code></td>
                   63227: <td><del class="diff-old">U+00FF</del> <ins class=
                   63228: "diff-chg">U+02A00</ins></td>
                   63229: </tr>
                   63230: <tr>
                   63231: <td><code title=""><del class="diff-old">yuml</del> <ins class=
                   63232: "diff-chg">xopf;</ins></code></td>
                   63233: <td><del class="diff-old">U+00FF</del> <ins class=
                   63234: "diff-chg">U+1D569</ins></td>
                   63235: </tr>
                   63236: <tr>
                   63237: <td><code title=""><del class="diff-old">zeta;</del> <ins class=
                   63238: "diff-chg">xoplus;</ins></code></td>
                   63239: <td><del class="diff-old">U+03B6</del> <ins class=
                   63240: "diff-chg">U+02A01</ins></td>
                   63241: </tr>
                   63242: <tr>
                   63243: <td><code title=""><del class="diff-old">zwj;</del> <ins class=
                   63244: "diff-chg">xotime;</ins></code></td>
                   63245: <td><del class="diff-old">U+200D</del> <ins class=
                   63246: "diff-chg">U+02A02</ins></td>
                   63247: </tr>
                   63248: <tr>
                   63249: <td><code title=""><del class="diff-old">zwnj;</del> <ins class=
                   63250: "diff-chg">xrArr;</ins></code></td>
                   63251: <td><del class="diff-old">U+200C 9. WYSIWYG editors WYSIWYG editors
                   63252: are authoring tools with a predominantly presentation-driven user
                   63253: interface. 9.1. Presentational markup 9.1.1. WYSIWYG signature
                   63254: WYSIWYG editors must include a meta</del> <ins class=
                   63255: "diff-chg">U+027F9</ins></td>
                   63256: </tr>
                   63257: <tr>
                   63258: <td><code title=""><ins class="diff-chg">xrarr;</ins></code>
                   63259: <del class="diff-old">element in the head</del></td>
                   63260: <td><ins class="diff-chg">U+027F6</ins></td>
                   63261: </tr>
                   63262: <tr>
                   63263: <td><code title=""><ins class="diff-chg">xscr;</ins></code>
                   63264: <del class="diff-old">element whose name</del></td>
                   63265: <td><ins class="diff-chg">U+1D4CD</ins></td>
                   63266: </tr>
                   63267: <tr>
                   63268: <td><code title=""><ins class="diff-chg">xsqcup;</ins></code>
                   63269: <del class="diff-old">attribute has the value generator</del></td>
                   63270: <td><ins class="diff-chg">U+02A06</ins></td>
                   63271: </tr>
                   63272: <tr>
                   63273: <td><code title=""><ins class="diff-chg">xuplus;</ins></code>
                   63274: <del class="diff-old">and whose content</del></td>
                   63275: <td><ins class="diff-chg">U+02A04</ins></td>
                   63276: </tr>
                   63277: <tr>
                   63278: <td><code title=""><ins class="diff-chg">xutri;</ins></code>
                   63279: <del class="diff-old">attribute's value ends with the string
                   63280: "</del></td>
                   63281: <td><ins class="diff-chg">U+025B3</ins></td>
                   63282: </tr>
                   63283: <tr>
                   63284: <td><code title=""><del class="diff-old">(WYSIWYG editor)</del>
                   63285: <ins class="diff-chg">xvee;</ins></code> <del class="diff-old">".
                   63286: Non-WYSIWYG authoring tools must not include this string in their
                   63287: generator string. This entire section will probably be dropped. The
                   63288: intent of this section was to allow a way for WYSIWYG editors,
                   63289: which aren't going to use semantic markup, to still write
                   63290: conforming documents, while not letting it be ok for hand-coding
                   63291: authors to not use semantic markup. We still need some sort of
                   63292: solution to this, but it's not clear what it is. 9.1.2. The
                   63293: font</del></td>
                   63294: <td><ins class="diff-chg">U+022C1</ins></td>
                   63295: </tr>
                   63296: <tr>
                   63297: <td><code title=""><ins class="diff-chg">xwedge;</ins></code>
                   63298: <del class="diff-old">element Categories Phrasing content .
                   63299: Contexts in which this element may be used: Where phrasing content
                   63300: is expected. Content model: Transparent . Element-specific
                   63301: attributes: style</del></td>
                   63302: <td><ins class="diff-chg">U+022C0</ins></td>
                   63303: </tr>
                   63304: <tr>
                   63305: <td><code title=""><ins class="diff-chg">yacute;</ins></code>
                   63306: <del class="diff-old">DOM interface: &lt;pre class=idl&gt;interface
                   63307: { readonly attribute CSSStyleDeclaration ; }; This entire section
                   63308: will probably be dropped. The intent of this section was to allow a
                   63309: way for WYSIWYG editors, which don't have enough information to use
                   63310: the "real" "semantic" elements, to still make HTML pages without
                   63311: abusing those semantic elements (since abusing elements is even
                   63312: worse than not using them in the first place). We have still got to
                   63313: find a solution to this, while not letting it be ok for hand-coding
                   63314: authors to abuse the style="" attribute. The font</del></td>
                   63315: <td><ins class="diff-chg">U+000FD</ins></td>
                   63316: </tr>
                   63317: <tr>
                   63318: <td><code title=""><ins class="diff-chg">yacute</ins></code>
                   63319: <del class="diff-old">element doesn't represent anything. It must
                   63320: not be used except by WYSIWYG editors , which may use it to achieve
                   63321: presentational affects. Even WYSIWYG editors, however, should make
                   63322: every effort to use appropriate semantic markup and avoid the use
                   63323: of media-specific presentational markup. Conformance checkers must
                   63324: consider this element to be non-conforming if it is used on a page
                   63325: lacking the WYSIWYG signature . The following would be
                   63326: syntactically legal (as the output from a WYSIWYG editor, though
                   63327: not anywhere else): &lt;html&gt; &lt;head&gt;
                   63328: &lt;title&gt;&lt;/title&gt; &lt;meta name="generator"
                   63329: content="Sample Editor 1.0 &lt;/head&gt; &lt;body&gt; &lt;font
                   63330: style="display: block; border: solid"&gt;
                   63331: &lt;h1&gt;Hello.&lt;/h1&gt; &lt;/font&gt; &lt;p&gt; &lt;font
                   63332: style="color: orange; background: white"&gt;How&lt;/font&gt;
                   63333: &lt;font style="color: yellow; background:
                   63334: white"&gt;do&lt;/font&gt; &lt;font style="color: green; background:
                   63335: white"&gt; &lt;font style="color: blue; background:
                   63336: white"&gt;do?&lt;/font&gt; &lt;/p&gt; &lt;/body&gt; &lt;/html&gt;
                   63337: The first font</del></td>
                   63338: <td><ins class="diff-chg">U+000FD</ins></td>
                   63339: </tr>
                   63340: <tr>
                   63341: <td><code title=""><ins class="diff-chg">yacy;</ins></code>
                   63342: <del class="diff-old">element is conformant because h1</del></td>
                   63343: <td><ins class="diff-chg">U+0044F</ins></td>
                   63344: </tr>
                   63345: <tr>
                   63346: <td><code title=""><ins class="diff-chg">ycirc;</ins></code>
                   63347: <del class="diff-old">and p</del></td>
                   63348: <td><ins class="diff-chg">U+00177</ins></td>
                   63349: </tr>
                   63350: <tr>
                   63351: <td><code title=""><ins class="diff-chg">ycy;</ins></code>
                   63352: <del class="diff-old">elements are both allowed in body</del></td>
                   63353: <td><ins class="diff-chg">U+0044B</ins></td>
                   63354: </tr>
                   63355: <tr>
                   63356: <td><code title=""><ins class="diff-chg">yen;</ins></code>
                   63357: <del class="diff-old">elements. the next four are allowed because
                   63358: text and em</del></td>
                   63359: <td><ins class="diff-chg">U+000A5</ins></td>
                   63360: </tr>
                   63361: <tr>
                   63362: <td><code title=""><ins class="diff-chg">yen</ins></code>
                   63363: <del class="diff-old">elements are allowed in p</del></td>
                   63364: <td><ins class="diff-chg">U+000A5</ins></td>
                   63365: </tr>
                   63366: <tr>
                   63367: <td><code title=""><ins class="diff-chg">yfr;</ins></code>
                   63368: <del class="diff-old">elements. The style</del></td>
                   63369: <td><ins class="diff-chg">U+1D536</ins></td>
                   63370: </tr>
                   63371: <tr>
                   63372: <td><code title=""><ins class="diff-chg">yicy;</ins></code>
                   63373: <del class="diff-old">attribute, if specified, must contain only a
                   63374: list of zero or more semicolon-separated (;) CSS declarations.
                   63375: [CSS21] We probably need to move this attribute to more elements,
                   63376: maybe even all of them, though if we do that we really should find
                   63377: a way to strongly discourage its use (and the use of its DOM
                   63378: attribute) for non-WYSIWYG authors. The declarations specified must
                   63379: be parsed and treated as the body of a declaration block whose
                   63380: selector matches just that font</del></td>
                   63381: <td><ins class="diff-chg">U+00457</ins></td>
                   63382: </tr>
                   63383: <tr>
                   63384: <td><code title=""><ins class="diff-chg">yopf;</ins></code>
                   63385: <del class="diff-old">element. For the purposes of the CSS cascade,
                   63386: the attribute must be considered to be a 'style' attribute at the
                   63387: author level. The style</del></td>
                   63388: <td><ins class="diff-chg">U+1D56A</ins></td>
                   63389: </tr>
                   63390: <tr>
                   63391: <td><code title=""><ins class="diff-chg">yscr;</ins></code>
                   63392: <del class="diff-old">DOM attribute must return a
                   63393: CSSStyleDeclaration</del></td>
                   63394: <td><ins class="diff-chg">U+1D4CE</ins></td>
                   63395: </tr>
                   63396: <tr>
                   63397: <td><code title=""><ins class="diff-chg">yucy;</ins></code>
                   63398: <del class="diff-old">whose value represents the declarations
                   63399: specified in the attribute, if present. Mutating the
                   63400: CSSStyleDeclaration</del></td>
                   63401: <td><ins class="diff-chg">U+0044E</ins></td>
                   63402: </tr>
                   63403: <tr>
                   63404: <td><code title=""><ins class="diff-chg">yuml;</ins></code>
                   63405: <del class="diff-old">object must create a style</del></td>
                   63406: <td><ins class="diff-chg">U+000FF</ins></td>
                   63407: </tr>
                   63408: <tr>
                   63409: <td><code title=""><ins class="diff-chg">yuml</ins></code>
                   63410: <del class="diff-old">attribute on the element (if there isn't one
                   63411: already) and then change its value to be a value representing the
                   63412: serialised form of the CSSStyleDeclaration</del></td>
                   63413: <td><ins class="diff-chg">U+000FF</ins></td>
                   63414: </tr>
                   63415: <tr>
                   63416: <td><code title=""><ins class="diff-chg">zacute;</ins></code>
                   63417: <del class="diff-old">object. [CSSOM]</del></td>
                   63418: <td><ins class="diff-chg">U+0017A</ins></td>
                   63419: </tr>
                   63420: <tr>
                   63421: <td><code title=""><ins class="diff-chg">zcaron;</ins></code></td>
                   63422: <td><ins class="diff-chg">U+0017E</ins></td>
                   63423: </tr>
                   63424: <tr>
                   63425: <td><code title=""><ins class="diff-chg">zcy;</ins></code></td>
                   63426: <td><ins class="diff-chg">U+00437</ins></td>
                   63427: </tr>
                   63428: <tr>
                   63429: <td><code title=""><ins class="diff-chg">zdot;</ins></code></td>
                   63430: <td><ins class="diff-chg">U+0017C</ins></td>
                   63431: </tr>
                   63432: <tr>
                   63433: <td><code title=""><ins class="diff-chg">zeetrf;</ins></code></td>
                   63434: <td><ins class="diff-chg">U+02128</ins></td>
                   63435: </tr>
                   63436: <tr>
                   63437: <td><code title=""><ins class="diff-chg">zeta;</ins></code></td>
                   63438: <td><ins class="diff-chg">U+003B6</ins></td>
                   63439: </tr>
                   63440: <tr>
                   63441: <td><code title=""><ins class="diff-chg">zfr;</ins></code></td>
                   63442: <td><ins class="diff-chg">U+1D537</ins></td>
                   63443: </tr>
                   63444: <tr>
                   63445: <td><code title=""><ins class="diff-chg">zhcy;</ins></code></td>
                   63446: <td><ins class="diff-chg">U+00436</ins></td>
                   63447: </tr>
                   63448: <tr>
                   63449: <td><code title=""><ins class="diff-chg">zigrarr;</ins></code></td>
                   63450: <td><ins class="diff-chg">U+021DD</ins></td>
                   63451: </tr>
                   63452: <tr>
                   63453: <td><code title=""><ins class="diff-chg">zopf;</ins></code></td>
                   63454: <td><ins class="diff-chg">U+1D56B</ins></td>
                   63455: </tr>
                   63456: <tr>
                   63457: <td><code title=""><ins class="diff-chg">zscr;</ins></code></td>
                   63458: <td><ins class="diff-chg">U+1D4CF</ins></td>
                   63459: </tr>
                   63460: <tr>
                   63461: <td><code title=""><ins class="diff-chg">zwj;</ins></code></td>
                   63462: <td><ins class="diff-chg">U+0200D</ins></td>
                   63463: </tr>
                   63464: <tr>
                   63465: <td><code title=""><ins class="diff-chg">zwnj;</ins></code></td>
                   63466: <td><ins class="diff-chg">U+0200C</ins></td>
                   63467: </tr>
                   63468: </tbody>
                   63469: </table>
                   63470: </div>
                   63471: <h2 id="rendering"><span class="secno"><del class=
                   63472: "diff-old">10.</del> <ins class="diff-chg">9.</ins></span>
                   63473: Rendering <ins class="diff-new">and user-agent behavior</ins></h2>
                   63474: <p class="big-issue">This section will probably include details on
                   63475: how to render DATAGRID (including <span id="datagridPseudos">its
                   63476: pseudo-elements</span> ), drag-and-drop, etc, in a visual medium,
                   63477: in concert with CSS. Terms that need to be defined include:
                   63478: <dfn id="sizing">sizing of embedded content</dfn></p>
                   63479: <p>CSS UAs in visual media must, when scrolling a page to a
                   63480: fragment identifier, align the top of the viewport with the target
                   63481: element's top border edge.</p>
                   63482: <p class="big-issue">must define letting the user <ins class=
                   63483: "diff-new">"</ins> <dfn id="obtain">obtain a physical form</dfn>
                   63484: <ins class="diff-new">(or a representation of a physical
                   63485: form)"</ins> of a document (printing) and what this means for the
                   63486: <del class="diff-old">UA</del> <ins class="diff-chg">UA, in
                   63487: particular creating a new view for the print media.</ins></p>
                   63488: <p class="big-issue">Must define that in CSS, tag names in HTML
                   63489: documents, and class names in quirks mode documents, are
                   63490: case-insensitive.</p>
                   63491: <h3 id="rendering0"><span class="secno"><del class=
                   63492: "diff-old">10.1.</del> <ins class="diff-chg">9.1</ins></span>
                   63493: Rendering and the DOM</h3>
                   63494: <p class="big-issue">This section is wrong. mediaMode will end up
                   63495: on Window, I think. All views implement Window.</p>
                   63496: <p>Any object implement the <code>AbstractView</code> interface
                   63497: must also implement the <code><a href=
                   63498: "#mediamodeabstractview">MediaModeAbstractView</a></code>
                   63499: interface.</p>
                   63500: <pre class="idl">
                   63501: interface <dfn id=
                   63502: "mediamodeabstractview">MediaModeAbstractView</dfn> {
                   63503:   readonly attribute DOMString <a href="#mediamode">mediaMode</a>;
                   63504: };
                   63505: </pre>
                   63506: <p>The <dfn id="mediamode"><code>mediaMode</code></dfn> attribute
                   63507: on objects implementing the <code><a href=
                   63508: "#mediamodeabstractview">MediaModeAbstractView</a></code> interface
                   63509: must return the string that represents the canvas' current
                   63510: rendering mode ( <code>screen</code> , <code>print</code> , etc).
                   63511: This is a lowercase string, as <a href=
                   63512: "http://www.w3.org/TR/CSS21/media.html#media-types">defined by the
                   63513: CSS specification</a> . <a href="#references">[CSS21]</a></p>
                   63514: <p>Some user agents may support multiple media, in which case there
                   63515: will exist multiple objects implementing the
                   63516: <code>AbstractView</code> interface. Only the default view
                   63517: implements the <code><a href="#window">Window</a></code> interface.
                   63518: The other views can be reached using the <code><a href=
                   63519: "#view">view</a></code> attribute of the <code>UIEvent</code>
                   63520: <del class="diff-old">inteface,</del> <ins class=
                   63521: "diff-chg">interface,</ins> during event propagation. There is no
                   63522: way currently to enumerate all the views.</p>
                   63523: <h3 id="rendering1"><span class="secno"><del class=
                   63524: "diff-old">10.2.</del> <ins class="diff-chg">9.2</ins></span>
                   63525: Rendering and menus/toolbars</h3>
                   63526: <h4 id="the-icon"><span class="secno"><del class=
                   63527: "diff-old">10.2.1.</del> <ins class="diff-chg">9.2.1</ins></span>
                   63528: The 'icon' property</h4>
                   63529: <p>UAs should use the command's Icon as the default generic icon
                   63530: provided by the user agent when the 'icon' property computes to
                   63531: 'auto' on an element that either defines a command or refers to one
                   63532: using the <code title="command-attribute">command</code> attribute,
                   63533: but when the property computes to an actual image, it should use
                   63534: that image instead.</p>
                   63535: <h3 id="obsolete"><span class="secno"><ins class=
                   63536: "diff-new">9.3</ins></span> <ins class="diff-new">Obsolete
                   63537: elements, attributes, and APIs</ins></h3>
                   63538: <h4 id="the-body0"><span class="secno"><ins class=
                   63539: "diff-new">9.3.1</ins></span> <ins class="diff-new">The</ins>
                   63540: <code><a href="#body0"><ins class="diff-new">body</ins></a></code>
                   63541: <ins class="diff-new">element</ins></h4>
                   63542: <p class="big-issue"><ins class="diff-new">Need to define the
                   63543: content attributes in terms of CSS or something.</ins></p>
                   63544: <pre class="idl">
                   63545: [XXX] interface <a href=
                   63546: "#htmldocument">HTMLDocument</a> {<ins class="diff-new">
                   63547:            attribute DOMString <a href="#fgcolor" title=
                   63548: "dom-document-fgColor">fgColor</a>;
                   63549:            attribute DOMString <a href="#bgcolor" title=
                   63550: "dom-document-bgColor">bgColor</a>;
                   63551:            attribute DOMString <a href="#linkcolor" title=
                   63552: "dom-document-linkColor">linkColor</a>;
                   63553:            attribute DOMString <a href="#vlinkcolor" title=
                   63554: "dom-document-vlinkColor">vlinkColor</a>;
                   63555:            attribute DOMString <a href="#alinkcolor" title=
                   63556: "dom-document-alinkColor">alinkColor</a>;
                   63557: };
                   63558: </ins>
                   63559: </pre>
                   63560: <p><ins class="diff-new">The</ins> <dfn id="fgcolor" title=
                   63561: "dom-document-fgColor"><code><ins class=
                   63562: "diff-new">fgColor</ins></code></dfn> <ins class=
                   63563: "diff-new">attribute on the</ins> <code><ins class=
                   63564: "diff-new">Document</ins></code> <ins class="diff-new">object
                   63565: must</ins> <a href="#reflect"><ins class=
                   63566: "diff-new">reflect</ins></a> <ins class="diff-new">the</ins>
                   63567: <code title="attr-body-text"><ins class=
                   63568: "diff-new">text</ins></code> <ins class="diff-new">attribute
                   63569: on</ins> <a href="#the-body1"><ins class="diff-new">the</ins>
                   63570: <code><ins class="diff-new">body</ins></code> <ins class=
                   63571: "diff-new">element</ins></a> .</p>
                   63572: <p><ins class="diff-new">The</ins> <dfn id="bgcolor" title=
                   63573: "dom-document-bgColor"><code><ins class=
                   63574: "diff-new">bgColor</ins></code></dfn> <ins class=
                   63575: "diff-new">attribute on the</ins> <code><ins class=
                   63576: "diff-new">Document</ins></code> <ins class="diff-new">object
                   63577: must</ins> <a href="#reflect"><ins class=
                   63578: "diff-new">reflect</ins></a> <ins class="diff-new">the</ins>
                   63579: <code title="attr-body-bgcolor"><ins class=
                   63580: "diff-new">bgcolor</ins></code> <ins class="diff-new">attribute
                   63581: on</ins> <a href="#the-body1"><ins class="diff-new">the</ins>
                   63582: <code><ins class="diff-new">body</ins></code> <ins class=
                   63583: "diff-new">element</ins></a> .</p>
                   63584: <p><ins class="diff-new">The</ins> <dfn id="linkcolor" title=
                   63585: "dom-document-linkColor"><code><ins class=
                   63586: "diff-new">linkColor</ins></code></dfn> <ins class=
                   63587: "diff-new">attribute on the</ins> <code><ins class=
                   63588: "diff-new">Document</ins></code> <ins class="diff-new">object
                   63589: must</ins> <a href="#reflect"><ins class=
                   63590: "diff-new">reflect</ins></a> <ins class="diff-new">the</ins>
                   63591: <code title="attr-body-link"><ins class=
                   63592: "diff-new">link</ins></code> <ins class="diff-new">attribute
                   63593: on</ins> <a href="#the-body1"><ins class="diff-new">the</ins>
                   63594: <code><ins class="diff-new">body</ins></code> <ins class=
                   63595: "diff-new">element</ins></a> .</p>
                   63596: <p><ins class="diff-new">The</ins> <dfn id="vlinkcolor" title=
                   63597: "dom-document-vLinkColor"><code><ins class=
                   63598: "diff-new">vLinkColor</ins></code></dfn> <ins class=
                   63599: "diff-new">attribute on the</ins> <code><ins class=
                   63600: "diff-new">Document</ins></code> <ins class="diff-new">object
                   63601: must</ins> <a href="#reflect"><ins class=
                   63602: "diff-new">reflect</ins></a> <ins class="diff-new">the</ins>
                   63603: <code title="attr-body-vlink"><ins class=
                   63604: "diff-new">vlink</ins></code> <ins class="diff-new">attribute
                   63605: on</ins> <a href="#the-body1"><ins class="diff-new">the</ins>
                   63606: <code><ins class="diff-new">body</ins></code> <ins class=
                   63607: "diff-new">element</ins></a> .</p>
                   63608: <p><ins class="diff-new">The</ins> <dfn id="alinkcolor" title=
                   63609: "dom-document-aLinkColor"><code><ins class=
                   63610: "diff-new">aLinkColor</ins></code></dfn> <ins class=
                   63611: "diff-new">attribute on the</ins> <code><ins class=
                   63612: "diff-new">Document</ins></code> <ins class="diff-new">object
                   63613: must</ins> <a href="#reflect"><ins class=
                   63614: "diff-new">reflect</ins></a> <ins class="diff-new">the</ins>
                   63615: <code title="attr-body-alink"><ins class=
                   63616: "diff-new">alink</ins></code> <ins class="diff-new">attribute
                   63617: on</ins> <a href="#the-body1"><ins class="diff-new">the</ins>
                   63618: <code><ins class="diff-new">body</ins></code> <ins class=
                   63619: "diff-new">element</ins></a> .</p>
                   63620: <pre ins="" class="diff-new">
                   63621:    class=idl&gt;[XXX] interface <a href=
                   63622: "#htmlbodyelement">HTMLBodyElement</a> {
                   63623:            attribute DOMString <a href="#text3" title=
                   63624: "dom-body-text">text</a>;
                   63625:            attribute DOMString <a href="#bgcolor0" title=
                   63626: "dom-body-bgColor">bgColor</a>;
                   63627:            attribute DOMString <a href="#background" title=
                   63628: "dom-body-background">background</a>;
                   63629:            attribute DOMString <a href="#link0" title=
                   63630: "dom-body-link">link</a>;
                   63631:            attribute DOMString <a href="#vlink" title=
                   63632: "dom-body-vLink">vLink</a>;
                   63633:            attribute DOMString <a href="#alink" title=
                   63634: "dom-body-aLink">aLink</a>;
                   63635: };
                   63636: </pre>
                   63637: <p><ins class="diff-new">The</ins> <dfn id="text3" title=
                   63638: "dom-body-text"><code><ins class="diff-new">text</ins></code></dfn>
                   63639: <ins class="diff-new">DOM attribute of the</ins> <code><a href=
                   63640: "#body0"><ins class="diff-new">body</ins></a></code> <ins class=
                   63641: "diff-new">element must</ins> <a href="#reflect"><ins class=
                   63642: "diff-new">reflect</ins></a> <ins class="diff-new">the
                   63643: element's</ins> <code title="attr-body-text"><ins class=
                   63644: "diff-new">text</ins></code> <ins class="diff-new">content
                   63645: attribute.</ins></p>
                   63646: <p><ins class="diff-new">The</ins> <dfn id="bgcolor0" title=
                   63647: "dom-body-bgColor"><code><ins class=
                   63648: "diff-new">bgColor</ins></code></dfn> <ins class="diff-new">DOM
                   63649: attribute of the</ins> <code><a href="#body0"><ins class=
                   63650: "diff-new">body</ins></a></code> <ins class="diff-new">element
                   63651: must</ins> <a href="#reflect"><ins class=
                   63652: "diff-new">reflect</ins></a> <ins class="diff-new">the
                   63653: element's</ins> <code title="attr-body-bgcolor"><ins class=
                   63654: "diff-new">bgcolor</ins></code> <ins class="diff-new">content
                   63655: attribute.</ins></p>
                   63656: <p><ins class="diff-new">The</ins> <dfn id="background" title=
                   63657: "dom-body-background"><code><ins class=
                   63658: "diff-new">background</ins></code></dfn> <ins class="diff-new">DOM
                   63659: attribute of the</ins> <code><a href="#body0"><ins class=
                   63660: "diff-new">body</ins></a></code> <ins class="diff-new">element
                   63661: must</ins> <a href="#reflect"><ins class=
                   63662: "diff-new">reflect</ins></a> <ins class="diff-new">the
                   63663: element's</ins> <code title="attr-body-background"><ins class=
                   63664: "diff-new">background</ins></code> <ins class="diff-new">content
                   63665: attribute.</ins></p>
                   63666: <p><ins class="diff-new">The</ins> <dfn id="link0" title=
                   63667: "dom-body-link"><code><ins class="diff-new">link</ins></code></dfn>
                   63668: <ins class="diff-new">DOM attribute of the</ins> <code><a href=
                   63669: "#body0"><ins class="diff-new">body</ins></a></code> <ins class=
                   63670: "diff-new">element must</ins> <a href="#reflect"><ins class=
                   63671: "diff-new">reflect</ins></a> <ins class="diff-new">the
                   63672: element's</ins> <code title="attr-body-link"><ins class=
                   63673: "diff-new">link</ins></code> <ins class="diff-new">content
                   63674: attribute.</ins></p>
                   63675: <p><ins class="diff-new">The</ins> <dfn id="alink" title=
                   63676: "dom-body-aLink"><code><ins class=
                   63677: "diff-new">aLink</ins></code></dfn> <ins class="diff-new">DOM
                   63678: attribute of the</ins> <code><a href="#body0"><ins class=
                   63679: "diff-new">body</ins></a></code> <ins class="diff-new">element
                   63680: must</ins> <a href="#reflect"><ins class=
                   63681: "diff-new">reflect</ins></a> <ins class="diff-new">the
                   63682: element's</ins> <code title="attr-body-alink"><ins class=
                   63683: "diff-new">alink</ins></code> <ins class="diff-new">content
                   63684: attribute.</ins></p>
                   63685: <p><ins class="diff-new">The</ins> <dfn id="vlink" title=
                   63686: "dom-body-vLink"><code><ins class=
                   63687: "diff-new">vLink</ins></code></dfn> <ins class="diff-new">DOM
                   63688: attribute of the</ins> <code><a href="#body0"><ins class=
                   63689: "diff-new">body</ins></a></code> <ins class="diff-new">element
                   63690: must</ins> <a href="#reflect"><ins class=
                   63691: "diff-new">reflect</ins></a> <ins class="diff-new">the
                   63692: element's</ins> <code title="attr-body-vlink"><ins class=
                   63693: "diff-new">vlink</ins></code> <ins class="diff-new">content
                   63694: attribute.</ins></p>
                   63695: <h4 id="the-applet"><span class="secno"><ins class=
                   63696: "diff-new">9.3.2</ins></span> <ins class="diff-new">The</ins>
                   63697: <dfn id="applet"><code><ins class=
                   63698: "diff-new">applet</ins></code></dfn> <ins class=
                   63699: "diff-new">element</ins></h4>
                   63700: <p><ins class="diff-new">The</ins> <code><a href=
                   63701: "#applet"><ins class="diff-new">applet</ins></a></code> <ins class=
                   63702: "diff-new">element is a Java-specific variant of the</ins>
                   63703: <code><a href="#embed"><ins class="diff-new">embed</ins></a></code>
                   63704: <ins class="diff-new">element. In HTML5 the</ins> <code><a href=
                   63705: "#applet"><ins class="diff-new">applet</ins></a></code> <ins class=
                   63706: "diff-new">element is obsoleted so that all extension frameworks
                   63707: (Java, .NET, Flash, etc) are handled in a consistent
                   63708: manner.</ins></p>
                   63709: <p id="sandboxPluginApplet"><ins class="diff-new">If the</ins>
                   63710: <a href="#sandboxed0"><ins class="diff-new">sandboxed plugins
                   63711: browsing context flag</ins></a> <ins class="diff-new">is set on
                   63712: the</ins> <a href="#browsing1"><ins class="diff-new">browsing
                   63713: context</ins></a> <ins class="diff-new">for which the</ins>
                   63714: <code><a href="#applet"><ins class=
                   63715: "diff-new">applet</ins></a></code> <ins class="diff-new">element's
                   63716: document is the</ins> <a href="#active"><ins class=
                   63717: "diff-new">active document</ins></a> ,<ins class="diff-new">then
                   63718: the element must be ignored (it represents nothing).</ins></p>
                   63719: <p><ins class="diff-new">Otherwise,</ins> <span class=
                   63720: "big-issue"><ins class="diff-new">define how the element works, if
                   63721: supported</ins></span> .</p>
                   63722: <pre class="idl">
                   63723: [XXX] interface <a href=
                   63724: "#htmldocument">HTMLDocument</a> {<ins class="diff-new">
                   63725:   readonly attribute <a href=
                   63726: "#htmlcollection0">HTMLCollection</a> <a href="#applets" title=
                   63727: "dom-document-applets">applets</a>;
                   63728: };
                   63729: </ins>
                   63730: </pre>
                   63731: <p><ins class="diff-new">The</ins> <dfn id="applets" title=
                   63732: "dom-document-applets"><code><ins class=
                   63733: "diff-new">applets</ins></code></dfn> <ins class=
                   63734: "diff-new">attribute must return an</ins> <code><a href=
                   63735: "#htmlcollection0"><ins class=
                   63736: "diff-new">HTMLCollection</ins></a></code> <ins class=
                   63737: "diff-new">rooted at the</ins> <code><ins class=
                   63738: "diff-new">Document</ins></code> <ins class="diff-new">node, whose
                   63739: filter matches only</ins> <code><a href="#applet"><ins class=
                   63740: "diff-new">applet</ins></a></code> <ins class=
                   63741: "diff-new">elements.</ins></p>
                   63742: <h2 id="no"><span class="secno"><del class="diff-old">11.</del>
                   63743: <ins class="diff-chg">10.</ins></span> Things that you can't do
                   63744: with this specification because they are better handled using other
                   63745: technologies that are further described herein</h2>
                   63746: <p><em>This section is non-normative.</em></p>
                   63747: <p>There are certain features that are not handled by this
                   63748: specification because a client side markup language is not the
                   63749: right level for them, or because the features exist in other
                   63750: languages that can be integrated into this one. This section covers
                   63751: some of the more common requests.</p>
                   63752: <h3 id="localization"><span class="secno"><del class=
                   63753: "diff-old">11.1.</del> <ins class="diff-chg">10.1</ins></span>
                   63754: <del class="diff-old">Localisation</del> <ins class=
                   63755: "diff-chg">Localization</ins></h3>
                   63756: <p>If you wish to create <del class="diff-old">localised</del>
                   63757: <ins class="diff-chg">localized</ins> versions of an HTML
                   63758: application, the best solution is to preprocess the files on the
                   63759: server, and then use HTTP content <del class=
                   63760: "diff-old">negotation</del> <ins class="diff-chg">negotiation</ins>
                   63761: to serve the appropriate language.</p>
                   63762: <h3 id="declarative"><span class="secno"><del class=
                   63763: "diff-old">11.2.</del> <ins class="diff-chg">10.2</ins></span>
                   63764: Declarative 2D vector graphics and animation</h3>
                   63765: <p>Embedding vector graphics into XHTML documents is the domain of
                   63766: SVG.</p>
                   63767: <h3 id="declarative0"><span class="secno"><del class=
                   63768: "diff-old">11.3.</del> <ins class="diff-chg">10.3</ins></span>
                   63769: Declarative 3D scenes</h3>
                   63770: <p>Embedding 3D imagery into XHTML documents is the domain of X3D,
                   63771: or technologies based on X3D that are namespace-aware.</p>
                   63772: <h3 id="timers"><span class="secno"><del class=
                   63773: "diff-old">11.4.</del> <ins class="diff-chg">10.4</ins></span>
                   63774: Timers</h3>
                   63775: <p>This section is expected to be moved to the Window Object
                   63776: specification in due course.</p>
                   63777: <pre class="idl">
                   63778: <del class="diff-old">interface  {
                   63779: </del>
                   63780: <ins class="diff-chg">[NoInterfaceObject] interface <dfn id=
                   63781: "windowtimers">WindowTimers</dfn> {
                   63782: </ins>
                   63783:   // timers
                   63784:   long <a href="#settimeout">setTimeout</a>(in <a href=
                   63785: "#timeouthandler">TimeoutHandler</a> handler, in long timeout);
                   63786:   long <a href="#settimeout">setTimeout</a>(in <a href=
                   63787: "#timeouthandler">TimeoutHandler</a> handler, in long timeout, <var title="">arguments...</var>);
                   63788:   long <a href=
                   63789: "#settimeout">setTimeout</a>(in DOMString code, in long timeout);
                   63790:   long <a href=
                   63791: "#settimeout">setTimeout</a>(in DOMString code, in long timeout, in DOMString language);
                   63792:   void <a href="#cleartimeout">clearTimeout</a>(in long handle);
                   63793:   long <a href="#setinterval...">setInterval</a>(in <a href=
                   63794: "#timeouthandler">TimeoutHandler</a> handler, in long timeout);
                   63795:   long <a href="#setinterval...">setInterval</a>(in <a href=
                   63796: "#timeouthandler">TimeoutHandler</a> handler, in long timeout, <var title="">arguments...</var>);
                   63797:   long <a href=
                   63798: "#setinterval...">setInterval</a>(in DOMString code, in long timeout);
                   63799:   long <a href=
                   63800: "#setinterval...">setInterval</a>(in DOMString code, in long timeout, in DOMString language);
                   63801:   void <a href="#clearinterval">clearInterval</a>(in long handle);
                   63802: };
                   63803: interface <dfn id="timeouthandler">TimeoutHandler</dfn> {
                   63804: <del class="diff-old">  void handleEvent();
                   63805: </del>
                   63806: <ins class="diff-chg">  void handleEvent([Variadic] in any args);
                   63807: </ins>
                   63808: };
                   63809: </pre>
                   63810: <p>The <code><a href="#windowtimers">WindowTimers</a></code>
                   63811: interface must be obtainable from any <code><a href=
                   63812: "#window">Window</a></code> object using binding-specific casting
                   63813: methods.</p>
                   63814: <p class="big-issue"><ins class="diff-new">Actually even better
                   63815: would be to just mix it straight into Window somehow.</ins></p>
                   63816: <p>The <code><a href="#settimeout">setTimeout</a></code> and
                   63817: <code><a href="#setinterval...">setInterval</a></code> methods
                   63818: allow authors to schedule timer-based events.</p>
                   63819: <p>The <dfn id="settimeout" title="setTimeout"><code>setTimeout(
                   63820: <var title="">handler</var> , <var title="">timeout</var> [,
                   63821: <var title="">arguments...</var> ])</code></dfn> method takes a
                   63822: reference to a <code><a href=
                   63823: "#timeouthandler">TimeoutHandler</a></code> object and a length of
                   63824: time in milliseconds. It must return a handle to the timeout
                   63825: created, and then asynchronously wait <var title="">timeout</var>
                   63826: milliseconds and then invoke <code>handleEvent()</code> on the
                   63827: <var title="">handler</var> object. If any <var title=
                   63828: "">arguments...</var> were provided, they must be passed to the
                   63829: <var title="">handler</var> as arguments to the
                   63830: <code>handleEvent()</code> function.</p>
                   63831: <p><del class="diff-old">In the ECMAScript DOM binding, the
                   63832: ECMAScript native Function type must implement the TimeoutHandler
                   63833: interface such that invoking the handleEvent() method of that
                   63834: interface on the object from another language binding invokes the
                   63835: function itself, with the arguments passed to handleEvent() as the
                   63836: arguments passed to the function. In the ECMAScript DOM binding
                   63837: itself, however, the handleEvent() method of the interface is not
                   63838: directly accessible on Function objects. Such functions must be
                   63839: called in the scope of the browsing context in which they were
                   63840: created.</del> Alternatively, <dfn id="settimeout0" title=
                   63841: ""><code>setTimeout( <var title="">code</var> , <var title=
                   63842: "">timeout</var> [, <var title="">language</var> ])</code></dfn>
                   63843: may be used. This variant takes a string instead of a
                   63844: <code><a href="#timeouthandler">TimeoutHandler</a></code> object.
                   63845: That string must be parsed using the specified <var title=
                   63846: "">language</var> (defaulting to ECMAScript if the third argument
                   63847: is omitted) and executed in the scope of the <a href=
                   63848: "#browsing1">browsing context</a> associated with the
                   63849: <code><a href="#window">Window</a></code> object on which the
                   63850: <code title="setTimeout"><a href=
                   63851: "#settimeout">setTimeout()</a></code> method was invoked.</p>
                   63852: <p class="big-issue">Need to define <var title="">language</var>
                   63853: values.</p>
                   63854: <p>The <dfn id="setinterval..."><code>setInterval(...)</code></dfn>
                   63855: variants must work in the same way as the <code><a href=
                   63856: "#settimeout">setTimeout</a></code> variants except that
                   63857: <ins class="diff-new">if</ins> <var title=""><ins class=
                   63858: "diff-new">timeout</ins></var> <ins class="diff-new">is a value
                   63859: greater than zero,</ins> the <var title="">handler</var> or
                   63860: <code><a href="#code">code</a></code> must be invoked again every
                   63861: <var title="">timeout</var> milliseconds, not just the once.</p>
                   63862: <p>The <dfn id="cleartimeout"><code>clearTimeout()</code></dfn> and
                   63863: <dfn id="clearinterval"><code>clearInterval()</code></dfn> methods
                   63864: take one integer (the value returned by <code><a href=
                   63865: "#settimeout">setTimeout</a></code> and <code><a href=
                   63866: "#setinterval...">setInterval</a></code> respectively) and must
                   63867: cancel the specified timeout. When called with a value that does
                   63868: not correspond to an active timeout or interval, the methods must
                   63869: return without doing anything.</p>
                   63870: <p>Timeouts must never fire while another script is executing.
                   63871: (Thus the HTML scripting model is strictly single-threaded and not
                   63872: reentrant.)</p>
                   63873: <h2 class="no-num" id="index"><ins class=
                   63874: "diff-chg">Index</ins></h2>
                   63875: <p><del class="diff-old">11.5. Events In the ECMAScript DOM
                   63876: binding, the ECMAScript native Function type must implement the
                   63877: EventListener interface such that invoking the handleEvent()
                   63878: method</del> <em><ins class="diff-chg">This section is
                   63879: non-normative.</ins></em></p>
                   63880: <p class="big-issue"><ins class="diff-chg">List</ins> of
                   63881: <del class="diff-old">that interface on the object from another
                   63882: language binding invokes the function itself, with the event
                   63883: argument as its only argument. In the ECMAScript binding itself,
                   63884: however, the handleEvent() method</del> <ins class=
                   63885: "diff-chg">elements</ins></p>
                   63886: <p class="big-issue"><ins class="diff-chg">List</ins> of
                   63887: <del class="diff-old">the interface is not directly accessible on
                   63888: Function objects. Such functions, when invoked, must be called in
                   63889: the scope</del> <ins class="diff-chg">attributes</ins></p>
                   63890: <p class="big-issue"><ins class="diff-chg">List</ins> of
                   63891: <del class="diff-old">the browsing context that they were created
                   63892: in.</del> <ins class="diff-chg">interfaces</ins></p>
                   63893: <p class="big-issue"><ins class="diff-chg">List of events</ins></p>
                   63894: <h2 class="no-num" id="references">References</h2>
                   63895: <p class="big-issue">This section will be written in a future
                   63896: draft.</p>
                   63897: <h2 class="no-num" id="acknowledgements">Acknowledgements</h2>
                   63898: <p>Thanks to Aankhen, Aaron Boodman, Aaron Leventhal, Adam
                   63899: <ins class="diff-new">Barth, Adam</ins> Roben, <ins class=
                   63900: "diff-new">Addison Phillips, Adele Peterson,</ins> Adrian Sutton,
                   63901: Agustín Fernández, <ins class="diff-new">Alastair Campbell,</ins>
                   63902: Alexey Feldgendler, <ins class="diff-new">Anders Carlsson,</ins>
                   63903: Andrew Gove, Andrew Sidwell, Anne van Kesteren, Anthony Hickson,
                   63904: <ins class="diff-new">Anthony Ricaud,</ins> Antti Koivisto,
                   63905: <ins class="diff-new">Arphen Lin,</ins> Asbjørn Ulsberg,
                   63906: <ins class="diff-new">Ashley Sheridan, Aurelien Levy,</ins> Ben
                   63907: Godfrey, Ben Meadowcroft, <ins class="diff-new">Ben Millard,</ins>
                   63908: Benjamin Hawkes-Lewis, Bert Bos, Billy Wong, Bjoern Hoehrmann,
                   63909: Boris Zbarsky, Brad Fults, Brad Neuberg, Brady Eidson, Brendan
                   63910: Eich, Brett Wilson, Brian Campbell, <ins class="diff-new">Brian
                   63911: Smith, Bruce Miller, Cameron McCormack,</ins> Carlos Perelló Marín,
                   63912: Chao Cai, 윤석찬 (Channy Yun), Charl van Niekerk, Charles Iliya
                   63913: Krempeaux, Charles McCathieNevile, Christian Biesinger, Christian
                   63914: Johansen, Chriswa, <ins class="diff-new">Cole Robison, Collin
                   63915: Jackson,</ins> Daniel Brumbaugh Keeney, Daniel <ins class=
                   63916: "diff-new">Glazman, Daniel</ins> Peng, Daniel Spång, <ins class=
                   63917: "diff-new">Danny Sullivan,</ins> Darin <del class=
                   63918: "diff-old">Alder,</del> <ins class="diff-chg">Adler,</ins> Darin
                   63919: Fisher, Dave <ins class="diff-new">Camp, Dave</ins> Singer, Dave
                   63920: Townsend, David Baron, David <ins class="diff-new">Bloom, David
                   63921: Carlisle, David</ins> Flanagan, David Håsäther, David Hyatt,
                   63922: <ins class="diff-new">Dean Edridge, Debi Orton,</ins> Derek
                   63923: Featherstone, DeWitt Clinton, Dimitri Glazkov, dolphinling, Doron
                   63924: Rosenberg, Doug Kramer, Eira Monstad, Elliotte Harold, Erik
                   63925: Arvidsson, Evan Martin, <ins class="diff-new">Evan Prodromou,</ins>
                   63926: fantasai, Franck 'Shift' Quélain, Garrett Smith, Geoffrey
                   63927: <ins class="diff-new">Garen, Geoffrey</ins> Sneddon, Håkon Wium
                   63928: Lie, Henri Sivonen, Henrik Lied, <ins class="diff-new">Henry Mason,
                   63929: Hugh Winkler,</ins> Ignacio Javier, Ivo Emanuel Gonçalves, J. King,
                   63930: <ins class="diff-new">Jacques Distler,</ins> James Graham, James
                   63931: <ins class="diff-new">Justin Harrell, James</ins> M Snell, James
                   63932: Perrett, Jan-Klaas Kollhof, <ins class="diff-new">Jason
                   63933: White,</ins> Jasper Bryant-Greene, Jeff Cutsinger, Jeff Walden,
                   63934: Jens Bannmann, <ins class="diff-new">Jens Fendler,</ins> Jeroen van
                   63935: der Meer, <ins class="diff-new">Jim Jewett, Jim Meehan, Joe Clark,
                   63936: Jjgod Jiang,</ins> Joel Spolsky, <ins class="diff-new">Johan
                   63937: Herland,</ins> John Boyer, John Bussjaeger, John Harding, Johnny
                   63938: Stenback, Jon Perlow, Jonathan Worent, Jorgen Horstink, Josh
                   63939: Levenberg, Joshua Randall, Jukka K. Korpela, <ins class=
                   63940: "diff-new">Julian Reschke,</ins> Kai Hendry, Kornel Lesinski, 黒澤剛志
                   63941: (KUROSAWA Takeshi), Kristof Zelechovski, Lachlan Hunt, Larry Page,
                   63942: Lars Gunther, <ins class="diff-new">Laura L. Carlson, Laura
                   63943: Wisewell,</ins> Laurens Holst, <ins class="diff-new">Lee
                   63944: Kowalkowski, Leif Halvard Silli,</ins> Lenny Domnitser, Léonard
                   63945: Bouchet, Leons Petrazickis, Logan, Loune, Maciej Stachowiak,
                   63946: <ins class="diff-new">Magnus Kristiansen,</ins> Malcolm Rowe, Mark
                   63947: Nottingham, Mark Rowe, Mark Schenk, Martijn Wargers, Martin Atkins,
                   63948: Martin Dürst, Martin Honnen, <ins class="diff-new">Masataka
                   63949: Yakura,</ins> Mathieu Henri, Matthew Mastracci, Matthew Raymond,
                   63950: Matthew Thomas, Mattias Waldau, Max Romantschuk, Michael 'Ratt'
                   63951: Iannarelli, Michael A. Nachbaur, Michael A. Puls II, Michael
                   63952: <ins class="diff-new">Carter, Michael</ins> Gratton, Michael
                   63953: Powers, <ins class="diff-new">Michael(tm) Smith,</ins> Michel
                   63954: Fortin, Michiel van der Blonk, Mihai Şucan, Mike Brown, Mike
                   63955: Dierken, Mike Dixon, Mike Schinkel, Mike Shaver, Mikko Rantalainen,
                   63956: Neil Deakin, <ins class="diff-new">Neil Soiffer, Olaf
                   63957: Hoffmann,</ins> Olav Junker Kjær, <ins class="diff-new">Oliver
                   63958: Hunt, Peter Karlsson,</ins> Peter Kasting, Philip Taylor,
                   63959: <ins class="diff-new">Philip TAYLOR,</ins> Rachid Finge, Rajas
                   63960: Moonka, <ins class="diff-new">Ralf Stoltze,</ins> Ralph Giles,
                   63961: <ins class="diff-new">Raphael Champeimont, Rene Saarsoo, Richard
                   63962: Ishida,</ins> Rimantas Liubertas, Robert <ins class=
                   63963: "diff-new">Blaut, Robert</ins> O'Callahan, Robert Sayre, Roman
                   63964: Ivanov, S. Mike Dierken, Sam Ruby, Sam Weinig, Scott Hess, Sean
                   63965: Knapp, Shaun Inman, Silvia Pfeiffer, Simon Pieters, Stefan
                   63966: Haustein, Stephen Ma, Steve <ins class="diff-new">Faulkner,
                   63967: Steve</ins> Runyon, Steven Garrity, Stewart Brodie, Stuart
                   63968: Parmenter, <ins class="diff-new">Sunava Dutta,</ins> Tantek Çelik,
                   63969: <ins class="diff-new">Terrence Wood,</ins> Thomas Broyer, Thomas
                   63970: O'Connor, Tim Altman, <ins class="diff-new">Tim Johansson,</ins>
                   63971: Tyler Close, Vladimir Vukićević, Wakaba, <ins class=
                   63972: "diff-new">Wayne Pollock,</ins> William Swanson, <ins class=
                   63973: "diff-new">Yi-An Huang, and</ins> Øistein E. Andersen, <del class=
                   63974: "diff-old">and everyone on the WHATWG mailing list</del> for their
                   63975: useful and substantial comments.</p>
                   63976: <p><ins class="diff-new">Thanks also to everyone who has ever
                   63977: posted about HTML5 to their blogs, public mailing lists, or forums,
                   63978: including the</ins> <a href=
                   63979: "http://lists.w3.org/Archives/Public/public-html/"><ins class=
                   63980: "diff-new">W3C public-html list</ins></a> <ins class="diff-new">and
                   63981: the</ins> <a href="http://www.whatwg.org/mailing-list"><ins class=
                   63982: "diff-new">various WHATWG lists</ins></a> .</p>
                   63983: <p>Special thanks to Richard Williamson for creating the first
                   63984: implementation of <code><a href="#canvas">canvas</a></code> in
                   63985: Safari, from which the canvas feature was designed.</p>
                   63986: <p>Special thanks also to the Microsoft employees who first
                   63987: implemented the event-based drag-and-drop mechanism, <code title=
                   63988: "attr-contenteditable"><a href=
                   63989: "#contenteditable0">contenteditable</a></code> , and other features
                   63990: first widely deployed by the Windows Internet Explorer browser.</p>
                   63991: <p>Special thanks and $10,000 to David Hyatt who came up with a
                   63992: broken implementation of the <a href="#adoptionAgency">adoption
                   63993: agency algorithm</a> that the editor had to reverse engineer and
                   63994: fix before using it in the parsing section.</p>
                   63995: <p>Thanks <ins class="diff-new">to the many sources that provided
                   63996: inspiration for the examples used in the specification.</ins></p>
                   63997: <p><ins class="diff-new">Thanks</ins> also <ins class=
                   63998: "diff-new">to</ins> the Microsoft blogging community for some
                   63999: ideas, to the attendees of the W3C Workshop on Web Applications and
                   64000: Compound Documents for inspiration, and to the #mrt crew, the
                   64001: #mrt.no crew, <ins class="diff-new">the #whatwg crew,</ins> and the
                   64002: cabal for their ideas and support.</p>
                   64003: </body>
                   64004: </html>
                   64005: 

Webmaster