[html5] r866 - /
whatwg at whatwg.org
whatwg at whatwg.org
Mon Jun 4 22:35:09 PDT 2007
Author: ianh
Date: 2007-06-04 22:35:09 -0700 (Mon, 04 Jun 2007)
New Revision: 866
Modified:
index
source
Log:
[] (0) Make HTML's document.title play nice with SVG's document.title
Modified: index
===================================================================
--- index 2007-06-05 05:26:08 UTC (rev 865)
+++ index 2007-06-05 05:35:09 UTC (rev 866)
@@ -3220,15 +3220,34 @@
<p>The <dfn id=document.title
title=dom-document-title><code>title</code></dfn> attribute must, on
- getting, return a concatenation of the data of all the child <a
- href="#text-node" title="text node">text nodes</a> of <a
- href="#the-title1">the <code>title</code> element</a>, in tree order, or
- the empty string if <a href="#the-title1">the <code>title</code>
- element</a> is null.
+ getting, run the following algorithm:
+ <ol>
+ <li>
+ <p>If the <a href="#root-element">root element</a> is an <code>svg</code>
+ element in the "<code title="">http://www.w3.org/2000/svg</code>"
+ namespace, and the user agent supports SVG, then the getter must return
+ the value that would have been returned by the DOM attribute of the same
+ name on the <code>SVGDocument</code> interface.
+
+ <li>
+ <p>Otherwise, it must return a concatenation of the data of all the child
+ <a href="#text-node" title="text node">text nodes</a> of <a
+ href="#the-title1">the <code>title</code> element</a>, in tree order, or
+ the empty string if <a href="#the-title1">the <code>title</code>
+ element</a> is null.
+ </ol>
+
<p>On setting, the following algorithm must be run:
<ol>
+ <li>
+ <p>If the <a href="#root-element">root element</a> is an <code>svg</code>
+ element in the "<code title="">http://www.w3.org/2000/svg</code>"
+ namespace, and the user agent supports SVG, then the setter must defer
+ to the setter for the DOM attribute of the same name on the
+ <code>SVGDocument</code> interface. Stop the algorithm here.
+
<li>If <a href="#the-head0">the <code>head</code> element</a> is null,
then the attribute must do nothing. Stop the algorithm here.
@@ -3245,6 +3264,12 @@
element</a>.
</ol>
+ <p>The <code title=dom-document-title><a
+ href="#document.title">title</a></code> attribute on the <code><a
+ href="#htmldocument">HTMLDocument</a></code> interface should shadow the
+ attribute of the same name on the <code>SVGDocument</code> interface when
+ the user agent supports both HTML and SVG.
+
<p><dfn id=the-body0>The body element</dfn> of a document is the first
child of <a href="#the-html0">the <code>html</code> element</a> that is
either a <code><a href="#body0">body</a></code> element or a
Modified: source
===================================================================
--- source 2007-06-05 05:26:08 UTC (rev 865)
+++ source 2007-06-05 05:35:09 UTC (rev 866)
@@ -1746,6 +1746,7 @@
<code>html</code> element</span>, if there is one, or null
otherwise.</p>
+
<p><dfn>The <code>title</code> element</dfn> of a document is the
first <code>title</code> element that is a child of <span>the
<code>head</code> element</span>, if there is one, or null
@@ -1753,16 +1754,36 @@
<p>The <dfn id="document.title"
title="dom-document-title"><code>title</code></dfn> attribute must,
- on getting, return a concatenation of the data of all the child
- <span title="text node">text nodes</span> of <span>the
- <code>title</code> element</span>, in tree order, or the empty
- string if <span>the <code>title</code> element</span> is null.</p>
+ on getting, run the following algorithm:</p>
+ <ol>
+ <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 getter must
+ return the value that would have been returned by the DOM attribute
+ of the same name on the <code>SVGDocument</code>
+ interface.</p></li>
+
+ <li><p>Otherwise, it must return a concatenation of the data of all
+ the child <span title="text node">text nodes</span> of <span>the
+ <code>title</code> element</span>, in tree order, or the empty
+ string if <span>the <code>title</code> element</span> is
+ null.</p></li>
+
+ </ol>
+
<p>On setting, the following algorithm must be run:</p>
<ol>
+ <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 DOM attribute of the same name on the
+ <code>SVGDocument</code> interface. Stop the algorithm
+ here.</p></li>
+
<li>If <span>the <code>head</code> element</span> is null, then the
attribute must do nothing. Stop the algorithm here.</li>
@@ -1779,6 +1800,12 @@
</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.</p>
+
+
<p><dfn>The body element</dfn> of a document is the first child of
<span>the <code>html</code> element</span> that is either a
<code>body</code> element or a <code>frameset</code> element. If
More information about the Commit-Watchers
mailing list