From 0d495ad297d9e90ab35f54a822cd5e4e6a670713 Mon Sep 17 00:00:00 2001 From: MDN Date: Sun, 20 Jun 2021 00:37:04 +0000 Subject: [CRON] sync translated content --- files/ja/_redirects.txt | 4 +- files/ja/_wikihistory.json | 34 +++++------ .../web/api/ambient_light_events/index.html | 69 ++++++++++++++++++++++ .../orphaned/web/api/devicelightevent/index.html | 59 ++++++++++++++++++ files/ja/web/api/ambient_light_events/index.html | 69 ---------------------- files/ja/web/api/devicelightevent/index.html | 58 ------------------ 6 files changed, 148 insertions(+), 145 deletions(-) create mode 100644 files/ja/orphaned/web/api/ambient_light_events/index.html create mode 100644 files/ja/orphaned/web/api/devicelightevent/index.html delete mode 100644 files/ja/web/api/ambient_light_events/index.html delete mode 100644 files/ja/web/api/devicelightevent/index.html (limited to 'files/ja') diff --git a/files/ja/_redirects.txt b/files/ja/_redirects.txt index a2be2575d4..a8e0285946 100644 --- a/files/ja/_redirects.txt +++ b/files/ja/_redirects.txt @@ -3680,6 +3680,7 @@ /ja/docs/Web-e/Guide/CSS/Understanding_z_index/The_stacking_context /ja/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context /ja/docs/Web/API/AbstractWorker /ja/docs/orphaned/Web/API/AbstractWorker /ja/docs/Web/API/AbstractWorker/onerror /ja/docs/orphaned/Web/API/AbstractWorker/onerror +/ja/docs/Web/API/Ambient_Light_Events /ja/docs/orphaned/Web/API/Ambient_Light_Events /ja/docs/Web/API/Apps /ja/docs/Web/API/DOMApplicationsRegistry /ja/docs/Web/API/Apps.checkInstalled /ja/docs/Web/API/DOMApplicationsRegistry/checkInstalled /ja/docs/Web/API/Apps.getInstalled /ja/docs/Web/API/DOMApplicationsRegistry/getInstalled @@ -3732,6 +3733,7 @@ /ja/docs/Web/API/DOMCursor.done /ja/docs/Web/API/DOMCursor/done /ja/docs/Web/API/DOMRequest.error /ja/docs/Web/API/DOMRequest/error /ja/docs/Web/API/DeviceAcceleration /ja/docs/Web/API/DeviceMotionEventAcceleration +/ja/docs/Web/API/DeviceLightEvent /ja/docs/orphaned/Web/API/DeviceLightEvent /ja/docs/Web/API/DeviceLightEvent.value /ja/docs/orphaned/Web/API/DeviceLightEvent/value /ja/docs/Web/API/DeviceLightEvent/value /ja/docs/orphaned/Web/API/DeviceLightEvent/value /ja/docs/Web/API/DeviceProximityEvent/max /ja/docs/orphaned/Web/API/DeviceProximityEvent/max @@ -5158,7 +5160,7 @@ /ja/docs/WebAPI/Managing_screen_orientation /ja/docs/Web/API/CSS_Object_Model/Managing_screen_orientation /ja/docs/WebAPI/Network_Information /ja/docs/Web/API/Network_Information_API /ja/docs/WebAPI/Proximity /ja/docs/Web/API/Proximity_Events -/ja/docs/WebAPI/Using_Light_Events /ja/docs/Web/API/Ambient_Light_Events +/ja/docs/WebAPI/Using_Light_Events /ja/docs/orphaned/Web/API/Ambient_Light_Events /ja/docs/WebAPI/Using_Web_Notifications /ja/docs/Web/API/Notifications_API/Using_the_Notifications_API /ja/docs/WebAPI/Using_geolocation /ja/docs/Web/API/Geolocation_API /ja/docs/WebGL /ja/docs/Web/API/WebGL_API diff --git a/files/ja/_wikihistory.json b/files/ja/_wikihistory.json index ef8f86f43b..7524a08d19 100644 --- a/files/ja/_wikihistory.json +++ b/files/ja/_wikihistory.json @@ -9990,13 +9990,6 @@ "silverskyvicto" ] }, - "Web/API/Ambient_Light_Events": { - "modified": "2020-10-15T21:25:12.532Z", - "contributors": [ - "mfuji09", - "yyss" - ] - }, "Web/API/AnalyserNode": { "modified": "2019-03-23T22:40:29.945Z", "contributors": [ @@ -12194,16 +12187,6 @@ "chikoski" ] }, - "Web/API/DeviceLightEvent": { - "modified": "2020-10-15T21:33:03.860Z", - "contributors": [ - "mfuji09", - "yyss", - "dskmori", - "YuichiNukiyama", - "fscholz" - ] - }, "Web/API/DeviceMotionEvent": { "modified": "2020-10-15T22:05:46.432Z", "contributors": [ @@ -52058,6 +52041,13 @@ "chikoski" ] }, + "orphaned/Web/API/Ambient_Light_Events": { + "modified": "2020-10-15T21:25:12.532Z", + "contributors": [ + "mfuji09", + "yyss" + ] + }, "orphaned/Web/API/AudioContext/mozAudioChannelType": { "modified": "2019-03-23T22:51:59.818Z", "contributors": [ @@ -52090,6 +52080,16 @@ "Fajrovulpo" ] }, + "orphaned/Web/API/DeviceLightEvent": { + "modified": "2020-10-15T21:33:03.860Z", + "contributors": [ + "mfuji09", + "yyss", + "dskmori", + "YuichiNukiyama", + "fscholz" + ] + }, "orphaned/Web/API/DeviceLightEvent/value": { "modified": "2020-10-15T21:22:48.751Z", "contributors": [ diff --git a/files/ja/orphaned/web/api/ambient_light_events/index.html b/files/ja/orphaned/web/api/ambient_light_events/index.html new file mode 100644 index 0000000000..01514d7e76 --- /dev/null +++ b/files/ja/orphaned/web/api/ambient_light_events/index.html @@ -0,0 +1,69 @@ +--- +title: Ambient Light Events +slug: orphaned/Web/API/Ambient_Light_Events +tags: + - Ambient Light +translation_of: Web/API/Ambient_Light_Events +original_slug: Web/API/Ambient_Light_Events +--- +
{{DefaultAPISidebar("Ambient Light Events")}}{{SeeCompatTable}}
+ +

ambient light event は、光の強さの変化をウェブページやアプリケーションに気づかせるのに便利な手段です。これによりユーザーインターフェイスのコントラストを変えたり写真を撮るために必要な露出時間を変えたりするなど、ウェブページやアプリケーションが光量の変化に対応できるようになります。

+ +

Light Event

+ +

端末の光センサーが光量の変化を検出すると、それをブラウザーに通知します。ブラウザーがその通知を受け取ると、正確な光の強度に関する情報を提供する {{domxref("DeviceLightEvent")}} イベントを発生させます。

+ +

このイベントは {{domxref("EventTarget.addEventListener","addEventListener")}} メソッド (イベント名 {{event("devicelight")}} を使用) を使用するか、イベントハンドラーを {{domxref("window.ondevicelight")}} プロパティに接続することにより、 window オブジェクトレベルで取得できます。

+ +

イベントを取得するとイベントオブジェクトの {{domxref("DeviceLightEvent.value")}} プロパティを通して、{{interwiki("wikipedia", "ルクス")}}で表した照度にアクセスできます。

+ +

+ +
if ('ondevicelight' in window) {
+  window.addEventListener('devicelight', function(event) {
+    var body = document.querySelector('body');
+    if (event.value < 50) {
+      body.classList.add('darklight');
+      body.classList.remove('brightlight');
+    } else {
+      body.classList.add('brightlight');
+      body.classList.remove('darklight');
+    }
+  });
+} else {
+  console.log('devicelight event not supported');
+}
+
+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("AmbientLight", "", "Ambient Light Events")}}{{Spec2("AmbientLight")}}初回定義
+ +

ブラウザーの対応

+ + + +

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

+ +

関連情報

+ + diff --git a/files/ja/orphaned/web/api/devicelightevent/index.html b/files/ja/orphaned/web/api/devicelightevent/index.html new file mode 100644 index 0000000000..c77dc67882 --- /dev/null +++ b/files/ja/orphaned/web/api/devicelightevent/index.html @@ -0,0 +1,59 @@ +--- +title: DeviceLightEvent +slug: orphaned/Web/API/DeviceLightEvent +tags: + - API + - Ambient Light Events + - Experimental + - Interface +translation_of: Web/API/DeviceLightEvent +original_slug: Web/API/DeviceLightEvent +--- +
{{apiref("Ambient Light Events")}}{{SeeCompatTable}}
+ +

DeviceLightEvent は、端末付近の環境光のレベルについての情報を、写真センサーやそれと類似した検知機を通してウェブ開発者に提供します。たとえば、このイベントは、エネルギーを節約したり、より良い視認性を提供したりするために、現在の環境光のレベルに応じて画面の明るさを調節するのに役立ちます。

+ +

プロパティ

+ +
+
{{domxref("DeviceLightEvent.value")}}
+
{{interwiki("wikipedia", "ルクス")}}で表した環境光のレベル
+
+ +

+ +
window.addEventListener('devicelight', function(event) {
+  console.log(event.value);
+});
+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('AmbientLight', '', 'Ambient Light Events')}}{{Spec2('AmbientLight')}}初回定義
+ +

