From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../web/api/xmlhttprequesteventtarget/index.html | 66 +++++++++++++++++++ .../xmlhttprequesteventtarget/onabort/index.html | 63 +++++++++++++++++++ .../xmlhttprequesteventtarget/onerror/index.html | 61 ++++++++++++++++++ .../xmlhttprequesteventtarget/onload/index.html | 61 ++++++++++++++++++ .../onloadstart/index.html | 61 ++++++++++++++++++ .../onprogress/index.html | 73 ++++++++++++++++++++++ 6 files changed, 385 insertions(+) create mode 100644 files/ja/web/api/xmlhttprequesteventtarget/index.html create mode 100644 files/ja/web/api/xmlhttprequesteventtarget/onabort/index.html create mode 100644 files/ja/web/api/xmlhttprequesteventtarget/onerror/index.html create mode 100644 files/ja/web/api/xmlhttprequesteventtarget/onload/index.html create mode 100644 files/ja/web/api/xmlhttprequesteventtarget/onloadstart/index.html create mode 100644 files/ja/web/api/xmlhttprequesteventtarget/onprogress/index.html (limited to 'files/ja/web/api/xmlhttprequesteventtarget') diff --git a/files/ja/web/api/xmlhttprequesteventtarget/index.html b/files/ja/web/api/xmlhttprequesteventtarget/index.html new file mode 100644 index 0000000000..27a27dd318 --- /dev/null +++ b/files/ja/web/api/xmlhttprequesteventtarget/index.html @@ -0,0 +1,66 @@ +--- +title: XMLHttpRequestEventTarget +slug: Web/API/XMLHttpRequestEventTarget +tags: + - AJAX + - API + - NeedsBrowserCompatibility + - NeedsContent + - Reference + - XMLHttpRequest +translation_of: Web/API/XMLHttpRequestEventTarget +--- +

{{APIRef("XMLHttpRequest")}}

+ +

XMLHttpRequestEventTarget は、{{ domxref("XMLHttpRequest")}} のイベントを処理するオブジェクトに実装できるイベントハンドラーを記述するインターフェイスです。

+ +

{{InheritanceDiagram}}

+ +

プロパティ

+ +
+
{{ domxref("XMLHttpRequestEventTarget.onabort") }}
+
リクエストが中止され、{{event('abort')}} イベントがこのオブジェクトによって受信されたときに呼び出す関数が含まれています。
+
{{ domxref("XMLHttpRequestEventTarget.onerror") }}
+
リクエストでエラーが発生し、このオブジェクトが {{event('error')}} イベントを受信したときに呼び出す関数が含まれています。
+
{{ domxref("XMLHttpRequestEventTarget.onload") }}
+
コンテンツのフェッチに成功した後にHTTPリクエストが返され、このオブジェクトが {{event('load')}} イベントを受信したときに呼び出す関数が含まれています。
+
{{ domxref("XMLHttpRequestEventTarget.onloadstart") }}
+
HTTPリクエストが最初にデータの読み込みを開始し、{{event('loadstart')}} イベントがこのオブジェクトによって受信されたときに呼び出される関数が含まれています。
+
{{ domxref("XMLHttpRequestEventTarget.onprogress") }}
+
リクエストの進行状況に関する情報とともに定期的に呼び出される関数が含まれ、{{event('progress')}} イベントがこのオブジェクトによって受信されます。
+
{{ domxref("XMLHttpRequestEventTarget.ontimeout") }}
+
イベントがタイムアウトし、{{event("timeout")}} イベントがこのオブジェクトによって受信された場合に呼び出される関数が含まれています。これは、XMLHttpRequest オブジェクトの timeout 属性の値を設定することによってタイムアウトが以前に確立されている場合にのみ発生します。
+
{{ domxref("XMLHttpRequestEventTarget.onloadend") }}
+
リクエストが失敗し、{{event('loadend')}} イベントがこのオブジェクトによって受信された場合でも、ロードが完了したときに呼び出される関数が含まれています。
+
+ +

仕様書

+ + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('XMLHttpRequest')}}{{Spec2('XMLHttpRequest')}}WHATWG living standard
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.XMLHttpRequestEventTarget")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/xmlhttprequesteventtarget/onabort/index.html b/files/ja/web/api/xmlhttprequesteventtarget/onabort/index.html new file mode 100644 index 0000000000..c6a48aa880 --- /dev/null +++ b/files/ja/web/api/xmlhttprequesteventtarget/onabort/index.html @@ -0,0 +1,63 @@ +--- +title: XMLHttpRequestEventTarget.onabort +slug: Web/API/XMLHttpRequestEventTarget/onabort +tags: + - API + - Property + - Reference + - Web + - XHMLHttpRequestEventTarget + - イベントハンドラ +translation_of: Web/API/XMLHttpRequestEventTarget/onabort +--- +
{{APIRef("XMLHttpRequest")}}
+ +

XMLHttpRequestEventTarget.onabort は、 {{domxref("XMLHttpRequest.abort()")}} 関数が呼ばれたときなどの {{domxref("XMLHttpRequest")}} トランザクションが中止されたときに呼び出される関数です。

+ +

構文

+ +
XMLHttpRequest.onabort = callback;
+ +

+ + + +

+ +
var xmlhttp = new XMLHttpRequest(),
+  method = 'GET',
+  url = 'https://developer.mozilla.org/';
+
+xmlhttp.open(method, url, true);
+xmlhttp.onabort = function () {
+  console.log('** The request was aborted');
+};
+xmlhttp.send();
+//..
+xmlhttp.abort(); // This will invoke our onabort handler above
+
+ +

仕様

+ + + + + + + + + + + + + + +
仕様ステータス備考
{{SpecName('XMLHttpRequest', '#handler-xhr-onabort')}}{{Spec2('XMLHttpRequest')}}WHATWG living standard
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.XMLHttpRequestEventTarget.onabort")}}

diff --git a/files/ja/web/api/xmlhttprequesteventtarget/onerror/index.html b/files/ja/web/api/xmlhttprequesteventtarget/onerror/index.html new file mode 100644 index 0000000000..0735301636 --- /dev/null +++ b/files/ja/web/api/xmlhttprequesteventtarget/onerror/index.html @@ -0,0 +1,61 @@ +--- +title: XMLHttpRequestEventTarget.onerror +slug: Web/API/XMLHttpRequestEventTarget/onerror +tags: + - API + - Property + - Reference + - Web + - XMLHttpRequestEventTarget + - イベントハンドラ +translation_of: Web/API/XMLHttpRequestEventTarget/onerror +--- +
{{APIRef("XMLHttpRequest")}}
+ +

XMLHttpRequestEventTarget.onerror は、エラーの為に {{domxref("XMLHttpRequest")}} トランザクションが失敗した場合に呼び出される関数です。

+ +

構文

+ +
XMLHttpRequest.onerror = callback;
+ +

+ + + +

+ +
var xmlhttp = new XMLHttpRequest(),
+  method = 'GET',
+  url = 'https://developer.mozilla.org/';
+
+xmlhttp.open(method, url, true);
+xmlhttp.onerror = function () {
+  console.log("** An error occurred during the transaction");
+};
+xmlhttp.send();
+
+ +

仕様

+ + + + + + + + + + + + + + +
仕様ステータス備考
{{SpecName('XMLHttpRequest', '#handler-xhr-onerror')}}{{Spec2('XMLHttpRequest')}}WHATWG living standard
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.XMLHttpRequestEventTarget.onerror")}}

diff --git a/files/ja/web/api/xmlhttprequesteventtarget/onload/index.html b/files/ja/web/api/xmlhttprequesteventtarget/onload/index.html new file mode 100644 index 0000000000..f208d27499 --- /dev/null +++ b/files/ja/web/api/xmlhttprequesteventtarget/onload/index.html @@ -0,0 +1,61 @@ +--- +title: XMLHttpRequestEventTarget.onload +slug: Web/API/XMLHttpRequestEventTarget/onload +tags: + - API + - Property + - Reference + - Web + - XMLHttpRequestEventTarget + - イベントハンドラ +translation_of: Web/API/XMLHttpRequestEventTarget/onload +--- +
{{APIRef("XMLHttpRequest")}}
+ +

XMLHttpRequestEventTarget.onload は、 {{domxref("XMLHttpRequest")}} トランザクションが正常に完了した場合に呼び出される関数です。

