(event)
| 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); |
nothing calls this directly
no test coverage detected