rewrite mutation observer handler with lazy child list calculation

This commit is contained in:
Yanzhen Yu
2018-10-22 23:08:05 +08:00
parent a88a79d821
commit d588f738b8
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;
};