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

Function tabOnclick

src/lib/editorFile.js:1824–1836  ·  view source on GitHub ↗

* * @param {MouseEvent} e * @returns

(e)

Source from the content-addressed store, hash-verified

1822 * @returns
1823 */
1824function tabOnclick(e) {
1825 e.preventDefault();
1826 const { action } = e.target.dataset;
1827 if (action === "close-file") {
1828 this.remove();
1829 return;
1830 }
1831 if (action === "toggle-pin") {
1832 this.togglePinned();
1833 return;
1834 }
1835 this.makeActive();
1836}
1837
1838function createFileEvent(file) {
1839 return new FileEvent(file);

Callers

nothing calls this directly

Calls 2

preventDefaultMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected