Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get the current foreground tab #188

Open
nearsyh opened this issue Jul 29, 2014 · 10 comments
Open

Get the current foreground tab #188

nearsyh opened this issue Jul 29, 2014 · 10 comments

Comments

@nearsyh
Copy link
Contributor

nearsyh commented Jul 29, 2014

Is it possible to get the current foreground tab id?

@nearsyh
Copy link
Contributor Author

nearsyh commented Jul 29, 2014

Seems impossible with the apI of the current version.

@kyleshrader
Copy link

Line 131 of https://github.com/breach/breach_core/blob/master/lib/core_tabs.js
Also I think the tabs_state has this information (shrug)

@spolu
Copy link
Owner

spolu commented Jul 29, 2014

You can use tabs_get and look for the visible key for each tab

@nearsyh
Copy link
Contributor Author

nearsyh commented Jul 29, 2014

@kylekinkade the visibile_tab is private which I think is not good to use.

@spolu
Copy link
Owner

spolu commented Jul 29, 2014

@nearsyh @kylekinkade it's definitely not accessible from other moduiles... that's why you want tabs_get from modules

@nearsyh
Copy link
Contributor Author

nearsyh commented Jul 29, 2014

@spolu Thanks! But maybe adding an api for this is a good idea.

@spolu
Copy link
Owner

spolu commented Jul 29, 2014

@nearsyh You mean have direct access to the visible tab?

@nearsyh
Copy link
Contributor Author

nearsyh commented Jul 29, 2014

Yes.

@brayniverse
Copy link
Contributor

@spolu If you would like I can make a PR for a tabs_current method that traverses the array provided by tabs_get and returns the current tab? Unless you have other plans.

@spolu
Copy link
Owner

spolu commented Jul 30, 2014

Sure that could be useful!

spolu pushed a commit that referenced this issue Jul 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants