I pasted the following into the html:
<svg width="400px" height="300px" viewBox="0 0 400 300" xmlns="http://www.w3.org/2000/svg">
<foreignObject width="100" height="50" requiredExtensions="http://www.w3.org/1999/xhtml">
<body xmlns="http://www.w3.org/1999/xhtml">
<p>Here is a paragraph that requires word wrap</p>
</body>
</foreignObject>
</svg>
However, it's represented as
<svg width="400px" height="300px" viewBox="0 0 400 300" xmlns="http://www.w3.org/2000/svg">
<foreignobject width="100" height="50" requiredextensions="http://www.w3.org/1999/xhtml">
<!-- XHTML content goes here -->
<p>Here is a paragraph that requires word wrap</p>
</foreignobject>
</svg>
in the DOM. Why is body
removed?
Here, for example, body
stays inside the DOM.
` to act as a paragraph, `
` acts like an HTML body tag, of which there can be only one in the document. – Emil S. Jørgensen Jul 22 '16 at 14:19