Re: [deviceorientation] Invalid IDL in DeviceMotionEventInit

In Chromium, when the invalid '?' are removed then you get the following,

```javascript
> new DeviceMotionEvent('', {acceleration: {}}).acceleration
DeviceAcceleration {x: null, y: null, z: null}
> new DeviceMotionEvent('', {acceleration: null}).acceleration
DeviceAcceleration {x: null, y: null, z: null}
> new DeviceMotionEvent('', {acceleration: undefined}).acceleration
null
> new DeviceMotionEvent('', {}).acceleration
null
```

Based on my understanding from the discussion above this is correct according to the WebIDL specification.

The change from the non-compliant behavior is in this case,

```javascript
> new DeviceMotionEvent('', {acceleration: null}).acceleration
null
```

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

Received on Friday, 28 September 2018 17:28:05 UTC