W3C home > Mailing lists > Public > public-secondscreen@w3.org > July 2015

Re: [presentation-api] Update PresentationAvailability.value and fire the change event in the same task

From: Mark Foltz via GitHub <sysbot+gh@w3.org>
Date: Tue, 07 Jul 2015 17:53:43 +0000
To: public-secondscreen@w3.org
Message-ID: <issue_comment.created-119282960-1436291622-sysbot+gh@w3.org>
I believe that the way that the algorithm is written, each state 
transition for A.value should result in a change event fired on A with
 the corresponding value; if A.value transitions to "false" then 
"true" then two events should be fired, the first with A.value == 
false and the second with A.value == true.

It does seem cleaner to fire the event before resolving the promise, 
although the caller may or may not see the first change event 
depending on when the event task completes vs. adding the initial 
event handler.

In a coming PR, I made the change above, and also consolidated the 
event firing task into the main algorithm to make it easier to follow.



-- 
GitHub Notif of comment by mfoltzgoogle
See 
https://github.com/w3c/presentation-api/issues/143#issuecomment-119282960
Received on Tuesday, 7 July 2015 17:53:44 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 7 July 2015 17:53:45 UTC