amIInstallTrigger 编辑
toolkit/mozapps/extensions/amIInstallTrigger.idl
Scriptable 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.
Constant | Value | Description |
SKIN | 1 | |
LOCALE | 2 | |
CONTENT | 4 | |
PACKAGE | 7 |
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论