Call afterAppend for mutations and top level elements (#1012)

This commit is contained in:
Justin Halsall
2026-04-01 12:00:00 +08:00
committed by GitHub
parent 1f6e847e55
commit 2a6ed9f008
2 changed files with 60 additions and 37 deletions

View File

@@ -348,6 +348,10 @@ export function buildNodeWithSN(
mirror: Mirror;
skipChild?: boolean;
hackCss: boolean;
/**
* This callback will be called for each of this nodes' `.childNodes` after they are appended to _this_ node.
* Caveat: This callback _doesn't_ get called when this node is appended to the DOM.
*/
afterAppend?: (n: Node, id: number) => unknown;
cache: BuildCache;
},