Fullscreen on Click - Ext JS

How can I switch the browser to full screen by clicking on the button, I'm looking for a solution of any type, I mean, based on Ext JS, Javascript, HTML5 or other tricks, if you have one

+4
source share
2 answers

I found this solution

var docElm = document.documentElement; if (docElm.requestFullscreen) { docElm.requestFullscreen(); } else if (docElm.mozRequestFullScreen) { docElm.mozRequestFullScreen(); } else if (docElm.webkitRequestFullScreen) { docElm.webkitRequestFullScreen(); } 

and to cancel full screen mode:

 if (document.exitFullscreen) { document.exitFullscreen(); } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } 

this work for me using ExtJS 4.0.7 with chrome

full explanation here .

+2
source
+2
source

Source: https://habr.com/ru/post/1414732/


All Articles