add support for nested shadow dom (#834)
* fix: can't record shadow host and shadow dom in incremental mutations * enable to record newly added shadow dom * Revert "enable to record newly added shadow dom" This reverts commit cf7c0ad551ac457f00e3f754702c1464314f6a86. * Revert "fix: can't record shadow host and shadow dom in incremental mutations" This reverts commit 8b25cc97f83cbc333702c0ba73684e54eeadaabe. * fix: can't record shadow host and shadow dom in incremental mutations * add support for nested shadow root and add integration test * fix test error * enable to record shadow-dom in iframes * add an integration test case for nested iframes and shadow-doms * use the patch function
This commit is contained in:
@@ -859,6 +859,7 @@ export function serializeNodeWithId(
|
||||
recordChild = recordChild && !serializedNode.needBlock;
|
||||
// this property was not needed in replay side
|
||||
delete serializedNode.needBlock;
|
||||
if ((n as HTMLElement).shadowRoot) serializedNode.isShadowHost = true;
|
||||
}
|
||||
if (
|
||||
(serializedNode.type === NodeType.Document ||
|
||||
@@ -903,7 +904,6 @@ export function serializeNodeWithId(
|
||||
}
|
||||
|
||||
if (isElement(n) && n.shadowRoot) {
|
||||
serializedNode.isShadowHost = true;
|
||||
for (const childN of Array.from(n.shadowRoot.childNodes)) {
|
||||
const serializedChildNode = serializeNodeWithId(childN, bypassOptions);
|
||||
if (serializedChildNode) {
|
||||
|
||||
Reference in New Issue
Block a user