Siddharth
Siddharth

Reputation: 7156

chrome.tabs.create in incognito window opens a tab in normal window

This bug has been reported here too(closed as obsolete):

https://code.google.com/p/chromium/issues/detail?id=72948

I want to create a new tab in current incognito window . The call to chrome.tabs.create will be made in background page. How can I achieve this? Is there any workaround?

Upvotes: 7

Views: 3583

Answers (2)

Jan Croonen
Jan Croonen

Reputation: 719

I found that adding the permission {"incognito":"split"} didn't solve my problem. The user must grant incognito right to the extension via extension manager details. Now it works: I get the window object from the callback when creating the incognito window.

Upvotes: 1

Siddharth
Siddharth

Reputation: 7156

Well guys I made it work after adding permission "incognito":"split" in manifest.json

It is explained in the docs :

https://developer.chrome.com/docs/extensions/reference/manifest/incognito

Upvotes: 14

Related Questions