The window object represents an open browser window and includes properties for managing frames, accessing the document, and retrieving window dimensions. It provides methods to check if the window is closed, access the console, and reference the parent or topmost window. Additionally, it allows for manipulation of the window's name and provides an array of all window objects running in the current window.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
5 views2 pages
Window Object
The window object represents an open browser window and includes properties for managing frames, accessing the document, and retrieving window dimensions. It provides methods to check if the window is closed, access the console, and reference the parent or topmost window. Additionally, it allows for manipulation of the window's name and provides an array of all window objects running in the current window.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2
Window Object
The window object represents an open window in a browser.
If a document contain frames (<iframe> tags), the browser creates one window object for the HTML document, and one additional window object for each frame.
Closed: Returns a boolean true if a window is closed. (window.close)
Console: Returns the Console Object for the window. The console object provides access to the browser's debugging console. The console object is a property of the window object. The console object is accessed with: window.console or just console
Document: Returns the Document object for the window.
When an HTML document is loaded into a web browser, it becomes a document object. The document object is the root node of the HTML document. The document object is a property of the window object. The document object is accessed with: window.document or just document
frameElement: Returns the frame in which the window runs.
The frameElement property returns null if the window does not run in a frame.
Frames: Returns all window objects running in the window.
The frames property returns an array with all window objects in the window. The windows can be accessed by index numbers. The first index is 0.
Length: Returns the number of <iframe> elements in the current window
The windows can be accessed by index numbers. The first index is 0.
Name: Sets or returns the name of a window
Opener: Returns a reference to the window that created the window outerHeigh: Returns the height of the browser window, including toolbars/scrollbars outerWidth: Returns the width of the browser window, including toolbars/scrollbars parent: Returns the parent window of the current window