MCPcopy Index your code
hub / github.com/Acode-Foundation/Acode / runAction

Method runAction

src/cm/touchSelectionMenu.js:488–502  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

486 }
487 let handled = false;
488 const runAction = (event) => {
489 if (handled) return;
490 handled = true;
491 event.preventDefault();
492 event.stopPropagation();
493 this.#handlingMenuAction = true;
494 try {
495 onclick?.();
496 } finally {
497 this.#handlingMenuAction = false;
498 this.#menuRequested = false;
499 this.#hideMenu();
500 this.#view.focus();
501 }
502 };
503 $item.addEventListener("pointerdown", runAction);
504 $item.addEventListener("click", runAction);
505 this.$menu.append($item);

Callers

nothing calls this directly

Calls 5

#hideMenuMethod · 0.95
focusMethod · 0.80
onclickFunction · 0.50
preventDefaultMethod · 0.45
stopPropagationMethod · 0.45

Tested by

no test coverage detected