I'm currently working on my first chrome extension (MV3) and I wanted to add a new tab group through js. The documentation say it's possible, but I just can't figure out how to do it. All help is appreciated! :)
I took a look at a similar chrome extension and managed to figure it out. You do something along the lines of:
aync function test() {
var groupId = await chrome.tabs.group({ tabIds: tabId });
chrome.tabGroups.update(groupId, { collapsed: false, title: "title", color: "blue" });
}
So, as I can understand, if you're not passing groupId, then it will create one for you, and return it's the id as a result of the promise.