HttpRequestProgressEvent

HttpRequestProgressEvent

new HttpRequestProgressEvent(type, target, sizeKnown, opt_totalopt, opt_loadedopt)

Source:
Parameters:
Name Type Attributes Default Description
type string
target EventTarget
sizeKnown boolean
opt_total number <optional>
0
opt_loaded number <optional>
0

Members

(private) loadedSize_ :number|null

Description:
  • Loaded size of content.

Source:

Loaded size of content.

Type:
  • number | null

(private) sizeKnown_ :boolean

Description:
  • If total size is known or not.

Source:

If total size is known or not.

Type:
  • boolean

(private) totalSize_ :number|null

Description:
  • Total size of content.

Source:

Total size of content.

Type:
  • number | null

Methods

getLoadedFactor() → {number}

Description:
  • The factor of loaded bytes (from 0 to 1, float).

Source:
Returns:
Type
number

getLoadedPercentage() → {number}

Description:
  • The percentage of loaded bytes (from 0 to 100, int).

Source:
Returns:
Type
number

getLoadedSize() → {number|null}

Description:
  • Loaded size of content.

Source:
Returns:
Type
number | null

getTotalSize() → {number|null}

Description:
  • Total size of content.

Source:
Returns:
Type
number | null

isSizeKnown() → {boolean}

Description:
  • If total size is known or not.

Source:
Returns:
Type
boolean