From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/progressevent/index.html | 161 ++++++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 files/ja/web/api/progressevent/index.html (limited to 'files/ja/web/api/progressevent/index.html') diff --git a/files/ja/web/api/progressevent/index.html b/files/ja/web/api/progressevent/index.html new file mode 100644 index 0000000000..c481c0d782 --- /dev/null +++ b/files/ja/web/api/progressevent/index.html @@ -0,0 +1,161 @@ +--- +title: ProgressEvent +slug: Web/API/ProgressEvent +translation_of: Web/API/ProgressEvent +--- +

{{APIRef("DOM Events")}}

+ +

The ProgressEvent インターフェースは (XMLHttpRequest、または {{HTMLElement("img")}}, {{HTMLElement("audio")}}, {{HTMLElement("video")}}, {{HTMLElement("style")}} ,{{HTMLElement("link")}}のような基本的なリソースのロードなどの)のようなHTTPリクエストイベントの基本的なプロセスの進捗の進み具合を表示します。

+ +

コンストラクタ

+ +
+
{{domxref("ProgressEvent.ProgressEvent", "ProgressEvent()")}}
+
Creates a ProgressEvent event with the given parameters.
+
+ +

Properties

+ +

Also inherits properties from its parent {{domxref("Event")}}.

+ +
+
{{domxref("ProgressEvent.lengthComputable")}} {{readonlyInline}}
+
Is a {{domxref("Boolean")}} 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.
+
{{domxref("ProgressEvent.loaded")}} {{readonlyInline}}
+
Is an 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.
+
{{domxref("ProgressEvent.total")}} {{readonlyInline}}
+
Is an 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.
+
+ +

メソッド

+ +
+
+ +

Also inherits methods from its parent {{domxref("Event")}}.

+ +
+
{{domxref("ProgressEvent.initProgressEvent()")}} {{deprecated_inline}}{{non-Standard_inline}}
+
Initializes a ProgressEvent created using the deprecated {{domxref("Document.createEvent()", "Document.createEvent(\"ProgressEvent\")")}} method.
+
+ +

+ +

The following example adds a ProgressEvent to a new {{domxref("XMLHTTPRequest")}} and uses it to display the status of the request.

+ +
  var progressBar = document.getElementById("p"),
+      client = new XMLHttpRequest()
+  client.open("GET", "magical-unicorns")
+  client.onprogress = function(pe) {
+    if(pe.lengthComputable) {
+      progressBar.max = pe.total
+      progressBar.value = pe.loaded
+    }
+  }
+  client.onloadend = function(pe) {
+    progressBar.value = pe.loaded
+  }
+  client.send()
+ +

仕様書

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Progress Events', '#interface-progressevent', 'ProgressEvent')}}{{Spec2('Progress Events')}}Initial definition.
+ +

ブラウザ互換性

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support1.0{{CompatGeckoDesktop("1.9.1")}}10.0{{CompatVersionUnknown}}{{CompatVersionUnknown}}
initProgressEvent() {{non-standard_inline}}{{deprecated_inline}}{{CompatNo}}[1]{{CompatNo}}[2]10.0{{CompatNo}}[4]{{CompatNo}}[3]
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidAndroid WebviewFirefox Mobile (Gecko)IE MobileOpera MobileSafari MobileChrome for Android
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.9.1")}}10.0{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
initProgressEvent() {{non-standard_inline}}{{deprecated_inline}}{{CompatNo}}[3]{{CompatNo}}{{CompatNo}}[2]10.0{{CompatNo}}[4]{{CompatNo}}[3]{{CompatNo}}
+
+ +

[1] This feature was implemented in Chrome 1.0, but removed in Chrome 17.0.

+ +

[2] This feature was implemented in Gecko 1.9.1 {{geckoRelease("1.9.1")}}, but removed in Gecko 22 {{geckoRelease("22")}}.

+ +

[3] This feature was removed at some point.

+ +

[4] This feature was removed in Opera 15.0.

+ +

See also

+ + -- cgit v1.2.3-54-g00ecf