javascript - Get Title of selected tab -


Is there a way to get value for the page title from Google extension? Firstly you should announce the tab API in your code:

/ P>

  {"name": "my extension", ... "permissions": ["tab"], ...}  

Then you tab You will be able to use the API, you are looking for the method.

To get the selected tab of the current window, you can simply pass null as windowId .

>

This method will execute a callback function passing an object as its first argument, where you can only get the title property:

  chrome.tabs.get selected (empty, function (tab) {// rickle default for current window title title = tab.title; // ...});  

Comments