Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

calling from tabs.onActivated event

  • No replies
  • 1 has this problem
more options

I want wrote extension, that will open sidebar (with bookmarks) on New Tab, and close it on other tabs.

I make background script with next content: ``` browser.tabs.onActivated.addListener(function(tab){ if(tab.url=="about:newtab") else browser.sidebarAction.close() }) ``` And I get next error in console: `browser.sidebarAction is undefined`

Also I can see here that such actions "can only be called from inside the handler for a user action." Clicking the extension's browser action or page action.

And I want ensure whether tabs.onActivated event is a User action?

And if not, is there any ways or suggestions to go around this limitation?

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.