0

Is it possible for a text node to have children nodes? Or a text node would always be the last child node and the only possible scenario is for it to have sibling nodes?

  • 1
    Try adding a new textnode as a child to a textnode and you will get an error (e.g. Uncaught DOMException: Failed to execute 'appendChild' on 'Node': This node type does not support this method.). So a text node has no child nodes. – Frederic Klein Feb 16 '17 at 18:22

1 Answers1

0

From Frederick Klein's comment:

Try adding a new textnode as a child to a textnode and you will get an error (e.g. Uncaught DOMException: Failed to execute 'appendChild' on 'Node': This node type does not support this method.). So a text node has no child nodes.