diff --git a/files/en-us/web/api/absoluteorientationsensor/absoluteorientationsensor/index.md b/files/en-us/web/api/absoluteorientationsensor/absoluteorientationsensor/index.md index c2c13295a1ce9de..39f6d5931d455ae 100644 --- a/files/en-us/web/api/absoluteorientationsensor/absoluteorientationsensor/index.md +++ b/files/en-us/web/api/absoluteorientationsensor/absoluteorientationsensor/index.md @@ -6,7 +6,7 @@ page-type: web-api-constructor browser-compat: api.AbsoluteOrientationSensor.AbsoluteOrientationSensor --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`AbsoluteOrientationSensor()`** constructor creates a new {{domxref("AbsoluteOrientationSensor")}} object which describes the device's physical orientation in relation to the Earth's reference coordinate system. @@ -23,9 +23,9 @@ new AbsoluteOrientationSensor(options) - : Options are as follows: - - `frequency` + - `frequency` {{optional_inline}} - : The desired number of times per second a sample should be taken, meaning the number of times per second that the {{domxref('sensor.reading_event', 'reading')}} event will be called. A whole number or decimal may be used, the latter for frequencies less than a second. The actual reading frequency depends on the device hardware and consequently may be less than requested. - - `referenceFrame` + - `referenceFrame` {{optional_inline}} - : Either `'device'` or `'screen'`. The default is `'device'`. ## Specifications diff --git a/files/en-us/web/api/absoluteorientationsensor/index.md b/files/en-us/web/api/absoluteorientationsensor/index.md index e18b1b404294e36..b190cb8b9e8eba0 100644 --- a/files/en-us/web/api/absoluteorientationsensor/index.md +++ b/files/en-us/web/api/absoluteorientationsensor/index.md @@ -5,7 +5,7 @@ page-type: web-api-interface browser-compat: api.AbsoluteOrientationSensor --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`AbsoluteOrientationSensor`** interface of the [Sensor APIs](/en-US/docs/Web/API/Sensor_APIs) describes the device's physical orientation in relation to the Earth's reference coordinate system. diff --git a/files/en-us/web/api/accelerometer/accelerometer/index.md b/files/en-us/web/api/accelerometer/accelerometer/index.md index 54a5cb21f5087f2..bf8b42cf312dd1a 100644 --- a/files/en-us/web/api/accelerometer/accelerometer/index.md +++ b/files/en-us/web/api/accelerometer/accelerometer/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.Accelerometer.Accelerometer --- -{{APIRef("Sensor API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("Sensor API")}}{{SeeCompatTable}} The **`Accelerometer()`** constructor creates a new {{domxref("Accelerometer")}} object which returns the acceleration of the device along all three axes at the time it is read. @@ -25,9 +25,9 @@ new Accelerometer(options) - : Options are as follows: - - `frequency` + - `frequency` {{optional_inline}} - : The desired number of times per second a sample should be taken, meaning the number of times per second the {{domxref('sensor.reading_event', 'reading')}} event will be called. A whole number or decimal may be used, the latter for frequencies less than a second. The actual reading frequency depends on the device hardware and consequently may be less than requested. - - `referenceFrame` + - `referenceFrame` {{optional_inline}} - : Either `'device'` or `'screen'`. The default is `'device'`. ### Exceptions diff --git a/files/en-us/web/api/accelerometer/index.md b/files/en-us/web/api/accelerometer/index.md index 5229c17fcfe0737..327c7f3067eb6ec 100644 --- a/files/en-us/web/api/accelerometer/index.md +++ b/files/en-us/web/api/accelerometer/index.md @@ -7,7 +7,7 @@ status: browser-compat: api.Accelerometer --- -{{APIRef("Sensor API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("Sensor API")}}{{SeeCompatTable}} The **`Accelerometer`** interface of the [Sensor APIs](/en-US/docs/Web/API/Sensor_APIs) provides on each reading the acceleration applied to the device along all three axes. diff --git a/files/en-us/web/api/accelerometer/x/index.md b/files/en-us/web/api/accelerometer/x/index.md index bd801dd6decefa2..44ffd6afad11332 100644 --- a/files/en-us/web/api/accelerometer/x/index.md +++ b/files/en-us/web/api/accelerometer/x/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.Accelerometer.x --- -{{APIRef("Sensor API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("Sensor API")}}{{SeeCompatTable}} The **`x`** read-only property of the {{domxref("Accelerometer")}} interface returns a number specifying the acceleration of the device along its x-axis. diff --git a/files/en-us/web/api/accelerometer/y/index.md b/files/en-us/web/api/accelerometer/y/index.md index 50247f4eb61ecd1..4d8db1909495dce 100644 --- a/files/en-us/web/api/accelerometer/y/index.md +++ b/files/en-us/web/api/accelerometer/y/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.Accelerometer.y --- -{{APIRef("Sensor API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("Sensor API")}}{{SeeCompatTable}} The **`y`** read-only property of the {{domxref("Accelerometer")}} interface returns a number specifying the acceleration of the device along its y-axis. diff --git a/files/en-us/web/api/accelerometer/z/index.md b/files/en-us/web/api/accelerometer/z/index.md index e6d0d316278570a..a197748f06ab65e 100644 --- a/files/en-us/web/api/accelerometer/z/index.md +++ b/files/en-us/web/api/accelerometer/z/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.Accelerometer.z --- -{{APIRef("Sensor API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("Sensor API")}}{{SeeCompatTable}} The **`z`** read-only property of the {{domxref("Accelerometer")}} interface returns a number specifying the acceleration of the device along its z-axis. diff --git a/files/en-us/web/api/ambientlightsensor/ambientlightsensor/index.md b/files/en-us/web/api/ambientlightsensor/ambientlightsensor/index.md index 233ad3bf28ecf1e..0a5f213d53c3e74 100644 --- a/files/en-us/web/api/ambientlightsensor/ambientlightsensor/index.md +++ b/files/en-us/web/api/ambientlightsensor/ambientlightsensor/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.AmbientLightSensor.AmbientLightSensor --- -{{APIRef("Sensor API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("Sensor API")}}{{SeeCompatTable}} The **`AmbientLightSensor()`** constructor creates a new {{domxref("AmbientLightSensor")}} object, which returns the current light level or illuminance of the ambient light around the hosting device. @@ -25,7 +25,7 @@ new AmbientLightSensor(options) - : Currently only one option is supported: - - `frequency` + - `frequency` {{optional_inline}} - : The desired number of times per second a sample should be taken, meaning the number of times per second that {{domxref('sensor.reading_event', 'reading')}} event will be called. A whole number or decimal may be used, the latter for frequencies less than a second. The actual reading frequency depends on the device hardware and consequently may be less than requested. ### Exceptions diff --git a/files/en-us/web/api/ambientlightsensor/illuminance/index.md b/files/en-us/web/api/ambientlightsensor/illuminance/index.md index fca169eebd7e279..def10a4b855661e 100644 --- a/files/en-us/web/api/ambientlightsensor/illuminance/index.md +++ b/files/en-us/web/api/ambientlightsensor/illuminance/index.md @@ -8,9 +8,9 @@ status: browser-compat: api.AmbientLightSensor.illuminance --- -{{APIRef("Sensor API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("Sensor API")}}{{SeeCompatTable}} -The **`illuminance`** property of the {{domxref("AmbientLightSensor")}} interface returns the current light level in [lux](https://en.wikipedia.org/wiki/Lux) of the ambient light level around the hosting device. +The **`illuminance`** read-only property of the {{domxref("AmbientLightSensor")}} interface returns the current light level in [lux](https://en.wikipedia.org/wiki/Lux) of the ambient light level around the hosting device. ## Value diff --git a/files/en-us/web/api/ambientlightsensor/index.md b/files/en-us/web/api/ambientlightsensor/index.md index af54e10f7693250..383e81b47b47376 100644 --- a/files/en-us/web/api/ambientlightsensor/index.md +++ b/files/en-us/web/api/ambientlightsensor/index.md @@ -7,7 +7,7 @@ status: browser-compat: api.AmbientLightSensor --- -{{APIRef("Sensor API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("Sensor API")}}{{SeeCompatTable}} The **`AmbientLightSensor`** interface of the [Sensor APIs](/en-US/docs/Web/API/Sensor_APIs) returns the current light level or illuminance of the ambient light around the hosting device. @@ -24,7 +24,7 @@ This feature may be blocked by a [Permissions Policy](/en-US/docs/Web/HTTP/Permi ## Instance properties -- {{domxref('AmbientLightSensor.illuminance')}} {{Experimental_Inline}} +- {{domxref('AmbientLightSensor.illuminance')}} {{ReadOnlyInline}} {{Experimental_Inline}} - : Returns the current light level in [lux](https://en.wikipedia.org/wiki/Lux) of the ambient light level around the hosting device. ## Instance methods diff --git a/files/en-us/web/api/gravitysensor/gravitysensor/index.md b/files/en-us/web/api/gravitysensor/gravitysensor/index.md index ac25422dc3e9e73..4b5beba12eaf825 100644 --- a/files/en-us/web/api/gravitysensor/gravitysensor/index.md +++ b/files/en-us/web/api/gravitysensor/gravitysensor/index.md @@ -6,7 +6,7 @@ page-type: web-api-constructor browser-compat: api.GravitySensor.GravitySensor --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`GravitySensor()`** constructor creates a new {{domxref("GravitySensor")}} object which @@ -25,14 +25,14 @@ new GravitySensor(options) - : Options are as follows: - - `frequency` + - `frequency` {{optional_inline}} - : The desired number of times per second a sample should be taken, meaning the number of times per second that the {{domxref('sensor.reading_event', 'reading')}} event will be called. A whole number or decimal may be used, the latter for frequencies less than a second. The actual reading frequency depends on device hardware and consequently may be less than requested. The default frequency is the one defined by the underlying platform. - - `referenceFrame` + - `referenceFrame` {{optional_inline}} - : The local coordinate system representing the reference frame. It can be either `'device'` or `'screen'`. The default is `'device'`. diff --git a/files/en-us/web/api/gravitysensor/index.md b/files/en-us/web/api/gravitysensor/index.md index 7bbb55b1597dff1..4c8cae20629f6e1 100644 --- a/files/en-us/web/api/gravitysensor/index.md +++ b/files/en-us/web/api/gravitysensor/index.md @@ -5,7 +5,7 @@ page-type: web-api-interface browser-compat: api.GravitySensor --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`GravitySensor`** interface of the [Sensor APIs](/en-US/docs/Web/API/Sensor_APIs) provides on each reading the gravity applied to the device along all three axes. diff --git a/files/en-us/web/api/gyroscope/gyroscope/index.md b/files/en-us/web/api/gyroscope/gyroscope/index.md index 605a6bc2d288e40..c107a2ff16f2146 100644 --- a/files/en-us/web/api/gyroscope/gyroscope/index.md +++ b/files/en-us/web/api/gyroscope/gyroscope/index.md @@ -6,7 +6,7 @@ page-type: web-api-constructor browser-compat: api.Gyroscope.Gyroscope --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`Gyroscope()`** constructor creates a new {{domxref("Gyroscope")}} object which provides on each reading the @@ -25,13 +25,13 @@ new Gyroscope(options) - : Options are as follows: - - `frequency` + - `frequency` {{optional_inline}} - : The desired number of times per second a sample should be taken, meaning the number of times per second that the {{domxref('sensor.reading_event', 'reading')}} event will be called. A whole number or decimal may be used, the latter for frequencies less than a second. The actual reading frequency depends device hardware and consequently may be less than requested. - - `referenceFrame` + - `referenceFrame` {{optional_inline}} - : Either `'device'` or `'screen'`. The default is `'device'`. diff --git a/files/en-us/web/api/gyroscope/index.md b/files/en-us/web/api/gyroscope/index.md index f0856384479a89c..5f3bcc3943de98a 100644 --- a/files/en-us/web/api/gyroscope/index.md +++ b/files/en-us/web/api/gyroscope/index.md @@ -5,7 +5,7 @@ page-type: web-api-interface browser-compat: api.Gyroscope --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`Gyroscope`** interface of the [Sensor APIs](/en-US/docs/Web/API/Sensor_APIs) provides on each reading the angular velocity of the device along all three axes. diff --git a/files/en-us/web/api/gyroscope/x/index.md b/files/en-us/web/api/gyroscope/x/index.md index d28fe938fd24289..357d0e4717c6c17 100644 --- a/files/en-us/web/api/gyroscope/x/index.md +++ b/files/en-us/web/api/gyroscope/x/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.Gyroscope.x --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`x`** read-only property of the {{domxref("Gyroscope")}} interface returns a number specifying the diff --git a/files/en-us/web/api/gyroscope/y/index.md b/files/en-us/web/api/gyroscope/y/index.md index 4c1026303f88b64..50534d19766399c 100644 --- a/files/en-us/web/api/gyroscope/y/index.md +++ b/files/en-us/web/api/gyroscope/y/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.Gyroscope.y --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`y`** read-only property of the {{domxref("Gyroscope")}} interface returns a number specifying the angular velocity of the device along its y-axis. diff --git a/files/en-us/web/api/gyroscope/z/index.md b/files/en-us/web/api/gyroscope/z/index.md index d789cf650110431..cbcc1037125e3eb 100644 --- a/files/en-us/web/api/gyroscope/z/index.md +++ b/files/en-us/web/api/gyroscope/z/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.Gyroscope.z --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`z`** read-only property of the {{domxref("Gyroscope")}} interface returns a number specifying the diff --git a/files/en-us/web/api/linearaccelerationsensor/index.md b/files/en-us/web/api/linearaccelerationsensor/index.md index 28667c205953e13..87caa22802b78e5 100644 --- a/files/en-us/web/api/linearaccelerationsensor/index.md +++ b/files/en-us/web/api/linearaccelerationsensor/index.md @@ -5,7 +5,7 @@ page-type: web-api-interface browser-compat: api.LinearAccelerationSensor --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`LinearAccelerationSensor`** interface of the [Sensor APIs](/en-US/docs/Web/API/Sensor_APIs) provides on each reading the acceleration applied to the device along all three axes, but without the contribution of gravity. diff --git a/files/en-us/web/api/linearaccelerationsensor/linearaccelerationsensor/index.md b/files/en-us/web/api/linearaccelerationsensor/linearaccelerationsensor/index.md index ef79bb40932de1b..c7ae8cf61ac7e6b 100644 --- a/files/en-us/web/api/linearaccelerationsensor/linearaccelerationsensor/index.md +++ b/files/en-us/web/api/linearaccelerationsensor/linearaccelerationsensor/index.md @@ -6,7 +6,7 @@ page-type: web-api-constructor browser-compat: api.LinearAccelerationSensor.LinearAccelerationSensor --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`LinearAccelerationSensor()`** constructor creates a new {{domxref("LinearAccelerationSensor")}} object which @@ -26,13 +26,13 @@ new LinearAccelerationSensor(options) - : Options are as follows: - - `frequency` + - `frequency` {{optional_inline}} - : The desired number of times per second a sample should be taken, meaning the number of times per second that the {{domxref('sensor.reading_event', 'reading')}} event will be called. A whole number or decimal may be used, the latter for frequencies less than a second. The actual reading frequency depends on device hardware and consequently may be less than requested. - - `referenceFrame` + - `referenceFrame` {{optional_inline}} - : Either `'device'` or `'screen'`. The default is `'device'`. diff --git a/files/en-us/web/api/magnetometer/index.md b/files/en-us/web/api/magnetometer/index.md index bc50035f0e0d8e3..7b6313d30b27615 100644 --- a/files/en-us/web/api/magnetometer/index.md +++ b/files/en-us/web/api/magnetometer/index.md @@ -7,7 +7,7 @@ status: browser-compat: api.Magnetometer --- -{{APIRef("Sensor API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("Sensor API")}}{{SeeCompatTable}} The **`Magnetometer`** interface of the [Sensor APIs](/en-US/docs/Web/API/Sensor_APIs) provides information about the magnetic field as detected by the device's primary magnetometer sensor. diff --git a/files/en-us/web/api/magnetometer/magnetometer/index.md b/files/en-us/web/api/magnetometer/magnetometer/index.md index f8214d4cee9ea5d..0648113b1e8354b 100644 --- a/files/en-us/web/api/magnetometer/magnetometer/index.md +++ b/files/en-us/web/api/magnetometer/magnetometer/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.Magnetometer.Magnetometer --- -{{APIRef("Sensor API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("Sensor API")}}{{SeeCompatTable}} The **`Magnetometer()`** constructor creates a new {{domxref("Magnetometer")}} object which returns information about the @@ -27,13 +27,13 @@ new Magnetometer(options) - : Options are as follows: - - `frequency` + - `frequency` {{optional_inline}} - : The desired number of times per second a sample should be taken, meaning the number of times per second that the {{domxref('sensor.reading_event', 'reading')}} event will be called. A whole number or decimal may be used, the latter for frequencies less than a second. The actual reading frequency depends on device hardware and consequently may be less than requested. - - `referenceFrame` + - `referenceFrame` {{optional_inline}} - : Either `'device'` or `'screen'`. The default is `'device'`. diff --git a/files/en-us/web/api/magnetometer/x/index.md b/files/en-us/web/api/magnetometer/x/index.md index 7cc48cb5ddc3ac3..25a2d2ca97a139d 100644 --- a/files/en-us/web/api/magnetometer/x/index.md +++ b/files/en-us/web/api/magnetometer/x/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.Magnetometer.x --- -{{APIRef("Sensor API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("Sensor API")}}{{SeeCompatTable}} The **`x`** read-only property of the {{domxref("Magnetometer")}} interface returns a number specifying diff --git a/files/en-us/web/api/magnetometer/y/index.md b/files/en-us/web/api/magnetometer/y/index.md index 6cd6ebff6a3825c..47aa4203bb61df3 100644 --- a/files/en-us/web/api/magnetometer/y/index.md +++ b/files/en-us/web/api/magnetometer/y/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.Magnetometer.y --- -{{APIRef("Sensor API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("Sensor API")}}{{SeeCompatTable}} The **`y`** read-only property of the {{domxref("Magnetometer")}} interface returns a number specifying diff --git a/files/en-us/web/api/magnetometer/z/index.md b/files/en-us/web/api/magnetometer/z/index.md index 4a493ff26d45cfc..518a87c0def2fa1 100644 --- a/files/en-us/web/api/magnetometer/z/index.md +++ b/files/en-us/web/api/magnetometer/z/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.Magnetometer.z --- -{{APIRef("Sensor API")}}{{SeeCompatTable}} +{{securecontext_header}}{{APIRef("Sensor API")}}{{SeeCompatTable}} The **`z`** read-only property of the {{domxref("Magnetometer")}} interface returns a number specifying diff --git a/files/en-us/web/api/orientationsensor/index.md b/files/en-us/web/api/orientationsensor/index.md index 3a1b8281b0f323b..f8dd74eedda0470 100644 --- a/files/en-us/web/api/orientationsensor/index.md +++ b/files/en-us/web/api/orientationsensor/index.md @@ -5,7 +5,7 @@ page-type: web-api-interface browser-compat: api.OrientationSensor --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`OrientationSensor`** interface of the [Sensor APIs](/en-US/docs/Web/API/Sensor_APIs) is the base class for orientation sensors. This interface cannot be used directly. Instead it provides properties and methods accessed by interfaces that inherit from it. @@ -22,7 +22,7 @@ Below is a list of interfaces based on the OrientationSensor interface. ## Instance properties -- {{domxref("OrientationSensor.quaternion")}} +- {{domxref("OrientationSensor.quaternion")}} {{ReadOnlyInline}} - : Returns a four element {{jsxref('Array')}} whose elements contain the components of the unit quaternion representing the device's orientation. ## Instance methods diff --git a/files/en-us/web/api/orientationsensor/populatematrix/index.md b/files/en-us/web/api/orientationsensor/populatematrix/index.md index 211e6008b797b72..5278e6fc0975625 100644 --- a/files/en-us/web/api/orientationsensor/populatematrix/index.md +++ b/files/en-us/web/api/orientationsensor/populatematrix/index.md @@ -6,9 +6,9 @@ page-type: web-api-instance-method browser-compat: api.OrientationSensor.populateMatrix --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} -The **`populateMatrix`** method of the +The **`populateMatrix()`** method of the {{domxref("OrientationSensor")}} interface populates the given target matrix with the rotation matrix based on the latest sensor reading. The rotation matrix is shown below. diff --git a/files/en-us/web/api/orientationsensor/quaternion/index.md b/files/en-us/web/api/orientationsensor/quaternion/index.md index eaa829baf78e1d8..948133dfbb07e29 100644 --- a/files/en-us/web/api/orientationsensor/quaternion/index.md +++ b/files/en-us/web/api/orientationsensor/quaternion/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.OrientationSensor.quaternion --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`quaternion`** read-only property of the {{domxref("OrientationSensor")}} interface returns a four element diff --git a/files/en-us/web/api/relativeorientationsensor/index.md b/files/en-us/web/api/relativeorientationsensor/index.md index acffb4f49c44109..f566da38b16bed6 100644 --- a/files/en-us/web/api/relativeorientationsensor/index.md +++ b/files/en-us/web/api/relativeorientationsensor/index.md @@ -5,7 +5,7 @@ page-type: web-api-interface browser-compat: api.RelativeOrientationSensor --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`RelativeOrientationSensor`** interface of the [Sensor APIs](/en-US/docs/Web/API/Sensor_APIs) describes the device's physical orientation without regard to the Earth's reference coordinate system. diff --git a/files/en-us/web/api/relativeorientationsensor/relativeorientationsensor/index.md b/files/en-us/web/api/relativeorientationsensor/relativeorientationsensor/index.md index 55bb7ae566480b6..1e0bfe08c5b010e 100644 --- a/files/en-us/web/api/relativeorientationsensor/relativeorientationsensor/index.md +++ b/files/en-us/web/api/relativeorientationsensor/relativeorientationsensor/index.md @@ -6,7 +6,7 @@ page-type: web-api-constructor browser-compat: api.RelativeOrientationSensor.RelativeOrientationSensor --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`RelativeOrientationSensor()`** constructor creates a new {{domxref("RelativeOrientationSensor")}} object which @@ -25,14 +25,14 @@ new RelativeOrientationSensor(options) - : Options are as follows: - - `frequency` + - `frequency` {{optional_inline}} - : The desired number of times per second a sample should be taken, meaning the number of times per second that the {{domxref('sensor.reading_event', 'reading')}} event will be called. A whole number or decimal may be used, the latter for frequencies less than a second. The actual reading frequency depends device hardware and consequently may be less than requested. - - `referenceFrame` + - `referenceFrame` {{optional_inline}} - : Either `'device'` or `'screen'`. The default is `'device'`. diff --git a/files/en-us/web/api/sensor/activate_event/index.md b/files/en-us/web/api/sensor/activate_event/index.md index 407d59b1937ec5a..f17eadbe9976539 100644 --- a/files/en-us/web/api/sensor/activate_event/index.md +++ b/files/en-us/web/api/sensor/activate_event/index.md @@ -6,7 +6,7 @@ page-type: web-api-event browser-compat: api.Sensor.activate_event --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`activate`** event is fired when a sensor becomes activated. It means that it will start obtaining readings. diff --git a/files/en-us/web/api/sensor/activated/index.md b/files/en-us/web/api/sensor/activated/index.md index 664a2871bde8f51..4b31af661951722 100644 --- a/files/en-us/web/api/sensor/activated/index.md +++ b/files/en-us/web/api/sensor/activated/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.Sensor.activated --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`activated`** read-only property of the {{domxref("Sensor")}} interface returns a boolean value indicating diff --git a/files/en-us/web/api/sensor/error_event/index.md b/files/en-us/web/api/sensor/error_event/index.md index 7de653f0790dc70..f0cf700c52a6b0c 100644 --- a/files/en-us/web/api/sensor/error_event/index.md +++ b/files/en-us/web/api/sensor/error_event/index.md @@ -6,7 +6,7 @@ page-type: web-api-event browser-compat: api.Sensor.error_event --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`error`** event is fired when an exception occurs on a sensor. diff --git a/files/en-us/web/api/sensor/hasreading/index.md b/files/en-us/web/api/sensor/hasreading/index.md index 00113f15a698b0c..c05ac3f6ebea140 100644 --- a/files/en-us/web/api/sensor/hasreading/index.md +++ b/files/en-us/web/api/sensor/hasreading/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.Sensor.hasReading --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`hasReading`** read-only property of the {{domxref("Sensor")}} interface returns a boolean value diff --git a/files/en-us/web/api/sensor/index.md b/files/en-us/web/api/sensor/index.md index 62df70606353aa8..12e25b104215db4 100644 --- a/files/en-us/web/api/sensor/index.md +++ b/files/en-us/web/api/sensor/index.md @@ -5,7 +5,7 @@ page-type: web-api-interface browser-compat: api.Sensor --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`Sensor`** interface of the [Sensor APIs](/en-US/docs/Web/API/Sensor_APIs) is the base class for all the other sensor interfaces. This interface cannot be used directly. Instead it provides properties, event handlers, and methods accessed by interfaces that inherit from it. diff --git a/files/en-us/web/api/sensor/reading_event/index.md b/files/en-us/web/api/sensor/reading_event/index.md index 8035ddedeb9b293..1a44aa3fb57bf07 100644 --- a/files/en-us/web/api/sensor/reading_event/index.md +++ b/files/en-us/web/api/sensor/reading_event/index.md @@ -6,7 +6,7 @@ page-type: web-api-event browser-compat: api.Sensor.reading_event --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`reading`** event is fired when a new reading is available on a sensor. diff --git a/files/en-us/web/api/sensor/start/index.md b/files/en-us/web/api/sensor/start/index.md index 085af9460bdff86..23a4bdc09907508 100644 --- a/files/en-us/web/api/sensor/start/index.md +++ b/files/en-us/web/api/sensor/start/index.md @@ -6,10 +6,9 @@ page-type: web-api-instance-method browser-compat: api.Sensor.start --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} -The **`start`** method activates one -of the sensors based on `Sensor`. +The **`start()`** method of the {{domxref("Sensor")}} interface activates one of the sensors based on `Sensor`. ## Syntax diff --git a/files/en-us/web/api/sensor/stop/index.md b/files/en-us/web/api/sensor/stop/index.md index f80734dbef6b786..1e1540271ae3cdc 100644 --- a/files/en-us/web/api/sensor/stop/index.md +++ b/files/en-us/web/api/sensor/stop/index.md @@ -6,10 +6,9 @@ page-type: web-api-instance-method browser-compat: api.Sensor.stop --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} -The **`stop`** method of the -{{domxref("Sensor")}} interface deactivates the current sensor. +The **`stop()`** method of the {{domxref("Sensor")}} interface deactivates the current sensor. ## Syntax diff --git a/files/en-us/web/api/sensor/timestamp/index.md b/files/en-us/web/api/sensor/timestamp/index.md index 495c1b86aa3b7b0..d188c05cd91b9ea 100644 --- a/files/en-us/web/api/sensor/timestamp/index.md +++ b/files/en-us/web/api/sensor/timestamp/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.Sensor.timestamp --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`timestamp`** read-only property of the {{domxref("Sensor")}} interface returns the timestamp of the latest sensor diff --git a/files/en-us/web/api/sensor_apis/index.md b/files/en-us/web/api/sensor_apis/index.md index 5f5b7099f13d647..b276fd8213de589 100644 --- a/files/en-us/web/api/sensor_apis/index.md +++ b/files/en-us/web/api/sensor_apis/index.md @@ -2,14 +2,27 @@ title: Sensor APIs slug: Web/API/Sensor_APIs page-type: web-api-overview -browser-compat: api.Sensor +browser-compat: + - api.Sensor + - api.Accelerometer + - api.OrientationSensor + - api.Gyroscope + - api.Magnetometer + - api.AmbientLightSensor +spec-urls: + - https://w3c.github.io/sensors/ + - https://w3c.github.io/accelerometer/ + - https://w3c.github.io/orientation-sensor/ + - https://w3c.github.io/ambient-light/ + - https://w3c.github.io/gyroscope/ + - https://w3c.github.io/magnetometer/ --- -{{DefaultAPISidebar("Sensor API")}} +{{securecontext_header}}{{DefaultAPISidebar("Sensor API")}} The **Sensor APIs** are a set of interfaces built to a common design that expose device sensors in a consistent way to the web platform. -## Sensor APIs concepts and usage +## Concepts and usage Although the Generic Sensor API specification defines a {{domxref('Sensor')}} interface, as a web developer you will never use it. Instead you'll use one of its subclasses to retrieve specific kinds of sensor data. For example, the {{domxref('Accelerometer')}} interface returns the acceleration of the device along all three axes at the time it is read. diff --git a/files/en-us/web/api/sensorerrorevent/error/index.md b/files/en-us/web/api/sensorerrorevent/error/index.md index 644c0305c4d4515..7457bc18e7da84a 100644 --- a/files/en-us/web/api/sensorerrorevent/error/index.md +++ b/files/en-us/web/api/sensorerrorevent/error/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.SensorErrorEvent.error --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`error`** read-only property of the {{domxref("SensorErrorEvent")}} interface returns the {{domxref('DOMException')}} diff --git a/files/en-us/web/api/sensorerrorevent/index.md b/files/en-us/web/api/sensorerrorevent/index.md index 51c964968702f03..ac410b5237ebca8 100644 --- a/files/en-us/web/api/sensorerrorevent/index.md +++ b/files/en-us/web/api/sensorerrorevent/index.md @@ -5,7 +5,7 @@ page-type: web-api-interface browser-compat: api.SensorErrorEvent --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} The **`SensorErrorEvent`** interface of the [Sensor APIs](/en-US/docs/Web/API/Sensor_APIs) provides information about errors thrown by a {{domxref('Sensor')}} or derived interface. diff --git a/files/en-us/web/api/sensorerrorevent/sensorerrorevent/index.md b/files/en-us/web/api/sensorerrorevent/sensorerrorevent/index.md index b1c56613be3a3e3..bd13b8f4aec8122 100644 --- a/files/en-us/web/api/sensorerrorevent/sensorerrorevent/index.md +++ b/files/en-us/web/api/sensorerrorevent/sensorerrorevent/index.md @@ -6,9 +6,9 @@ page-type: web-api-constructor browser-compat: api.SensorErrorEvent.SensorErrorEvent --- -{{APIRef("Sensor API")}} +{{securecontext_header}}{{APIRef("Sensor API")}} -The **`SensorErrorEvent`** constructor +The **`SensorErrorEvent()`** constructor creates a new {{domxref("SensorErrorEvent")}} object which provides information about errors thrown by any of the interfaces based on {{domxref('Sensor')}}.