nsIDOMWindow

IID:a6cf906b-15b3-11d2-932e-00805f8add32
Inherits From:nsISupports

Properties

readonly nsIDOMDocument document

Accessor for the document in this window.

readonly nsIDOMWindowCollection frames

Accessor for the child windows in this window.

DOMString name

Set/Get the name of this window.

This attribute is "replaceable" in JavaScript

readonly nsIDOMWindow parent

Accessor for this window's parent window, or the window itself if there is no parent, or if the parent is of different type (i.e. this does not cross chrome-content boundaries).

readonly nsIDOMBarProp scrollbars

Accessor for the object that controls whether or not scrollbars are shown in this window.

This attribute is "replaceable" in JavaScript

readonly PRInt32 scrollX

Accessor for the current x scroll position in this window in pixels.

This attribute is "replaceable" in JavaScript

readonly PRInt32 scrollY

Accessor for the current y scroll position in this window in pixels.

This attribute is "replaceable" in JavaScript

float textZoom

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.

readonly nsIDOMWindow top

Accessor for the root of this hierarchy of windows. This root may be the window itself if there is no parent, or if the parent is of different type (i.e. this does not cross chrome-content boundaries).


Methods

nsISelection getSelection ( ) void scrollBy ( PRInt32 xScrollDif , PRInt32 yScrollDif ) void scrollByLines ( PRInt32 numLines ) void scrollByPages ( PRInt32 numPages ) void scrollTo ( PRInt32 xScroll , PRInt32 yScroll ) void sizeToContent ( )

nsISelection getSelection ( )

Method for accessing this window's selection object.


void scrollBy ( PRInt32 xScrollDif , PRInt32 yScrollDif )

Method for scrolling this window to a pixel offset relative to the current scroll position.

Arguments:
xScrollDif
yScrollDif

void scrollByLines ( PRInt32 numLines )

Method for scrolling this window by a number of lines.

Arguments:
numLines

void scrollByPages ( PRInt32 numPages )

Method for scrolling this window by a number of pages.

Arguments:
numPages

void scrollTo ( PRInt32 xScroll , PRInt32 yScroll )

Method for scrolling this window to an absolute pixel offset.

Arguments:
xScroll
yScroll

void sizeToContent ( )

Method for sizing this window to the content in the window.


References

This interface is the type of the following properties:

nsIAccessibleDocument.window, nsICommandHandlerInit.window, nsICommandLine.windowContext, nsIDOMJSWindow.frames, nsIDOMNSHTMLFrameElement.contentWindow, nsIDOMWindow.parent, nsIDOMWindow.top, nsIDOMWindowInternal.content, nsIDOMXULCommandDispatcher.focusedWindow, nsIProgressDialog.dialog, nsITypeAheadFind.currentWindow, nsIWebBrowser.contentDOMWindow, nsIWebBrowserFindInFrames.currentSearchFrame, nsIWebBrowserFindInFrames.rootSearchFrame, nsIWebBrowserFocus.focusedWindow, nsIWebBrowserPrint.currentChildDOMWindow, nsIWebProgress.DOMWindow, nsIWindowWatcher.activeWindow

This interface is passed as an argument to the following methods:

nsIAccessibleRetrieval.getAccessibleInWindow, nsIAddressBook.exportAddressBook, nsIBrowserDOMWindow.isTabContentWindow, nsIBrowserDOMWindow.openURI, nsIBrowserGlue.sanitize, nsICommandLineRunner.setWindowContext, nsICommandManager.doCommand, nsICommandManager.getCommandState, nsICommandManager.isCommandEnabled, nsICommandManager.isCommandSupported, nsICookiePromptService.cookieDialog, nsIDOMCanvasRenderingContext2D.drawWindow, nsIDownloadManager.open, nsIEditingSession.getEditorForWindow, nsIEditingSession.makeWindowEditable, nsIEditingSession.setEditorOnControllers, nsIEditingSession.setupEditorOnWindow, nsIEditingSession.tearDownEditorOnWindow, nsIEditingSession.windowIsEditable, nsIFilePicker.init, nsIJSConsoleService.open, nsIMapiRegistry.showMailIntegrationDialog, nsIMsgCompose.initEditor, nsIMsgStatusFeedback.setDocShell, nsIPrintingPromptService.showPageSetup, nsIPrintingPromptService.showPrintDialog, nsIPrintingPromptService.showPrinterProperties, nsIPrintingPromptService.showProgress, nsIProgressDialog.open, nsIPromptService.alert, nsIPromptService.alertCheck, nsIPromptService.confirm, nsIPromptService.confirmCheck, nsIPromptService.confirmEx, nsIPromptService.prompt, nsIPromptService.promptPassword, nsIPromptService.promptUsernameAndPassword, nsIPromptService.select, nsIRemoteService.registerWindow, nsISecureBrowserUI.init, nsIUpdatePrompt.showUpdateHistory, nsIWebBrowserPrint.printPreview, nsIWindowWatcher.getChromeForWindow, nsIWindowWatcher.getNewAuthPrompter, nsIWindowWatcher.getNewPrompter, nsIWindowWatcher.getWindowByName, nsIWindowWatcher.openWindow, nsIXPIDialogService.confirmInstall, nsPICommandUpdater.init, nsPIPromptService.doDialog, nsPIWindowWatcher.addWindow, nsPIWindowWatcher.openWindowJS, nsPIWindowWatcher.removeWindow

This interface is returned from the following methods:

nsIBrowserDOMWindow.openURI, nsIDOMJSWindow.open, nsIDOMJSWindow.openDialog, nsIDOMWindowCollection.item, nsIDOMWindowCollection.namedItem, nsIDOMWindowInternal.open, nsIDOMWindowInternal.openDialog, nsIWindowWatcher.getWindowByName, nsIWindowWatcher.openWindow, nsPIWindowWatcher.openWindowJS

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com