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

Load initial tab #121

Open
adamgoose opened this issue Sep 15, 2018 · 2 comments
Open

Load initial tab #121

adamgoose opened this issue Sep 15, 2018 · 2 comments
Assignees
Labels
example needed A reduced test case or example code is requested to help resolve this issue. feature request

Comments

@adamgoose
Copy link

I'm using non-headless chrome in --kiosk mode. In order to hide the address bar, we specify the url as the --app flag. This hides the tab bar and forces the window into a single-tab mode.

Calling c.NewTab(url) on a single-tab window opens a new window that is not in kiosk mode. It actually prevents the original window from making it to kiosk mode in the first place.

Thus, I am unable to get my hands on a tot.Tab instance (due to un-exported properties) for the initial tab created by chrome and its --app flag.

There are a couple ways this could be fixed.

  • tot.Chrome could automatically query /json for the first tab after the chrome process launches, and append it to Chrome.tabs
  • Provide a LoadTabByIndex(i int) (*tot.Tab, error) method that queries /json and fetches the ith index from the slice
  • Provide a ReloadTabs() error method that queries /json for all tabs and merges new connections (if applicable) into Chrome.tabs

Would love to hear your thoughts. Thanks for a great package!

@mkenney
Copy link
Owner

mkenney commented Sep 15, 2018

@adamgoose Thanks for letting me know!

That's not a use-case I've explored. I like the first option you listed, I feel like that makes it more of a natural experience, but the other options are interesting as well and probably have independent value.

Is it possible for you to provide an example main.go that illustrates the issue? I'd be happy to play with it and get a better idea of what you're working with.

@mkenney
Copy link
Owner

mkenney commented Sep 15, 2018

PRs are always welcome too 😉

@mkenney mkenney added help wanted Looking for technical assistance with this issue. feature request and removed help wanted Looking for technical assistance with this issue. labels Sep 15, 2018
@mkenney mkenney added the feedback wanted Looking for community feedback on this discussion. label Sep 29, 2018
@mkenney mkenney self-assigned this Sep 29, 2018
@mkenney mkenney added example needed A reduced test case or example code is requested to help resolve this issue. and removed feedback wanted Looking for community feedback on this discussion. labels Sep 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example needed A reduced test case or example code is requested to help resolve this issue. feature request
Projects
None yet
Development

No branches or pull requests

2 participants