diff --git a/src/clone-node.ts b/src/clone-node.ts index 5dfcd117..8aa85ca8 100644 --- a/src/clone-node.ts +++ b/src/clone-node.ts @@ -88,11 +88,6 @@ async function cloneChildren( if (isSlotElement(nativeNode) && nativeNode.assignedNodes) { children = toArray(nativeNode.assignedNodes()) - } else if ( - isInstanceOfElement(nativeNode, HTMLIFrameElement) && - nativeNode.contentDocument?.body - ) { - children = toArray(nativeNode.contentDocument.body.childNodes) } else { children = toArray((nativeNode.shadowRoot ?? nativeNode).childNodes) } diff --git a/test/resources/iframe/node.html b/test/resources/iframe/node.html new file mode 100644 index 00000000..acb23075 --- /dev/null +++ b/test/resources/iframe/node.html @@ -0,0 +1,17 @@ + diff --git a/test/spec/special.spec.ts b/test/spec/special.spec.ts index 6425195a..93f72853 100644 --- a/test/spec/special.spec.ts +++ b/test/spec/special.spec.ts @@ -59,4 +59,11 @@ describe('special cases', () => { .then(done) .catch(done) }) + + it('should render iframe content', (done) => { + bootstrap('iframe/node.html') + .then(assertTextRendered(['SOME TEXT', 'SOME MORE TEXT'])) + .then(done) + .catch(done) + }) })