Bugzilla – Bug 180
Clarify where elements can be used; explicitly allow orphan nodes.
Last modified: 2008-05-30 20:51:05 CEST
Index: source =================================================================== --- source (revision 1582) +++ source (revision 1583) @@ -4722,11 +4722,11 @@ and there are no other element nodes or text nodes (other than <span>inter-element whitespace</span>) between them.</p> - <p>Authors must only use <span>elements in the HTML namespace</span> - in the contexts where they are allowed, as defined for each - element. For XML compound documents, these contexts could be inside - elements from other namespaces, if those elements are defined as - providing the relevant contexts.</p> + <p>Authors must not use <span>elements in the HTML namespace</span> + anywhere except where they are explicitly allowed, as defined for + each element. For XML compound documents, these contexts could be + inside elements from other namespaces, if those elements are defined + as providing the relevant contexts.</p> <div class="example"> <p>The SVG specification defines the SVG <code>foreignObject</code> @@ -4740,6 +4740,23 @@ conforming.</p> </div> + <p>In addition, <span>elements in the HTML namespace</span> may be + orphan nodes (i.e. without a parent node).</p> + + <div class="example"> + + <p>For example, creating a <code>td</code> element and storing it + in a global variable in a script is conforming, even though + <code>td</code> elements are otherwise only supposed to be used + inside <code>tr</code> elements.</p> + + <pre>var data = { + name: "Banana", + cell: document.createElement('td'), +};</pre> + + </div> + <h4>Kinds of content</h4>