close #140 transform mutated attributes

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 26f9b1bfc8
commit cd12816638
2 changed files with 7 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
import { INode, serializeNodeWithId } from 'rrweb-snapshot';
import { INode, serializeNodeWithId, transformAttribute } from 'rrweb-snapshot';
import {
mirror,
throttle,
@@ -130,7 +130,11 @@ function initMutationObserver(
attributes.push(item);
}
// overwrite attribute if the mutations was triggered in same time
item.attributes[attributeName!] = value;
item.attributes[attributeName!] = transformAttribute(
document,
attributeName!,
value!,
);
break;
}
case 'childList': {