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

Method getTaskContextFromEvent

src/bases/TaskListView.ts:2273–2283  ·  view source on GitHub ↗
(event: Event)

Source from the content-addressed store, hash-verified

2271 }
2272
2273 private getTaskContextFromEvent(event: Event): { task: TaskInfo; card: HTMLElement } | null {
2274 const target = event.target as HTMLElement | null;
2275 if (!target) return null;
2276 const card = target.closest<HTMLElement>(".task-card");
2277 if (!card) return null;
2278 const path = card.dataset.taskPath;
2279 if (!path) return null;
2280 const task = this.taskInfoCache.get(path);
2281 if (!task) return null;
2282 return { task, card };
2283 }
2284
2285 private handleItemClick = async (event: MouseEvent) => {
2286 const target = event.target as HTMLElement;

Callers 1

TaskListViewClass · 0.95

Calls 1

getMethod · 0.65

Tested by

no test coverage detected