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

This commit is contained in:
Justin Halsall
2022-09-30 08:15:24 +02:00
committed by GitHub
parent 55ebce7337
commit 6f44bb72a1
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;
},