## com.gargoylesoftware.htmlunit
Interface WebWindow

All Superinterfaces:
  java.io.Serializable

All Known Implementing Classes:
  DialogWindow, FrameWindow, TopLevelWindow, WebWindowImpl

    public interface WebWindow

extends java.io.Serializable

An interface that represents one window in a browser. It could be a top level window or a frame.

Version:
  $Revision: 4756 $
Author:
  Mike Bowler, David K. Taylor, David D. Kilzer

Method Summary
`Page` `getEnclosedPage()` Returns the currently loaded page or null if no page has been loaded.
`History` `getHistory()` Returns this window's navigation history.
`com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManager` `getJobManager()` INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. Returns the job manager for this window.
`java.lang.String` `getName()` Returns the name of this window.
`WebWindow` `getParentWindow()` Returns the window that contains this window.
`java.lang.Object` `getScriptObject()` INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. Returns the JavaScript object that corresponds to this element.
`WebWindow` `getTopWindow()` Returns the top level window that contains this window.
`WebClient` `getWebClient()` Returns the web client that "owns" this window.
`void` `setEnclosedPage(Page page)` Sets the currently loaded page.
`void` `setName(java.lang.String name)` Sets the name of this window.
`void` `setScriptObject(java.lang.Object scriptObject)` INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK. Sets the JavaScript object that corresponds to this element.

Method Detail

### getName

    java.lang.String getName()

  Returns the name of this window.

  Returns:
    the name of this window

### setName

    void setName(java.lang.String name)

  Sets the name of this window.

  Parameters:
    `name` - the new window name

### getEnclosedPage

    Page getEnclosedPage()

  Returns the currently loaded page or null if no page has been loaded.

  Returns:
    the currently loaded page or null if no page has been loaded

### setEnclosedPage

    void setEnclosedPage(Page page)

  Sets the currently loaded page.

  Parameters:
    `page` - the new page or null if there is no page (ie empty window)

### getParentWindow

    WebWindow getParentWindow()

  Returns the window that contains this window. If this is a top level window, then return this window.

  Returns:
    the parent window or this window if there is no parent

### getTopWindow

    WebWindow getTopWindow()

  Returns the top level window that contains this window. If this is a top level window, then return this window.

  Returns:
    the top level window that contains this window or this window if there is no parent.

### getWebClient

    WebClient getWebClient()

  Returns the web client that "owns" this window.

  Returns:
    the web client or null if this window has been closed

### getHistory

    History getHistory()

  Returns this window's navigation history.

  Returns:
    this window's navigation history

### setScriptObject

    void setScriptObject(java.lang.Object scriptObject)

  INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
  Sets the JavaScript object that corresponds to this element. This is not guaranteed to be set even if there is a JavaScript object for this HTML element.

  Parameters:
    `scriptObject` - the JavaScript object

### getScriptObject

    java.lang.Object getScriptObject()

  INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
  Returns the JavaScript object that corresponds to this element.

  Returns:
    the JavaScript object that corresponds to this element

### getJobManager

    com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManager getJobManager()

  INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
  Returns the job manager for this window.

  Returns:
    the job manager for this window

Copyright © 2002-2011 Gargoyle Software Inc.. All Rights Reserved.