rewrite mutation observer handler with lazy child list calculation

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 487f1d0c9a
commit aa3e2f02ed
6 changed files with 112 additions and 36 deletions

View File

@@ -110,11 +110,21 @@ export type observerParam = {
inputCb: inputCallback;
};
export type textCursor = {
node: Node;
value: string | null;
};
export type textMutation = {
id: number;
value: string | null;
};
export type attributeCursor = {
node: Node;
attributes: {
[key: string]: string | null;
};
};
export type attributeMutation = {
id: number;
attributes: {
@@ -123,7 +133,8 @@ export type attributeMutation = {
};
export type removedNodeMutation = {
parentId: number;
parentId?: number;
parentNode?: Node;
id: number;
};