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

Magnetometer data doesn't make sense and doesn't match caniuse.com #2631

Open
foolip opened this issue Feb 11, 2025 · 3 comments
Open

Magnetometer data doesn't make sense and doesn't match caniuse.com #2631

foolip opened this issue Feb 11, 2025 · 3 comments

Comments

@foolip
Copy link
Collaborator

foolip commented Feb 11, 2025

https://github.com/web-platform-dx/web-features/blob/5f3d1e80a508b8ba0ec1e240f0ce4bc4acf7dbfd/features/magnetometer.yml.dist doesn't make sense, it is meaningless to say that <iframe allow="magnetometer"> or Permissions-Policy for the feature is supported when the feature itself isn't. Those code paths, even if active in the browser, wouldn't end up doing anything observable.

https://caniuse.com/magnetometer claims the whole feature is supported since Chrome 67, but I don't believe that.

In Chromium the features is controlled by a flag which is off by default:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/runtime_enabled_features.json5;l=3940-3943;drc=bdbfc851687b28b24b80bccbc4c027bfe05a701b

Testing on Chrome on macOS, the Magnetometer interface isn't exposed.

@anssiko @riju as editors of the spec, can you say something about the situation? Is the Magnetometer API enabled by default on some platform?

BCD, caniuse.com and web-features need updating to align on whatever the correct state is.

@anssiko
Copy link

anssiko commented Feb 11, 2025

Magnetometer is behind about://flags/#enable-generic-sensor-extra-classes in Chromium-based browsers. BCD et al. should be updated to reflect this. It looks like caniuse.com does note the flag for Chrome, but versions are off. Thanks for looking into this!

@ddbeck
Copy link
Collaborator

ddbeck commented Feb 11, 2025

Leaving a cross-reference for myself: doing #1680 would catch this kind of problem in general.

@ddbeck
Copy link
Collaborator

ddbeck commented Feb 11, 2025

I've sent mdn/browser-compat-data#25897 and Fyrd/caniuse#7259.

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

No branches or pull requests

3 participants