File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -9602,6 +9602,23 @@ partial interface <dfn id="document" data-lt="">Document</dfn> {
9602
9602
9603
9603
</ol>
9604
9604
9605
+ <p class="note">The value returned by the <code data-x="dom-document-body">body</code> getter is
9606
+ not always the one passed to the setter.</p>
9607
+
9608
+ <div class="example">
9609
+ <p>In this example, the setter successfully inserts a <code>body</code> element (though this is
9610
+ non-conforming since SVG does not allow a <code>body</code> as child of <span>SVG
9611
+ <code>svg</code></span>). However the getter will return null because the document element is not
9612
+ <code>html</code>.</p>
9613
+
9614
+ <pre><svg xmlns="http://www.w3.org/2000/svg">
9615
+ <script>
9616
+ document.body = document.createElementNS("http://www.w3.org/1999/xhtml", "body");
9617
+ console.assert(document.body === null);
9618
+ </script>
9619
+ </svg></pre>
9620
+ </div>
9621
+
9605
9622
</div>
9606
9623
9607
9624
<hr>
You can’t perform that action at this time.
0 commit comments