amIInstallTrigger 编辑

toolkit/mozapps/extensions/amIInstallTrigger.idlScriptable Called when an install completes or fails. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Method overview

boolean enabled();
boolean install(in nsIVariant aArgs, [optional] in amIInstallCallback aCallback);
boolean installChrome(in PRUint32 aType, in AString aUrl, in AString aSkin); Deprecated since Gecko 2.0
boolean startSoftwareUpdate(in AString aUrl, [optional] in PRInt32 aFlags); Deprecated since Gecko 2.0
boolean updateEnabled(); Deprecated since Gecko 2.0

Constants

Retained for backwards compatibility.

ConstantValueDescription
SKIN1 
LOCALE2 
CONTENT4 
PACKAGE7 

Methods

enabled()

Tests if installation is enabled.

boolean enabled();
Parameters

None.

Return value

 

install()

Starts a new installation of a set of add-ons.

boolean install(
  in nsIVariant aArgs,
  in amIInstallCallback aCallback Optional
);
Parameters
aArgs
The add-ons to install. This should be a JS object, each property is the name of an add-on to be installed. The value of the property should either be a string URL, or an object with the following properties:
  • URL for the add-on's URL
  • IconURL for an icon for the add-on
  • Hash for a hash of the add-on.
aCallback Optional
A callback to call as each installation succeeds or fails.
Return value

true if the installations were successfully started.

installChrome

Starts installing a new add-on. This method is deprecated, please use install() in the future.

boolean installChrome(
  in PRUint32 aType,
  in AString aUrl,
  in AString aSkin
);
Parameters
aType
Unused, retained for backwards compatibility.
aUrl
The URL of the add-on.
aSkin
Unused, retained for backwards compatibility.
Return value

true if the installation was successfully started.

startSoftwareUpdate

Starts installing a new add-on.

boolean startSoftwareUpdate(
  in AString aUrl,
  in PRInt32 aFlags Optional
);
Parameters
aUrl
The URL of the add-on.
aFlags Optional
Unused, retained for backwards compatibility.
Return value

true if the installation was successfully started.

updateEnabled

Tests if installation is enabled.

boolean updateEnabled();
Parameters

None.

Return value

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

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

发布评论

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

词条统计

浏览:99 次

字数:5386

最后编辑:7 年前

编辑次数:0 次

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