1

I'm trying to log 1 to the console with jpm. The thing is that the google.com tab opens, but the 1 isn't outputed. Any ideas?

var buttons = require('sdk/ui/button/action');
var tabs = require("sdk/tabs");

var button = buttons.ActionButton({
  id: "mozilla-link",
  label: "SupBot",
  icon: {
    "16": "./icon-16.png",
    "32": "./icon-32.png",
    "64": "./icon-64.png"
  },
  onClick: handleClick
});

function handleClick() {
    console.log(1);
    tabs.open("https://google.com");
}
Matt
  • 37
  • 4

0 Answers0