Packagedom
Classpublic class WindowProxy
InheritanceWindowProxy Inheritance Window Inheritance Object

Must proxy all operations to the Window object of the browsing context's active document. It is indistinguishable from that Window object in every way, except that it is not equal to it.

See also

http://www.whatwg.org/specs/web-apps/current-work/#windowproxy


Public Properties
 PropertyDefined By
 Inherited applicationCache : nsIDOMOfflineResourceList
[read-only] Non-Standard | Firefox 3+ Returns a reference to the application cache object for the window.
Window
 Inherited closed : Boolean
[read-only] DOM Level 0 This property indicates whether the referenced window is closed or not.
Window
 Inherited Components : nsIXPCComponents
[read-only] Non-Standard | Firefox The Components object is the object through which XPConnect functionality is reflected into JavaScript.
Window
 Inherited content : Window
[read-only] Non-Standard | Firefox Returns a Window object for the primary content window.
Window
 Inherited crypto : Crypto
[read-only] DOM Level 0 Returns the browser crypto object, which can then be used to manipulate various browser security features.
Window
 Inherited defaultStatus : DOMString
DOM Level 0 Gets/sets the status bar text for the given window.
Window
 Inherited directories : BarProp
[read-only] DOM Level 0 Returns the window directories toolbar object.
Window
 Inherited document : DocumentView
[read-only] The source DocumentView of which this is an AbstractView.
Window
 Inherited frameElement : Element
[read-only] DOM Level 0 Returns the element (such as <iframe> or <object>) in which the window is embedded, or null if the window is top-level.
Window
 Inherited frames : Array
[read-only] DOM Level 0 Returns an array-like object, listing the direct sub-frames of the current window.
Window
 Inherited fullScreen : Boolean
DOM Level 0 | Firefox 3+ This property indicates whether the window is displayed in full screen mode or not.
Window
 Inherited globalStorage : Object
