Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeviceOrientationEvent.absolute's value when data cannot be obtained #119

Closed
rakuco opened this issue Nov 10, 2023 · 0 comments · Fixed by #139
Closed

DeviceOrientationEvent.absolute's value when data cannot be obtained #119

rakuco opened this issue Nov 10, 2023 · 0 comments · Fixed by #139
Assignees

Comments

@rakuco
Copy link
Member

rakuco commented Nov 10, 2023

The current ondeviceorientation text has the following excerpt:

If an implementation can never provide orientation information, the event should be fired with the alpha, beta and gamma attributes set to null.

It does not say anything about the absolute attribute. This is an event without any data so its value is not relevant, but I wonder if it should be specified normatively nonetheless.

@rakuco rakuco self-assigned this Feb 12, 2024
rakuco added a commit that referenced this issue Feb 13, 2024
We were only requiring alpha, beta, and gamma to be null. It makes sense to
also require implementations to set absolute to the same value as well.

At the time of writing, this is done for completeness' sake though:
- Blink implements this behavior and sets absolute to false when a
  deviceorientation cannot be provided, and to true for
  deviceorientationabsolute events.
- Gecko does not send any events if it cannot provide readings (e.g. when
  there are no sensors available).
- WebKit only ships an iOS implementation, whose IDL does not even have an
  absolute attribute.

Fixes #119.
rakuco added a commit that referenced this issue Feb 14, 2024
We were only requiring alpha, beta, and gamma to be null. It makes sense to
also require implementations to set absolute to the same value as well.

At the time of writing, this is done for completeness' sake though:
- Blink implements this behavior and sets absolute to false when a
  deviceorientation cannot be provided, and to true for
  deviceorientationabsolute events.
- Gecko does not send any events if it cannot provide readings (e.g. when
  there are no sensors available).
- WebKit only ships an iOS implementation, whose IDL does not even have an
  absolute attribute.

Fixes #119.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant