Skip to content

Commit bce54de

Browse files
Oops, previous fix was wrong--Attr object serialization should throw.
1 parent a881816 commit bce54de

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,12 @@ <h2>Serializing</h2>
326326
elements in the <a title="html-ns">HTML namespace</a> that contain no child nodes are serialized
327327
with an explicit begin and end tag rather than using the self-closing tag syntax [[XML10]].
328328

329+
<p class="note">Per [[DOM4]], <a title="interface-attr" data-spec="DOM4" class="externalDFN">Attr</a>
330+
objects are not <a title="node" data-spec="DOM4" class="externalDFN">Node</a>s, and thus cannot
331+
be serialized by the <a title="concept-xml-serialization-algorithm">XML serialization algorithm</a>.
332+
An attempt to serialize an <a title="interface-attr" data-spec="DOM4" class="externalDFN">Attr</a>
333+
object will result in a TypeError exception [[WEBIDL]].
334+
329335
<p>To run the <dfn title="concept-xml-serialization-algorithm">XML serialization algorithm</dfn> on
330336
a <var>node</var> given a <a title="concept-context-namespace">context namespace</a>
331337
<var>namespace</var>, a <a title="concept-namespace-prefix-map">namespace prefix map</a>
@@ -678,12 +684,6 @@ <h2>Serializing</h2>
678684
<li>Return <var>markup</var>.
679685
</ol>
680686

681-
<dt><code><a title="interface-attr" data-spec="DOM4" class="externalDFN">Attr</a></code>
682-
<dd>
683-
<p>Return the empty string.
684-
<p class="note">Attr objects do not make sense to serialize independently of the
685-
<a title="element" data-spec="DOM4" class="externalDFN">element</a> to which
686-
they belong.
687687
</dl>
688688

689689
<p>To <dfn title="concept-serialize-doctype">produce a DocumentType serialization</dfn> of a

0 commit comments

Comments
 (0)