I’m making a chrome extension that opens an incognito window/tab from background, opens a website, and executes some script in the page, but the window object returned is always null no matter what I do:
function createWindow() {
chrome.windows.create({
incognito:true
}, (window) => {
console.log('New window created:', window);
});
}
// Output: New window created: null
The object ALWAYS returns null.
How am I supossed to interact with the incognito window content?
3
For some reason it works on my work computer. I will test later in my personal. I changed nothing.
Keep in mind you would need to allow incognito in the app details, on the browser.