I have a function in a chrome extension service worker that I need to open a window. It seems I can't use 'window.open' but according to the documentation I should be able to use chrome.action.openPopup. However, I get an error saying openPopup is undefined. Here is my function:
function configure() {
// window.open("config.html","_blank");
chrome.action.setPopup( {
popup: "config.html"
});
chrome.action.openPopup();
}
What am I doing wrong? TIA.