Re: [deviceorientation] DeviceMotionEvent atttributes can't be null per current IDL (#91)

Because creating a `DeviceMotionEvent` like this,

```
{ acceleration: null, accelerationIncludingGravity: null, rotationRate: null }
```

is much more likely what the developer wants than creating one like this,

```
{
  acceleration: { x: null, y: null, z: null },
  accelerationIncludingGravity: { x: null, y: null, z: null },
  rotationRate: { alpha: null, beta: null, gamma: null }
}
```

The first option is equivalent to the "null event" that implementations generate when sensors aren't supported on the host while the second option is what an implementation would generate if the host had sensors which provided none of the expected axes, which is nonsense.

-- 
GitHub Notification of comment by reillyeon
Please view or discuss this issue at https://github.com/w3c/deviceorientation/issues/91#issuecomment-1971558378 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 29 February 2024 16:53:49 UTC