From 4873c5f1122ac800cf3c916a52df07e05ddc9dcf Mon Sep 17 00:00:00 2001 From: MDN Date: Fri, 11 Feb 2022 00:58:37 +0000 Subject: [CRON] sync translated content --- .../web/api/xmlhttprequest/abort_event/index.html | 64 +++++++++++++++++++ .../web/api/xmlhttprequest/error_event/index.html | 62 ++++++++++++++++++ .../web/api/xmlhttprequest/load_event/index.html | 62 ++++++++++++++++++ .../api/xmlhttprequest/loadstart_event/index.html | 62 ++++++++++++++++++ .../api/xmlhttprequest/onreadystatechange/index.md | 60 ------------------ .../api/xmlhttprequest/progress_event/index.html | 74 ++++++++++++++++++++++ .../xmlhttprequest/readystatechange_event/index.md | 61 ++++++++++++++++++ .../xmlhttprequesteventtarget/onabort/index.html | 63 ------------------ .../xmlhttprequesteventtarget/onerror/index.html | 61 ------------------ .../xmlhttprequesteventtarget/onload/index.html | 61 ------------------ .../onloadstart/index.html | 61 ------------------ .../onprogress/index.html | 73 --------------------- 12 files changed, 385 insertions(+), 379 deletions(-) create mode 100644 files/ja/web/api/xmlhttprequest/abort_event/index.html create mode 100644 files/ja/web/api/xmlhttprequest/error_event/index.html create mode 100644 files/ja/web/api/xmlhttprequest/load_event/index.html create mode 100644 files/ja/web/api/xmlhttprequest/loadstart_event/index.html delete mode 100644 files/ja/web/api/xmlhttprequest/onreadystatechange/index.md create mode 100644 files/ja/web/api/xmlhttprequest/progress_event/index.html create mode 100644 files/ja/web/api/xmlhttprequest/readystatechange_event/index.md delete mode 100644 files/ja/web/api/xmlhttprequesteventtarget/onabort/index.html delete mode 100644 files/ja/web/api/xmlhttprequesteventtarget/onerror/index.html delete mode 100644 files/ja/web/api/xmlhttprequesteventtarget/onload/index.html delete mode 100644 files/ja/web/api/xmlhttprequesteventtarget/onloadstart/index.html delete mode 100644 files/ja/web/api/xmlhttprequesteventtarget/onprogress/index.html (limited to 'files/ja/web/api') diff --git a/files/ja/web/api/xmlhttprequest/abort_event/index.html b/files/ja/web/api/xmlhttprequest/abort_event/index.html new file mode 100644 index 0000000000..a8a128756c --- /dev/null +++ b/files/ja/web/api/xmlhttprequest/abort_event/index.html @@ -0,0 +1,64 @@ +--- +title: XMLHttpRequestEventTarget.onabort +slug: Web/API/XMLHttpRequest/abort_event +tags: + - API + - Property + - Reference + - Web + - XHMLHttpRequestEventTarget + - イベントハンドラ +translation_of: Web/API/XMLHttpRequestEventTarget/onabort +original_slug: 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/xmlhttprequest/error_event/index.html b/files/ja/web/api/xmlhttprequest/error_event/index.html new file mode 100644 index 0000000000..a42c9536e3 --- /dev/null +++ b/files/ja/web/api/xmlhttprequest/error_event/index.html @@ -0,0 +1,62 @@ +--- +title: XMLHttpRequestEventTarget.onerror +slug: Web/API/XMLHttpRequest/error_event +tags: + - API + - Property + - Reference + - Web + - XMLHttpRequestEventTarget + - イベントハンドラ +translation_of: Web/API/XMLHttpRequestEventTarget/onerror +original_slug: 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/xmlhttprequest/load_event/index.html b/files/ja/web/api/xmlhttprequest/load_event/index.html new file mode 100644 index 0000000000..89f566c83a --- /dev/null +++ b/files/ja/web/api/xmlhttprequest/load_event/index.html @@ -0,0 +1,62 @@ +--- +title: XMLHttpRequestEventTarget.onload +slug: Web/API/XMLHttpRequest/load_event +tags: + - API + - Property + - Reference + - Web + - XMLHttpRequestEventTarget + - イベントハンドラ +translation_of: Web/API/XMLHttpRequestEventTarget/onload +original_slug: 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/xmlhttprequest/loadstart_event/index.html b/files/ja/web/api/xmlhttprequest/loadstart_event/index.html new file mode 100644 index 0000000000..55e2add3bf --- /dev/null +++ b/files/ja/web/api/xmlhttprequest/loadstart_event/index.html @@ -0,0 +1,62 @@ +--- +title: XMLHttpRequestEventTarget.onloadstart +slug: Web/API/XMLHttpRequest/loadstart_event +tags: + - API + - Property + - Reference + - Web + - XMLHttpRequestEventTarget + - イベントハンドラ +translation_of: Web/API/XMLHttpRequestEventTarget/onloadstart +original_slug: 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/xmlhttprequest/onreadystatechange/index.md b/files/ja/web/api/xmlhttprequest/onreadystatechange/index.md deleted file mode 100644 index d537c8dd1a..0000000000 --- a/files/ja/web/api/xmlhttprequest/onreadystatechange/index.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: XMLHttpRequest.onreadystatechange -slug: Web/API/XMLHttpRequest/onreadystatechange -tags: - - API - - Event - - ハンドラー - - プロパティ - - リファレンス - - XHR - - XMLHttpRequest -browser-compat: api.XMLHttpRequest.onreadystatechange -translation_of: Web/API/XMLHttpRequest/onreadystatechange ---- -{{APIRef}} - -[イベントハンドラー](/ja/docs/Web/Events/Event_handlers) で、 `readyState` 属性が変化するたびに呼び出されます。コールバックはユーザーインターフェイスのスレッドから呼び出されます。 **`XMLHttpRequest.onreadystatechange`** プロパティは、 {{domxref("XMLHttpRequest/readystatechange_event", "readystatechange")}} イベントが発行されるたびに、つまり {{domxref("XMLHttpRequest")}} の {{domxref("XMLHttpRequest.readyState", "readyState")}} が変化するたびに呼び出されるイベントハンドラーを保持します。 - -> **Warning:** これは同期リクエストで使用してはいけません。また、ネイティブコードから使用してはいけません。 - -## 構文 - -```js -XMLHttpRequest.onreadystatechange = callback; -``` - -### 値 - -- `callback` は `readyState` が変化したときに実行される関数です。 - -## 例 - -```js -const xhr = new XMLHttpRequest(), - method = "GET", - url = "https://developer.mozilla.org/"; - -xhr.open(method, url, true); -xhr.onreadystatechange = function () { -  // ローカルファイルでは、 Mozilla Firefox で成功するとステータスは0になります - if(xhr.readyState === XMLHttpRequest.DONE) { -  var status = xhr.status; - if (status === 0 || (status >= 200 && status < 400)) { -  // リクエストが正常に終了した -  console.log(xhr.responseText); -  } else { - // あらら! リクエストでエラーが発生しました! -  } -  } -}; -xhr.send(); -``` - -## 仕様書 - -{{Specifications}} - -## ブラウザーの互換性 - -{{Compat}} diff --git a/files/ja/web/api/xmlhttprequest/progress_event/index.html b/files/ja/web/api/xmlhttprequest/progress_event/index.html new file mode 100644 index 0000000000..eb32cc0a22 --- /dev/null +++ b/files/ja/web/api/xmlhttprequest/progress_event/index.html @@ -0,0 +1,74 @@ +--- +title: XMLHttpRequestEventTarget.onprogress +slug: Web/API/XMLHttpRequest/progress_event +tags: + - Property + - Reference + - Web + - XHR + - XMLHttpRequestEventTarget + - イベントハンドラ +translation_of: Web/API/XMLHttpRequestEventTarget/onprogress +original_slug: 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")}}

