MCPcopy Create free account
hub / github.com/dailydotdev/apps / getTargetElement

Function getTargetElement

packages/shared/src/components/Markdown.tsx:26–36  ·  view source on GitHub ↗
(target: EventTarget)

Source from the content-addressed store, hash-verified

24}
25
26function getTargetElement(target: EventTarget): Element | null {
27 if (target instanceof Element) {
28 return target;
29 }
30
31 if (target instanceof Node) {
32 return target.parentElement;
33 }
34
35 return null;
36}
37
38function getWrappingAnchor(
39 element: Element,

Callers 1

MarkdownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected