aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/xmlhttprequest/onreadystatechange
diff options
context:
space:
mode:
authorMDN <actions@users.noreply.github.com>2022-02-11 00:58:37 +0000
committerMDN <actions@users.noreply.github.com>2022-02-11 00:58:37 +0000
commit4873c5f1122ac800cf3c916a52df07e05ddc9dcf (patch)
tree0b63e7a2179d77b0b20eac780dba8d8cb35355f4 /files/ja/web/api/xmlhttprequest/onreadystatechange
parent633d212cfb9c7a5838f350ff88264e460ef0398e (diff)
downloadtranslated-content-4873c5f1122ac800cf3c916a52df07e05ddc9dcf.tar.gz
translated-content-4873c5f1122ac800cf3c916a52df07e05ddc9dcf.tar.bz2
translated-content-4873c5f1122ac800cf3c916a52df07e05ddc9dcf.zip
[CRON] sync translated content
Diffstat (limited to 'files/ja/web/api/xmlhttprequest/onreadystatechange')
-rw-r--r--files/ja/web/api/xmlhttprequest/onreadystatechange/index.md60
1 files changed, 0 insertions, 60 deletions
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 &gt;= 200 &amp;&amp; status &lt; 400)) {
-  // リクエストが正常に終了した
-  console.log(xhr.responseText);
-  } else {
- // あらら! リクエストでエラーが発生しました!
-  }
-  }
-};
-xhr.send();
-```
-
-## 仕様書
-
-{{Specifications}}
-
-## ブラウザーの互換性
-
-{{Compat}}