I’ve read this article on MDN:
https://developer.mozilla.org/en/Places_utilities_for_JavaScript#Bookmark_Dialog
But still has no clue how to call for function like
showAddBookmarkUI()
I tried PlacesUtils.showAddBookmarkUI(), but it didn’t work.
This article is outdated as of Firefox 4. This functionality is now implemented in the
PlacesUIUtilsmodule, methodshowBookmarkDialog(). You would call it like this:This is an internal module so it isn’t really documented and the API might change again in future. You can see an example of how it is being used in the source code. Btw, if what you actually want to open is the list of bookmarks rather than the “Add Bookmark” dialog then you do it like this:
(code mostly copied from
PlacesCommandHookimplementation).