Re: [web-bluetooth] startNotifications sometimes doesn't bind (#429)

You mean like this ?
```
function handleHeartRateMeasurement(heartRateMeasurement) {
  heartRateMeasurement.addEventListener("characteristicvaluechanged", event => {
    console.log(event.target);    
    var value = device.parseValue(event.target.value);
    // Use my value
  });
}
```

In this case yes. I have no problem to retrieve a value in the listener.

My issue is that sometimes, this listener is never called, so I assume this is because the event `characteristicvaluechanged` never happens, and I guess this happens when the binding to the notification is not properly made ?! Or because I start the listener before receiving the first `characteristic.value` ?

-- 
GitHub Notification of comment by StephaneJuban
Please view or discuss this issue at https://github.com/WebBluetoothCG/web-bluetooth/issues/429#issuecomment-476394222 using your GitHub account

Received on Monday, 25 March 2019 22:00:08 UTC