Package org.htmlunit.html
Class FrameWindow
java.lang.Object
org.htmlunit.WebWindowImpl
org.htmlunit.html.FrameWindow
- All Implemented Interfaces:
Serializable,WebWindow
The web window for a frame or iframe.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this frame window.Returns the HTML page in which the <frame> or <iframe> tag is contained for this frame window.Gets the DOM node of the (i)frame containing this window.getName()Returns the name of this window.Returns the window that contains this window.Returns the top level window that contains this window.protected booleanReturnstrueif this window needs JavaScript initialization to occur when the enclosed page is set.voidsetEnclosedPage(Page page) Sets the currently loaded page.voidSets the name of this window.voidsetPageDenied(FrameWindow.PageDenied pageDenied) Marks that the page content as denied.toString()Gives a basic representation for debugging purposes.Methods inherited from class org.htmlunit.WebWindowImpl
addChildWindow, destroyChildren, getComputedStyle, getEnclosedPage, getHistory, getInnerHeight, getInnerWidth, getJobManager, getOuterHeight, getOuterWidth, getScreen, getScriptableObject, getWebClient, isClosed, performRegistration, removeChildWindow, setClosed, setInnerHeight, setInnerWidth, setJobManager, setOuterHeight, setOuterWidth, setScriptableObject
-
Method Details
-
getName
Returns the name of this window. A FrameWindow shares it's name with it's containing frame.- Specified by:
getNamein interfaceWebWindow- Overrides:
getNamein classWebWindowImpl- Returns:
- the name of this window
-
setName
Sets the name of this window. A FrameWindow shares it's name with it's containing frame.- Specified by:
setNamein interfaceWebWindow- Overrides:
setNamein classWebWindowImpl- Parameters:
name- the new window name
-
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
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
Returnstrueif this window needs JavaScript initialization to occur when the enclosed page is set.- Specified by:
isJavaScriptInitializationNeededin classWebWindowImpl- Parameters:
page- the page that will become the enclosing page- Returns:
trueif this window needs JavaScript initialization to occur when the enclosed page is set
-
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
-
setEnclosedPage
Sets the currently loaded page.- Specified by:
setEnclosedPagein interfaceWebWindow- Overrides:
setEnclosedPagein classWebWindowImpl- Parameters:
page- the new page or null if there is no page (ie empty window)
-
getFrameElement
Gets the DOM node of the (i)frame containing this window.- Returns:
- the DOM node
-
toString
Gives a basic representation for debugging purposes. -
close
public void close()Closes this frame window. -
setPageDenied
Marks that the page content as denied.- Parameters:
pageDenied- the new state
-
getPageDenied
- Returns:
- PageDenied if the page was denied
-