[html5] r6718 - [giow] (2) Make HTMLDocument === Document. Fixing http://www.w3.org/Bugs/Public/ [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Oct 20 16:01:05 PDT 2011


Author: ianh
Date: 2011-10-20 16:01:03 -0700 (Thu, 20 Oct 2011)
New Revision: 6718

Modified:
   complete.html
   index
   source
Log:
[giow] (2) Make HTMLDocument === Document.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=14037

Modified: complete.html
===================================================================
--- complete.html	2011-10-20 22:13:42 UTC (rev 6717)
+++ complete.html	2011-10-20 23:01:03 UTC (rev 6718)
@@ -2132,7 +2132,7 @@
   <pre><<a href=#the-form-element>form</a> <a href=#attr-form-name title=attr-form-name>name</a>="main">
  Result: <<a href=#the-output-element>output</a> <a href=#attr-fe-name title=attr-fe-name>name</a>="result"></output>
  <<a href=#the-script-element>script</a>>
-  <a href=#htmldocument title=HTMLDocument>document</a>.<a href=#dom-document-forms title=dom-document-forms>forms</a>.main.<a href=#dom-form-elements title=dom-form-elements>elements</a>.result.<a href=#dom-output-value title=dom-output-value>value</a> = 'Hello World';
+  <a href=#document title=Document>document</a>.<a href=#dom-document-forms title=dom-document-forms>forms</a>.main.<a href=#dom-form-elements title=dom-form-elements>elements</a>.result.<a href=#dom-output-value title=dom-output-value>value</a> = 'Hello World';
  </script>
 </form></pre>
 
@@ -2142,7 +2142,7 @@
   can have its "<code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>"
   attribute changed in several ways:</p>
 
-  <pre>var a = <a href=#htmldocument title=HTMLDocument>document</a>.<a href=#dom-document-links title=dom-document-links>links</a>[0]; // obtain the first link in the document
+  <pre>var a = <a href=#document title=Document>document</a>.<a href=#dom-document-links title=dom-document-links>links</a>[0]; // obtain the first link in the document
 a.<a href=#dom-a-href title=dom-a-href>href</a> = 'sample.html'; // change the destination URL of the link
 a.<a href=#dom-uda-protocol title=dom-uda-protocol>protocol</a> = 'https'; // change just the scheme part of the URL
 a.setAttribute('href', 'http://example.com/'); // change the content attribute directly</pre>
@@ -9222,26 +9222,10 @@
 
   </ol><h4 id=documents-in-the-dom><span class=secno>3.1.1 </span>Documents in the DOM</h4>
 
-  <p>All <code><a href=#document>Document</a></code> objects (in user agents implementing
-  this specification) <span class=impl>must</span> also implement
-  the <code><a href=#htmldocument>HTMLDocument</a></code> interface, available using
-  binding-specific methods. (This is the case whether or not the
-  document in question is an <a href=#html-documents title="HTML documents">HTML
-  document</a> or indeed whether it contains any <a href=#html-elements>HTML
-  elements</a> at all.) <code><a href=#document>Document</a></code> objects <span class=impl>must</span> also implement the document-level interface
-  of any other namespaces that the UA supports.</p>
-
-  <p class=example>For example, if an HTML implementation also
-  supports SVG, then the <code><a href=#document>Document</a></code> object implements both
-  <code><a href=#htmldocument>HTMLDocument</a></code> and <code>SVGDocument</code>.</p>
-
-  <p class=note>Because the <code><a href=#htmldocument>HTMLDocument</a></code> interface is
-  now obtained using binding-specific casting methods instead of
-  simply being the primary interface of the document object, it is no
-  longer defined as inheriting from <code><a href=#document>Document</a></code>.</p>
-
   <pre class=idl>[OverrideBuiltins]
-interface <dfn id=htmldocument>HTMLDocument</dfn> {
+partial interface <a href=#document>Document</a> {
+  readonly attribute <code><a href=#document>Document</a></code> <a href=#htmldocument title=HTMLDocument>HTMLDocument</a>;
+
   // <a href=#resource-metadata-management>resource metadata management</a>
   [PutForwards=<a href=#dom-location-href title=dom-location-href>href</a>] readonly attribute <a href=#location>Location</a>? <a href=#dom-document-location title=dom-document-location>location</a>;
   readonly attribute DOMString <a href=#dom-document-url title=dom-document-URL>URL</a>;
@@ -9268,7 +9252,7 @@
 <!--CSSREF-->  readonly attribute <a href=#domelementmap>DOMElementMap</a> <a href=#dom-document-csselementmap title=dom-document-cssElementMap>cssElementMap</a>;<!--CSSREF-->
 
   // <a href=#dynamic-markup-insertion>dynamic markup insertion</a>
-  <a href=#htmldocument>HTMLDocument</a> <a href=#dom-document-open title=dom-document-open>open</a>(optional DOMString type, optional DOMString replace);
+  <a href=#document>Document</a> <a href=#dom-document-open title=dom-document-open>open</a>(optional DOMString type, optional DOMString replace);
   <a href=#windowproxy>WindowProxy</a> <a href=#dom-document-open title=dom-document-open>open</a>(DOMString url, DOMString name, DOMString features, optional boolean replace);
   void <a href=#dom-document-close title=dom-document-close>close</a>();
   void <a href=#dom-document-write title=dom-document-write>write</a>(DOMString... text);
@@ -9346,12 +9330,10 @@
 
   // special <a href=#event-handler-idl-attributes>event handler IDL attributes</a> that only apply to Document objects
   [TreatNonCallableAsNull] attribute <a href=#function>Function</a>? <a href=#handler-onreadystatechange title=handler-onreadystatechange>onreadystatechange</a>;
-};
-<a href=#document>Document</a> implements <a href=#htmldocument>HTMLDocument</a>;</pre>
+};</pre>
 
