This is a Javascript plug-in that can be used across browsers Fullscreen API.
$ npm install --save ke-fullscreen
Feature | Chrome | Edge | Firefox | IE | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 15 | Yes | 9.0 | 11 | 12.10 | 5.0 |
fullscreenEnabled | 20 | Yes | 10.0 | 11 | 12.10 | 5.1 |
You can also visit Fullscreen API to learn more.
<!-- import js -->
<script src="ke-fullscreen.min.js"></script>
<script>
/* use
* fullscreen as a global object.
*/
console.log(fullscreen.isEnabled());
</script>
/*
The width and height of the dom which is passed into fullscreen.launch() as a parameter will be set to 100% in fullscreen mode.
for example:
fullscreen.launch(document.querySelector('#container')).
*/
#container:-webkit-full-screen {
width: 100%;
height: 100%;
}
#container:-moz-full-screen {
width: 100%;
height: 100%;
}
#container:-ms-fullscreen {
width: 100%;
height: 100%;
}
#container:fullscreen {
width: 100%;
height: 100%;
}
$ gulp package
or
$ npm start
$ gulp package-dev
$ gulp doc
MIT © porky-prince