- From: Shih-Chiang Chien via GitHub <sysbot+gh@w3.org>
- Date: Mon, 08 Jun 2015 03:12:28 +0000
- To: public-secondscreen@w3.org
Web developers can still use `bind` to reuse the same handling
function, so it doesn't gain much benefit if we don't provide the URL
after redirection.
For example,
```
navigator.presentation.startSession(firstUrl).then(handleSession.bind(null,
firstUrl))
navigator.presentation.startSession(secondUrl).then(handleSession.bind(null,
secondUrl))
handleSession = function(url, session) {
// Code common to all presentation sessions goes here
// Now code specific to the presentation content
if (url == firstUrl) ...
else if (url == secondUrl) ...
}
```
--
GitHub Notif of comment by schien
See
https://github.com/w3c/presentation-api/issues/102#issuecomment-109848354
Received on Monday, 8 June 2015 03:12:30 UTC