-  <p>Since the <code><a href=#htmldocument>HTMLDocument</a></code> interface holds methods and
-  attributes related to a number of disparate features, the members of
-  this interface are described in various different sections.</p>
+  <p>The <dfn id=htmldocument><code>HTMLDocument</code></dfn> IDL attribute must
+  return the <code><a href=#document>Document</a></code> object on which it is called.</p>
 
 
   <h4 id=security-document><span class=secno>3.1.2 </span>Security</h4>
@@ -9628,8 +9610,9 @@
   <ol><li><p>If the <a href=#root-element>root element</a> is an <code><a href=#svg>svg</a></code>
    element in the "<code title="">http://www.w3.org/2000/svg</code>"
    namespace, and the user agent supports SVG, then the setter must
-   defer to the setter for the IDL attribute of the same name on the
-   <code>SVGDocument</code> interface. Stop the algorithm here. <a href=#refsSVG>[SVG]</a></li>
+   act as if it was the setter for the IDL attribute of the same name
+   on the <code><a href=#document>Document</a></code> interface defined by the SVG
+   specification. Stop the algorithm here. <a href=#refsSVG>[SVG]</a></li>
 
    <li>If <a href=#the-title-element-0>the <code>title</code> element</a> is null and
    <a href=#the-head-element-0>the <code>head</code> element</a> is null, then the
@@ -9646,10 +9629,10 @@
    <li>A single <code><a href=#text>Text</a></code> node whose data is the new value
    being assigned must be appended to <var title="">element</var>.</li>
 
-  </ol><p>The <code title=dom-document-title><a href=#document.title>title</a></code> attribute on
-  the <code><a href=#htmldocument>HTMLDocument</a></code> interface should shadow the attribute
-  of the same name on the <code>SVGDocument</code> interface when the
-  user agent supports both HTML and SVG. <a href=#refsSVG>[SVG]</a></p>
+  </ol><p>The <code title=dom-document-title><a href=#document.title>title</a></code> IDL attribute
+  defined above must replace the attribute of the same name on the
+  <code><a href=#document>Document</a></code> interface defined by the SVG specification
+  when the user agent supports both HTML and SVG. <a href=#refsSVG>[SVG]</a></p>
 
   </div>
 
@@ -9868,7 +9851,7 @@
 
   <div class=impl>
 
-  <hr><p>The <code><a href=#htmldocument>HTMLDocument</a></code> interface <span title="support
+  <hr><p>The <code><a href=#document>Document</a></code> interface <span title="support
   named properties">supports named properties</span>. The
   <a href=#supported-property-names>supported property names</a> at any moment consist of the
   values of the <code title=attr-name>name</code> content attributes
@@ -9889,7 +9872,7 @@
   elements in the <code><a href=#document>Document</a></code> that have both <code title=attr-name>name</code> content attributes and <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes.</p>
 
   <p>To <a href=#determine-the-value-of-a-named-property>determine the value of a named property</a> <var title="">name</var> when <dfn id=dom-document-nameditem title=dom-document-namedItem>the
-  <code>HTMLDocument</code> object is indexed for property
+  <code>Document</code> object is indexed for property
   retrieval</dfn>, the user agent must return the value obtained using
   the following steps:</p>
 
@@ -9959,7 +9942,7 @@
   </div>
 
   <hr><p class=note>The <code title=dom-document-dir><a href=#dom-document-dir>dir</a></code>
-  attribute on the <code><a href=#htmldocument>HTMLDocument</a></code> interface is defined
+  attribute on the <code><a href=#document>Document</a></code> interface is defined
   along with the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> content
   attribute.</p>
 
@@ -10884,7 +10867,7 @@
   <a href=#limited-to-only-known-values>limited to only known values</a>.</p>
 
   <p>The <dfn id=dom-document-dir title=dom-document-dir><code>dir</code></dfn> IDL
-  attribute on <code><a href=#htmldocument>HTMLDocument</a></code> objects must
+  attribute on <code><a href=#document>Document</a></code> objects must
   <a href=#reflect>reflect</a> the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> content
   attribute of <a href=#the-html-element-0>the <code>html</code> element</a>, if any,
   <a href=#limited-to-only-known-values>limited to only known values</a>. If there is no such
@@ -13066,10 +13049,10 @@
   tasks</a> or <a href=#completely-loaded>completely loaded</a>.</p>
 
   <p>When called with three or more arguments, the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method on the
-  <code><a href=#htmldocument>HTMLDocument</a></code> object must call the <code title=dom-open><a href=#dom-open>open()</a></code> method on the <code><a href=#window>Window</a></code>
-  object of the <code><a href=#htmldocument>HTMLDocument</a></code> object, with the same
+  <code><a href=#document>Document</a></code> object must call the <code title=dom-open><a href=#dom-open>open()</a></code> method on the <code><a href=#window>Window</a></code>
+  object of the <code><a href=#document>Document</a></code> object, with the same
   arguments as the original call to the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method, and return whatever
-  that method returned. If the <code><a href=#htmldocument>HTMLDocument</a></code> object has no
+  that method returned. If the <code><a href=#document>Document</a></code> object has no
   <code><a href=#window>Window</a></code> object, then the method must throw an
   <code><a href=#invalidaccesserror>InvalidAccessError</a></code> exception.</p>
 
