- From: Tobie Langel via GitHub <sysbot+gh@w3.org>
- Date: Mon, 14 Nov 2016 16:01:36 +0000
- To: public-device-apis-log@w3.org
> let s = new HeadTrackerSensor();
> permissions.query(s).then(/.../);
Yes, this could be thought of as something like:
```js
HeadTrackerSensor.prototype.getPermission = function() {
return ["gyroscope", "magnetometer"];
};
Permissions.prototype.query = function(...args) {
args.map(function(arg) {
if (typeof arg.getPermission === "function") {
return arg.getPermission();
} else {
return arg;
}
});
// do stuff
};
```
--
GitHub Notification of comment by tobie
Please view or discuss this issue at
https://github.com/w3c/sensors/issues/132#issuecomment-260376376 using
your GitHub account
Received on Monday, 14 November 2016 16:01:42 UTC