MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / handleItems

Function handleItems

src/lib/openFolder.js:303–317  ·  view source on GitHub ↗

* Handle click event * @param {Event} e

(e)

Source from the content-addressed store, hash-verified

301 * @param {Event} e
302 */
303function handleItems(e) {
304 const mode = e.type;
305 const $target = e.target;
306 if (!($target instanceof HTMLElement)) return;
307 const type = $target.dataset.type;
308 if (!type) return;
309 const url = $target.dataset.url;
310 const name = $target.dataset.name;
311
312 if (mode === "click") {
313 handleClick(type, url, name, $target);
314 } else if (mode === "contextmenu") {
315 handleContextmenu(type, url, name, $target);
316 }
317}
318
319/**
320 * Handle contextmenu

Callers

nothing calls this directly

Calls 2

handleContextmenuFunction · 0.85
handleClickFunction · 0.70

Tested by

no test coverage detected