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

[presentation-api] Message sending in Example 5 happens too early

From: François Daoust via GitHub <sysbot+gh@w3.org>
Date: Fri, 18 Sep 2015 14:56:59 +0000
To: public-secondscreen@w3.org
Message-ID: <issues.opened-107218655-1442588218-sysbot+gh@w3.org>
tidoust has just created a new issue for 

== Message sending in Example 5 happens too early ==
The code in example 5 apparently assumes that it may issue a `send` 
command right away:

However, I don't see what guarantees that this won't thrown an error 
in the spec. The algorithm to etablish a presentation connection runs 
in the background in particular, so I would expect the returned 
PresentationSession to be in "disconnected" state to start with:

And the algorithm to send a message throws an exception if the state 
is not "connected":

Happy to prepare a PR if I'm right.

See https://github.com/w3c/presentation-api/issues/198
Received on Friday, 18 September 2015 14:57:00 UTC

This archive was generated by hypermail 2.3.1 : Friday, 18 September 2015 14:57:01 UTC