MCPcopy
hub / github.com/wavetermdev/waveterm / getBlockIdFromTarget

Function getBlockIdFromTarget

frontend/app/app.tsx:217–227  ·  view source on GitHub ↗
(target: EventTarget)

Source from the content-addressed store, hash-verified

215 windowFocusTime = Date.now();
216 };
217 const getBlockIdFromTarget = (target: EventTarget): string => {
218 let elem = target as HTMLElement;
219 while (elem != null) {
220 const blockId = elem.dataset?.blockid;
221 if (blockId) {
222 return blockId;
223 }
224 elem = elem.parentElement;
225 }
226 return null;
227 };
228 const isAIPanelTarget = (target: EventTarget): boolean => {
229 let elem = target as HTMLElement;
230 while (elem != null) {

Callers 1

handleMouseDownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected