Allows developers to ask for permission to start using the Device Orientation and Device Motion APIs. Access to these APIs is currently granted by default, and these new functions are part of the plan to start prompting for access in the future.
The Device Orientation spec is more than a decade old, at a time when integration with the Permissions spec was not common (or possible). As such, developers can use the window.ondevice{motion,orientation} events without having to ask for permission before reading sensor data. A few years ago, the WebKit team added the requestPermission() functions to DeviceOrientationEvent and DeviceMotionEvent when implementing the spec, so that websites would have to ask for permission before being able to use the API. This is the case on Safari for iOS at the moment. We want to do the same thing and avoid allowing websites access to sensor data by default. Doing this in Chromium is more complicated because the API is already implemented, and requiring developers to add requestPermission() to their websites out of the blue can risk breaking the web. In this first step, the idea is to just add the API and make it report "granted" or "denied" without prompting for access (i.e. it just reports the current Motion Sensor permission settings) while also adding user counters to understand how many pages are already using the requestPermission() calls and how many pages are just using window.ondevice{motion,orientation} without it. We will then evaluate how to switch to prompting by default in the future, as discussed in the tracking bug.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
-
No milestones specified
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/a7bfbf70-0cbf-709f-6310-7af1101c2574%40intel.com.