fix: Cannot set property attributeName of #<MutationRecord> which has only a getter (#1173)

* fix: Cannot set property attributeName of #<MutationRecord> which has only a getter

* fix: attributeName readonly
This commit is contained in:
fukang wang
2026-04-01 12:00:00 +08:00
committed by GitHub
parent 1c5acb69be
commit 18d7456ed7
3 changed files with 12 additions and 11 deletions

View File

@@ -265,14 +265,14 @@ export type hooksParam = {
};
// https://dom.spec.whatwg.org/#interface-mutationrecord
export type mutationRecord = {
export type mutationRecord = Readonly<{
type: string;
target: Node;
oldValue: string | null;
addedNodes: NodeList;
removedNodes: NodeList;
attributeName: string | null;
};
}>;
export type textCursor = {
node: Node;