ExtensionManager (Toolkit) 编辑
Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
The ExtensionManager follows the nsIExtensionManager API.
Note: This API is obsolete starting in Gecko 2.0, and has been replaced by the new Add-on Manager.
Examples
Here is how to retrive all the extensions installed:
var em = Cc['@mozilla.org/extensions/manager;1'] .getService(Ci.nsIExtensionManager); const nsIUpdateItem = Ci.nsIUpdateItem; var extension_type = nsIUpdateItem.TYPE_EXTENSION; items = em.getItemList(extension_type, {}); items.forEach(function(item, index, array) { alert(item.name + " / " + item.id + " version: " + item.version); });
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论