1
0
Gildas 2 жил өмнө
parent
commit
e52f8606a7

+ 1 - 1
src/core/content/content-bootstrap.js

@@ -256,7 +256,7 @@ function serializeShadowRoots(node) {
 			serializeShadowRoots(shadowRoot);
 			const templateElement = document.createElement("template");
 			templateElement.setAttribute(SHADOWROOT_ATTRIBUTE_NAME, "open");
-			templateElement.appendChild(shadowRoot);
+			Array.from(shadowRoot.childNodes).forEach(childNode => templateElement.appendChild(childNode));
 			element.appendChild(templateElement);
 		}
 	});

+ 1 - 1
src/ui/content/content-ui-editor-web.js

@@ -1988,7 +1988,7 @@ pre code {
 				serializeShadowRoots(shadowRoot);
 				const templateElement = document.createElement("template");
 				templateElement.setAttribute(SHADOWROOT_ATTRIBUTE_NAME, "open");
-				templateElement.appendChild(shadowRoot);
+				Array.from(shadowRoot.childNodes).forEach(childNode => templateElement.appendChild(childNode));
 				element.appendChild(templateElement);
 			}
 		});