From 4307c2c244d8104a663258a54cc5fc8a1e50a3c7 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Fri, 30 Jul 2021 12:52:49 +0900 Subject: devicelight イベント関連の文書を削除 (#1585) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit orphaned/Web/API/DeviceLightEvent は廃止されたインターフェイスなので削除 devicelight イベント関連の文書を削除 --- .../web/api/ambient_light_events/index.html | 67 ---------------------- .../orphaned/web/api/devicelightevent/index.html | 57 ------------------ .../web/api/devicelightevent/value/index.html | 58 ------------------- .../web/api/window/ondevicelight/index.html | 58 ------------------- 4 files changed, 240 deletions(-) delete mode 100644 files/ja/orphaned/web/api/ambient_light_events/index.html delete mode 100644 files/ja/orphaned/web/api/devicelightevent/index.html delete mode 100644 files/ja/orphaned/web/api/devicelightevent/value/index.html delete mode 100644 files/ja/orphaned/web/api/window/ondevicelight/index.html (limited to 'files/ja/orphaned') diff --git a/files/ja/orphaned/web/api/ambient_light_events/index.html b/files/ja/orphaned/web/api/ambient_light_events/index.html deleted file mode 100644 index 3dfcee50da..0000000000 --- a/files/ja/orphaned/web/api/ambient_light_events/index.html +++ /dev/null @@ -1,67 +0,0 @@ ---- -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 deleted file mode 100644 index b8cf0558dd..0000000000 --- a/files/ja/orphaned/web/api/devicelightevent/index.html +++ /dev/null @@ -1,57 +0,0 @@ ---- -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/orphaned/web/api/devicelightevent/value/index.html b/files/ja/orphaned/web/api/devicelightevent/value/index.html deleted file mode 100644 index 558268c276..0000000000 --- a/files/ja/orphaned/web/api/devicelightevent/value/index.html +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: DeviceLightEvent.value -slug: orphaned/Web/API/DeviceLightEvent/value -tags: - - Ambient Light - - B2G - - DOM - - Firefox OS - - WebAPI - - events -translation_of: Web/API/DeviceLightEvent/value -original_slug: Web/API/DeviceLightEvent/value ---- -

{{APIRef("Ambient Light Events")}}

- -

DeviceLightEventvalue プロパティは、現在の環境光レベルを提供します。

- -

構文

- -
var light = instanceOfDeviceLightEvent.value;
- -

- -

光強度を表す正数のルクス

- -

仕様

- - - - - - - - - - - - - - - - -
仕様書策定状況コメント
{{SpecName('AmbientLight', '', 'Ambient Light Events')}}{{Spec2('AmbientLight')}}最初期の定義
- -

ブラウザ実装状況

- -
- - -

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

-
- -

関連情報

- - diff --git a/files/ja/orphaned/web/api/window/ondevicelight/index.html b/files/ja/orphaned/web/api/window/ondevicelight/index.html deleted file mode 100644 index 35faf1c93e..0000000000 --- a/files/ja/orphaned/web/api/window/ondevicelight/index.html +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: window.ondevicelight -slug: orphaned/Web/API/Window/ondevicelight -tags: - - Ambient Light - - B2G - - Firefox OS - - WebAPI - - Window -translation_of: Web/API/Window/ondevicelight -original_slug: Web/API/Window/ondevicelight ---- -

{{ApiRef}} {{obsolete_header}} 

- -

デバイスの環境光センサが光の強度の変化を検出した際に発生する {{event("devicelight")}} イベントを受け取るイベントリスナーを指定します。

- -

構文

- -
window.ondevicelight = funcRef
- - - -

仕様

- - - - - - - - - - - - - - - - -
仕様書策定状況コメント
{{SpecName('AmbientLight', '#event-handlers', 'Ambient Light Events')}}{{Spec2('AmbientLight')}}最初期の定義
- -

ブラウザ実装状況

- -
- - -

{{Compat("api.Window.ondevicelight")}}

-
- -

関連情報

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