Re: [presentation-api] Added defaultsessionstart and default-presentation <link> to the spec

I believe we could have a generic onsessionstart event then and 
abandon returning a Promise from start/joinSession resulting in a more
 unified API and smaller API surface. Not sure it would be convenient 
for the page because it might have to track what request is being 
resolved with the new session passed in onstart. Although the page 
might not care much.

Having a Promise returned for startSession/joinSession is better for 
error handling though - the page makes a request and either gets a 
session or gets an error. There's no issue with the timing of when 
event listener is attached. If we use an event handler to pass the 
result of startSession/joinSession to the page, we'd have to add 
onsessionfail, for example.

I think a Promise based API for startSession/joinSession is better.

-- 
GitHub Notif of comment by avayvod
See 
https://github.com/w3c/presentation-api/pull/77#issuecomment-101748025

Received on Wednesday, 13 May 2015 17:04:42 UTC