← Chrome 151 reference

v151 · shipped · covered on mdn

DeviceOrientation Events permission request API

Chrome adds the requestPermission() static methods to DeviceOrientationEvent and DeviceMotionEvent, letting pages ask the user for access to device orientation and motion data. Each returns a Promise<PermissionState> that resolves to “granted” or “denied”. The methods require a secure context and — while the underlying permission state is “prompt” — transient user activation. Chrome is aligning with the API Safari has shipped since iOS 13.

this feature is documented on MDN

MDN: DeviceOrientationEvent.requestPermission() static method

MDN's reference covers the requestPermission() static method — its PermissionState promise, the secure-context requirement, user-activation behavior, specifications, and browser compatibility — plus the companion DeviceMotionEvent.requestPermission() page. gendn doesn't duplicate that here.

quick reference

APIstatic Promise<PermissionState> requestPermission(optional boolean absolute = false) on DeviceOrientationEvent; static Promise<PermissionState> requestPermission() with no parameter on DeviceMotionEvent
RequiresSecure context; while the permission state is “prompt”, a call made without transient user activation fails — the method gates the accelerometer and gyroscope permissions
EffectLets a page request orientation/motion sensor access at a moment of its choosing (e.g. from a settings toggle), instead of the browser prompting on first event listener
Chrome statusEnabled by default in Chrome 151 (chromestatus milestone listing, verified 2026-07-28; previously listed as developer trial under Chrome 150)
SpecDevice Orientation Event — requestPermission()
MDNDeviceOrientationEvent.requestPermission() · DeviceMotionEvent.requestPermission()
ChromeStatus5915984063889408 — DeviceOrientation Events permission request API
Interactive demoChrome Platform Showcase — DeviceOrientation Events permission request API
Source: chromestatus.com/feature/5915984063889408; Device Orientation Event specification; MDN, July 2026.