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

While trying to test #141 in Chromium I discovered that Blink rejects the proposed WebIDL with an error that "[n]ullable dictionary type is forbidden as a dictionary member type." Double-checking the WebIDL spec the note at the end of https://webidl.spec.whatwg.org/#idl-nullable-type explicitly says that "[a]lthough dictionary types can in general be nullable, they cannot when used as the type of an operation argument or a dictionary member."

It looks like @bzbarsky's comment above was either incorrect or out of date.

If that is true then it seems like this is insolvable given the current WebIDL specification. The question is whether it is worth pursuing a workaround (or WebIDL spec change) or accepting that it is simply impossible to construct a `DeviceMotionEvent` from script with these attributes set to `null`. I am tempted to go with the latter. It doesn't seem worth the effort to resolve this issue.

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


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

Received on Wednesday, 28 February 2024 22:58:16 UTC