W3C home > Mailing lists > Public > public-device-apis-log@w3.org > December 2018

Re: [deviceorientation] Add API for requesting permission to receive device motion / orientation events (#57)

From: Reilly Grant via GitHub <sysbot+gh@w3.org>
Date: Thu, 13 Dec 2018 21:35:24 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-447129020-1544736923-sysbot+gh@w3.org>
You need both `"gyroscope"` and `"accelerometer"` for both so it would look like:

```js
Promise.all([navigation.permissions.request({ name: “accelerometer” }),
             navigation.permissions.request({ name: “gyroscope” })])
    .then(results => {
      ...
    });
```

-- 
GitHub Notification of comment by reillyeon
Please view or discuss this issue at https://github.com/w3c/deviceorientation/issues/57#issuecomment-447129020 using your GitHub account
Received on Thursday, 13 December 2018 21:35:25 UTC

This archive was generated by hypermail 2.4.0 : Monday, 4 July 2022 12:47:56 UTC