The way I did it before with window.sidebar.addPanel() does not work for latest version of Firefox. I try to use PlacesUIUtils.showBookmarkDialog as adviced in How to call for Firefox bookmark dialog? It is (in the advice) preceded by Components.utils.import("resource:///modules/PlacesUIUtils.jsm");
The problem is that documents tell that .import() may be called only on (local) file. I want the thing to work for a casual user (without requiring any plugins preinstalled).
Is this approach usable in general? Can I not import from elsewhere? Any other suggestions?
See https://support.mozilla.org/en-US/questions/985670 - the answer I got there is basically NOT IT IS NOT POSSIBLE to implement opening the Bookmarks Dialog in Firefox. So I have followed a simplified solution (though valid across browsers).