nsIBlocklistService 编辑

xpcom/system/nsIBlocklistService.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 29 (Firefox 29 / Thunderbird 29 / SeaMonkey 2.26)

 

Method overview

unsigned long getAddonBlocklistState(in jsval addon, [optional] in AString appVersion, [optional] in AString toolkitVersion);
unsigned long getPluginBlocklistState(in nsIPluginTag plugin, [optional] in AString appVersion, [optional] in AString toolkitVersion);
boolean isAddonBlocklisted(in jsval addon, [optional] in AString appVersion, [optional] in AString toolkitVersion);

Constants

ConstantValueDescription
STATE_NOT_BLOCKED0
STATE_SOFTBLOCKED1
STATE_BLOCKED2
STATE_OUTDATED3

Methods

getAddonBlocklistState()

Determine the blocklist state of an add-on.

unsigned long getAddonBlocklistState(
  in jsval addon,
  in AString appVersion, Optional
  in AString toolkitVersion Optional
);
Parameters
addon
The addon object whose blocklist state is to be determined.
appVersion Optional
The version of the application we are checking in the blocklist. If this parameter is null, the version of the running application is used.
toolkitVersion Optional
The version of the toolkit we are checking in the blocklist. If this parameter is null, the version of the running toolkit is used.
Return value

The blocklist state of the add-on, one of the Constants.

getPluginBlocklistState()

Determine the blocklist state of a plugin.

unsigned long getPluginBlocklistState(
  in nsIPluginTag plugin,
  in AString appVersion, Optional
  in AString toolkitVersion Optional
);
Parameters
plugin
The plugin to get the state for.
appVersion Optional
The version of the application we are checking in the blocklist. If this parameter is null, the version of the running application is used.
toolkitVersion Optional
The version of the toolkit we are checking in the blocklist. If this parameter is null, the version of the running toolkit is used.
Return value

The blocklist state of the plugin, one of the Constants.

isAddonBlocklisted()

Determine if an item is blocklisted.

boolean isAddonBlocklisted(
  in jsval addon,
  in AString appVersion, Optional from Gecko 1.9.1
  in AString toolkitVersion Optional from Gecko 1.9.1
);
Parameters
addon
The addon object to be checked.
appVersion Optional from Gecko 1.9.1
The version of the application we are checking in the blocklist. If this parameter is null, the version of the running application is used.
toolkitVersion Optional from Gecko 1.9.1
The version of the toolkit we are checking in the blocklist. If this parameter is null, the version of the running toolkit is used.
Return value

true if the item is blocklisted, otherwise false.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:103 次

字数:5424

最后编辑:6 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文