@@ -54359,7 +54342,7 @@
   </dl><div class=impl>
 
   <p>The <dfn id=dom-document-commands title=dom-document-commands><code>commands</code></dfn> attribute
-  of the document's <code><a href=#htmldocument>HTMLDocument</a></code> interface must return an
+  of the document's <code><a href=#document>Document</a></code> interface must return an
   <code><a href=#htmlcollection>HTMLCollection</a></code> rooted at the <code><a href=#document>Document</a></code>
   node, whose filter matches only elements that <a href=#concept-command title=concept-command>define commands</a> and have <a href=#command-facet-id title=command-facet-ID>IDs</a>.</p>
 
@@ -62595,7 +62578,7 @@
   context</a>'s <a href=#active-document>active document</a>.</p>
 
   <p>The <dfn id=dom-document-defaultview title=dom-document-defaultView><code>defaultView</code></dfn> IDL
-  attribute of the <code><a href=#htmldocument>HTMLDocument</a></code> interface must return the
+  attribute of the <code><a href=#document>Document</a></code> interface must return the
   <code><a href=#document>Document</a></code>'s <a href=#browsing-context>browsing context</a>'s
   <code><a href=#windowproxy>WindowProxy</a></code> object, if there is one, or null
   otherwise.</p>
@@ -64365,7 +64348,7 @@
   </dl><div class=impl>
 
   <p>The <dfn id=dom-document-location title=dom-document-location><code>location</code></dfn> attribute
-  of the <code><a href=#htmldocument>HTMLDocument</a></code> interface must return the
+  of the <code><a href=#document>Document</a></code> interface must return the
   <code><a href=#location>Location</a></code> object for that <code><a href=#document>Document</a></code> object,
   if it is in a <a href=#browsing-context>browsing context</a>, and null otherwise.</p>
 
@@ -69625,7 +69608,7 @@
   </table><p class=note>The <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code>
   handler is also used for <a href=#runtime-script-errors>reporting script errors</a>.</p>
 
-  <hr><!-- this guy is only on HTMLDocument and not on HTMLElement because
+  <hr><!-- this guy is only on Document and not on HTMLElement because
   otherwise HTMLScriptElement would have it and that causes
   compatibility issues since IE fires readystatechange events on
   <script>, not load events, and we can't fire both, and some sites
@@ -72012,13 +71995,13 @@
   </dl><div class=impl>
 
   <p>The <dfn id=dom-document-activeelement title=dom-document-activeElement><code>activeElement</code></dfn>
-  attribute on <code><a href=#htmldocument>HTMLDocument</a></code> objects must return the
+  attribute on <code><a href=#document>Document</a></code> objects must return the
   element in the document that is focused. If no element in the
   <code><a href=#document>Document</a></code> is focused, this must return <a href=#the-body-element-0>the body
   element</a>.</p>
 
   <p>The <dfn id=dom-document-hasfocus title=dom-document-hasFocus><code>hasFocus()</code></dfn> method
-  on <code><a href=#htmldocument>HTMLDocument</a></code> objects must return true if the
+  on <code><a href=#document>Document</a></code> objects must return true if the
   <code><a href=#document>Document</a></code>'s <a href=#browsing-context>browsing context</a> is focused,
   and all its <a href=#ancestor-browsing-context title="ancestor browsing context">ancestor
   browsing contexts</a> are also focused, and the <a href=#top-level-browsing-context>top-level
@@ -97466,7 +97449,7 @@
   spec, albeit as obsolete, and then we say that only elements not
   defined in this spec use HTMLUnknownElement. -->
 
-  <hr><pre class=idl>partial interface <a href=#htmldocument>HTMLDocument</a> {
+  <hr><pre class=idl>partial interface <a href=#document>Document</a> {
   [TreatNullAs=EmptyString] attribute DOMString <a href=#dom-document-fgcolor title=dom-document-fgColor>fgColor</a>;
   [TreatNullAs=EmptyString] attribute DOMString <a href=#dom-document-linkcolor title=dom-document-linkColor>linkColor</a>;
   [TreatNullAs=EmptyString] attribute DOMString <a href=#dom-document-vlinkcolor title=dom-document-vlinkColor>vlinkColor</a>;
@@ -102645,8 +102628,8 @@
         library.onload = function() {
           var sound1 = library.getAudio("sound1.wav"); // returns an Audio object
           var image1 = library.getImage("image1.png"); // returns an HTMLImageElement
-          var doc1 = library.getXMLDocument("doc1.xml"); // returns a Document
-          var doc2 = library.getHTMLDocument("doc1.html"); // returns an HTMLDocument
+          var doc1 = library.getXMLDocument("doc1.xml"); // returns a Document (XML Document mode)
+          var doc2 = library.getHTMLDocument("doc1.html"); // returns a Document (HTML Document mode)
         }
        or:
         var library = new ResourceLoader("data.zip");

Modified: index
===================================================================
--- index	2011-10-20 22:13:42 UTC (rev 6717)
+++ index	2011-10-20 23:01:03 UTC (rev 6718)
@@ -2132,7 +2132,7 @@
   <pre><<a href=#the-form-element>form</a> <a href=#attr-form-name title=attr-form-name>name</a>="main">
  Result: <<a href=#the-output-element>output</a> <a href=#attr-fe-name title=attr-fe-name>name</a>="result"></output>
  <<a href=#the-script-element>script</a>>
