Create mozilla extension to display a popup and iframe in it

后端 未结 3 655
旧巷少年郎
旧巷少年郎 2021-02-10 22:50

Am trying to develop a mozilla extension. I just need to display an iframe in a popup, but don\'t know how to do this.

My requirement is

  1. Add a extension b
3条回答
  •  悲&欢浪女
    2021-02-10 23:46

    With the Addon-SDK, you can use a panel, which is essentially a popup iframe.

    const { Panel } = require('sdk/panel');
    let panel = Panel({
      contentURL: 'http://mozilla.com',
      width: 600,
      height: 600
    });
    panel.show();
    

    Hooking it into a toolbar button, there are community created modules that allow that make it easy to trigger the panel as well.

提交回复
热议问题