如何调用 Firefox 书签对话框?
我在 MDN 上读过这篇文章:
https://developer.mozilla.org/en/Places_utilities_for_JavaScript#Bookmark_Dialog< br> 但仍然不知道如何调用像
showAddBookmarkUI()
这样的函数我尝试了 PlacesUtils.showAddBookmarkUI()
,但它不起作用。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
本文自 Firefox 4 起已过时。此功能现已在
PlacesUIUtils
模块的showBookmarkDialog()
方法中实现。您可以这样称呼它:这是一个内部模块,因此它没有真正记录下来,并且 API 将来可能会再次更改。您可以查看如何使用它的示例
代码主要复制自
PlacesCommandHook
实现)。This article is outdated as of Firefox 4. This functionality is now implemented in the
PlacesUIUtils
module, 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
PlacesCommandHook
implementation).对于 SDK 开发人员(谷歌凹凸):
For SDK developers (google bump):