I am new to Javascript and am trying to make a Chrome extension. However, the console log isn't printing anything to the console I opened using f12. The code executes other functions, like opening a tab, but prints nothing. I've searched through a lot of questions about the same problem but none of the causes seemed to be mine. Thanks.
chrome.browserAction.onClicked.addListener (function (tab)
{
var teste = new Object();
chrome.tabs.create (teste);
alert(123);
chrome.tabs.executeScript( {file:"viewer.js"});
});