Skip to content

Commit

Permalink
FF89: Removal of events docs for DeviceLightEvent, DeviceProximityEve…
Browse files Browse the repository at this point in the history
…nt, UserProximityEvent (#4515)

* DeviceLightEvent, UserProximityEvent, DeviceProximityEvent no longer supported

* Mark APIs as deprecated

* Tag interfaces as deprecated
  • Loading branch information
hamishwillee committed Apr 27, 2021
1 parent f2a9cd2 commit 9586311
Show file tree
Hide file tree
Showing 13 changed files with 80 additions and 336 deletions.
15 changes: 5 additions & 10 deletions files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,6 @@
/en-US/docs/DOM/DeviceAcceleration.y /en-US/docs/Web/API/DeviceMotionEventAcceleration/y
/en-US/docs/DOM/DeviceAcceleration.z /en-US/docs/Web/API/DeviceMotionEventAcceleration/z
/en-US/docs/DOM/DeviceLightEvent /en-US/docs/Web/API/DeviceLightEvent
/en-US/docs/DOM/DeviceLightEvent.value /en-US/docs/Web/API/DeviceLightEvent/value
/en-US/docs/DOM/DeviceMotionEvent /en-US/docs/Web/API/Window/devicemotion_event
/en-US/docs/DOM/DeviceMotionEvent.acceleration /en-US/docs/Web/API/DeviceMotionEvent/acceleration
/en-US/docs/DOM/DeviceMotionEvent.accelerationIncludingGravity /en-US/docs/Web/API/DeviceMotionEvent/accelerationIncludingGravity
Expand Down Expand Up @@ -1830,7 +1829,6 @@
/en-US/docs/DOM/UIEvent /en-US/docs/Web/API/UIEvent
/en-US/docs/DOM/UserDataHandler /en-US/docs/Web/API/UserDataHandler
/en-US/docs/DOM/UserProximityEvent /en-US/docs/Web/API/UserProximityEvent
/en-US/docs/DOM/UserProximityEvent.near /en-US/docs/Web/API/UserProximityEvent/near
/en-US/docs/DOM/Using_device_orientation_with_3D_transforms /en-US/docs/Web/Events/Using_device_orientation_with_3D_transforms
/en-US/docs/DOM/Using_dynamic_styling_information /en-US/docs/Web/API/CSS_Object_Model/Using_dynamic_styling_information
/en-US/docs/DOM/Using_full-screen_mode /en-US/docs/Web/API/Fullscreen_API
Expand Down Expand Up @@ -2295,10 +2293,8 @@
/en-US/docs/DOM/window.onclick /en-US/docs/Web/API/GlobalEventHandlers/onclick
/en-US/docs/DOM/window.onclose /en-US/docs/Web/API/GlobalEventHandlers/onclose
/en-US/docs/DOM/window.oncontextmenu /en-US/docs/Web/API/GlobalEventHandlers/oncontextmenu
/en-US/docs/DOM/window.ondevicelight /en-US/docs/Web/API/Window/ondevicelight
/en-US/docs/DOM/window.ondevicemotion /en-US/docs/Web/API/Window/ondevicemotion
/en-US/docs/DOM/window.ondeviceorientation /en-US/docs/Web/API/Window/ondeviceorientation
/en-US/docs/DOM/window.ondeviceproximity /en-US/docs/Web/API/Window/ondeviceproximity
/en-US/docs/DOM/window.ondragdrop /en-US/docs/Web/API/Window/ondragdrop
/en-US/docs/DOM/window.onerror /en-US/docs/Web/API/GlobalEventHandlers/onerror
/en-US/docs/DOM/window.onfocus /en-US/docs/Web/API/GlobalEventHandlers/onfocus
Expand All @@ -2322,7 +2318,6 @@
/en-US/docs/DOM/window.onselect /en-US/docs/Web/API/GlobalEventHandlers/onselect
/en-US/docs/DOM/window.onsubmit /en-US/docs/Web/API/GlobalEventHandlers/onsubmit
/en-US/docs/DOM/window.onunload /en-US/docs/Web/API/WindowEventHandlers/onunload
/en-US/docs/DOM/window.onuserproximity /en-US/docs/Web/API/Window/onuserproximity
/en-US/docs/DOM/window.open /en-US/docs/Web/API/Window/open
/en-US/docs/DOM/window.openDialog /en-US/docs/Web/API/Window/openDialog
/en-US/docs/DOM/window.opener /en-US/docs/Web/API/Window/opener
Expand Down Expand Up @@ -7461,8 +7456,8 @@
/en-US/docs/Web/API/DeviceAcceleration/x /en-US/docs/Web/API/DeviceMotionEventAcceleration/x
/en-US/docs/Web/API/DeviceAcceleration/y /en-US/docs/Web/API/DeviceMotionEventAcceleration/y
/en-US/docs/Web/API/DeviceAcceleration/z /en-US/docs/Web/API/DeviceMotionEventAcceleration/z
/en-US/docs/Web/API/DeviceLightEvent.value /en-US/docs/Web/API/DeviceLightEvent/value
/en-US/docs/Web/API/DeviceLightEvent/Using_light_events /en-US/docs/Web/API/Ambient_Light_Events
/en-US/docs/Web/API/DeviceLightEvent/value /en-US/docs/Web/API/DeviceLightEvent
/en-US/docs/Web/API/DeviceMotionEvent.acceleration /en-US/docs/Web/API/DeviceMotionEvent/acceleration
/en-US/docs/Web/API/DeviceMotionEvent.accelerationIncludingGravity /en-US/docs/Web/API/DeviceMotionEvent/accelerationIncludingGravity
/en-US/docs/Web/API/DeviceMotionEvent.interval /en-US/docs/Web/API/DeviceMotionEvent/interval
Expand Down Expand Up @@ -8906,7 +8901,7 @@
/en-US/docs/Web/API/Uint32Array /en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array
/en-US/docs/Web/API/Uint8Array /en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array
/en-US/docs/Web/API/Uint8ClampedArray /en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray
/en-US/docs/Web/API/UserProximityEvent.near /en-US/docs/Web/API/UserProximityEvent/near
/en-US/docs/Web/API/UserProximityEvent/near /en-US/docs/Web/API/UserProximityEvent
/en-US/docs/Web/API/VRDevice /en-US/docs/Web/API/VRDisplay
/en-US/docs/Web/API/VRDevice/deviceId /en-US/docs/Web/API/VRDisplay/displayId
/en-US/docs/Web/API/VRDevice/deviceName /en-US/docs/Web/API/VRDisplay/displayName
Expand Down Expand Up @@ -9099,6 +9094,8 @@
/en-US/docs/Web/API/Window/onclick /en-US/docs/Web/API/GlobalEventHandlers/onclick
/en-US/docs/Web/API/Window/oncontextmenu /en-US/docs/Web/API/GlobalEventHandlers/oncontextmenu
/en-US/docs/Web/API/Window/ondblclick /en-US/docs/Web/API/GlobalEventHandlers/ondblclick
/en-US/docs/Web/API/Window/ondevicelight /en-US/docs/Web/API/DeviceLightEvent
/en-US/docs/Web/API/Window/ondeviceproximity /en-US/docs/Web/API/DeviceProximityEvent
/en-US/docs/Web/API/Window/onfocus /en-US/docs/Web/API/GlobalEventHandlers/onfocus
/en-US/docs/Web/API/Window/onhashchange /en-US/docs/Web/API/WindowEventHandlers/onhashchange
/en-US/docs/Web/API/Window/oninput /en-US/docs/Web/API/GlobalEventHandlers/onkeydown
Expand All @@ -9122,6 +9119,7 @@
/en-US/docs/Web/API/Window/onsubmit /en-US/docs/Web/API/GlobalEventHandlers/onsubmit
/en-US/docs/Web/API/Window/onunhandledrejection /en-US/docs/Web/API/WindowEventHandlers/onunhandledrejection
/en-US/docs/Web/API/Window/onunload /en-US/docs/Web/API/WindowEventHandlers/onunload
/en-US/docs/Web/API/Window/onuserproximity /en-US/docs/Web/API/UserProximityEvent
/en-US/docs/Web/API/Window/onvrdisplayconnected /en-US/docs/Web/API/Window/onvrdisplayconnect
/en-US/docs/Web/API/Window/onvrdisplaydisconnected /en-US/docs/Web/API/Window/onvrdisplaydisconnect
/en-US/docs/Web/API/Window/removeEventListener /en-US/docs/Web/API/EventTarget/removeEventListener
Expand Down Expand Up @@ -9681,10 +9679,8 @@
/en-US/docs/Web/API/window.onclick /en-US/docs/Web/API/GlobalEventHandlers/onclick
/en-US/docs/Web/API/window.onclose /en-US/docs/Web/API/GlobalEventHandlers/onclose
/en-US/docs/Web/API/window.oncontextmenu /en-US/docs/Web/API/GlobalEventHandlers/oncontextmenu
/en-US/docs/Web/API/window.ondevicelight /en-US/docs/Web/API/Window/ondevicelight
/en-US/docs/Web/API/window.ondevicemotion /en-US/docs/Web/API/Window/ondevicemotion
/en-US/docs/Web/API/window.ondeviceorientation /en-US/docs/Web/API/Window/ondeviceorientation
/en-US/docs/Web/API/window.ondeviceproximity /en-US/docs/Web/API/Window/ondeviceproximity
/en-US/docs/Web/API/window.ondragdrop /en-US/docs/Web/API/Window/ondragdrop
/en-US/docs/Web/API/window.onerror /en-US/docs/Web/API/GlobalEventHandlers/onerror
/en-US/docs/Web/API/window.onfocus /en-US/docs/Web/API/GlobalEventHandlers/onfocus
Expand All @@ -9708,7 +9704,6 @@
/en-US/docs/Web/API/window.onselect /en-US/docs/Web/API/GlobalEventHandlers/onselect
/en-US/docs/Web/API/window.onsubmit /en-US/docs/Web/API/GlobalEventHandlers/onsubmit
/en-US/docs/Web/API/window.onunload /en-US/docs/Web/API/WindowEventHandlers/onunload
/en-US/docs/Web/API/window.onuserproximity /en-US/docs/Web/API/Window/onuserproximity
/en-US/docs/Web/API/window.open /en-US/docs/Web/API/Window/open
/en-US/docs/Web/API/window.openDialog /en-US/docs/Web/API/Window/openDialog
/en-US/docs/Web/API/window.opener /en-US/docs/Web/API/Window/opener
Expand Down
79 changes: 1 addition & 78 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -40575,23 +40575,6 @@
"scaledrop"
]
},
"Web/API/DeviceLightEvent/value": {
"modified": "2020-10-15T21:22:48.698Z",
"contributors": [
"connorshea",
"jpmedley",
"erikadoyle",
"Sebastianz",
"fscholz",
"teoli",
"KuroTora",
"sobering",
"kscarfone",
"tregagnon",
"Sheppy",
"Jeremie"
]
},
"Web/API/DeviceMotionEvent": {
"modified": "2020-10-15T21:23:45.988Z",
"contributors": [
Expand Down Expand Up @@ -88220,21 +88203,6 @@
"jswisher"
]
},
"Web/API/UserProximityEvent/near": {
"modified": "2020-10-15T21:22:26.696Z",
"contributors": [
"sideshowbarker",
"ExE-Boss",
"fscholz",
"MHasan",
"Jungle_",
"teoli",
"kscarfone",
"Reachmeatshivam",
"Sheppy",
"Jeremie"
]
},
"Web/API/User_Timing_API": {
"modified": "2020-10-09T08:34:10.885Z",
"contributors": [
Expand Down Expand Up @@ -95143,22 +95111,6 @@
"teoli"
]
},
"Web/API/Window/ondevicelight": {
"modified": "2020-10-15T21:22:48.581Z",
"contributors": [
"sideshowbarker",
"wbamberg",
"jpmedley",
"erikadoyle",
"Sebastianz",
"fscholz",
"teoli",
"chrisdavidmills",
"libreGeekingKid",
"Sheppy",
"Jeremie"
]
},
"Web/API/Window/ondevicemotion": {
"modified": "2020-10-15T21:10:42.063Z",
"contributors": [
Expand Down Expand Up @@ -95197,21 +95149,6 @@
"jpmedley"
]
},
"Web/API/Window/ondeviceproximity": {
"modified": "2020-10-15T21:22:28.058Z",
"contributors": [
"sideshowbarker",
"mfluehr",
"wbamberg",
"fscholz",
"teoli",
"cpigat",
"MHasan",
"kscarfone",
"Sheppy",
"Jeremie"
]
},
"Web/API/Window/ondragdrop": {
"modified": "2020-10-19T07:54:26.789Z",
"contributors": [
Expand Down Expand Up @@ -95287,20 +95224,6 @@
"alecananian"
]
},
"Web/API/Window/onuserproximity": {
"modified": "2020-10-15T21:22:28.239Z",
"contributors": [
"sideshowbarker",
"mfluehr",
"wbamberg",
"fscholz",
"MHasan",
"teoli",
"kscarfone",
"Sheppy",
"Jeremie"
]
},
"Web/API/Window/onvrdisplayactivate": {
"modified": "2020-10-15T21:54:14.394Z",
"contributors": [
Expand Down Expand Up @@ -165556,4 +165479,4 @@
"jswisher"
]
}
}
}
15 changes: 10 additions & 5 deletions files/en-us/web/api/ambient_light_events/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,28 @@
slug: Web/API/Ambient_Light_Events
tags:
- Ambient Light
- Deprecated
---
<div>{{DefaultAPISidebar("Ambient Light Events")}}{{SeeCompatTable}}</div>
<div>{{DefaultAPISidebar("Ambient Light Events")}}{{Deprecated_Header}}</div>
<div class="notecard warning">
<h4>Warning</h4>
<p>Ambient Light Events not supported by any current major browser, and should not be used.</p>
</div>

