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

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