이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 참여해서 번역을 마치도록 도와 주세요!
English (US)의 문서도 읽어보세요.

Gets the title of the page action.

This is an asynchronous function that returns a Promise.

Syntax

var gettingTitle = browser.pageAction.getTitle(
  details // object
)

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

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxOperaFirefox for Android
getTitleChrome Full support YesEdge Full support 14Firefox Full support 45Opera Full support YesFirefox Android No support No

Legend

Full support  
Full support
No support  
No support

Examples

This example logs the page action's title when the user clicks its icon:

function gotTitle(title) {
  console.log(`Title ${title}`);
}

browser.pageAction.onClicked.addListener((tab) => {
  var gettingTitle = browser.pageAction.getTitle({
    tabId: tab.id
  });
  gettingTitle.then(gotTitle);
});

Example extensions

Acknowledgements

This API is based on Chromium's chrome.pageAction API. This documentation is derived from page_action.json in the Chromium code.

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

문서 태그 및 공헌자

이 페이지의 공헌자: mdnwebdocs-bot, wbamberg, michael-zapata, Makyen
최종 변경자: mdnwebdocs-bot,