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

Function getTargetElement

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

Source from the content-addressed store, hash-verified

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

Callers 1

MarkdownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected