nsIDOMWindowInternal

This interface is part of a chain of interfaces used to represent a window in the DOM.
28
Introduced
Gecko 1.0
Deprecated
Gecko 8.0
Inherits from: nsIDOMWindow Last changed in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4)

Gecko 8.0 note
(Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5)

In Gecko 8.0 this Interface was merged into the nsIDOMWindow interface.

This interface no longer has any members; it exists solely to prevent add-ons that reference it from failing completely. Add-ons should be updated to use nsIDOMWindow instead.

It provides many of the common functions used in JavaScript such as alert() or open().

Note: Because most of nsIDOMWindowInternal's functions and attributes are well documented in window, those articles are linked to rather than re-documented. However, they are not guaranteed to document all available arguments (i.e. see window.prompt).

Method overview

Firefox 3.5 note

The prompt() and find() methods changed in Firefox 3.5 to make all their parameters optional; in previous versions, all parameters were required.

void alert(in DOMString text)
boolean confirm(in DOMString text)
DOMString prompt([optional] in DOMString aMessage, [optional] in DOMString aInitial, [optional] in DOMString aTitle, [optional] in unsigned long aSavePassword)
void focus()
void blur()
void back()
void forward()
void home()
void stop()
void print()
void moveTo(in long xPos, in long yPos)
void moveBy(in long xDif, in long yDif)
void resizeTo(in long width, in long height)
void resizeBy(in long widthDif, in long heightDif)
void scroll(in long xScroll, in long yScroll)
nsIDOMWindow open(in DOMString url, in DOMString name, in DOMString options)
nsIDOMWindow nsISupports aExtraArgument)
void close()
void updateCommands(in DOMString action)
boolean find([optional] in DOMString str,[optional] in boolean caseSensitive, [optional] in boolean backwards, [optional] in boolean wrapAround, [optional] in boolean wholeWord, [optional] in boolean searchInFrames, [optional] in boolean showDialog)
DOMString atob(in DOMString aAsciiString)
DOMString btoa(in DOMString aBase64Data)
nsIVariant nsIVariant aArgs,[optional] in DOMString aOptions)
void postMessage(in DOMString message, in DOMString targetOrigin)

Attributes

Attribute Type Description
window nsIDOMWindowInternal Readonly: The window object itself.
self nsIDOMWindowInternal Readonly: Returns an object reference to the window object.
navigator nsIDOMNavigator Readonly: Returns a reference to the navigator object.
screen nsIDOMScreen Readonly: Returns a reference to the screen object associated with the window.
history nsIDOMHistory Readonly: Returns a reference to the History object, which provides an interface for manipulating the browser session history.
content nsIDOMWindow Readonly: Returns a Window object for the primary content window.
prompter nsIPrompt Readonly:
menubar nsIDOMBarProp Readonly: Returns the menubar object, whose visibility can be toggled in the window.
toolbar nsIDOMBarProp Readonly: Returns the toolbar object, whose visibility can be toggled in the window.
locationbar nsIDOMBarProp Readonly: Returns the locationbar object, whose visibility can be toggled in the window.
personalbar nsIDOMBarProp Readonly: Returns the personalbar object, whose visibility can be toggled in the window.
statusbar nsIDOMBarProp Readonly: Returns the statusbar object, whose visibility can be toggled in the window.
directories nsIDOMBarProp Readonly: Returns the window directories toolbar object.
closed boolean Readonly: This property indicates whether the referenced window is closed or not.
crypto nsIDOMCrypto Readonly: Returns the browser crypto object, which can then be used to manipulate various browser security features.
pkcs11 nsIDOMPkcs11 Obsolete: this property is not supported in newer versions of Firefox.
controllers nsIControllers Readonly: Returns the XUL controllers of the chrome window.
opener nsIDOMWindowInternal Returns a reference to the window that opened this current window.
status DOMString Sets the text in the status bar at the bottom of the browser or returns the previously set text.
defaultStatus DOMString Gets/sets the status bar text for the given window.
location nsIDOMLocation Readonly: Returns a nsIDOMLocation object, which contains information about the URL of the document.
innerWidth long Width of the browser window.
innerHeight long Height of the browser window.
outerWidth long Gets the width of the outside of the browser window.
outerHeight long Gets the height of the outside of the browser window.
screenX long The horizontal distance of the left border of the user's browser from the left side of the screen.
screenY long The vertical distance of the top border of the user's browser from the top edge of the screen.
pageXOffset long Returns the number of pixels that the document has already been scrolled horizontally.
pageYOffset long Returns the number of pixels that the document has already been scrolled vertically.
scrollMaxX long Returns the maximum number of pixels that the document can be scrolled horizontally.
scrollMaxY long Returns the maximum number of pixels that the document can be scrolled vertically.
length unsigned long Readonly: Returns the number of frames in the window.
fullScreen boolean Whether the window is displayed in full screen mode or not
frameElement nsIDOMElement Readonly: The element in which the window is embedded, or null if the window is top-level.
URL nsIDOMMozURLProperty

Readonly: A DOM URL object, which provides the window.URL.createObjectURL() and window.URL.revokeObjectURL() methods.

Note: Prior to Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4), this attribute was part of nsIDOMWindow_2_0_BRANCH.

 

Document Tags and Contributors

Contributors to this page: Benjamin Smedberg, Wjjohnst, trevorh, Jürgen Jeka, Sheppy
Last updated by: Sheppy,