ブラウザーの対応

+ + + +

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

+ +

関連情報

+ + diff --git a/files/ja/web/api/ambient_light_events/index.html b/files/ja/web/api/ambient_light_events/index.html deleted file mode 100644 index c39d45a614..0000000000 --- a/files/ja/web/api/ambient_light_events/index.html +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: Ambient Light Events -slug: Web/API/Ambient_Light_Events -tags: - - Ambient Light -translation_of: Web/API/Ambient_Light_Events -original_slug: WebAPI/Using_Light_Events ---- -
{{DefaultAPISidebar("Ambient Light Events")}}{{SeeCompatTable}}
- -

ambient light event は、光の強さの変化をウェブページやアプリケーションに気づかせるのに便利な手段です。これによりユーザーインターフェイスのコントラストを変えたり写真を撮るために必要な露出時間を変えたりするなど、ウェブページやアプリケーションが光量の変化に対応できるようになります。

- -

Light Event

- -

端末の光センサーが光量の変化を検出すると、それをブラウザーに通知します。ブラウザーがその通知を受け取ると、正確な光の強度に関する情報を提供する {{domxref("DeviceLightEvent")}} イベントを発生させます。

- -

このイベントは {{domxref("EventTarget.addEventListener","addEventListener")}} メソッド (イベント名 {{event("devicelight")}} を使用) を使用するか、イベントハンドラーを {{domxref("window.ondevicelight")}} プロパティに接続することにより、 window オブジェクトレベルで取得できます。

- -

イベントを取得するとイベントオブジェクトの {{domxref("DeviceLightEvent.value")}} プロパティを通して、{{interwiki("wikipedia", "ルクス")}}で表した照度にアクセスできます。

- -

- -
if ('ondevicelight' in window) {
-  window.addEventListener('devicelight', function(event) {
-    var body = document.querySelector('body');
-    if (event.value < 50) {
-      body.classList.add('darklight');
-      body.classList.remove('brightlight');
-    } else {
-      body.classList.add('brightlight');
-      body.classList.remove('darklight');
-    }
-  });
-} else {
-  console.log('devicelight event not supported');
-}
-
- -

仕様書

- - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName("AmbientLight", "", "Ambient Light Events")}}{{Spec2("AmbientLight")}}初回定義
- -

ブラウザーの対応

- - - -

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

- -

関連情報

- - diff --git a/files/ja/web/api/devicelightevent/index.html b/files/ja/web/api/devicelightevent/index.html deleted file mode 100644 index 58829fc7c3..0000000000 --- a/files/ja/web/api/devicelightevent/index.html +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: DeviceLightEvent -slug: Web/API/DeviceLightEvent -tags: - - API - - Ambient Light Events - - Experimental - - Interface -translation_of: Web/API/DeviceLightEvent ---- -
{{apiref("Ambient Light Events")}}{{SeeCompatTable}}
- -

DeviceLightEvent は、端末付近の環境光のレベルについての情報を、写真センサーやそれと類似した検知機を通してウェブ開発者に提供します。たとえば、このイベントは、エネルギーを節約したり、より良い視認性を提供したりするために、現在の環境光のレベルに応じて画面の明るさを調節するのに役立ちます。

- -

プロパティ

- -
-
{{domxref("DeviceLightEvent.value")}}
-
{{interwiki("wikipedia", "ルクス")}}で表した環境光のレベル
-
- -

- -
window.addEventListener('devicelight', function(event) {
-  console.log(event.value);
-});
- -

仕様書

- - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName('AmbientLight', '', 'Ambient Light Events')}}{{Spec2('AmbientLight')}}初回定義
- -

ブラウザーの対応

- - - -

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

- -

関連情報

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