W3C home > Mailing lists > Public > public-secondscreen@w3.org > December 2016

[presentation-api] Check on Presentation display availability in getAvailability can never be true

From: François Daoust via GitHub <sysbot+gh@w3.org>
Date: Thu, 01 Dec 2016 21:14:44 +0000
To: public-secondscreen@w3.org
Message-ID: <issues.opened-192964056-1480626883-sysbot+gh@w3.org>
tidoust has just created a new issue for 
https://github.com/w3c/presentation-api:

== Check on Presentation display availability in getAvailability can 
never be true ==
One last one :) My apologies for not seeing that before as well!

[`getAvailability`](http://w3c.github.io/presentation-api/#getting-the-presentation-displays-availability-information)
 is the only algorithm that sets the [presentation display 
availability](http://w3c.github.io/presentation-api/#dfn-presentation-display-availability).
 That algorithm also creates (and never resets) the [presentation 
availability 
promise](http://w3c.github.io/presentation-api/#dfn-presentation-availability-promise).

The presentation display availability will always be `null` the first 
time `getAvailability` is called so condition in step 7 that checks on
 the presentation display availability will always evaluate to 
`false`. The presentation availability promise will always be set in 
subsequent calls to `getAvailability`, meaning that the algorithm will
 stop at step 2, return that promise, and never reach step 7.

In short, unless I missed something, I believe that step (and 
substeps) can be dropped.

This did not happen before because there was no such thing as a 
"presentation availability promise".

Please view or discuss this issue at 
https://github.com/w3c/presentation-api/issues/388 using your GitHub 
account
Received on Thursday, 1 December 2016 21:14:50 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 1 December 2016 21:14:51 UTC