Event to focus and unfocus to a tab (EditorView)?


#1

I am trying to implement a httpServer to interact a browser Client, and the server instance with a specific port (say 3000) should be bind to each current active tabs.

To do that, I need to obtain every focus/unfocus event to a tab (the cursor blinking content).

I have read

and
https://github.com/atom/autosave/blob/master/lib/autosave.coffee

then noticed
atom.workspaceView.on 'focusout’
is the one to catch an event unfocus, but cannot find one for focus.

My question is as follows:

is the atom.workspaceView proper object to catch an event for every tab, and what is the ‘focus’ event?

Thanks.


Is There An Event Triggered When Tabs Are Changed / Active Editor Changes
#2

I think this can help https://gist.github.com/ardcore/9262498

pane:became-active


#3

This list is helpful to see what events are possible. But what objects are these triggered on? What is the best way to bind to them?