[read-only] Non-Standard | Firefox 2 This is a global object (globalStorage) that maintains multiple private storage areas that can be used to hold data over a long period of time (e.g.
Window
 Inherited history : History
[read-only] DOM Level 0 Returns a reference to the History object, which provides an interface for manipulating the browser session history (pages visited in the tab or frame that the current page is loaded in).
Window
 InheritedHTML 5 innerHeight : Number
[read-only] Height of the browser window viewport including, if rendered, the horizontal scrollbar.
Window
 InheritedHTML 5 innerWidth : Number
[read-only] Width of the browser window viewport including, if rendered, the vertical scrollbar.
Window
 Inherited length : Number
[read-only] DOM Level 0 Returns the number of frames (either frame or iframe elements) in the window.
Window
 Inherited localStorage : Storage
[read-only] Web Storage This is a global object that maintains multiple private storage areas that can be used to hold data over a long period of time (e.g.
Window
 Inherited location : Location
[read-only] DOM Level 0 Returns a Location object, which contains information about the URL of the document and provides methods for changing that URL.
Window
 Inherited locationbar : BarProp
[read-only] DOM Level 0 Returns the locationbar object, whose visibility can be toggled in the window.
Window
 InheritedHTML 5 media : Media
[read-only] Returns an Media object.
Window
 Inherited menubar : BarProp
[read-only] DOM Level 0 Returns the menubar object, whose visibility can be toggled in the window.
Window
 Inherited name : DOMString
DOM Level 0 Gets/sets the name of the window.
Window
 Inherited navigator : Navigator
[read-only] DOM Level 0 Returns a reference to the navigator object, which can be queried for information about the application running the script.
Window
 Inherited onabort : Function
An event handler for abort events sent to the window.
Window
 Inherited onbeforeunload : Function
An event that fires before the unload event when the page is unloaded.
Window
 Inherited onblur : Function
DOM Level 0 The onblur property can be used to set the blur handler on the window, which is triggered when the window loses focus.
Window
 Inherited onchange : Function
An event handler for change events sent to the window.
Window
 Inherited onclick : Function
Called when the user clicks the mouse button while the cursor is in the window.
Window
 Inherited onclose : Function
An event handler for close events sent to the window.
Window
 Inherited oncontextmenu : Function
An event handler property for right-click events on the window.
Window
 Inherited ondragdrop : Function
An event handler for drag and drop events sent to the window.
Window
 Inherited onerror : Function
An event handler for error events sent to the window.
Window
 Inherited onfocus : Function
An event handler for focus events sent to the window.
Window
 Inherited onkeydown : Function
An event handler for the keydown event on the window.
Window
 Inherited onkeypress : Function
An event handler for the keypress event on the window.
Window
 Inherited onkeyup : Function
An event handler for the keyup event on the window.
Window
 Inherited onload : Function
DOM Level 0 An event handler for the load event of a window.
Window
 Inherited onmousedown : Function
An event handler for the mousedown event on the window.
Window
 Inherited onmousemove : Function
An event handler for the mousemove event on the window.
Window
 Inherited onmouseout : Function
An event handler for the mouseout event on the window.
Window
 Inherited onmouseover : Function
An event handler for the mouseover event on the window.
Window
 Inherited onmouseup : Function
An event handler for the mouseup event on the window.
Window
 Inherited onpaint : Function
DOM Level 0 An event handler for the paint event on the window.
Window
 Inherited onreset : Function
An event handler for the reset event on the window.
Window
 Inherited onresize : Function
An event handler for the resize event on the window.
Window
 Inherited onscroll : Function
Specifies the function to be called when the window is scrolled.
Window
 Inherited onselect : Function
An event handler for the select event on the window.
Window
 Inherited onsubmit : Function
An event handler for the submit event on the window.
Window
 Inherited onunload : Function
DOM Level 0 The unload event is raised when the document is unloaded.
Window
 Inherited opener : WindowProxy
[read-only] DOM Level 0 Returns a reference to the window that opened this current window.
Window
 InheritedHTML 5 outerHeight : Number
[read-only] Gets the height of the outside of the browser window.
Window
 InheritedHTML 5 outerWidth : Number
[read-only] Gets the width of the outside of the browser window.
Window
 InheritedHTML 5 pageXOffset : Number
[read-only] Returns the number of pixels that the document has already been scrolled horizontally.
Window
 InheritedHTML 5 pageYOffset : Number
[read-only] Returns the number of CSS pixels the user has scrolled towards the bottom within the viewport.
Window
 Inherited parent : Window
[read-only] DOM Level 0 Returns a reference to the parent of the current window or subframe.
Window
 Inherited personalbar : BarProp
[read-only] Returns the personalbar object, whose visibility can be toggled in the window.
Window
 Inherited pkcs11 : Pkcs11
[read-only] DOM Level 0 Returns the pkcs11 object , which can be used to install drivers and other software associated with the pkcs11 protocol.
Window
 Inherited returnValue : *
[read-only] Non-Standard? | Firefox 3+ The return value to be returned to the function that called window.showModalDialog() to display the window as a modal dialog.
Window
 InheritedHTML 5 screen : Screen
[read-only] Returns a reference to the screen object associated with the window.
Window
 InheritedHTML 5 screenX : Number
[read-only] Returns the horizontal distance of the left border of the user's browser from the left side of the screen.
Window
 InheritedHTML 5 screenY : Number
[read-only] Returns the vertical distance of the top border of the user's browser from the top edge of the screen.
Window
 Inherited scrollbars : BarProp
[read-only] DOM Level 0 Returns the scrollbars object, whose visibility can be toggled in the window.
Window
 Inherited scrollMaxX : Number
[read-only] DOM Level 0 Returns the maximum number of pixels that the document can be scrolled horizontally.
Window
 Inherited scrollMaxY : Number
[read-only] DOM Level 0 Returns the maximum number of pixels that the document can be scrolled vertically.
Window
 Inherited scrollX : Number
[read-only] DOM Level 0 Returns the number of pixels that the document has already been scrolled horizontally.
Window
 Inherited scrollY : Number
[read-only] DOM Level 0 Returns the number of pixels that the document has already been scrolled vertically.
Window
 Inherited self : WindowProxy
[read-only] Returns a self-reference.
Window
 Inherited sessionStorage : Storage
[read-only] HTML5 | Firefox 3+ This is a global object (sessionStorage) that maintains a storage area that's available for the duration of the page session.
Window
 Inherited sidebar : Sidebar
[read-only] Non-Standard | Firefox Returns a reference to the window object of the sidebar.
Window
 Inherited status : DOMString
DOM Level 0 Sets the text in the status bar at the bottom of the browser or returns the previously set text.
Window
 Inherited statusbar : BarProp
[read-only] DOM Level 0 Returns the statusbar object, whose visibility can be toggled in the window.
Window
 Inherited toolbar : BarProp
[read-only] DOM Level 0 Returns the toolbar object, whose visibility can be toggled in the window.
Window
 Inherited top : WindowProxy
[read-only] DOM Level 0 Returns a reference to the topmost window in the window hierarchy.
Window
 Inherited window : WindowProxy
[read-only] Returns a self-reference.
Window
Public Methods
 MethodDefined By
 Inherited
 addEventListener(type:DOMString, listener:EventListener, useCapture:Boolean):void
Associates a function with a particular event and binds the event to the current node.
Window
 Inherited
 addEventListenerNS(namespaceURI:DOMString, type:DOMString, listener:EventListener, useCapture:Boolean):void
Registers an event listener, depending on the useCapture parameter, on the capture phase of the DOM event flow or its target and bubbling phases.
Window
 Inherited
 alert(message:DOMString):void
DOM Level 0 Display an alert dialog with the specified content and an OK button.
Window
 Inherited
 atob(encodedData:DOMString):DOMString
DOM Level 0 Decodes a string of data which has been encoded using base-64 encoding.
Window
 Inherited
 back():void
DOM Level 0 Returns the window to the previous item in the history.
Window
 Inherited
 blur():void
DOM Level 0 Shifts focus away from the window.
Window
 Inherited
 btoa(stringToEncode:DOMString):DOMString
DOM Level 0 Creates a base-64 encoded ASCII string from a string of binary data.
Window
 Inherited
 captureEvents(eventType:DOMString):void
DOM Level 0 | OBSOLETE Registers the window to capture all events of the specified type.
Window
 Inherited
 clearInterval(timerID:Number):void
DOM Level 0 Cancels repeated action which was set up using setInterval().
Window
 Inherited
 clearTimeout(timerID:Number):void
DOM Level 0 Clears the delay set by window.setTimeout().
Window
 Inherited
 close():void
DOM Level 0 Closes the current window, or a referenced window.
Window
 Inherited
 confirm(message:DOMString):Boolean
DOM Level 0 Displays a modal dialog with a message and two buttons, OK and Cancel.
Window
 Inherited
Undocumented
Window
 Inherited
 dispatchEvent(event:Event):Boolean
Dispatches an event to fire on a node artificially.
Window
 Inherited
 dump(message:DOMString):void
DOM Level 0 Prints messages to the console.
Window
 Inherited
Undocumented
Window
 Inherited
DOM Level 0 Encodes a string, replacing certain characters with a hexadecimal escape sequence.
Window
 Inherited
 find(string:DOMString, caseSensitive:Boolean, backwards:Boolean, wrapAround:Boolean, wholeWord:Boolean, searchInFrames:Boolean, showDialog:Boolean):Boolean
DOM Level 0 Finds a string in a window.
Window
 Inherited
 focus():void
DOM Level 0 Sets focus on the window.
Window
 Inherited
 forward():void
DOM Level 0 Moves the window one document forward in the history.
Window
 Inherited
Undocumented
Window
 Inherited
 getAttention():void
DOM Level 0 Attempts to get the user's attention.
Window
 Inherited
Undocumented
Window
 Inherited
This method is used to get the computed style as it is defined in CSS2.
Window
 Inherited
DOM Level 0 Returns a selection object representing the range of text selected by the user.
Window
 Inherited
 home():void
DOM Level 0 Returns the window to the home page.
Window
 Inherited
 maximize():void
Undocumented
Window
 Inherited
 minimize():void
Undocumented
Window
 Inherited
 moveBy(deltaX:Number, deltaY:Number):void
DOM Level 0 Moves the current window by a specified amount.
Window
 Inherited
 moveTo(x:Number, y:Number):void
DOM Level 0 Moves the window to the specified coordinates.
Window
 Inherited
 open(url:DOMString, windowName:DOMString, windowFeatures:DOMString):WindowProxy
DOM Level 0 Creates a new secondary browser window and loads the referenced resource.
Window
 Inherited
 openDialog(url:DOMString, name:DOMString, features:DOMString, ... args):WindowProxy
DOM Level 0 window.openDialog is an extension to window.open.
Window
 Inherited
 postMessage(message:DOMString, targetOrigin:DOMString):void
HTML5 | Firefox 3 window.postMessage is a method for safely enabling cross-origin communication.
Window
 Inherited
 print():void
DOM Level 0 Opens the Print Dialog to print the current document.
Window
 Inherited
DOM Level 0 Displays a dialog with a message prompting the user to input some text.
Window
 Inherited
Undocumented
Window
 Inherited
 releaseEvents(eventType:DOMString):void
DOM Level 0 | OBSOLETE Releases the window from trapping events of a specific type.
Window
 Inherited
 removeEventListener(type:DOMString, listener:EventListener, useCapture:Boolean):void
Removes an event listener.
Window
 Inherited
 removeEventListenerNS(namespaceURI:DOMString, type:DOMString, listener:EventListener, useCapture:Boolean):void
Removes an event listener.
Window
 Inherited
 resizeBy(xDelta:Number, yDelta:Number):void
DOM Level 0 Resizes the current window by a certain amount.
Window
 Inherited
 resizeTo(width:Number, height:Number):void
DOM Level 0 Dynamically resizes window.
Window
 Inherited
 restore():void
Undocumented
Window
 Inherited
 routeEvent():void
Undocumented
Window
 Inherited
 scroll(xCoord:Number, yCoord:Number):void
DOM Level 0 Scrolls the window to a particular place in the document.
Window
 Inherited
 scrollBy(x:Number, y:Number):void
DOM Level 0 Scrolls the document in the window by the given amount.
Window
 Inherited
 scrollByLines(lines:Number):void
DOM Level 0 Scrolls the document by the given number of lines.
Window
 Inherited
 scrollByPages(pages:Number):void
DOM Level 0 Scrolls the current document by the specified number of pages.
Window
 Inherited
 scrollTo(xCoord:Number, yCoord:Number):void
DOM Level 0 Scrolls to a particular set of coordinates in the document.
Window
 Inherited
 setCursor(state:DOMString):void
DOM Level 0 Changes the cursor for the current window.
Window
 Inherited
 setInterval(func:Function, delay:Number):Number
DOM Level 0 Calls a function repeatedly, with a fixed time delay between each call to that function.
Window
 Inherited
 setResizable():void
Undocumented
Window
 Inherited
 setTimeout(func:Function, delay:Number):Number
DOM Level 0 Executes a code snippet or a function after specified delay.
Window
 Inherited
 showModalDialog(uri:DOMString, arguments:DOMString = null, options:* = null):*
Non-Standard | IE4 Firefox3 Creates and displays a modal dialog box containing a specified HTML document.
Window
 Inherited
 sizeToContent():void
DOM Level 0 Sizes the window according to its content.
Window
 Inherited
 stop():void
DOM Level 0 This method stops window loading.
Window
 Inherited
DOM Level 0 Decodes a value that has been encoded in hexadecimal (e.g., a cookie).
Window
 Inherited
 updateCommands(commandName:DOMString):void
DOM Level 0 Updates the state of commands of the current chrome window (UI).
Window
 Inherited
Undocumented
Window
 Inherited
Undocumented
Window