1

I am working on to develop extensions using crossrider . I have added popup.html file to resources of my extension , but how to link it to onclick event of a browser button .I have been trying with appAPI.tabs.create('popup.html') to atleast open the popup file in a new tab but it doesn't work

user1547566
  • 403
  • 1
  • 6
  • 11

1 Answers1

2

There is no need for explicit linking of popup.html to onclick event of browser button if you have registered manifest as below.

{
  "name": "My extension",
  ...
  "browser_action": {
    "default_title": "Google Mail",      // optional; shown in tooltip
    "default_popup": "popup.html"        // This registers to onclick event of browser icon
  },
  ...
}

References:

Browser action

Let me know if you need more information.

Sudarshan
  • 18,140
  • 7
  • 53
  • 61