DeviceSensorsOptions Class

The host hooks of the sensor APIs (BrowsingContextOptions.Sensors): the Generic Sensor API (https://w3c.github.io/sensors/, Accelerometer, Gyroscope, AbsoluteOrientationSensor, etc.) and the DeviceOrientation and DeviceMotion events (https://w3c.github.io/deviceorientation/).

public sealed class DeviceSensorsOptions

Constructors

NameDescription
DeviceSensorsOptions()

DeviceSensorsOptions()

public DeviceSensorsOptions()

No documentation is available.

Properties

NameDescription
ProviderGets or sets the sensors of the device: a DeviceSensorProvider whose sensors are added by the application (DeviceSensorProvider.AddSensor), which pushes their readings with DeviceSensor.Update. A provider can be shared by several browsing contexts. The default is null: the device has no sensor, so the start() method of the sensor objects fails with a NotReadableError, and the device orientation and motion events are fired once with null values.

Gets or sets the sensors of the device: a DeviceSensorProvider whose sensors are added by the application (DeviceSensorProvider.AddSensor), which pushes their readings with DeviceSensor.Update. A provider can be shared by several browsing contexts. The default is null: the device has no sensor, so the start() method of the sensor objects fails with a NotReadableError, and the device orientation and motion events are fired once with null values.

public DeviceSensorProvider? Provider { get; init; }

Property value

DeviceSensorProvider?