| Package | cssom.view |
| Interface | public interface Screen |
| Introduced in: | DOM 0 |
All browser compatibility information was obtained via Quirksmode.
See also
| Property | Defined By | ||
|---|---|---|---|
| CSSOM View availHeight : Number [read-only]
Returns the amount of vertical space available to the window on the screen. | Screen | ||
| CSSOM View availWidth : Number [read-only]
Returns the amount of horizontal space in pixels available to the window. | Screen | ||
| CSSOM View colorDepth : Number [read-only]
Returns the lowest number of bits from the color components of the output device. | Screen | ||
| CSSOM View height : Number [read-only]
Returns the height of the screen in pixels. | Screen | ||
| CSSOM View pixelDepth : Number [read-only]
Returns the lowest number of bits from the color components of the output device. | Screen | ||
| CSSOM View width : Number [read-only]
Returns the width of the screen. | Screen | ||
| CSSOM View availHeight | property |
availHeight:Number [read-only] | Product Versions : |
| Introduced in: | DOM 0 |
Returns the amount of vertical space available to the window on the screen.
public function get availHeight():NumberSee also
if (window.screen.availHeight != window.screen.height) {
// something's in the way!
// use available to size window
}| CSSOM View availWidth | property |
availWidth:Number [read-only] | Product Versions : |
| Introduced in: | DOM 0 |
Returns the amount of horizontal space in pixels available to the window.
public function get availWidth():NumberSee also
if (window.screen.availHeight != window.screen.height) {
// something's in the way!
// use available to size window
}| CSSOM View colorDepth | property |
colorDepth:Number [read-only] | Product Versions : |
| Introduced in: | DOM 0 |
Returns the lowest number of bits from the color components of the output device.
public function get colorDepth():NumberSee also
if ( window.screen.colorDepth < 8) {
// use low-color version of page
} else {
// use regular, colorful page
}| CSSOM View height | property |
height:Number [read-only] | Product Versions : |
| Introduced in: | DOM 0 |
Returns the height of the screen in pixels.
public function get height():NumberSee also
if (window.screen.availHeight != window.screen.height) {
// something is occupying some screen real estate!
}| CSSOM View pixelDepth | property |
pixelDepth:Number [read-only] | Product Versions : |
| Introduced in: | DOM 0 |
Returns the lowest number of bits from the color components of the output device.
public function get pixelDepth():NumberSee also
// if there is not adequate bit depth choose a simpler color
if ( window.screen.pixelDepth > 8 ) {
document.style.color = "#FAEBD7";
} else {
document.style.color = "#FFFFFF";
}| CSSOM View width | property |
width:Number [read-only] | Product Versions : |
| Introduced in: | DOM 0 |
Returns the width of the screen.
public function get width():NumberSee also
if (window.screen.width > 1000) {
// resolution is below 10 x 7
}