Get active tab's title

10/22/2016 23:15 BeginnerDO#1
Hi all,

Now, after too many hours, I finaly give up :D

I am trying to do a simple browser addon (for firefox) and I need to get page's title. Sounds simple but it isnt :D
The issue is that I am calling the javascript from a "addon box" so it is not inside the current web page. (its like a popup?)

Simple document.title wont work because it is trying to give me the title of my addon html document.

I have tried to use chrome tabs in a dozens ways but they are still giving me "undefined"
Code:
 chrome.tabs.query({ currentWindow: true, active: true }, function (tabs) {
  alert(tabs[0].title);
});
Any ideas? :)


EDIT:

Solved.
I quess I had a problem with debugger last night or something like that. The code above works just fine..
Can be closed :)