JavaScript Reference :: Screen

A Screen object is automatically created by a browser window and contains information about the display, such as size and color depth.

methods

object toSource()
Returns a literal representing the source code of the object e.g "function Object() { [native code] }" or "function Car(manufactuer, model, productionyear) { this.make = manufactuer; this.model = model; this.year = productionyear; }".
string toString()
Returns a string representing the object i.e. "[object Object]".
void unwatch(property)
Removes a previously set watchpoint.
								
object valueOf()
Returns the primitive value of the object e.g. "function Object() { [native code] }".
void watch(property, handlingFunction)
Calls the handlingFunction when the property is changed.
								

properties

availHeight
The display height of the screen in pixels.
availWidth
The display width of the screen in pixels.
colorDepth
An integer indicating the color depth that can be displayed in the screen.
constructor
The constructor method is the base method used to create an instance of the object.
height
The height of the screen.
pixelDepth
The number of pixels per inch displayed in the screen.
prototype
Exposes the prototype for the method or property of the object.
width
The width of the screen.

events