## com.gargoylesoftware.htmlunit.html
Class FrameWindow

    java.lang.Object
      com.gargoylesoftware.htmlunit.WebWindowImpl
          com.gargoylesoftware.htmlunit.html.FrameWindow

All Implemented Interfaces:
  WebWindow, java.io.Serializable

    public class FrameWindow

extends WebWindowImpl

The web window for a frame or iframe.

Version:
  $Revision: 4756 $
Author:
  Brad Clarke, Ahmed Ashour
See Also:
  Serialized Form

Method Summary
`HtmlPage` `getEnclosingPage()` Returns the HTML page in which the <frame> or <iframe> tag is contained for this frame window.
`BaseFrame` `getFrameElement()` Gets the DOM node of the (i)frame containing this window.
`java.lang.String` `getName()` Returns the name of this window.
`WebWindow` `getParentWindow()` Returns the window that contains this window.
`WebWindow` `getTopWindow()` Returns the top level window that contains this window.
`protected boolean` `isJavaScriptInitializationNeeded()` Returns `true` if this window needs JavaScript initialization to occur when the enclosed page is set.
`void` `setName(java.lang.String name)` Sets the name of this window.
`java.lang.String` `toString()` Gives a basic representation for debugging purposes.

Methods inherited from class com.gargoylesoftware.htmlunit.WebWindowImpl
`addChildWindow, getEnclosedPage, getHistory, getJobManager, getScriptObject, getWebClient, performRegistration, setEnclosedPage, setJobManager, setScriptObject`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### getName

    public java.lang.String getName()

  Returns the name of this window. A FrameWindow shares it's name with it's containing frame.

  Specified by:
    `getName` in interface `WebWindow`
  Overrides:
    `getName` in class `WebWindowImpl`
  Returns:
    the name of this window

### setName

    public void setName(java.lang.String name)

  Sets the name of this window. A FrameWindow shares it's name with it's containing frame.

  Specified by:
    `setName` in interface `WebWindow`
  Overrides:
    `setName` in class `WebWindowImpl`
  Parameters:
    `name` - the new window name

### getParentWindow

    public 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

    public 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.

### isJavaScriptInitializationNeeded

    protected boolean isJavaScriptInitializationNeeded()

  Returns `true` if this window needs JavaScript initialization to occur when the enclosed page is set.

  Specified by:
    `isJavaScriptInitializationNeeded` in class `WebWindowImpl`
  Returns:
    `true` if this window needs JavaScript initialization to occur when the enclosed page is set

### getEnclosingPage

    public HtmlPage getEnclosingPage()

  Returns the HTML page in which the <frame> or <iframe> tag is contained for this frame window. This is a facility method for `(HtmlPage) (getParentWindow().getEnclosedPage())`.

  Returns:
    the page in the parent window

### getFrameElement

    public BaseFrame getFrameElement()

  Gets the DOM node of the (i)frame containing this window.

  Returns:
    the DOM node

### toString

    public java.lang.String toString()

  Gives a basic representation for debugging purposes.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    a basic representation

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