DOMWindow

extern class js.html.DOMWindowextends EventTargetAvailable in js

This section provides a brief reference for all of the methods, properties, and events available through the DOM window object. The window object implements the Window interface, which in turn inherits from the AbstractView interface. Some additional global functions, namespaces objects, and constructors, not typically associated with the window, but available on it, are listed in the JavaScript Reference.

The window object represents the window itself. The document property of a window points to the DOM document loaded in that window. A window for a given document can be obtained using the document.defaultView property.

In a tabbed browser, such as Firefox, each tab contains its own window object (and if you're writing an extension, the browser window itself is a separate window too - see Working with windows in chrome code for more information). That is, the window object is not shared between tabs in the same window. Some methods, namely window.resizeTo and window.resizeBy apply to the whole window and not to the specific tab the window object belongs to. Generally, anything that can't reasonably pertain to a tab pertains to the window instead.



Documentation for this class was provided by MDN.
var applicationCache(default,null) : DOMApplicationCacheAn nsIDOMOfflineResourceList object providing access to the offline resources for the window. var clientInformation(default,null) : Navigator var closed(default,null) : Bool
This property indicates whether the current window is closed or not.
window.Components
The entry point to many XPCOM features. Some properties, e.g. classes, are only available to sufficiently privileged code.
var console(default,null) : Console var crypto(default,null) : CryptoReturns the browser crypto object. var defaultStatus : StringGets/sets the status bar text for the given window. var defaultstatus : String var devicePixelRatio(default,null) : Float var document(default,null) : DocumentReturns a reference to the document that the window contains. var event(default,null) : Event var frameElement(default,null) : ElementReturns the element in which the window is embedded, or null if the window is not embedded. var frames(default,null) : DOMWindowReturns an array of the subframes in the current window. var history(default,null) : HistoryReturns a reference to the history object. var indexedDB(default,null) : Factory var innerHeight(default,null) : IntGets the height of the content area of the browser window including, if rendered, the horizontal scrollbar. var innerWidth(default,null) : IntGets the width of the content area of the browser window including, if rendered, the vertical scrollbar. var length(default,null) : IntReturns the number of frames in the window. See also window.frames . var localStorage(default,null) : StorageReturns a reference to the local storage object used to store data that may only be accessed by the origin that created it. Getter throws DOMException. var location : LocationGets/sets the location, or current URL, of the window object. var locationbar(default,null) : BarInfoReturns the locationbar object, whose visibility can be toggled in the window. var menubar(default,null) : BarInfoReturns the menubar object, whose visibility can be toggled in the window. var name : StringGets/sets the name of the window. var navigator(default,null) : NavigatorReturns a reference to the navigator object. var notifications(default,null) : NotificationCenter var offscreenBuffering(default,null) : Bool var onabort : EventListenerAn event handler property for abort events on the window. var onanimationend : EventListener var onanimationiteration : EventListener var onanimationstart : EventListener var onbeforeunload : EventListenerAn event handler property for before-unload events on the window. var onblur : EventListenerAn event handler property for blur events on the window. var oncanplay : EventListener var oncanplaythrough : EventListener var onchange : EventListenerAn event handler property for change events on the window. var onclick : EventListenerAn event handler property for click events on the window. var oncontextmenu : EventListenerAn event handler property for right-click events on the window. var ondblclick : EventListener var ondevicemotion : EventListener var ondeviceorientation : EventListener var ondrag : EventListener var ondragend : EventListener var ondragenter : EventListener var ondragleave : EventListener var ondragover : EventListener var ondragstart : EventListener var ondrop : EventListener var ondurationchange : EventListener var onemptied : EventListener var onended : EventListener var onerror : EventListenerAn event handler property for errors raised on the window. var onfocus : EventListenerAn event handler property for focus events on the window. var onhashchange : EventListenerAn event handler property for hash change events on the window; called when the part of the URL after the hash mark ("#") changes. var oninput : EventListener var oninvalid : EventListener var onkeydown : EventListenerAn event handler property for keydown events on the window. var onkeypress : EventListenerAn event handler property for keypress events on the window. var onkeyup : EventListenerAn event handler property for keyup events on the window. var onload : EventListenerAn event handler property for window loading. var onloadeddata : EventListener var onloadedmetadata : EventListener var onloadstart : EventListener var onmessage : EventListener var onmousedown : EventListenerAn event handler property for mousedown events on the window. var onmousemove : EventListenerAn event handler property for mousemove events on the window. var onmouseout : EventListenerAn event handler property for mouseout events on the window. var onmouseover : EventListenerAn event handler property for mouseover events on the window. var onmouseup : EventListenerAn event handler property for mouseup events on the window. var onmousewheel : EventListener var onoffline : EventListener var ononline : EventListener var onpagehide : EventListenerAn event handler property for pagehide events on the window. var onpageshow : EventListenerAn event handler property for pageshow events on the window. var onpause : EventListener var onplay : EventListener var onplaying : EventListener var onpopstate : EventListenerAn event handler property for popstate events, which are fired when navigating to a session history entry representing a state object. var onprogress : EventListener var onratechange : EventListener var onreset : EventListenerAn event handler property for reset events on the window. var onresize : EventListenerAn event handler property for window resizing. var onscroll : EventListenerAn event handler property for window scrolling. var onsearch : EventListener var onseeked : EventListener var onseeking : EventListener var onselect : EventListenerAn event handler property for window selection. var onstalled : EventListener var onstorage : EventListener var onsubmit : EventListenerAn event handler property for submits on window forms. var onsuspend : EventListener var ontimeupdate : EventListener var ontouchcancel : EventListener var ontouchend : EventListener var ontouchmove : EventListener var ontouchstart : EventListener var ontransitionend : EventListener var onunload : EventListenerAn event handler property for unload events on the window. var onvolumechange : EventListener var onwaiting : EventListener var opener(default,null) : DOMWindowReturns a reference to the window that opened this current window. var outerHeight(default,null) : IntGets the height of the outside of the browser window. var outerWidth(default,null) : IntGets the width of the outside of the browser window. var pagePopupController(default,null) : PagePopupController var pageXOffset(default,null) : IntAn alias for window.scrollX . var pageYOffset(default,null) : IntAn alias for window.scrollY var parent(default,null) : DOMWindowReturns a reference to the parent of the current window or subframe. var performance(default,null) : Performance var personalbar(default,null) : BarInfoReturns the personalbar object, whose visibility can be toggled in the window. var screen(default,null) : ScreenReturns a reference to the screen object associated with the window. var screenLeft(default,null) : Int var screenTop(default,null) : Int var screenX(default,null) : IntReturns the horizontal distance of the left border of the user's browser from the left side of the screen. var screenY(default,null) : IntReturns the vertical distance of the top border of the user's browser from the top side of the screen. var scrollX(default,null) : IntReturns the number of pixels that the document has already been scrolled horizontally. var scrollY(default,null) : IntReturns the number of pixels that the document has already been scrolled vertically. var scrollbars(default,null) : BarInfoReturns the scrollbars object, whose visibility can be toggled in the window. var self(default,null) : DOMWindowReturns an object reference to the window object itself. var sessionStorage(default,null) : StorageA storage object for storing data within a single page session. Getter throws DOMException. var status : StringGets/sets the text in the statusbar at the bottom of the browser. var statusbar(default,null) : BarInfoReturns the statusbar object, whose visibility can be toggled in the window. var storageInfo(default,null) : StorageInfo var styleMedia(default,null) : StyleMedia var toolbar(default,null) : BarInfoReturns the toolbar object, whose visibility can be toggled in the window. var top(default,null) : DOMWindow
Returns a reference to the topmost window in the window hierarchy. This property is read only.
window.URL Requires Gecko 2.0
A DOM URL object, which provides the window.URL.createObjectURL() and window.URL.revokeObjectURL() methods.
var window(default,null) : DOMWindow
Returns a reference to the current window.
window[0], window[1], etc.
Returns a reference to the window object in the frames. See window.frames for more details.
function alert( message : String ) : Void function atob( ?string : String ) : String function blur() : Void function btoa( ?string : String ) : String function cancelAnimationFrame( id : Int ) : Void function cancelRequestAnimationFrame( id : Int ) : Void function captureEvents() : Void function clearInterval( handle : Int ) : Void function clearTimeout( handle : Int ) : Void function close() : Void function confirm( message : String ) : Bool function convertPointFromNodeToPage( node : Node, p : Point ) : Point function convertPointFromPageToNode( node : Node, p : Point ) : Point function find( string : String, caseSensitive : Bool, backwards : Bool, wrap : Bool, wholeWord : Bool, searchInFrames : Bool, showDialog : Bool ) : Bool function focus() : Void function getComputedStyle( element : Element, ?pseudoElement : String ) : CSSStyleDeclaration function getMatchedCSSRules( element : Element, ?pseudoElement : String ) : CSSRuleList function getSelection() : DOMSelection function matchMedia( query : String ) : MediaQueryList function moveBy( x : Float, y : Float ) : Void function moveTo( x : Float, y : Float ) : Void function open( url : String, name : String, ?options : String ) : DOMWindow function openDatabase( name : String, version : String, displayName : String, estimatedSize : Int, ?creationCallback : DatabaseCallback ) : Database function postMessage( message : Dynamic, targetOrigin : String, messagePorts : Array<Dynamic> ) : VoidProvides a secure means for one window to send a string of data to another window, which need not be within the same domain as the first, in a secure manner. Throws DOMException. function print() : Void function prompt( message : String, ?defaultValue : String ) : String function releaseEvents() : Void function requestAnimationFrame( callback_ : RequestAnimationFrameCallback ) : Int function requestFileSystem( type : Int, size : Int, successCallback : FileSystemCallback, ?errorCallback : ErrorCallback ) : Void function resizeBy( x : Float, y : Float ) : Void function resizeTo( width : Float, height : Float ) : Void function resolveLocalFileSystemURL( url : String, successCallback : EntryCallback, ?errorCallback : ErrorCallback ) : Void function scroll( x : Int, y : Int ) : Void function scrollBy( x : Int, y : Int ) : Void function scrollTo( x : Int, y : Int ) : Void function setInterval( handler : Void -> Void, timeout : Int ) : Int function setTimeout( handler : Void -> Void, timeout : Int ) : Int function showModalDialog( url : String, ?dialogArgs : Dynamic, ?featureArgs : String ) : Dynamic function stop() : Void static inline var PERSISTENT : Int static inline var TEMPORARY : Int
version #19193, modified 2013-05-08 11:06:13 by api
0 comment