-  <a href=#htmldocument title=HTMLDocument>document</a>.<a href=#dom-document-forms title=dom-document-forms>forms</a>.main.<a href=#dom-form-elements title=dom-form-elements>elements</a>.result.<a href=#dom-output-value title=dom-output-value>value</a> = 'Hello World';
+  <a href=#document title=Document>document</a>.<a href=#dom-document-forms title=dom-document-forms>forms</a>.main.<a href=#dom-form-elements title=dom-form-elements>elements</a>.result.<a href=#dom-output-value title=dom-output-value>value</a> = 'Hello World';
  </script>
 </form></pre>
 
@@ -2142,7 +2142,7 @@
   can have its "<code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>"
   attribute changed in several ways:</p>
 
-  <pre>var a = <a href=#htmldocument title=HTMLDocument>document</a>.<a href=#dom-document-links title=dom-document-links>links</a>[0]; // obtain the first link in the document
+  <pre>var a = <a href=#document title=Document>document</a>.<a href=#dom-document-links title=dom-document-links>links</a>[0]; // obtain the first link in the document
 a.<a href=#dom-a-href title=dom-a-href>href</a> = 'sample.html'; // change the destination URL of the link
 a.<a href=#dom-uda-protocol title=dom-uda-protocol>protocol</a> = 'https'; // change just the scheme part of the URL
 a.setAttribute('href', 'http://example.com/'); // change the content attribute directly</pre>
@@ -9222,26 +9222,10 @@
 
   </ol><h4 id=documents-in-the-dom><span class=secno>3.1.1 </span>Documents in the DOM</h4>
 
-  <p>All <code><a href=#document>Document</a></code> objects (in user agents implementing
-  this specification) <span class=impl>must</span> also implement
-  the <code><a href=#htmldocument>HTMLDocument</a></code> interface, available using
-  binding-specific methods. (This is the case whether or not the
-  document in question is an <a href=#html-documents title="HTML documents">HTML
-  document</a> or indeed whether it contains any <a href=#html-elements>HTML
-  elements</a> at all.) <code><a href=#document>Document</a></code> objects <span class=impl>must</span> also implement the document-level interface
-  of any other namespaces that the UA supports.</p>
-
-  <p class=example>For example, if an HTML implementation also
-  supports SVG, then the <code><a href=#document>Document</a></code> object implements both
-  <code><a href=#htmldocument>HTMLDocument</a></code> and <code>SVGDocument</code>.</p>
-
-  <p class=note>Because the <code><a href=#htmldocument>HTMLDocument</a></code> interface is
-  now obtained using binding-specific casting methods instead of
-  simply being the primary interface of the document object, it is no
-  longer defined as inheriting from <code><a href=#document>Document</a></code>.</p>
-
   <pre class=idl>[OverrideBuiltins]
-interface <dfn id=htmldocument>HTMLDocument</dfn> {
+partial interface <a href=#document>Document</a> {
+  readonly attribute <code><a href=#document>Document</a></code> <a href=#htmldocument title=HTMLDocument>HTMLDocument</a>;
+
   // <a href=#resource-metadata-management>resource metadata management</a>
   [PutForwards=<a href=#dom-location-href title=dom-location-href>href</a>] readonly attribute <a href=#location>Location</a>? <a href=#dom-document-location title=dom-document-location>location</a>;
   readonly attribute DOMString <a href=#dom-document-url title=dom-document-URL>URL</a>;
@@ -9268,7 +9252,7 @@
 <!--CSSREF-->  readonly attribute <a href=#domelementmap>DOMElementMap</a> <a href=#dom-document-csselementmap title=dom-document-cssElementMap>cssElementMap</a>;<!--CSSREF-->
 
   // <a href=#dynamic-markup-insertion>dynamic markup insertion</a>
-  <a href=#htmldocument>HTMLDocument</a> <a href=#dom-document-open title=dom-document-open>open</a>(optional DOMString type, optional DOMString replace);
+  <a href=#document>Document</a> <a href=#dom-document-open title=dom-document-open>open</a>(optional DOMString type, optional DOMString replace);
   <a href=#windowproxy>WindowProxy</a> <a href=#dom-document-open title=dom-document-open>open</a>(DOMString url, DOMString name, DOMString features, optional boolean replace);
   void <a href=#dom-document-close title=dom-document-close>close</a>();
   void <a href=#dom-document-write title=dom-document-write>write</a>(DOMString... text);
@@ -9346,12 +9330,10 @@
 
   // special <a href=#event-handler-idl-attributes>event handler IDL attributes</a> that only apply to Document objects
   [TreatNonCallableAsNull] attribute <a href=#function>Function</a>? <a href=#handler-onreadystatechange title=handler-onreadystatechange>onreadystatechange</a>;
-};
-<a href=#document>Document</a> implements <a href=#htmldocument>HTMLDocument</a>;</pre>
+};</pre>
 
-  <p>Since the <code><a href=#htmldocument>HTMLDocument</a></code> interface holds methods and
-  attributes related to a number of disparate features, the members of
-  this interface are described in various different sections.</p>
+  <p>The <dfn id=htmldocument><code>HTMLDocument</code></dfn> IDL attribute must
+  return the <code><a href=#document>Document</a></code> object on which it is called.</p>
 
 
   <h4 id=security-document><span class=secno>3.1.2 </span>Security</h4>
@@ -9628,8 +9610,9 @@
   <ol><li><p>If the <a href=#root-element>root element</a> is an <code><a href=#svg>svg</a></code>
    element in the "<code title="">http://www.w3.org/2000/svg</code>"
    namespace, and the user agent supports SVG, then the setter must
