简体   繁体   中英

How to create incognito tab from chrome extension

I need to open an url in incognito mode from chrome extension. Opening it in a new incognito window is simple, but there is no such property for creating new tab .

I tried to store the window object created but seems that the callback parameter is always null incognito windows, but properly populated for normal windows.

Is there a way to open url in incognito tab if there already is an incognito window?

The solution here ( How to open new tab in an existing incognito window? ) looks fine, but it does not work for me. No incognito window is returned by getAll() . Does this need any special permission in the manifest (aside tabs ) to work?

It turned out, that I need to explicitly enable incognito access to the extension to get intel about incognito windows, even created by my extension itself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM