- From: Anssi Kostiainen via GitHub <sysbot+gh@w3.org>
- Date: Sun, 06 Mar 2016 19:44:21 +0000
- To: public-device-apis@w3.org
Good points from @rwaldron. Just noting the `MessagePort` has this interesting (not very intuitive IMO) behaviour: >... when using `addEventListener()`, the `start()` method must also be invoked. When using `onmessage`, the call to `start()` is implied. Applying that pattern to the solution 1 the call to `start()` would be implied with `onreading`. We'd need to `start()` when using `addEventListener()` though. Seems more clear to require `start()` for both `onreading` and `addEventListener('reading', ...)`, thus the solutions 1 and 2 should actually be the same. I'd probably name the method simply `start()`. Also wondering if there are good use cases for explicit `pause()` and `resume()` or `stop()` and how would the solution 1+2 compare with 3 in that case. -- GitHub Notification of comment by anssiko Please view or discuss this issue at https://github.com/w3c/sensors/issues/88#issuecomment-192972157 using your GitHub account
Received on Sunday, 6 March 2016 19:44:32 UTC