-   defer to the setter for the IDL attribute of the same name on the
-   <code>SVGDocument</code> interface. Stop the algorithm here. <a href=#refsSVG>[SVG]</a></li>
+   act as if it was the setter for the IDL attribute of the same name
+   on the <code><a href=#document>Document</a></code> interface defined by the SVG
+   specification. Stop the algorithm here. <a href=#refsSVG>[SVG]</a></li>
 
    <li>If <a href=#the-title-element-0>the <code>title</code> element</a> is null and
    <a href=#the-head-element-0>the <code>head</code> element</a> is null, then the
@@ -9646,10 +9629,10 @@
    <li>A single <code><a href=#text>Text</a></code> node whose data is the new value
    being assigned must be appended to <var title="">element</var>.</li>
 
-  </ol><p>The <code title=dom-document-title><a href=#document.title>title</a></code> attribute on
-  the <code><a href=#htmldocument>HTMLDocument</a></code> interface should shadow the attribute
-  of the same name on the <code>SVGDocument</code> interface when the
-  user agent supports both HTML and SVG. <a href=#refsSVG>[SVG]</a></p>
+  </ol><p>The <code title=dom-document-title><a href=#document.title>title</a></code> IDL attribute
+  defined above must replace the attribute of the same name on the
+  <code><a href=#document>Document</a></code> interface defined by the SVG specification
+  when the user agent supports both HTML and SVG. <a href=#refsSVG>[SVG]</a></p>
 
   </div>
 
@@ -9868,7 +9851,7 @@
 
   <div class=impl>
 
-  <hr><p>The <code><a href=#htmldocument>HTMLDocument</a></code> interface <span title="support
+  <hr><p>The <code><a href=#document>Document</a></code> interface <span title="support
   named properties">supports named properties</span>. The
   <a href=#supported-property-names>supported property names</a> at any moment consist of the
   values of the <code title=attr-name>name</code> content attributes
@@ -9889,7 +9872,7 @@
   elements in the <code><a href=#document>Document</a></code> that have both <code title=attr-name>name</code> content attributes and <code title=attr-id><a href=#the-id-attribute>id</a></code> content attributes.</p>
 
   <p>To <a href=#determine-the-value-of-a-named-property>determine the value of a named property</a> <var title="">name</var> when <dfn id=dom-document-nameditem title=dom-document-namedItem>the
-  <code>HTMLDocument</code> object is indexed for property
+  <code>Document</code> object is indexed for property
   retrieval</dfn>, the user agent must return the value obtained using
   the following steps:</p>
 
@@ -9959,7 +9942,7 @@
   </div>
 
   <hr><p class=note>The <code title=dom-document-dir><a href=#dom-document-dir>dir</a></code>
-  attribute on the <code><a href=#htmldocument>HTMLDocument</a></code> interface is defined
+  attribute on the <code><a href=#document>Document</a></code> interface is defined
   along with the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> content
   attribute.</p>
 
@@ -10884,7 +10867,7 @@
   <a href=#limited-to-only-known-values>limited to only known values</a>.</p>
 
   <p>The <dfn id=dom-document-dir title=dom-document-dir><code>dir</code></dfn> IDL
-  attribute on <code><a href=#htmldocument>HTMLDocument</a></code> objects must
+  attribute on <code><a href=#document>Document</a></code> objects must
   <a href=#reflect>reflect</a> the <code title=attr-dir><a href=#the-dir-attribute>dir</a></code> content
   attribute of <a href=#the-html-element-0>the <code>html</code> element</a>, if any,
   <a href=#limited-to-only-known-values>limited to only known values</a>. If there is no such
@@ -13066,10 +13049,10 @@
   tasks</a> or <a href=#completely-loaded>completely loaded</a>.</p>
 
   <p>When called with three or more arguments, the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method on the
-  <code><a href=#htmldocument>HTMLDocument</a></code> object must call the <code title=dom-open><a href=#dom-open>open()</a></code> method on the <code><a href=#window>Window</a></code>
-  object of the <code><a href=#htmldocument>HTMLDocument</a></code> object, with the same
+  <code><a href=#document>Document</a></code> object must call the <code title=dom-open><a href=#dom-open>open()</a></code> method on the <code><a href=#window>Window</a></code>
+  object of the <code><a href=#document>Document</a></code> object, with the same
   arguments as the original call to the <code title=dom-document-open><a href=#dom-document-open>open()</a></code> method, and return whatever
-  that method returned. If the <code><a href=#htmldocument>HTMLDocument</a></code> object has no
+  that method returned. If the <code><a href=#document>Document</a></code> object has no
   <code><a href=#window>Window</a></code> object, then the method must throw an
   <code><a href=#invalidaccesserror>InvalidAccessError</a></code> exception.</p>
 
@@ -54359,7 +54342,7 @@
   </dl><div class=impl>
 
   <p>The <dfn id=dom-document-commands title=dom-document-commands><code>commands</code></dfn> attribute
-  of the document's <code><a href=#htmldocument>HTMLDocument</a></code> interface must return an
+  of the document's <code><a href=#document>Document</a></code> interface must return an
   <code><a href=#htmlcollection>HTMLCollection</a></code> rooted at the <code><a href=#document>Document</a></code>
   node, whose filter matches only elements that <a href=#concept-command title=concept-command>define commands</a> and have <a href=#command-facet-id title=command-facet-ID>IDs</a>.</p>
 
