Skip to content

Commit

Permalink
DeviceOrientationEvents | normalize See also section and fix paramete…
Browse files Browse the repository at this point in the history
…rs for `DeviceMotionEvent()` constructor (#31058)

* update parameters

* update see also section
  • Loading branch information
skyclouds2001 authored Dec 16, 2023
1 parent 7fb6ccc commit 358fa88
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 75 deletions.
10 changes: 3 additions & 7 deletions files/en-us/web/api/devicemotionevent/acceleration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ acceleration on three axis. Each axis is represented with its own property:

## See also

- {{DOMxRef("DeviceMotionEvent.accelerationIncludingGravity")}}
- {{DOMxRef("window.devicemotion_event", "devicemotion") }} event
- {{DOMxRef("window.deviceorientation_event", "deviceorientation") }} event
- {{DOMxRef("DeviceOrientationEvent")}}
- {{DOMxRef("LinearAccelerationSensor")}}
- [Detecting device orientation](/en-US/docs/Web/API/Device_orientation_events/Detecting_device_orientation)
- [Orientation and motion data explained](/en-US/docs/Web/API/Device_orientation_events/Orientation_and_motion_data_explained)
- {{domxref("Device orientation events/Detecting device orientation", "Detecting device orientation", "", "nocode")}}
- {{domxref("Device orientation events/Orientation and motion data explained", "Orientation and motion data explained", "", "nocode")}}
- {{DOMxRef("Window/devicemotion_event", "devicemotion")}} event
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ property:

## See also

- {{DOMxRef("DeviceMotionEvent.acceleration")}}
- {{DOMxRef("window.devicemotion_event", "devicemotion") }} event
- {{DOMxRef("window.deviceorientation_event", "deviceorientation") }} event
- {{DOMxRef("DeviceOrientationEvent")}}
- {{DOMxRef("Accelerometer")}}
- [Detecting device orientation](/en-US/docs/Web/API/Device_orientation_events/Detecting_device_orientation)
- [Orientation and motion data explained](/en-US/docs/Web/API/Device_orientation_events/Orientation_and_motion_data_explained)
- {{domxref("Device orientation events/Detecting device orientation", "Detecting device orientation", "", "nocode")}}
- {{domxref("Device orientation events/Orientation and motion data explained", "Orientation and motion data explained", "", "nocode")}}
- {{DOMxRef("Window/devicemotion_event", "devicemotion")}} event
15 changes: 6 additions & 9 deletions files/en-us/web/api/devicemotionevent/devicemotionevent/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,12 @@ new DeviceMotionEvent(type, options)
It is case-sensitive and browsers always set it to `devicemotion`.
- `options` {{Optional_Inline}}
- : An object that, _in addition of the properties defined in {{domxref("Event/Event", "Event()")}}_, can have the following properties:
- `acceleration`
- : A {{domxref("DeviceMotionEventAcceleration")}} object giving the acceleration of the device on the three axis X, Y and Z.
Acceleration is expressed in [m/s²](https://en.wikipedia.org/wiki/Meter_per_second_squared).
- `accelerationIncludingGravity`
- : A {{domxref("DeviceMotionEventAcceleration")}} object giving the acceleration of the device on the three axis X, Y and Z with the effect of gravity.
Acceleration is expressed in [m/s²](https://en.wikipedia.org/wiki/Meter_per_second_squared).
- `rotationRate`
- : A {{domxref("DeviceMotionEventRotationRate")}} object giving the rate of change of the device's orientation on the three orientation axis alpha, beta and gamma.
Rotation rate is express in degrees per seconds.
- `acceleration` {{Optional_Inline}}
- : A {{domxref("DeviceMotionEventAcceleration")}} object giving the acceleration of the device on the three axis X, Y and Z. Acceleration is expressed in [m/s²](https://en.wikipedia.org/wiki/Meter_per_second_squared). If not specified, every properties in the object will be `null`.
- `accelerationIncludingGravity` {{Optional_Inline}}
- : A {{domxref("DeviceMotionEventAcceleration")}} object giving the acceleration of the device on the three axis X, Y and Z with the effect of gravity. Acceleration is expressed in [m/s²](https://en.wikipedia.org/wiki/Meter_per_second_squared). If not specified, every properties in the object will be `null`.
- `rotationRate` {{Optional_Inline}}
- : A {{domxref("DeviceMotionEventRotationRate")}} object giving the rate of change of the device's orientation on the three orientation axis alpha, beta and gamma. Rotation rate is express in degrees per seconds. If not specified, every properties in the object will be `null`.
- `interval` {{Optional_Inline}}
- : A number representing the interval of time, in milliseconds, at which data is obtained from the device. It defaults to `0`.

Expand Down
9 changes: 5 additions & 4 deletions files/en-us/web/api/devicemotionevent/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ window.addEventListener("devicemotion", (event) => {

## See also

- {{domxref("Window/deviceorientation_event", "deviceorientation")}}
- {{domxref("Device orientation events/Detecting device orientation", "Detecting device orientation", "", "nocode")}}
- {{domxref("Device orientation events/Orientation and motion data explained", "Orientation and motion data explained", "", "nocode")}}
- {{DOMxRef("DeviceOrientationEvent")}}
- {{domxref("Window/devicemotion_event", "devicemotion")}}
- {{DOMxRef("Window.deviceorientation_event", "deviceorientation")}} event
- {{DOMxRef("Window.deviceorientationabsolute_event", "deviceorientationabsolute")}} event
- {{DOMxRef("Window/devicemotion_event", "devicemotion")}} event
- {{DOMxRef("Accelerometer")}}
- {{DOMxRef("LinearAccelerationSensor")}}
- [Detecting device orientation](/en-US/docs/Web/API/Device_orientation_events/Detecting_device_orientation)
- [Orientation and motion data explained](/en-US/docs/Web/API/Device_orientation_events/Orientation_and_motion_data_explained)
9 changes: 3 additions & 6 deletions files/en-us/web/api/devicemotionevent/interval/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ A number representing the interval of time, in milliseconds.

## See also

- {{DOMxRef("DeviceMotionEvent")}}
- {{DOMxRef("window.devicemotion_event", "devicemotion") }} event
- {{DOMxRef("window.deviceorientation_event", "deviceorientation") }} event
- {{DOMxRef("DeviceOrientationEvent")}}
- [Detecting device orientation](/en-US/docs/Web/API/Device_orientation_events/Detecting_device_orientation)
- [Orientation and motion data explained](/en-US/docs/Web/API/Device_orientation_events/Orientation_and_motion_data_explained)
- {{domxref("Device orientation events/Detecting device orientation", "Detecting device orientation", "", "nocode")}}
- {{domxref("Device orientation events/Orientation and motion data explained", "Orientation and motion data explained", "", "nocode")}}
- {{DOMxRef("Window/devicemotion_event", "devicemotion")}} event
9 changes: 3 additions & 6 deletions files/en-us/web/api/devicemotionevent/rotationrate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ rates of the device around each of its axes:

## See also

- {{DOMxRef("DeviceMotionEvent") }}
- {{DOMxRef("window.devicemotion_event", "devicemotion") }} event
- {{DOMxRef("window.deviceorientation_event", "deviceorientation") }} event
- {{DOMxRef("DeviceOrientationEvent") }}
- [Detecting device orientation](/en-US/docs/Web/API/Device_orientation_events/Detecting_device_orientation)
- [Orientation and motion data explained](/en-US/docs/Web/API/Device_orientation_events/Orientation_and_motion_data_explained)
- {{domxref("Device orientation events/Detecting device orientation", "Detecting device orientation", "", "nocode")}}
- {{domxref("Device orientation events/Orientation and motion data explained", "Orientation and motion data explained", "", "nocode")}}
- {{DOMxRef("Window/devicemotion_event", "devicemotion")}} event
5 changes: 0 additions & 5 deletions files/en-us/web/api/devicemotioneventacceleration/x/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,3 @@ See [Accelerometer values explained](/en-US/docs/Web/API/Device_orientation_even
## Browser compatibility

{{Compat}}

## See also

- [`DeviceMotionEventAcceleration.y`](/en-US/docs/Web/API/DeviceMotionEventAcceleration/y)
- [`DeviceMotionEventAcceleration.z`](/en-US/docs/Web/API/DeviceMotionEventAcceleration/z)
5 changes: 0 additions & 5 deletions files/en-us/web/api/devicemotioneventacceleration/y/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,3 @@ See [Accelerometer values explained](/en-US/docs/Web/API/Device_orientation_even
## Browser compatibility

{{Compat}}

## See also

- [`DeviceMotionEventAcceleration.x`](/en-US/docs/Web/API/DeviceMotionEventAcceleration/x)
- [`DeviceMotionEventAcceleration.z`](/en-US/docs/Web/API/DeviceMotionEventAcceleration/z)
5 changes: 0 additions & 5 deletions files/en-us/web/api/devicemotioneventacceleration/z/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,3 @@ See [Accelerometer values explained](/en-US/docs/Web/API/Device_orientation_even
## Browser compatibility

{{Compat}}

## See also

- [`DeviceMotionEventAcceleration.x`](/en-US/docs/Web/API/DeviceMotionEventAcceleration/x)
- [`DeviceMotionEventAcceleration.y`](/en-US/docs/Web/API/DeviceMotionEventAcceleration/y)
8 changes: 4 additions & 4 deletions files/en-us/web/api/deviceorientationevent/absolute/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ See [Orientation and motion data explained](/en-US/docs/Web/API/Device_orientati

## See also

- {{ domxref("DeviceOrientationEvent") }}
- [Detecting device orientation](/en-US/docs/Web/API/Device_orientation_events/Detecting_device_orientation)
- [Orientation and motion data explained](/en-US/docs/Web/API/Device_orientation_events/Orientation_and_motion_data_explained)
- {{DOMxRef("window.deviceorientation_event", "deviceorientation") }} event
- {{domxref("Device orientation events/Detecting device orientation", "Detecting device orientation", "", "nocode")}}
- {{domxref("Device orientation events/Orientation and motion data explained", "Orientation and motion data explained", "", "nocode")}}
- {{domxref("Window.deviceorientation_event", "deviceorientation")}} event
- {{domxref("Window.deviceorientationabsolute_event", "deviceorientationabsolute")}} event
8 changes: 4 additions & 4 deletions files/en-us/web/api/deviceorientationevent/alpha/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A number.

## See also

- {{ domxref("DeviceOrientationEvent") }}
- [Detecting device orientation](/en-US/docs/Web/API/Device_orientation_events/Detecting_device_orientation)
- [Orientation and motion data explained](/en-US/docs/Web/API/Device_orientation_events/Orientation_and_motion_data_explained)
- {{DOMxRef("window.deviceorientation_event", "deviceorientation") }} event
- {{domxref("Device orientation events/Detecting device orientation", "Detecting device orientation", "", "nocode")}}
- {{domxref("Device orientation events/Orientation and motion data explained", "Orientation and motion data explained", "", "nocode")}}
- {{domxref("Window.deviceorientation_event", "deviceorientation")}} event
- {{domxref("Window.deviceorientationabsolute_event", "deviceorientationabsolute")}} event
8 changes: 4 additions & 4 deletions files/en-us/web/api/deviceorientationevent/beta/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A number.

## See also

- {{ domxref("DeviceOrientationEvent") }}
- [Detecting device orientation](/en-US/docs/Web/API/Device_orientation_events/Detecting_device_orientation)
- [Orientation and motion data explained](/en-US/docs/Web/API/Device_orientation_events/Orientation_and_motion_data_explained)
- {{DOMxRef("window.deviceorientation_event", "deviceorientation") }} event
- {{domxref("Device orientation events/Detecting device orientation", "Detecting device orientation", "", "nocode")}}
- {{domxref("Device orientation events/Orientation and motion data explained", "Orientation and motion data explained", "", "nocode")}}
- {{domxref("Window.deviceorientation_event", "deviceorientation")}} event
- {{domxref("Window.deviceorientationabsolute_event", "deviceorientationabsolute")}} event
8 changes: 4 additions & 4 deletions files/en-us/web/api/deviceorientationevent/gamma/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ A number.

## See also

- {{ domxref("DeviceOrientationEvent") }}
- [Detecting device orientation](/en-US/docs/Web/API/Device_orientation_events/Detecting_device_orientation)
- [Orientation and motion data explained](/en-US/docs/Web/API/Device_orientation_events/Orientation_and_motion_data_explained)
- {{DOMxRef("window.deviceorientation_event", "deviceorientation") }} event
- {{domxref("Device orientation events/Detecting device orientation", "Detecting device orientation", "", "nocode")}}
- {{domxref("Device orientation events/Orientation and motion data explained", "Orientation and motion data explained", "", "nocode")}}
- {{domxref("Window.deviceorientation_event", "deviceorientation")}} event
- {{domxref("Window.deviceorientationabsolute_event", "deviceorientationabsolute")}} event
11 changes: 6 additions & 5 deletions files/en-us/web/api/deviceorientationevent/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ window.addEventListener("deviceorientation", (event) => {

## See also

- {{domxref("Window.deviceorientation_event", "deviceorientation")}}
- {{ domxref("DeviceMotionEvent") }}
- {{domxref("Window.devicemotion_event", "devicemotion")}}
- [Detecting device orientation](/en-US/docs/Web/API/Device_orientation_events/Detecting_device_orientation)
- [Orientation and motion data explained](/en-US/docs/Web/API/Device_orientation_events/Orientation_and_motion_data_explained)
- {{domxref("Device orientation events/Detecting device orientation", "Detecting device orientation", "", "nocode")}}
- {{domxref("Device orientation events/Orientation and motion data explained", "Orientation and motion data explained", "", "nocode")}}
- {{domxref("DeviceMotionEvent")}}
- {{domxref("Window.devicemotion_event", "devicemotion")}} event
- {{domxref("Window.deviceorientation_event", "deviceorientation")}} event
- {{domxref("Window.deviceorientationabsolute_event", "deviceorientationabsolute")}} event

0 comments on commit 358fa88

Please sign in to comment.