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

prevent the user from creating new tabs or closing them and how to create tab groups #834

Open
Fitrad3w opened this issue Mar 18, 2023 · 6 comments
Labels
question Questions related to rod upstream Upstream issue that can't solved by Rod

Comments

@Fitrad3w
Copy link

hi, can I prevent the user from creating new tabs or closing them, if not, how can I pin tabs?

@Fitrad3w Fitrad3w added the question Questions related to rod label Mar 18, 2023
@Fitrad3w
Copy link
Author

and how to create tab groups?

@Fitrad3w Fitrad3w changed the title prevent the user from creating new tabs or closing them prevent the user from creating new tabs or closing them and how to create tab groups Mar 18, 2023
@rod-robot
Copy link

Please add a valid Rod Version: v0.0.0 to your issue. Current version is v0.112.6

generated by check-issue

@ysmood
Copy link
Collaborator

ysmood commented Mar 19, 2023

cdp doesn't have api to pin tabs or create tab groups

https://chromedevtools.github.io/devtools-protocol/

@ysmood ysmood added the upstream Upstream issue that can't solved by Rod label Mar 19, 2023
@Fly-Playgroud
Copy link
Contributor

Fly-Playgroud commented Mar 20, 2023

you can listen some Events to prevent user create new tab

go browser.EachEvents(

// listen targetCreated Events
func () {
// 1.get current pages num 
// 2.if num > maxPageNum then close the new target
},
)

@caner-cetin
Copy link
Contributor

@ysmood https://stackoverflow.com/a/60174894 can this be replicated in GoLang?

@caner-cetin
Copy link
Contributor

#830 (comment) You can override variables like this with Rod, I am forcing the page to be visible in this comment. Maybe something similar can be done on forcing window's open tab behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions related to rod upstream Upstream issue that can't solved by Rod
Projects
None yet
Development

No branches or pull requests

5 participants