Defines the properties and methods inherited by objects in the Window prototype chain.
HTML N/A Scripting Window.prototype
The following table lists the members exposed by the Window Constructor object.
Attribute Property Description closed Retrieves whether the referenced window is closed. defaultStatus Sets or retrieves the default message displayed in the status bar at the bottom of the window. document EVENT event Sets or retrieves the event for which the script is written. frameElement Retrieves the frame or iframe object that is hosting the window in the parent document. length Gets or sets the number of objects in a collection. localStorage Retrieves the Web Storage area specific to the current document. maxConnectionsPerServer Retrieves the maximum number of concurrent connections to a Web server. name Sets or retrieves a value that indicates the window name. offscreenBuffering Sets or retrieves whether objects are drawn offscreen before being made visible to the user. opener Sets or retrieves a reference to the window that created the current window. parent Retrieves the parent of the window in the object hierarchy. screenLeft Retrieves the x-coordinate of the upper left-hand corner of the window frame, relative to the upper left-hand corner of the screen. screenTop Retrieves the y-coordinate of the top corner of the client area, relative to the top corner of the screen. self Retrieves a reference to the current window or frame. sessionStorage Retrieves the Web Storage area for the session. status Sets or retrieves the message in the status bar at the bottom of the window. top Retrieves the topmost ancestor window.
Collection Description frames Retrieves a collection of all window objects defined by the given document or defined by the document associated with the given window.
Event Event Property Description abort onabort Fires when the user aborts the download. onafterprint Fires on the object immediately after its associated document prints or previews for printing. onbeforeprint Fires on the object before its associated document prints or previews for printing. http://msdn.microsoft.com/en-us/library/ms536907.aspx onbeforeunload Fires prior to a document being unloaded. blur onblur Fires when the object loses the input focus. drag ondrag Fires on the source object continuously during a drag operation. dragend ondragend Fires on the source object when the user releases the mouse at the close of a drag operation. dragenter ondragenter Fires on the target element when the user drags the object to a valid drop target. dragleave ondragleave Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation. dragover ondragover Fires on the target element continuously while the user drags the object over a valid drop target. dragstart ondragstart Fires on the source object when the user starts to drag a text selection or selected object. drop ondrop Fires on the target object when the mouse button is released during a drag-and-drop operation. error onerror Fires when an error occurs during object loading. focus onfocus Fires when the object receives focus. focusin onfocusin Fires for an element just prior to setting focus on that element. focusout onfocusout Fires for the current element with focus immediately after moving focus to another element. onhashchange
Raised when there are changes to the portion of a URL that follows the number sign (#).
onhelp Fires when the user presses the F1 key while the client is the active window. input oninput Occurs when the text content of an element is changed through the user interface. keydown onkeydown Fires when the user presses a key. keypress onkeypress Fires when the user presses an alphanumeric key. keyup onkeyup Fires when the user releases a key. load onload Fires immediately after the client loads the object. mousedown onmousedown Fires when the user clicks the object with either mouse button. mousemove onmousemove Fires when the user moves the mouse over the object. mouseout onmouseout Fires when the user moves the mouse pointer outside the boundaries of the object. mouseover onmouseover Fires when the user moves the mouse pointer into the object. mouseup onmouseup Fires when the user releases a mouse button while the mouse is over the object. mousewheel onmousewheel Fires when the wheel button is rotated. offline onoffline
Raised when Internet Explorer is working offline.
Raised when Internet Explorer is working online.
readystatechange onreadystatechange Fires when the state of the object has changed. onreset Fires when the user resets a form. http://msdn.microsoft.com/en-us/library/ms536959.aspx onresize Fires when the size of the object is about to change. scroll onscroll Fires when the user repositions the scroll box in the scroll bar on the object. select onselect Fires when the current selection changes. storage onstorage Fires when a Web Storage area is updated. onunload Fires immediately before the object is unloaded.
Method Description addEventListener Registers an event handler for the specified event type. alert
Displays a dialog box containing an application-defined message.
attachEvent Binds the specified function to an event, so that the function gets called whenever the event fires on the object. blur Causes the element to lose focus and fires the onblur event. clearInterval Cancels the interval previously started using the setInterval method. clearTimeout Cancels a time-out that was set with the setTimeout method. close
Closes the current browser window or HTML Application (HTA).
Displays a confirmation dialog box that contains an optional message as well as OK and Cancel buttons.
createPopup Creates a popup window object. detachEvent Unbinds the specified function from the event, so that the function stops receiving notifications when the event fires. dispatchEvent Sends an event to the current element. execScript Executes the specified script in the provided language. focus Causes the element to receive the focus and executes the code specified by the onfocus event. item Retrieves an object from various collections, including the all collection. moveBy
Moves the screen position of the window by the specified x and y offset values.
Moves the screen position of the upper-left corner of the window to the specified x and y position.
navigate Loads the specified URL to the current window. open
Opens a new window and loads the document specified by a given URL.
postMessage Sends a cross-document message. Prints the document associated with the window. prompt
Displays a dialog box that prompts the user with a message and an input field.
removeEventListener Removes an event handler that the addEventListener method registered. resizeBy
Changes the current size of the window by the specified x- and y-offset.
Sets the size of the window to the specified width and height values.
scroll Causes the window to scroll to the specified x- and y-offset at the upper-left corner of the window. scrollBy Causes the window to scroll relative to the current scrolled position by the specified x- and y-pixel offset. scrollTo Scrolls the window to the specified x- and y-offset. setInterval Evaluates an expression each time a specified number of milliseconds has elapsed. setTimeout Evaluates an expression after a specified number of milliseconds has elapsed. showHelp
Displays a Help file. This method can be used with Microsoft HTML Help.
Creates a modal dialog box that displays the specified HTML document.
Creates a modeless dialog box that displays the specified HTML document.
toStaticHTML Removes dynamic HTML elements and attributes from an HTML fragment.
Object Description clientInformation
Contains information about the browser.
clipboardData Provides access to predefined clipboard formats for use in editing operations. external
Allows access to an additional object model provided by host applications of the Internet Explorer browser components.
Contains information about the URLs visited by the client.
Image Creates and initializes a new img element. location Contains information about the current URL. navigator Contains information about the client. Option Creates and initializes a new option element. screen Contains information about the client's screen and rendering capabilities.
For more information on this and other DOM Prototypes see Document Object Model Prototypes, Part 1: Introduction.
This prototype does not derive from any objects.