+ +

構文

+ +
XMLHttpRequest.onload = callback;
+ +

+ + + +

+ +
var xmlhttp = new XMLHttpRequest(),
+  method = 'GET',
+  url = 'https://developer.mozilla.org/';
+
+xmlhttp.open(method, url, true);
+xmlhttp.onload = function () {
+  // Do something with the retrieved data ( found in xmlhttp.response )
+};
+xmlhttp.send();
+
+ +

仕様

+ + + + + + + + + + + + + + +
仕様ステータス備考
{{SpecName('XMLHttpRequest', '#handler-xhr-onload')}}{{Spec2('XMLHttpRequest')}}WHATWG living standard
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.XMLHttpRequestEventTarget.onload")}}

diff --git a/files/ja/web/api/xmlhttprequesteventtarget/onloadstart/index.html b/files/ja/web/api/xmlhttprequesteventtarget/onloadstart/index.html new file mode 100644 index 0000000000..606959a180 --- /dev/null +++ b/files/ja/web/api/xmlhttprequesteventtarget/onloadstart/index.html @@ -0,0 +1,61 @@ +--- +title: XMLHttpRequestEventTarget.onloadstart +slug: Web/API/XMLHttpRequestEventTarget/onloadstart +tags: + - API + - Property + - Reference + - Web + - XMLHttpRequestEventTarget + - イベントハンドラ +translation_of: Web/API/XMLHttpRequestEventTarget/onloadstart +--- +
{{APIRef("XMLHttpRequest")}}
+ +

XMLHttpRequestEventTarget.onloadstart は、 {{domxref("XMLHttpRequest")}} トランザクションがデータ転送を開始するときに呼び出される関数です。

+ +

構文

+ +
XMLHttpRequest.onloadstart = callback;
+ +

+ + + +

+ +
var xmlhttp = new XMLHttpRequest(),
+  method = 'GET',
+  url = 'https://developer.mozilla.org/';
+
+xmlhttp.open(method, url, true);
+xmlhttp.onloadstart = function () {
+  console.log("Download underway");
+};
+xmlhttp.send();
+
+ +

仕様

+ + + + + + + + + + + + + + +
仕様ステータス備考
{{SpecName('XMLHttpRequest', '#handler-xhr-onloadstart')}}{{Spec2('XMLHttpRequest')}}WHATWG living standard
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.XMLHttpRequestEventTarget.onloadstart")}}

diff --git a/files/ja/web/api/xmlhttprequesteventtarget/onprogress/index.html b/files/ja/web/api/xmlhttprequesteventtarget/onprogress/index.html new file mode 100644 index 0000000000..7973898e1f --- /dev/null +++ b/files/ja/web/api/xmlhttprequesteventtarget/onprogress/index.html @@ -0,0 +1,73 @@ +--- +title: XMLHttpRequestEventTarget.onprogress +slug: Web/API/XMLHttpRequestEventTarget/onprogress +tags: + - Property + - Reference + - Web + - XHR + - XMLHttpRequestEventTarget + - イベントハンドラ +translation_of: Web/API/XMLHttpRequestEventTarget/onprogress +--- +

{{APIRef("XMLHttpRequest")}}

+ +

XMLHttpRequestEventTarget.onprogress は、正常に成功する前に {{domxref("XMLHttpRequest")}} の情報を定期的に呼び出す関数です。

+ +

構文

+ +
XMLHttpRequest.onprogress = callback;
+ +

+ + + +

イベント

+ + + +
XMLHttpRequest.onprogress = function (event) {
+  event.loaded;
+  event.total;
+};
+ +

+ +
var xmlhttp = new XMLHttpRequest(),
+  method = 'GET',
+  url = 'https://developer.mozilla.org/';
+
+xmlhttp.open(method, url, true);
+xmlhttp.onprogress = function () {
+  //do something
+};
+xmlhttp.send();
+
+ +

仕様

+ + + + + + + + + + + + + + +
仕様備考コメント
{{SpecName('XMLHttpRequest', '#handler-xhr-onload')}}{{Spec2('XMLHttpRequest')}}WHATWG living standard
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.XMLHttpRequestEventTarget.onprogress")}}

-- cgit v1.2.3-54-g00ecf