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'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
| API | static Promise<PermissionState> requestPermission(optional boolean absolute = false) on DeviceOrientationEvent; static Promise<PermissionState> requestPermission() with no parameter on DeviceMotionEvent |
|---|---|
| Requires | Secure context; while the permission state is “prompt”, a call made without transient user activation fails — the method gates the accelerometer and gyroscope permissions |
| Effect | Lets 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 status | Enabled by default in Chrome 151 (chromestatus milestone listing, verified 2026-07-28; previously listed as developer trial under Chrome 150) |
| Spec | Device Orientation Event — requestPermission() |
| MDN | DeviceOrientationEvent.requestPermission() · DeviceMotionEvent.requestPermission() |
| ChromeStatus | 5915984063889408 — DeviceOrientation Events permission request API |
| Interactive demo | Chrome Platform Showcase — DeviceOrientation Events permission request API |