W3C home > Mailing lists > Public > public-web-bluetooth-log@w3.org > January 2016

Re: [web-bluetooth] Make readValue's .then() and event handlers execute in the same order they're mentioned in the spec.

From: Giovanni Ortuno via GitHub <sysbot+gh@w3.org>
Date: Sat, 16 Jan 2016 03:03:08 +0000
To: public-web-bluetooth-log@w3.org
Message-ID: <issue_comment.created-172149850-1452913387-sysbot+gh@w3.org>
We should be good on the implementation side.

More details: We send the events through 
 where we post a task to notify the dispatcher that a characteristic 
changed; this way we resolve the promise first. In order to avoid 
sending unnecessary characteristic changed events to the dispatcher, 
the dispatcher host only sends events after a listener has been added 
to the characteristic, which requires another message from the 
dispatcher to the host. It is in between this message that the js 
context could miss an event. One solution we considered is just 
sending all messages to the dispatcher that way we avoid that extra 
message and no events get lost.

GitHub Notification of comment by g-ortuno
Please view or discuss this issue at 
 using your GitHub account
Received on Saturday, 16 January 2016 03:03:10 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 16 January 2016 03:03:10 UTC