<p>The ambient light events are a handy way to make a web page or an application aware of any change in the light intensity. It allows them to react to such a change, for example by changing the color contrast of the User Interface (UI) or by changing the exposure necessary to take a picture.</p>

<div class="notecard note">
<p><strong>Note:</strong> This API is <em>not available</em> in <a href="/en-US/docs/Web/API/Web_Workers_API">Web Workers</a> (it is not exposed in the <a href="/en-US/docs/Web/API/Web_Workers_API#worker_global_contexts_and_functions">worker global context</a>).</p>
<h4>Note</h4>
<p>This API is <em>not available</em> in <a href="/en-US/docs/Web/API/Web_Workers_API">Web Workers</a> (it is not exposed in the <a href="/en-US/docs/Web/API/Web_Workers_API#worker_global_contexts_and_functions">worker global context</a>).</p>
</div>

<h2 id="Light_Events">Light Events</h2>

<p>When the light sensor of a device detects a change in the light level, it notifies the browser of that change. When the browser gets such a notification, it fires a {{domxref("DeviceLightEvent")}} event that provides information about the exact light intensity (in lux units).</p>

<p>This event can be captured at the <code>window</code> object level by using the {{domxref("EventTarget.addEventListener","addEventListener")}} method (using the {{event("devicelight")}} event name) or by attaching an event handler to the {{domxref("window.ondevicelight")}} property.</p>
<p>This event can be captured at the <code>window</code> object level by using the {{domxref("EventTarget.addEventListener","addEventListener")}} method (using the <code>devicelight</code> event name) or by attaching an event handler to the <code>window.ondevicelight</code> property.</p>

