Skip to content

Load initial tab #121

Open
Open
@adamgoose

Description

@adamgoose

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!

Metadata

Metadata

Assignees

Labels

example neededA reduced test case or example code is requested to help resolve this issue.feature request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions