I am developing a tiny Firefox Addon which has a Widget and a Panel. I passed the panel object inside widget constructor.
Panel is getting displayed when I click on Widget object. However, when I call panel.show([Widget Object]) in onAttach, it is giving me the error anchor.ownerDocument not defined.
If I call just panel.show(), it is showing the panel in the center of the browser window.
How can I set widget as panel's anchor in onAttach event?
If that is not possible, can I fire a click event on the widget so that onClick action happen and my panel comes up?