1

I have this block of code for a button I am adding to the tab right-click context menu

var playButton = doc.createElementNS(ns,"button");
playButton.setAttribute("id", "contexttab-newtab");
playButton.setAttribute("label", _("newtab_string"));
playButton.setAttribute("accesskey", _("newtabaccesskey_string"));
playButton.setAttribute("oncommand", "BrowserOpenTab();");
playButton.setAttribute("icon", "./icon-16.png");

However, it shows no button. The icon itself is located in data/icon-16.png as I believe it should be. 'image' doesn't work either. What am I doing wrong?

Screenshot of button-less context menu

Pastebin of full code: http://pastebin.com/4FeZSScy

Nils Guillermin
  • 1,867
  • 3
  • 21
  • 51

0 Answers0