<p>Once captured, the event object gives access to the light intensity expressed in {{interwiki("wikipedia", "lux")}} through the {{domxref("DeviceLightEvent.value")}} property.</p>
<p>Once captured, the event object gives access to the light intensity expressed in {{interwiki("wikipedia", "lux")}} through the <code>DeviceLightEvent.value</code> property.</p>

<h2 id="Example">Example</h2>

Expand Down Expand Up @@ -65,5 +71,4 @@ <h2 id="See_also">See also</h2>

<ul>
<li>{{domxref("DeviceLightEvent")}}</li>
<li>{{event("devicelight")}}</li>
</ul>
31 changes: 23 additions & 8 deletions files/en-us/web/api/devicelightevent/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@
tags:
- API
- Ambient Light Events
- Obsolete
- Interface
- NeedsBetterSpecLink
- NeedsMarkupWork
- Deprecated
---
<div>{{deprecated_header}}{{apiref("Ambient Light Events")}}{{SeeCompatTable}}</div>

<div>{{apiref("Ambient Light Events")}}{{deprecated_header}}</div>
<div class="notecard warning">
<h4>Warning</h4>
<p><code>DeviceLightEvent</code> is not supported by any current major browser, and should not be used.</p>
</div>
<p>The <code>DeviceLightEvent</code> provides web developers with information from photo sensors or similar detectors about ambient light levels near the device. For example this may be useful to adjust the screen's brightness based on the current ambient light level in order to save energy or provide better readability.</p>

