0

The addon-builder documentation says this for the panel API, but doesn't go into details:


show(anchor)

Displays the panel. [ anchor : handle ]

A handle to a DOM node in a page to which the panel should appear to be anchored. If not given, the panel is centered inside the most recent browser window. Note that it is not currently possible to anchor panels in this way using only the high level APIs.


How can I get such an handle to have the panel appear right next to the DOM element I clicked?

Charles
  • 50,943
  • 13
  • 104
  • 142
Jochen Bedersdorfer
  • 4,093
  • 24
  • 26

1 Answers1

1

The way this method is currently implemented you pass the DOM element itself as parameter, not some abstract "handle" (this might change in future if I read bug 638142 correctly). However, you cannot control the position of the panel relative to the anchor node, it is always determined by the screen space available.

Wladimir Palant
  • 56,865
  • 12
  • 98
  • 126