rod
rod copied to clipboard
prevent the user from creating new tabs or closing them and how to create tab groups
hi, can I prevent the user from creating new tabs or closing them, if not, how can I pin tabs?
and how to create tab groups?
Please add a valid Rod Version: v0.0.0
to your issue. Current version is v0.112.6
generated by check-issue
cdp doesn't have api to pin tabs or create tab groups
https://chromedevtools.github.io/devtools-protocol/
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
},
)
@ysmood https://stackoverflow.com/a/60174894 can this be replicated in GoLang?
https://github.com/go-rod/rod/issues/830#issuecomment-1462874270 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