How to automatically resize panels in a Firefox extension

I am making a firefox extension using their addon builder and I am trying to open a popup when I click on the toolbar button. However, it seems that the panel dimensions cannot be set to automatic. I load some content after calling api, so the content of the html panel changes. How to resize a panel to fit an html document automatically, for example, a default popup in google chrome extensions?

+4
source share
1 answer

You will need to manually resize using the resize method

If you find out a solution that works with automatic resizing, determining the optimal value for the page, send a request or send an error

+2
source

Source: https://habr.com/ru/post/1493948/