{"action":"created","issue":{"url":"https://api.github.com/repos/WebBluetoothCG/web-bluetooth/issues/172","labels_url":"https://api.github.com/repos/WebBluetoothCG/web-bluetooth/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/WebBluetoothCG/web-bluetooth/issues/172/comments","events_url":"https://api.github.com/repos/WebBluetoothCG/web-bluetooth/issues/172/events","html_url":"https://github.com/WebBluetoothCG/web-bluetooth/issues/172","id":110221575,"number":172,"title":"Returns DataView instead of ArrayBuffer on readValue","user":{"login":"beaufortfrancois","id":634478,"avatar_url":"https://avatars.githubusercontent.com/u/634478?v=3","gravatar_id":"","url":"https://api.github.com/users/beaufortfrancois","html_url":"https://github.com/beaufortfrancois","followers_url":"https://api.github.com/users/beaufortfrancois/followers","following_url":"https://api.github.com/users/beaufortfrancois/following{/other_user}","gists_url":"https://api.github.com/users/beaufortfrancois/gists{/gist_id}","starred_url":"https://api.github.com/users/beaufortfrancois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beaufortfrancois/subscriptions","organizations_url":"https://api.github.com/users/beaufortfrancois/orgs","repos_url":"https://api.github.com/users/beaufortfrancois/repos","events_url":"https://api.github.com/users/beaufortfrancois/events{/privacy}","received_events_url":"https://api.github.com/users/beaufortfrancois/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/WebBluetoothCG/web-bluetooth/labels/needs%20wording","name":"needs wording","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-10-07T13:06:06Z","updated_at":"2016-01-19T17:04:46Z","closed_at":null,"body":"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.\r\n\r\nInstead of \r\n\r\n```js\r\ncharacteristic.readValue().then(buffer => {\r\n  let data = new DataView(buffer);\r\n  let foo = data.getUint8(0);\r\n  ...\r\n```\r\n\r\nWe would have something simpler like\r\n\r\n```js\r\ncharacteristic.readValue().then(data => {\r\n  let foo = data.getUint8(0);\r\n  // We can always access ArrayBuffer if we need to with data.buffer\r\n  ...\r\n"},"comment":{"url":"https://api.github.com/repos/WebBluetoothCG/web-bluetooth/issues/comments/172919485","html_url":"https://github.com/WebBluetoothCG/web-bluetooth/issues/172#issuecomment-172919485","issue_url":"https://api.github.com/repos/WebBluetoothCG/web-bluetooth/issues/172","id":172919485,"user":{"login":"g-ortuno","id":3117611,"avatar_url":"https://avatars.githubusercontent.com/u/3117611?v=3","gravatar_id":"","url":"https://api.github.com/users/g-ortuno","html_url":"https://github.com/g-ortuno","followers_url":"https://api.github.com/users/g-ortuno/followers","following_url":"https://api.github.com/users/g-ortuno/following{/other_user}","gists_url":"https://api.github.com/users/g-ortuno/gists{/gist_id}","starred_url":"https://api.github.com/users/g-ortuno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/g-ortuno/subscriptions","organizations_url":"https://api.github.com/users/g-ortuno/orgs","repos_url":"https://api.github.com/users/g-ortuno/repos","events_url":"https://api.github.com/users/g-ortuno/events{/privacy}","received_events_url":"https://api.github.com/users/g-ortuno/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T17:04:46Z","updated_at":"2016-01-19T17:04:46Z","body":"Could we get this in the spec first before we implement it? We don't want to introduce discrepancies between the browser and the spec specially now that other browsers are implementing."}}