Path: blob/main/files/en-us/mozilla/add-ons/webextensions/api/pageaction/gettitle/index.md
6585 views
------{{AddonSidebar()}}
Gets the title of the page action.
This is an asynchronous function that returns a Promise.
Syntax
Parameters
details:
object.tabId:
integer. The ID of the tab containing the page action whose title you want to get.
Return value
A Promise that will be fulfilled with a string containing the page action's title.
Browser compatibility
{{Compat}}
Examples
This example logs the page action's title when the user clicks its icon:
{{WebExtExamples}}
Note: This API is based on Chromium's
chrome.pageActionAPI. This documentation is derived frompage_action.jsonin the Chromium code.