yarek
yarek

Reputation: 12054

how to set the focus on a external windows I created?

In my background.js, I use that to open a new external popup window

chrome.windows.create({type:"panel", url: "https://www.example.com/", width:320, height:240},
 function (_win) {
    win = _win.id;
});

How can I set the focus back later on this popup window ?

Upvotes: 0

Views: 122

Answers (1)

cviejo
cviejo

Reputation: 4398

Use chrome.windows.update:

chrome.windows.update(windowId, {focused: true});

Upvotes: 1

Related Questions