| OLD | NEW |
| (Empty) | |
| 1 <h1>The activeTab permission</h1> |
| 2 |
| 3 <p> |
| 4 The <code>activeTab</code> permission is for extensions that perform an action o
n a tab in response to the user. For example, an extension with a browser action
that changes the formatting of the current page when clicked, or has a context
menu which acts on the word that was clicked on. |
| 5 </p> |
| 6 |
| 7 <p> |
| 8 Traditionally such extensions would need to request both the <code><all_urls&
gt;</code> permission and the <code>tabs</code> permission, requiring a scary in
stall warning. With the <code>activeTab</code> permission, none of that is neces
sary. |
| 9 </p> |
| 10 |
| 11 </p> |
| 12 Formally, the <code>activeTab</code> permission allows an extension to use <a hr
ef="tabs.html#method-executeScript">tabs.executeScript</a> and <a href="tabs.htm
l#method-insertCSS">tabs.insertCSS</a> on any tab the extension has been invoked
on, including any frames with the same security origin. The permission lasts un
til the tab is navigated. |
| 13 </p> |
| 14 |
| 15 <p> |
| 16 The following qualify as invocations: |
| 17 <ul> |
| 18 <li>clicking on an extension’s browser action, |
| 19 <li>clicking on an extension’s page action, |
| 20 <li>clicking on an extension’s script badge, |
| 21 <li>accepting a suggestion from an extension’s omnibox, |
| 22 <li>invoking an action from an extension’s context menu, or |
| 23 <li>executing a command configured for an extension. |
| 24 </ul> |
| 25 </p> |
| OLD | NEW |