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
ConstructorsModifierConstructorDescriptionprotectedDialogWindow(WebClient webClient, Object arguments) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes 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.<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 thedialogArgumentsJavaScript property
-
-
Method Details
-
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
-
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:
setScriptableObjectin interfaceWebWindow- Overrides:
setScriptableObjectin 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.
-