[deviceorientation] requestPermission() and event handling clarification (#74)

rakuco has just created a new issue for https://github.com/w3c/deviceorientation:

== requestPermission() and event handling clarification ==
@reillyeon and I were discussing the Chromium implementation of #68 and we figured it'd be good to get some clarification on how it integrates with `Device{Orientation,Motion}Event` -- either in terms of what the spec's supposed to mean or, if it's intentionally leaving some decisions up to implementations, what WebKit/Safari do so we can try to align some of the behavior across implementations.

- Does WebKit/Safari remember if permission's been granted to a given page or are users always asked for permission when `requestPermission()` is called?
- If an event listener for a deviceorientation/motion event is added before permission is granted, does anything happen (e.g. a null deviceorientation/motion event is fired)?
- Are users at all supposed to be able to add an event listener for those events before requesting permission?
- Once permission is granted, do previously registered event listeners start working or does the user need to add another event listener in order to start receiving events?

cc @cdumez

Please view or discuss this issue at https://github.com/w3c/deviceorientation/issues/74 using your GitHub account

Received on Monday, 8 April 2019 18:46:26 UTC