nsIDOMProgressEvent 编辑
dom/interfaces/events/nsIDOMProgressEvent.idl
Scriptable 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
Attribute | Type | Description |
lengthComputable | boolean | Specifies whether or not the total size of the transfer is known. Read only. |
loaded | unsigned long long | The 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. |
total | unsigned long long | The 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, specifyfalse
. loadedArg
- The number of bytes already transferred. Must be a non-negative value.
totalArg
- The total number of bytes to be transferred. If
lengthComputable
isfalse
, this must be zero.
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论