nsIDOMProgressEvent 编辑

dom/interfaces/events/nsIDOMProgressEvent.idlScriptable This interface represents the events sent with progress information while uploading data using the XMLHttpRequest object. 1.0 66 Introduced Gecko 1.9.1 Deprecated Gecko 22 Inherits from: nsIDOMEvent Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0)

The nsIDOMProgressEvent is used in the media elements (<video> and <audio>) to inform interested code of the progress of the media download. This implementation is a placeholder until the specification is complete, and is compatible with the WebKit ProgressEvent.

Method overview

void initProgressEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in boolean lengthComputableArg, in unsigned long long loadedArg, in unsigned long long totalArg);Deprecated since Gecko 22.0

Attributes

AttributeTypeDescription
lengthComputablebooleanSpecifies whether or not the total size of the transfer is known. Read only.
loadedunsigned long longThe number of bytes transferred since the beginning of the operation. This doesn't include headers and other overhead, but only the content itself. Read only.
totalunsigned long longThe total number of bytes of content that will be transferred during the operation. If the total size is unknown, this value is zero. Read only.

Methods

initProgressEvent() Deprecated since Gecko 22.0

This method has been removed from use in JavaScript in Gecko 22.0. Use the regular constructor to construct a synthetic ProgressEvent.
It still is usable from native C++ code.

Initializes the progress event object.

void initProgressEvent(
  in DOMString typeArg,
  in boolean canBubbleArg,
  in boolean cancelableArg,
  in boolean lengthComputableArg,
  in unsigned long long loadedArg,
  in unsigned long long totalArg
);
Parameters
typeArg
The type of event. Must be one of "abort", "error", "load", "loadstart", or "progress".
canBubbleArg
Specifies whether or not the created event will bubble.
cancelableArg
Specifies whether or not the created event can be canceled.
lengthComputableArg
If the size of the data to be transferred is known, this should be true. Otherwise, specify false.
loadedArg
The number of bytes already transferred. Must be a non-negative value.
totalArg
The total number of bytes to be transferred. If lengthComputable is false, this must be zero.

See also

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

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

发布评论

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

词条统计

浏览:90 次

字数:5805

最后编辑:7 年前

编辑次数:0 次

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