弃用
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the
兼容性表格
at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。
ProgressEvent.initProgressEvent()
method Initializes an animation event created using the deprecated
Document.createEvent("ProgressEvent")
方法。
ProgressEvent
created that way are untrusted.
注意:
this method has been dropped during the standard process. It has been deprecated and removed from most implementation. Do not use it anymore, use the standard constructor,
ProgressEvent()
, to create a synthetic
ProgressEvent
Progress.initProgressEvent(typeArg, canBubbleArg, cancelableArg, lengthComputable, loaded, total);
DOMString
identifying the specific type of animation event that occurred. The following values are allowed:
| 值 | 含义 |
|---|---|
loadstart
|
The operation has started. |
progress
|
The operation still is in progress. |
error
|
The operation failed and didn't complete. |
abort
|
The operation was cancelled and didn't complete. |
load
|
The operation completed. |
loadend
|
The operation stopped. |
布尔
flag indicating if the event can bubble (
true
) 或不 (
false)
.
布尔
flag indicating if the event associated action can be avoided (
true
) 或不 (
false)
.
布尔
flag indicating if the total work to be done, and the amount of work already done, by the underlying process is calculable. In other words, it tells if the progress is measurable or not.
unsigned long long
representing the amount of work already performed by the underlying process. The ratio of work done can be calculated with the property and
ProgressEvent.total
. When downloading a resource using HTTP, this only represent the part of the content itself, not headers and other overhead.
unsigned long long
representing the total amount of work that the underlying process is in the progress of performing. When downloading a resource using HTTP, this only represent the content itself, not headers and other overhead.
This feature does not exist in any specifications.
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
initProgressEvent
弃用
非标
|
Chrome 1 — 17 | Edge 12 — 79 | Firefox 3.5 — 22 | IE 10 | Opera ? — 15 | Safari ? — ? | WebView Android No | Chrome Android ? — ? | Firefox Android 4 — 22 | Opera Android ? — 14 | Safari iOS ? — ? | Samsung Internet Android No |
完整支持
不支持
非标。预期跨浏览器支持较差。
弃用。不要用于新网站。
ProgressEvent
interface it belongs to.
ProgressEvent
initProgressEvent()