Open permission manager from options page

Hi!
I’m porting XPCOM extension jsPrintSetup .
In options page of addon I have button which calls permission manager with allowed/blocked hosts which can access jsPrintSetup .
This code doesn’t work in web extension options.html.

function openPermissionManager() {
  var params = {
    blockVisible   : true,
    sessionVisible : false,
    allowVisible   : true,
    prefilledHost  : "",
    permissionType : "jsPrintSetup", //"popup",
    windowTitle    : "jsPrintSetup",
    introText      : "jsPrintSetup "+browser.i18n.getMessage("jsp_Permissions") 
  };
  console.log(window);
  window.openDialog(
    "chrome://browser/content/preferences/permissions.xul"
	 , "_blank"
	 , "resizable,dialog=no,centerscreen"
	 , params
  );
}

What is right way to implement host permissions for accessing extension and provide way to manage permissions?

Regards,

Dimitar Angelov

I assume you’re porting this to a WebExtension? If so, you cannot use XUL. You should open this in a browserAction or sidebarAction. However, I think you’re going to have other trouble–trouble with printing and print preview. There are no WebExtension APIs for that yet.

If you’re porting to a XUL/legacy addon, it will only work until Firefox 57 in November. Do you still want help with that path?

Yes, I’m working on webextension experiment with implementation of print services, but can’t find a proper way to implement host based permissions allow/block for using jsPrintSetup addon.
See discussion