amIWebInstaller 编辑
toolkit/mozapps/extensions/amIWebInstaller.idl
Scriptable This interface is used to allow web pages to start installing add-ons. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports
Last changed in Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5)Method overview
boolean installAddonsFromWebpage(in AString aMimetype, in nsIDOMWindow aWindow, in nsIURI aReferer, [array, size_is(aInstallCount)] in wstring aUris, [array, size_is(aInstallCount)] in wstring aHashes, [array, size_is(aInstallCount)] in wstring aNames, [array, size_is(aInstallCount)] in wstring aIcons, [optional] in amIInstallCallback aCallback, [optional] in PRUint32 aInstallCount); |
boolean isInstallEnabled(in AString aMimetype, in nsIURI aReferer); |
Note: Prior to Gecko 8.0, all references to nsIDOMWindow
used in this interface were nsIDOMWindow
.
Methods
installAddonsFromWebpage()
Installs an array of add-ons at the request of a webpage.
boolean installAddonsFromWebpage( in AString aMimetype, in nsIDOMWindow aWindow, in nsIURI aReferer, [array, size_is(aInstallCount)] in wstring aUris, [array, size_is(aInstallCount)] in wstring aHashes, [array, size_is(aInstallCount)] in wstring aNames, [array, size_is(aInstallCount)] in wstring aIcons, in amIInstallCallback aCallback, Optional in PRUint32 aInstallCount Optional );
Parameters
aMimetype
- The mimetype for the add-ons.
aWindow
- The window installing the add-ons.
aReferer
- The URI for the web page installing the add-ons.
aUris
- The URIs of add-ons to be installed.
aHashes
- The hashes for the add-ons to be installed.
aNames
- The names for the add-ons to be installed.
aIcons
- The icons for the add-ons to be installed.
aCallback
Optional- An optional callback to notify about installation success and failure.
aInstallCount
Optional- An optional argument including the number of add-ons to install.
Return value
true
if the installation was successfully started.
isInstallEnabled()
Checks if installation is enabled for a web page.
boolean isInstallEnabled( in AString aMimetype, in nsIURI aReferer );
Parameters
aMimetype
- The MIME type for the add-on to be installed.
aReferer
- The URI of the web page for which to see if installation is allowed.
Return value
true
if installation is enabled.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论