diff --git a/files/ja/web/api/xmlhttprequest/readystatechange_event/index.md b/files/ja/web/api/xmlhttprequest/readystatechange_event/index.md new file mode 100644 index 0000000000..7e64081ec6 --- /dev/null +++ b/files/ja/web/api/xmlhttprequest/readystatechange_event/index.md @@ -0,0 +1,61 @@ +--- +title: XMLHttpRequest.onreadystatechange +slug: Web/API/XMLHttpRequest/readystatechange_event +tags: + - API + - Event + - ハンドラー + - プロパティ + - リファレンス + - XHR + - XMLHttpRequest +translation_of: Web/API/XMLHttpRequest/onreadystatechange +original_slug: Web/API/XMLHttpRequest/onreadystatechange +browser-compat: api.XMLHttpRequest.onreadystatechange +--- +{{APIRef}} + +[イベントハンドラー](/ja/docs/Web/Events/Event_handlers) で、 `readyState` 属性が変化するたびに呼び出されます。コールバックはユーザーインターフェイスのスレッドから呼び出されます。 **`XMLHttpRequest.onreadystatechange`** プロパティは、 {{domxref("XMLHttpRequest/readystatechange_event", "readystatechange")}} イベントが発行されるたびに、つまり {{domxref("XMLHttpRequest")}} の {{domxref("XMLHttpRequest.readyState", "readyState")}} が変化するたびに呼び出されるイベントハンドラーを保持します。 + +> **Warning:** これは同期リクエストで使用してはいけません。また、ネイティブコードから使用してはいけません。 + +## 構文 + +```js +XMLHttpRequest.onreadystatechange = callback; +``` + +### 値 + +- `callback` は `readyState` が変化したときに実行される関数です。 + +## 例 + +```js +const xhr = new XMLHttpRequest(), + method = "GET", + url = "https://developer.mozilla.org/"; + +xhr.open(method, url, true); +xhr.onreadystatechange = function () { +  // ローカルファイルでは、 Mozilla Firefox で成功するとステータスは0になります + if(xhr.readyState === XMLHttpRequest.DONE) { +  var status = xhr.status; + if (status === 0 || (status >= 200 && status < 400)) { +  // リクエストが正常に終了した +  console.log(xhr.responseText); +  } else { + // あらら! リクエストでエラーが発生しました! +  } +  } +}; +xhr.send(); +``` + +## 仕様書 + +{{Specifications}} + +## ブラウザーの互換性 + +{{Compat}} diff --git a/files/ja/web/api/xmlhttprequesteventtarget/onabort/index.html b/files/ja/web/api/xmlhttprequesteventtarget/onabort/index.html deleted file mode 100644 index c6a48aa880..0000000000 --- a/files/ja/web/api/xmlhttprequesteventtarget/onabort/index.html +++ /dev/null @@ -1,63 +0,0 @@ ---- -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 deleted file mode 100644 index 0735301636..0000000000 --- a/files/ja/web/api/xmlhttprequesteventtarget/onerror/index.html +++ /dev/null @@ -1,61 +0,0 @@ ---- -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 deleted file mode 100644 index f208d27499..0000000000 --- a/files/ja/web/api/xmlhttprequesteventtarget/onload/index.html +++ /dev/null @@ -1,61 +0,0 @@ ---- -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 deleted file mode 100644 index 606959a180..0000000000 --- a/files/ja/web/api/xmlhttprequesteventtarget/onloadstart/index.html +++ /dev/null @@ -1,61 +0,0 @@ ---- -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 deleted file mode 100644 index 7973898e1f..0000000000 --- a/files/ja/web/api/xmlhttprequesteventtarget/onprogress/index.html +++ /dev/null @@ -1,73 +0,0 @@ ---- -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