- From: Kenneth Rohde Christiansen via GitHub <sysbot+gh@w3.org>
- Date: Wed, 01 Mar 2017 09:00:01 +0000
- To: public-device-apis-log@w3.org
Sure, this was just an idea and there might be other similar hooks.
This example is a bit stupid how shows how you could do in JS:
```
const reading = {
x: 76,
y: -22,
z: 36,
[Symbol.iterator]: function*() {
for (const i of ["x", "y", "z"]) {
yield this[i];
}
}
};
let arr = [...reading];
-> [76, -22, 36]
```
--
GitHub Notification of comment by kenchris
Please view or discuss this issue at
https://github.com/w3c/sensors/issues/170#issuecomment-283282702 using
your GitHub account
Received on Wednesday, 1 March 2017 09:00:13 UTC