The Browser Object Model (BOM)
There are no official norms for the Browser Object Model (BOM).
The Window Object
The window object is upheld by all programs. It speaks to the program's window.
Global factors are properties of the window object.
Global capacities are strategies for the window object.
Even the archive object (of the HTML DOM) is a property of the window object:
is the equivalent as:
Two properties can be utilized to decide the span of the program window.
Both properties return the sizes in pixels:
- window.innerHeight - the inward tallness of the program window (in pixels)
- window.innerWidth - the inward width of the program window (in pixels)
For Internet Explorer 8, 7, 6, 5:
var h = window.innerHeight
The model shows the program window's tallness and width: (excluding toolbars/scrollbars)
Other Window Methods
Some other methods:
- window.open() - open another window
- window.close() - close the current window
- window.moveTo() - move the current window
- window.resizeTo() - resize the current window