MCPcopy
hub / github.com/callumalpass/tasknotes / insertAfterElement

Function insertAfterElement

src/editor/MarkdownWidgetInsertion.ts:65–73  ·  view source on GitHub ↗
(anchor: Element, widget: HTMLElement)

Source from the content-addressed store, hash-verified

63}
64
65export function insertAfterElement(anchor: Element, widget: HTMLElement): boolean {
66 const parent = anchor.parentNode;
67 if (!parent) {
68 return false;
69 }
70
71 parent.insertBefore(widget, anchor.nextSibling);
72 return true;
73}

Calls

no outgoing calls

Tested by

no test coverage detected