Proposal: declarative way for opening an extension page in a new tab when click the extension icon #267
Labels
discussion
Needs further discussion
opposed: chrome
Opposed by Chrome
opposed: firefox
Opposed by Firefox
opposed: safari
Opposed by Safari
proposal
Proposal for a change or new feature
Popup is a temporary small window. Sometimes, developers want another behavior: open a page in a new tab when users click the extension icon.
At present, developers must declare a background script(service worker), and add one line of code in it:
browser.action.onClicked.addListener(_ => chrome.tabs.create({url: "index.html"}));
My proposal likes below:
Unlike popup page, tab page has no per-tab state. When click the extension icon, just open that page in a new tab.
The text was updated successfully, but these errors were encountered: