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

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