How do you prevent javascript redirects from exiting fullscreen mode?
I am trying to redirect to a new url using javascript in an already full screen, but the currenlt redirect comes out of full screen, which I don't want. Am I using the wrong JS code?
window.location.href = demo_url;
or
window.location = demo_url;
+3
hobailey
source
to share
2 answers
In fact, I was doing it wrong - if you are using a Chrome extension and want full screen mode, like me, you can simply use the following:
chrome.windows.getCurrent(null, function(window) {
chrome.windows.update(window.id, {state: "fullscreen"});
})
0
hobailey
source
to share
If you change the address of the document, the browser will always exit full screen mode.
The only thing you can do to get the same visual result is to present a "new" page inside an iframe with 100% height and width.
0
PhonicUK
source
to share