@@ -76,11 +76,6 @@ async function cloneChildren<T extends HTMLElement>(
7676
7777 if ( isSlotElement ( nativeNode ) && nativeNode . assignedNodes ) {
7878 children = toArray < T > ( nativeNode . assignedNodes ( ) )
79- } else if (
80- isInstanceOfElement ( nativeNode , HTMLIFrameElement ) &&
81- nativeNode . contentDocument ?. body
82- ) {
83- children = toArray < T > ( nativeNode . contentDocument . body . childNodes )
8479 } else {
8580 children = toArray < T > ( ( nativeNode . shadowRoot ?? nativeNode ) . childNodes )
8681 }
@@ -133,11 +128,11 @@ function cloneCSSStyle<T extends HTMLElement>(nativeNode: T, clonedNode: T) {
133128 ) {
134129 value = 'block'
135130 }
136-
131+
137132 if ( name === 'd' && clonedNode . getAttribute ( 'd' ) ) {
138133 value = `path(${ clonedNode . getAttribute ( 'd' ) } )`
139134 }
140-
135+
141136 targetStyle . setProperty (
142137 name ,
143138 value ,
@@ -171,7 +166,10 @@ function cloneSelectValue<T extends HTMLElement>(nativeNode: T, clonedNode: T) {
171166}
172167
173168function decorate < T extends HTMLElement > ( nativeNode : T , clonedNode : T ) : T {
174- if ( isInstanceOfElement ( clonedNode , Element ) ) {
169+ if (
170+ isInstanceOfElement ( clonedNode , Element ) &&
171+ ! isInstanceOfElement ( nativeNode , HTMLIFrameElement )
172+ ) {
175173 cloneCSSStyle ( nativeNode , clonedNode )
176174 clonePseudoElements ( nativeNode , clonedNode )
177175 cloneInputValue ( nativeNode , clonedNode )
0 commit comments