nsIBlocklistService 编辑
xpcom/system/nsIBlocklistService.idl
Scriptable 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
Constant | Value | Description |
STATE_NOT_BLOCKED | 0 | |
STATE_SOFTBLOCKED | 1 | |
STATE_BLOCKED | 2 | |
STATE_OUTDATED | 3 |
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论