I am developing a GWT web application and for a specific requirement I need to display my only hosted html page in full screen on load.
This we done with the help of pressing F11 on any web page. I need exactly the same functionality in my GWT application.
I have tried glimpses of Javascript for this which wasn’t worked.
<script language="JavaScript1.2">
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById)
{
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
</script>
Could it be possible?
You can’t force the user on how to display your document. Still, there’s a Draft for a fullscreen api, see also https://developer.mozilla.org/en/DOM/Using_full-screen_mode