w3c / deviceorientation

W3C Device Orientation spec
https://www.w3.org/TR/orientation-event/
Other
49 stars 32 forks source link

Make DeviceMotionEventInit members nullable with null default #141

Closed reillyeon closed 5 months ago

reillyeon commented 9 months ago

This change reverts #55 and defines the default values of the DeviceMotionEventInit as null as I believe was the original intent of the definition before that change.

Null DeviceMotionEvent attributes have semantic meaning (they declare that the host does not provide the given sensor) and so script should be able to initialize an event with its attributes set to null.

Fixed #91.


Preview | Diff

marcoscaceres commented 6 months ago

@reillyeon, what would you like to do here? See @annevk suggestion. As the events are primarily fired by the browser, we can make these defaults as implementation friendly as possible.

annevk commented 6 months ago

@marcoscaceres see https://github.com/w3c/deviceorientation/issues/91#issuecomment-1970852027 for context. At this point we're waiting for @rakuco I think.

marcoscaceres commented 6 months ago

Ah, right, thanks!... @rakuco, do you want me to take this over?

reillyeon commented 5 months ago

Thanks for the reminder. Abandoning this change because it's not valid WebIDL. We should instead do as I suggested on #91 and update the specification to match implementations after @rakuco's investigation.