@@ -62595,7 +62578,7 @@
   context</a>'s <a href=#active-document>active document</a>.</p>
 
   <p>The <dfn id=dom-document-defaultview title=dom-document-defaultView><code>defaultView</code></dfn> IDL
-  attribute of the <code><a href=#htmldocument>HTMLDocument</a></code> interface must return the
+  attribute of the <code><a href=#document>Document</a></code> interface must return the
   <code><a href=#document>Document</a></code>'s <a href=#browsing-context>browsing context</a>'s
   <code><a href=#windowproxy>WindowProxy</a></code> object, if there is one, or null
   otherwise.</p>
@@ -64365,7 +64348,7 @@
   </dl><div class=impl>
 
   <p>The <dfn id=dom-document-location title=dom-document-location><code>location</code></dfn> attribute
-  of the <code><a href=#htmldocument>HTMLDocument</a></code> interface must return the
+  of the <code><a href=#document>Document</a></code> interface must return the
   <code><a href=#location>Location</a></code> object for that <code><a href=#document>Document</a></code> object,
   if it is in a <a href=#browsing-context>browsing context</a>, and null otherwise.</p>
 
@@ -69625,7 +69608,7 @@
   </table><p class=note>The <code title=handler-window-onerror><a href=#handler-window-onerror>onerror</a></code>
   handler is also used for <a href=#runtime-script-errors>reporting script errors</a>.</p>
 
-  <hr><!-- this guy is only on HTMLDocument and not on HTMLElement because
+  <hr><!-- this guy is only on Document and not on HTMLElement because
   otherwise HTMLScriptElement would have it and that causes
   compatibility issues since IE fires readystatechange events on
   <script>, not load events, and we can't fire both, and some sites
@@ -72012,13 +71995,13 @@
   </dl><div class=impl>
 
   <p>The <dfn id=dom-document-activeelement title=dom-document-activeElement><code>activeElement</code></dfn>
-  attribute on <code><a href=#htmldocument>HTMLDocument</a></code> objects must return the
+  attribute on <code><a href=#document>Document</a></code> objects must return the
   element in the document that is focused. If no element in the
   <code><a href=#document>Document</a></code> is focused, this must return <a href=#the-body-element-0>the body
   element</a>.</p>
 
   <p>The <dfn id=dom-document-hasfocus title=dom-document-hasFocus><code>hasFocus()</code></dfn> method
-  on <code><a href=#htmldocument>HTMLDocument</a></code> objects must return true if the
+  on <code><a href=#document>Document</a></code> objects must return true if the
   <code><a href=#document>Document</a></code>'s <a href=#browsing-context>browsing context</a> is focused,
   and all its <a href=#ancestor-browsing-context title="ancestor browsing context">ancestor
   browsing contexts</a> are also focused, and the <a href=#top-level-browsing-context>top-level
@@ -97466,7 +97449,7 @@
   spec, albeit as obsolete, and then we say that only elements not
   defined in this spec use HTMLUnknownElement. -->
 
-  <hr><pre class=idl>partial interface <a href=#htmldocument>HTMLDocument</a> {
+  <hr><pre class=idl>partial interface <a href=#document>Document</a> {
   [TreatNullAs=EmptyString] attribute DOMString <a href=#dom-document-fgcolor title=dom-document-fgColor>fgColor</a>;
   [TreatNullAs=EmptyString] attribute DOMString <a href=#dom-document-linkcolor title=dom-document-linkColor>linkColor</a>;
   [TreatNullAs=EmptyString] attribute DOMString <a href=#dom-document-vlinkcolor title=dom-document-vlinkColor>vlinkColor</a>;
@@ -102645,8 +102628,8 @@
         library.onload = function() {
           var sound1 = library.getAudio("sound1.wav"); // returns an Audio object
           var image1 = library.getImage("image1.png"); // returns an HTMLImageElement
-          var doc1 = library.getXMLDocument("doc1.xml"); // returns a Document
-          var doc2 = library.getHTMLDocument("doc1.html"); // returns an HTMLDocument
+          var doc1 = library.getXMLDocument("doc1.xml"); // returns a Document (XML Document mode)
+          var doc2 = library.getHTMLDocument("doc1.html"); // returns a Document (HTML Document mode)
         }
        or:
         var library = new ResourceLoader("data.zip");

Modified: source
===================================================================
--- source	2011-10-20 22:13:42 UTC (rev 6717)
+++ source	2011-10-20 23:01:03 UTC (rev 6718)
@@ -931,7 +931,7 @@
   <pre><<span>form</span> <span title="attr-form-name">name</span>="main">
  Result: <<span>output</span> <span title="attr-fe-name">name</span>="result"></output>
  <<span>script</span>>
-  <span title="HTMLDocument">document</span>.<span title="dom-document-forms">forms</span>.main.<span title="dom-form-elements">elements</span>.result.<span title="dom-output-value">value</span> = 'Hello World';
+  <span title="Document">document</span>.<span title="dom-document-forms">forms</span>.main.<span title="dom-form-elements">elements</span>.result.<span title="dom-output-value">value</span> = 'Hello World';
  </script>
 </form></pre>
 
@@ -941,7 +941,7 @@
   can have its "<code title="attr-hyperlink-href">href</code>"
   attribute changed in several ways:</p>
 
-  <pre>var a = <span title="HTMLDocument">document</span>.<span title="dom-document-links">links</span>[0]; // obtain the first link in the document
+  <pre>var a = <span title="Document">document</span>.<span title="dom-document-links">links</span>[0]; // obtain the first link in the document
 a.<span title="dom-a-href">href</span> = 'sample.html'; // change the destination URL of the link
 a.<span title="dom-uda-protocol">protocol</span> = 'https'; // change just the scheme part of the URL
 a.setAttribute('href', 'http://example.com/'); // change the content attribute directly</pre>
@@ -9249,27 +9249,10 @@
 
   <h4>Documents in the DOM</h4>
 
-  <p>All <code>Document</code> objects (in user agents implementing
-  this specification) <span class="impl">must</span> also implement
-  the <code>HTMLDocument</code> interface, available using
-  binding-specific methods. (This is the case whether or not the
-  document in question is an <span title="HTML documents">HTML
-  document</span> or indeed whether it contains any <span>HTML
-  elements</span> at all.) <code>Document</code> objects <span
-  class="impl">must</span> also implement the document-level interface
-  of any other namespaces that the UA supports.</p>
-
-  <p class="example">For example, if an HTML implementation also
-  supports SVG, then the <code>Document</code> object implements both
-  <code>HTMLDocument</code> and <code>SVGDocument</code>.</p>
-
-  <p class="note">Because the <code>HTMLDocument</code> interface is
-  now obtained using binding-specific casting methods instead of
-  simply being the primary interface of the document object, it is no
-  longer defined as inheriting from <code>Document</code>.</p>
-
   <pre class="idl">[OverrideBuiltins]
-interface <dfn>HTMLDocument</dfn> {
+partial interface <span>Document</span> {
+  readonly attribute <code>Document</code> <span title="HTMLDocument">HTMLDocument</span>;
+
   // <span>resource metadata management</span>
   [PutForwards=<span title="dom-location-href">href</span>] readonly attribute <span>Location</span>? <span title="dom-document-location">location</span>;
   readonly attribute DOMString <span title="dom-document-URL">URL</span>;
@@ -9296,7 +9279,7 @@
 <!--END w3c-html--><!--CSSREF-->  readonly attribute <span>DOMElementMap</span> <span title="dom-document-cssElementMap">cssElementMap</span>;<!--START w3c-html--><!--CSSREF-->
 
   // <span>dynamic markup insertion</span>
-  <span>HTMLDocument</span> <span title="dom-document-open">open</span>(optional DOMString type, optional DOMString replace);
+  <span>Document</span> <span title="dom-document-open">open</span>(optional DOMString type, optional DOMString replace);
   <span>WindowProxy</span> <span title="dom-document-open">open</span>(DOMString url, DOMString name, DOMString features, optional boolean replace);
   void <span title="dom-document-close">close</span>();
   void <span title="dom-document-write">write</span>(DOMString... text);
@@ -9374,12 +9357,10 @@
 
   // special <span>event handler IDL attributes</span> that only apply to Document objects
   [TreatNonCallableAsNull] attribute <span>Function</span>? <span title="handler-onreadystatechange">onreadystatechange</span>;
-};
-<span>Document</span> implements <span>HTMLDocument</span>;</pre>
+};</pre>
 
-  <p>Since the <code>HTMLDocument</code> interface holds methods and
-  attributes related to a number of disparate features, the members of
-  this interface are described in various different sections.</p>
+  <p>The <dfn><code>HTMLDocument</code></dfn> IDL attribute must
+  return the <code>Document</code> object on which it is called.</p>
 
 
   <h4 id="security-document">Security</h4>
@@ -9725,8 +9706,9 @@
    <li><p>If the <span>root element</span> is an <code>svg</code>
    element in the "<code title="">http://www.w3.org/2000/svg</code>"
    namespace, and the user agent supports SVG, then the setter must
-   defer to the setter for the IDL attribute of the same name on the
-   <code>SVGDocument</code> interface. Stop the algorithm here. <a
+   act as if it was the setter for the IDL attribute of the same name
+   on the <code>Document</code> interface defined by the SVG
+   specification. Stop the algorithm here. <a
    href="#refsSVG">[SVG]</a></p></li>
 
    <li>If <span>the <code>title</code> element</span> is null and
@@ -9749,10 +9731,10 @@
 
   </ol>
 
-  <p>The <code title="dom-document-title">title</code> attribute on
-  the <code>HTMLDocument</code> interface should shadow the attribute
-  of the same name on the <code>SVGDocument</code> interface when the
-  user agent supports both HTML and SVG. <a
+  <p>The <code title="dom-document-title">title</code> IDL attribute
+  defined above must replace the attribute of the same name on the
+  <code>Document</code> interface defined by the SVG specification
+  when the user agent supports both HTML and SVG. <a
   href="#refsSVG">[SVG]</a></p>
 
   </div>
@@ -10024,7 +10006,7 @@
 
   <hr>
 
-  <p>The <code>HTMLDocument</code> interface <span title="support
+  <p>The <code>Document</code> interface <span title="support
   named properties">supports named properties</span>. The
   <span>supported property names</span> at any moment consist of the
   values of the <code title="attr-name">name</code> content attributes
@@ -10050,7 +10032,7 @@
 
   <p>To <span>determine the value of a named property</span> <var
   title="">name</var> when <dfn title="dom-document-namedItem">the
-  <code>HTMLDocument</code> object is indexed for property
+  <code>Document</code> object is indexed for property
   retrieval</dfn>, the user agent must return the value obtained using
   the following steps:</p>
 
@@ -10137,7 +10119,7 @@
   <hr>
 
   <p class="note">The <code title="dom-document-dir">dir</code>
-  attribute on the <code>HTMLDocument</code> interface is defined
+  attribute on the <code>Document</code> interface is defined
   along with the <code title="attr-dir">dir</code> content
   attribute.</p>
 
