W3C home > Mailing lists > Public > public-device-apis-log@w3.org > September 2018

Re: [deviceorientation] Invalid IDL in DeviceMotionEventInit

From: Marijn Kruisselbrink via GitHub <sysbot+gh@w3.org>
Date: Fri, 21 Sep 2018 21:15:18 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-423672723-1537564517-sysbot+gh@w3.org>
> We can update the spec but implementations will likely need to keep accepting null values for these members because both [Blink](https://chromium.googlesource.com/chromium/src/+/1e6e30b0e19a1d2d2db6e6b7184d26c741959d78/third_party/blink/renderer/modules/device_orientation/device_motion_event_init.idl) and [Gecko](https://hg.mozilla.org/mozilla-central/raw-file/ebeba937ca2a01df86d98089f2368bb975182dcc/dom/webidl/DeviceMotionEvent.webidl) mark these as optional.

Every member of a dictionary that is not marked as required is already optional. The `?` really doesn't do anything since both "null" and "undefined" get converted to a dictionary the same way anyway. So getting rid of the `?` shouldn't have any behavioral effect (although it's hard to discuss what the behavior is of what is written now, since what is written isn't valid WebIDL to begin with).

GitHub Notification of comment by mkruisselbrink
Please view or discuss this issue at https://github.com/w3c/deviceorientation/issues/54#issuecomment-423672723 using your GitHub account
Received on Friday, 21 September 2018 21:15:21 UTC

This archive was generated by hypermail 2.4.0 : Monday, 4 July 2022 12:47:55 UTC