All specs
W3C Generic SensorW3CShould KnowProduct

Generic Sensor API

Device Access & Sensors·World Wide Web Consortium
WHY YOU NEED THIS

Enables motion-based UX (shake to undo, tilt to scroll), compass features, step counting, and AR experiences. The unified permission model means understanding the base Sensor lifecycle covers all sensor types.

What It Defines

Base specification for hardware sensor access in the browser. Defines the Sensor base class, SensorErrorEvent, and the permission/lifecycle model. Concrete sensors: Accelerometer (linear acceleration), Gyroscope (angular velocity), Magnetometer (magnetic field), AbsoluteOrientationSensor, RelativeOrientationSensor, AmbientLightSensor, and GravitySensor.

Canonical (Normative)

Convenient (Practical)

sensoraccelerometergyroscopemagnetometermotiondevice-accessbrowser
Standards Body
World Wide Web Consortium

Publishes web platform specs including CSS, accessibility, security policies, Service Workers, Web App Manifest, and many browser APIs. Also maintains some versioned HTML/DOM specs.

Visit

Related Specs

W3C PermissionsW3CMust Know

Permissions

The gating mechanism for every sensitive browser API. Check permission state before requesting access to avoid unexpected prompt dialogs. The change event lets you react when users revoke permissions in browser settings.

ProductDevice Access & Sensors
Details
W3C GeolocationW3CMust Know

Geolocation

Required for maps, location-based search, delivery tracking, geofencing, and any feature that needs the user's physical location. Understanding accuracy levels (GPS vs Wi-Fi vs IP) and the permission flow is essential.

ProductDevice Access & Sensors
Details