NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 180 - Clarify where elements can be used; explicitly allow orphan nodes.
Clarify where elements can be used; explicitly allow orphan nodes.
Status: RESOLVED INTENTIONAL
Product: Validator.nu
Classification: Unclassified
Component: General
HEAD
All All
: P2 normal
Assigned To: Henri Sivonen
http://svn.whatwg.org/webapps/source?...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-12 13:18 CEST by Nobody
Modified: 2008-05-30 20:51 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nobody 2008-05-12 13:18:22 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>