2

I try to create simple xpi example. In my project folder I run "jpm init" command and changed code in index.js on this:

var menuId;

function loadIntoWindow(window) {
  if (!window)
    return;
  menuId = window.NativeWindow.menu.add("View Source", null, function() {
viewSource(window);
});
}

function unloadFromWindow(window) {
  if (!window)
    return;
  window.NativeWindow.menu.remove(menuId);
}

Xpi installed correctly, but menu item doesn't appear. What wrong in code?

umni4ek
  • 365
  • 1
  • 2
  • 16

0 Answers0