From 4f4d511f3a78d7e3dc357e44481cf0a7eba99b9f Mon Sep 17 00:00:00 2001 From: MDN Date: Thu, 17 Mar 2022 00:12:44 +0000 Subject: [CRON] sync translated content --- .../api/networkinformation/change_event/index.html | 59 ++++++++++++++++++++++ .../web/api/networkinformation/onchange/index.html | 58 --------------------- 2 files changed, 59 insertions(+), 58 deletions(-) create mode 100644 files/ja/web/api/networkinformation/change_event/index.html delete mode 100644 files/ja/web/api/networkinformation/onchange/index.html (limited to 'files/ja/web/api/networkinformation') diff --git a/files/ja/web/api/networkinformation/change_event/index.html b/files/ja/web/api/networkinformation/change_event/index.html new file mode 100644 index 0000000000..926f813316 --- /dev/null +++ b/files/ja/web/api/networkinformation/change_event/index.html @@ -0,0 +1,59 @@ +--- +title: NetworkInformation.onchange +slug: Web/API/NetworkInformation/change_event +tags: + - API + - Event Handler + - Experimental + - Network Information API + - NetworkInformation + - Property + - Reference +translation_of: Web/API/NetworkInformation/onchange +original_slug: Web/API/NetworkInformation/onchange +--- +

{{apiref("Network Information API")}}{{SeeCompatTable}}

+ +

NetworkInformation.onchange イベントハンドラは、接続情報が変化したときに発火し、{{domxref("NetworkInformation")}} オブジェクトが {{event("change")}} を受け取るコードを含みます。

+ +

構文

+ +
netInfo.onchange = function() { ... }
+
+ +

+ +
// 接続型の取得
+var type = navigator.connection.type;
+
+function changeHandler(e) {
+   // ここで接続型の変更を操作する
+}
+
+// change イベントの登録:
+navigator.connection.onchange = changeHandler;
+
+// Another way: navigator.connection.addEventListener('change', changeHandler);
+ +

仕様

+ + + + + + + + + + + + + + + + +
仕様ステータスコメント
{{SpecName('Network Information')}}{{Spec2('Network Information')}}最初の定義
+ +

ブラウザ実装状況

+ +

{{Compat("api.NetworkInformation.onchange")}}

diff --git a/files/ja/web/api/networkinformation/onchange/index.html b/files/ja/web/api/networkinformation/onchange/index.html deleted file mode 100644 index f6c540bebe..0000000000 --- a/files/ja/web/api/networkinformation/onchange/index.html +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: NetworkInformation.onchange -slug: Web/API/NetworkInformation/onchange -tags: - - API - - Event Handler - - Experimental - - Network Information API - - NetworkInformation - - Property - - Reference -translation_of: Web/API/NetworkInformation/onchange ---- -

{{apiref("Network Information API")}}{{SeeCompatTable}}

- -

NetworkInformation.onchange イベントハンドラは、接続情報が変化したときに発火し、{{domxref("NetworkInformation")}} オブジェクトが {{event("change")}} を受け取るコードを含みます。

- -

構文

- -
netInfo.onchange = function() { ... }
-
- -

- -
// 接続型の取得
-var type = navigator.connection.type;
-
-function changeHandler(e) {
-   // ここで接続型の変更を操作する
-}
-
-// change イベントの登録:
-navigator.connection.onchange = changeHandler;
-
-// Another way: navigator.connection.addEventListener('change', changeHandler);
- -

仕様

- - - - - - - - - - - - - - - - -
仕様ステータスコメント
{{SpecName('Network Information')}}{{Spec2('Network Information')}}最初の定義
- -

ブラウザ実装状況

- -

{{Compat("api.NetworkInformation.onchange")}}

-- cgit v1.2.3-54-g00ecf