Package org.htmlunit
Class DialogWindow
java.lang.Object
org.htmlunit.WebWindowImpl
org.htmlunit.DialogWindow
- All Implemented Interfaces:
Serializable
,WebWindow
A window opened in JavaScript via either
window.showModalDialog
or window.showModelessDialog
.- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DialogWindow
(WebClient webClient, Object arguments) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes this window.Returns the window that contains this window.Returns the top level window that contains this window.protected boolean
Returnstrue
if this window needs JavaScript initialization to occur when the enclosed page is set.<T extends org.htmlunit.javascript.HtmlUnitScriptable>
voidsetScriptableObject
(T scriptObject) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Sets the JavaScript object that corresponds to this element.toString()
Returns a string representation of this object.Methods inherited from class org.htmlunit.WebWindowImpl
addChildWindow, destroyChildren, getComputedStyle, getEnclosedPage, getHistory, getInnerHeight, getInnerWidth, getJobManager, getName, getOuterHeight, getOuterWidth, getScreen, getScriptableObject, getWebClient, isClosed, performRegistration, removeChildWindow, setClosed, setEnclosedPage, setInnerHeight, setInnerWidth, setJobManager, setName, setOuterHeight, setOuterWidth
-
Constructor Details
-
DialogWindow
Creates a new instance.- Parameters:
webClient
- the web client that "owns" this windowarguments
- the arguments object exposed via thedialogArguments
JavaScript property
-
-
Method Details
-
isJavaScriptInitializationNeeded
Returnstrue
if this window needs JavaScript initialization to occur when the enclosed page is set.- Specified by:
isJavaScriptInitializationNeeded
in classWebWindowImpl
- Parameters:
page
- the page that will become the enclosing page- Returns:
true
if this window needs JavaScript initialization to occur when the enclosed page is set
-
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.
-
setScriptableObject
public <T extends org.htmlunit.javascript.HtmlUnitScriptable> void setScriptableObject(T 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.- Specified by:
setScriptableObject
in interfaceWebWindow
- Overrides:
setScriptableObject
in classWebWindowImpl
- Type Parameters:
T
- the object type- Parameters:
scriptObject
- the JavaScript object
-
close
public void close()Closes this window. -
toString
Returns a string representation of this object.
-