nsIDOMProgressEvent

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, 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