The nsIDOMWindow interface is the primary interface for a DOM
window object. It represents a single window object that may
contain child windows if the document in the window contains a
HTML frameset document or if the document contains iframe elements.
@see http://www.whatwg.org/html/#window
Implements a safe message-passing system which can cross same-origin
boundaries.
This method, when called, causes a MessageEvent to be asynchronously
dispatched at the primary document for the window upon which this method is
called. (Note that the postMessage property on windows is allAccess and
thus is readable cross-origin.) The dispatched event will have message as
its data, the calling context’s window as its source, and an origin
determined by the calling context’s main document URI. The targetOrigin
argument specifies a URI and is used to restrict the message to be sent
only when the target window has the same origin as targetOrigin (since,
when the sender and the target have different origins, neither can read the
location of the other).
@see http://www.whatwg.org/html/#dom-window-postmessage
Method for accessing this window’s selection object.
Method for scrolling this window to an absolute pixel offset.
Method for scrolling this window to a pixel offset relative to
the current scroll position.
@see http://dev.w3.org/csswg/cssom/#dom-window-getcomputedstyle
Method for scrolling this window by a number of lines.
Method for scrolling this window by a number of pages.
Method for sizing this window to the content in the window.
Open a new window with this one as the parent. This method will
NOT examine the JS stack for purposes of determining a caller.
This window will be used for security checks during the search by
name and the default character set on the newly opened window
will just be the default character set of this window.
This method works like open except that aExtraArgument gets
converted into the array window.arguments in JS, if
aExtraArgument is a nsISupportsArray then the individual items in
the array are inserted into window.arguments, and primitive
nsISupports (nsISupportsPrimitives) types are converted to native
JS types when possible.
Request a refresh of this browser window.
@see http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/RequestAnimationFrame/Overview.html
Cancel a refresh callback.
Accessor for the document in this window.
Set/Get the name of this window.
This attribute is “replaceable” in JavaScript
Accessor for the object that controls whether or not scrollbars
are shown in this window.
This attribute is “replaceable” in JavaScript
top | gets the root of the window hierarchy. |
This function does not cross chrome-content boundaries, so if this
window’s parent is of a different type, |top| will return this window.
When script reads the top property, we run GetScriptableTop, which
will not cross an <iframe mozbrowser> boundary.
In contrast, C++ calls to GetTop are forwarded to GetRealTop, which
ignores <iframe mozbrowser> boundaries.
This property is “replaceable” in JavaScript.
You shouldn’t need to call this function directly; call GetTop instead.
|parent| gets this window’s parent window. If this window has no parent,
we return the window itself.
This property does not cross chrome-content boundaries, so if this
window’s parent is of a different type, we return the window itself as its
parent.
When script reads the property (or when C++ calls ScriptableTop), this
property does not cross <iframe mozbrowser> boundaries. In contrast, when
C++ calls GetParent, we ignore the mozbrowser attribute.
You shouldn’t need to read this property directly; call GetParent instead.
|frameElement| gets this window’s <iframe> or element, if it has one.
When script reads this property (or when C++ calls
ScriptableFrameElement), we return |null| if the window is inside an
<iframe mozbrowser>. In contrast, when C++ calls GetFrameElement, we
ignore the mozbrowser attribute.
You shouldn’t need to read this property directly; call GetFrameElement
instead.
Get the application cache object for this window.
Session storage for the current browsing context.
This attribute is a DOMStorage
Local storage for the current browsing context.
This attribute is a DOMStorage
Accessor for the current x scroll position in this window in
pixels.
This attribute is “replaceable” in JavaScript
Accessor for the current y scroll position in this window in
pixels.
This attribute is “replaceable” in JavaScript
Get the window root for this window. This is useful for hooking
up event listeners to this window and every other window nested
in the window root.
Accessor for the child windows in this window.
Set/Get the document scale factor as a multiplier on the default
size. When setting this attribute, a NS_ERROR_NOT_IMPLEMENTED
error may be returned by implementations not supporting
zoom. Implementations not supporting zoom should return 1.0 all
the time for the Get operation. 1.0 is equals normal size,
i.e. no zoom.
Returns the number of times this document for this window has
been painted to the screen.
The current animation start time in milliseconds since the epoch.
Console API