Custom context menu items


Hi, I’m trying to improve my package run-in-terminal with #12 request. And I need file path not only from atom.workspace.getActivePaneItem()?.buffer?.file?.path, but also path from tree and path from tabs. I mean context menu with tree and tab. How to get file path of tree-view and tabs if they are not active. Probably css selector, but I can’t find how to query custom css selector.


I think I found solution: document.querySelector. It was obvious, but I’m not too familar with pure js-dom manipulations.