@@ -11175,7 +11157,7 @@
   <span>limited to only known values</span>.</p>
 
   <p>The <dfn title="dom-document-dir"><code>dir</code></dfn> IDL
-  attribute on <code>HTMLDocument</code> objects must
+  attribute on <code>Document</code> objects must
   <span>reflect</span> the <code title="attr-dir">dir</code> content
   attribute of <span>the <code>html</code> element</span>, if any,
   <span>limited to only known values</span>. If there is no such
@@ -13647,12 +13629,12 @@
 
   <p>When called with three or more arguments, the <code
   title="dom-document-open">open()</code> method on the
-  <code>HTMLDocument</code> object must call the <code
+  <code>Document</code> object must call the <code
   title="dom-open">open()</code> method on the <code>Window</code>
-  object of the <code>HTMLDocument</code> object, with the same
+  object of the <code>Document</code> object, with the same
   arguments as the original call to the <code
   title="dom-document-open">open()</code> method, and return whatever
-  that method returned. If the <code>HTMLDocument</code> object has no
+  that method returned. If the <code>Document</code> object has no
   <code>Window</code> object, then the method must throw an
   <code>InvalidAccessError</code> exception.</p>
 
@@ -61210,7 +61192,7 @@
 
   <p>The <dfn
   title="dom-document-commands"><code>commands</code></dfn> attribute
-  of the document's <code>HTMLDocument</code> interface must return an
+  of the document's <code>Document</code> interface must return an
   <code>HTMLCollection</code> rooted at the <code>Document</code>
   node, whose filter matches only elements that <span
   title="concept-command">define commands</span> and have <span
@@ -65795,7 +65777,7 @@
   <h3>Microdata DOM API</h3>
 
 <!--END html--><!--END dev-html--><!--END complete--><!--END epub--><!--MD-->
-  <pre class="idl">partial interface <span>HTMLDocument</span> { <!--WARNING: ALSO DUPLICATED IN HTMLDocument SECTION-->
+  <pre class="idl">partial interface <span>Document</span> { <!--WARNING: ALSO DUPLICATED IN Document SECTION-->
   NodeList <span title="dom-document-getItems">getItems</span>(optional DOMString typeNames); // <span>microdata</span>
 };
 
@@ -71055,7 +71037,7 @@
 
   <p>The <dfn
   title="dom-document-defaultView"><code>defaultView</code></dfn> IDL
-  attribute of the <code>HTMLDocument</code> interface must return the
+  attribute of the <code>Document</code> interface must return the
   <code>Document</code>'s <span>browsing context</span>'s
   <code>WindowProxy</code> object, if there is one, or null
   otherwise.</p>
@@ -73079,7 +73061,7 @@
 
   <p>The <dfn
   title="dom-document-location"><code>location</code></dfn> attribute
-  of the <code>HTMLDocument</code> interface must return the
+  of the <code>Document</code> interface must return the
   <code>Location</code> object for that <code>Document</code> object,
   if it is in a <span>browsing context</span>, and null otherwise.</p>
 
@@ -79207,7 +79189,7 @@
 
   <hr>
 
-  <!-- this guy is only on HTMLDocument and not on HTMLElement because
+  <!-- this guy is only on Document and not on HTMLElement because
   otherwise HTMLScriptElement would have it and that causes
   compatibility issues since IE fires readystatechange events on
   <script>, not load events, and we can't fire both, and some sites
@@ -81969,14 +81951,14 @@
 
   <p>The <dfn
   title="dom-document-activeElement"><code>activeElement</code></dfn>
-  attribute on <code>HTMLDocument</code> objects must return the
+  attribute on <code>Document</code> objects must return the
   element in the document that is focused. If no element in the
   <code>Document</code> is focused, this must return <span>the body
   element</span>.</p>
 
   <p>The <dfn
   title="dom-document-hasFocus"><code>hasFocus()</code></dfn> method
-  on <code>HTMLDocument</code> objects must return true if the
+  on <code>Document</code> objects must return true if the
   <code>Document</code>'s <span>browsing context</span> is focused,
   and all its <span title="ancestor browsing context">ancestor
   browsing contexts</span> are also focused, and the <span>top-level
@@ -110619,7 +110601,7 @@
 
   <hr>
 
-  <pre class="idl">partial interface <span>HTMLDocument</span> {
+  <pre class="idl">partial interface <span>Document</span> {
   [TreatNullAs=EmptyString] attribute DOMString <span title="dom-document-fgColor">fgColor</span>;
   [TreatNullAs=EmptyString] attribute DOMString <span title="dom-document-linkColor">linkColor</span>;
   [TreatNullAs=EmptyString] attribute DOMString <span title="dom-document-vlinkColor">vlinkColor</span>;
@@ -116970,8 +116952,8 @@
         library.onload = function() {
           var sound1 = library.getAudio("sound1.wav"); // returns an Audio object
           var image1 = library.getImage("image1.png"); // returns an HTMLImageElement
-          var doc1 = library.getXMLDocument("doc1.xml"); // returns a Document
-          var doc2 = library.getHTMLDocument("doc1.html"); // returns an HTMLDocument
+          var doc1 = library.getXMLDocument("doc1.xml"); // returns a Document (XML Document mode)
+          var doc2 = library.getHTMLDocument("doc1.html"); // returns a Document (HTML Document mode)
         }
        or:
         var library = new ResourceLoader("data.zip");




More information about the Commit-Watchers mailing list