<h2 id="Properties">Properties</h2>

<dl>
<dt>{{domxref("DeviceLightEvent.value")}}</dt>
<dt><code>DeviceLightEvent.value</code></dt>
<dd>The level of the ambient light in {{interwiki("wikipedia", "lux")}}.</dd>
</dl>

Expand All @@ -28,7 +29,22 @@ <h2 id="Example">Example</h2>

<h2 id="Specifications">Specifications</h2>

<p>No specification.</p>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName("AmbientLight", "", "Ambient Light Events")}}</td>
<td>{{Spec2("AmbientLight")}}</td>
<td>Initial definition</td>
</tr>
</tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

Expand All @@ -37,6 +53,5 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>
<h2 id="See_also">See also</h2>

<ul>
<li>{{event("devicelight")}}</li>
<li><a href="/en-US/docs/Web/API/Ambient_Light_Events">Using Light Events</a></li>
</ul>
54 changes: 0 additions & 54 deletions files/en-us/web/api/devicelightevent/value/index.html

This file was deleted.

1 change: 1 addition & 0 deletions files/en-us/web/api/deviceproximityevent/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Interface
- Proximity Events
- Reference
- Deprecated
---
<div>{{APIRef("Proximity Events")}}{{deprecated_header}}</div>
<div class="notecard warning">
Expand Down

0 comments on commit 9586311

Please sign in to comment.