fullScreen property (window)
Specifies or retrieves whether the browser application is in full-screen mode or not.
Note: The fullScreen property works in Firefox from version 3, in earlier versions it always returns false.
To write the fullScreen property, the UniversalXPConnect privilege is required.
See Example 2 for details.
In Microsoft Windows platforms, the F11 key toggles the browser applications (Internet Explorer, Firefox and Opera, but not Safari) between
full screen and normal mode.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
Possible values:
Boolean that specifies or retrieves whether the browser application is in full-screen mode.
One of the following values:
| The browser application isn't in full-screen mode. | ||||||
| The browser application is in full-screen mode. |
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the fullScreen property:
|
|
||||
<head> <script type="text/javascript"> function IsInFullScreenMode () { alert (window.fullScreen); } </script> </head> <body> <button onclick="IsInFullScreenMode ();">Is in full screen mode?</button> Press F11 to toggle between normal and full screen mode. </body> |
||||
|
||||
|
Did you find this example helpful?
|
Example HTML code 2:
This example shows how to toggle between the normal and the full screen mode write with the fullScreen property:
|
|
||||
<head> <script type="text/javascript"> function ToggleFullScreen () { if (window.netscape) { netscape.security.PrivilegeManager.enablePrivilege ("UniversalXPConnect"); } var isFull = window.fullScreen; window.fullScreen = (isFull)? false : true; } </script> </head> <body> Press this button, <button onclick="ToggleFullScreen ();">Change full screen mode!</button> or press F11 to toggle between normal and full screen mode. </body> |
||||
|
||||
|
Did you find this example helpful?
|
Supported by objects:
External links:
User Contributed Comments

