MCPcopy Index your code
hub / github.com/witheve/Eve / handleBasicEventWithTarget

Function handleBasicEventWithTarget

src/renderer.ts:653–673  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

651}
652
653function handleBasicEventWithTarget(name) {
654 return (event) => {
655 let {target} = event;
656 let current = target as RecordElement;
657 let objs: any[] = [];
658 while (current) {
659 if (current.entity) {
660 let tag = [name];
661 if (current == target) {
662 tag.push("direct-target");
663 }
664 let eveEvent = {tag, element: current.entity};
665 addSVGCoods(current, event, eveEvent);
666 objs.push(eveEvent);
667 }
668 addRootEvent(current, event, objs, name);
669 current = current.parentElement;
670 }
671 client.sendEvent(objs);
672 };
673}
674
675window.addEventListener("focus", function(event) {
676 let target = event.target as RecordElement;

Callers 1

renderer.tsFile · 0.85

Calls 3

addSVGCoodsFunction · 0.85
addRootEventFunction · 0.85
sendEventMethod · 0.80

Tested by

no test coverage detected