Short URL: http://html5.org/r/6718
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 6718 | 14037 | 2011-10-20 23:01 |
Index: source
===================================================================
--- source (revision 6717)
+++ source (revision 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");