nsIDownloadManagerUI 编辑

toolkit/components/downloads/public/nsIDownloadManagerUI.idlScriptable This interface is used to implement the user interface for the Download Manager. If you wish to replace the default Download Manager user interface, implement this interface. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3)

Method overview

void getAttention();
void show([optional] in nsIInterfaceRequestor aWindowContext, [optional] in unsigned long aID, [optional] in short aReason);

Attributes

AttributeTypeDescription
visiblebooleantrue if the Download Manager UI is visible; otherwise false. Read only.

Constants

ConstantValueDescription
REASON_USER_INTERACTED0When opening the Download Manager user interface, this value indicates that it's being done at the user's request.
REASON_NEW_DOWNLOAD1When opening the Download Manager user interface, this value indicates that the user interface is being displayed because a new download is being started.

Methods

getAttention()

Calls attention to the Download Manager's user interface if it's already open. The UI need not be visible to call this function, nor will the UI be made visible.

void getAttention();
Parameters

None.

Exceptions thrown
NS_ERROR_UNEXPECTED
The user interface isn't currently open.

show()

Shows the Download Manager's user interface to the user.

void show(
  in nsIInterfaceRequestor aWindowContext, Optional
  in unsigned long aID, Optional
  in short aReason Optional
);
Parameters
aWindowContext Optional
The parent window context to show the user interface. With this information, it's possible to put the Download Manager in a tab in the same window as the parent.
aID Optional
The ID of the download to be preselected upon opening the Download Manager UI.
aReason Optional
One of the reason constants indicating why the user interface should be displayed.

See also

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

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

发布评论

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

词条统计

浏览:33 次

字数:4188

最后编辑:7年前

编辑次数:0 次

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