Issue
I am developing an application where I want to implement such a thing where if user leaves from one component & enters other component, then in other component's ngOnInit method chrome browser should go full screen same as when we press Fn + F11 Key.
Any help or references are appreciated.
Solution
You can try with requestFullscreen
I have create a demo on Stackblitz
fullScreen() {
let elem = document.documentElement;
let methodToBeInvoked = elem.requestFullscreen ||
elem.webkitRequestFullScreen || elem['mozRequestFullscreen']
||
elem['msRequestFullscreen'];
if (methodToBeInvoked) methodToBeInvoked.call(elem);
}
Answered By - Krishna Rathore
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.