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

[presentation-api] Separate interface for controlling page and presenting page

From: Shih-Chiang Chien via GitHub <sysbot+gh@w3.org>
Date: Mon, 25 May 2015 08:52:43 +0000
To: public-secondscreen@w3.org
Message-ID: <issues.opened-80455409-1432543962-sysbot+gh@w3.org>
schien has just created a new issue for 
https://github.com/w3c/presentation-api:

== Separate interface for controlling page and presenting page ==
Currently we mix the API for controlling page and presenting page in 
`NavigatorPresentation` and developer will use 
`navigator.presentation` as the entry point.

Since we are providing more and more advance feature in this API (see 
#19), it's cumbersome to provide statement on the usage of each 
attribute/function.

Therefore I propose to move all presenting page APIs into a different 
interface, called `PresentingContext`. The example definition will 
looks like:

```
interface PresentingContext : EventTarget {
  Promise<PresentationSession> getSession();
  Sequence<PresentationSession> getSessions();
  attribute EventHandler onsessionavailable;
};

partial interface Navigator {
  readonly attibute PresentingContext presentingContext; // null if 
not presenting page
};
```

See https://github.com/w3c/presentation-api/issues/91
Received on Monday, 25 May 2015 08:52:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 25 May 2015 08:52:47 UTC