- From: François Beaufort via GitHub <sysbot+gh@w3.org>
- Date: Wed, 07 Oct 2015 13:06:06 +0000
- To: public-web-bluetooth-log@w3.org
beaufortfrancois has just created a new issue for https://github.com/WebBluetoothCG/web-bluetooth: == Returns DataView instead of ArrayBuffer on readValue == I've realized that all the `arrayBuffer` I receive from `readValue` are always wrapped around a `DataView` and I was wondering if we could simply return a `DataView` instead of an `ArrayBuffer` then. Instead of ```js characteristic.readValue().then(buffer => { let data = new DataView(buffer); let foo = data.getUint8(0); ... ``` We would have something simpler like ```js characteristic.readValue().then(data => { let foo = data.getUint8(0); // We can always access ArrayBuffer if we need to with data.buffer ... See https://github.com/WebBluetoothCG/web-bluetooth/issues/172
Received on Wednesday, 7 October 2015 13:06:10 UTC