Skip to content

Instantly share code, notes, and snippets.

@jsscclr
Created April 12, 2016 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsscclr/3fbd87c7534679f7c5400a6a9cea7d70 to your computer and use it in GitHub Desktop.
Save jsscclr/3fbd87c7534679f7c5400a6a9cea7d70 to your computer and use it in GitHub Desktop.
(function() {
function Presentation() {
}
Presentation.prototype.requestShow = function(url) {
return new Promise(function(resolve, reject) {
presentationWindow = window.open(url, "", "presentation");
if (presentationWindow)
presentationWindow.onload = function() { resolve(presentationWindow); };
else
reject();
});
};
navigator.presentation = new Presentation();
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment