public interface WebWindow extends Serializable
Modifier and Type | Method and Description |
---|---|
ComputedCssStyleDeclaration |
getComputedStyle(DomElement element,
String pseudoElement)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
|
Page |
getEnclosedPage()
Returns the currently loaded page or null if no page has been loaded.
|
History |
getHistory()
Returns this window's navigation history.
|
int |
getInnerHeight()
Returns the height (in pixels) of the browser window viewport including, if rendered, the horizontal scrollbar.
|
int |
getInnerWidth()
Returns the width (in pixels) of the browser window viewport including, if rendered, the vertical scrollbar.
|
JavaScriptJobManager |
getJobManager()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
|
String |
getName()
Returns the name of this window.
|
int |
getOuterHeight()
Returns the height in pixels of the whole browser window.
|
int |
getOuterWidth()
Returns the width of the outside of the browser window.
|
WebWindow |
getParentWindow()
Returns the window that contains this window.
|
Screen |
getScreen() |
<T> T |
getScriptableObject()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
|
WebWindow |
getTopWindow()
Returns the top level window that contains this window.
|
WebClient |
getWebClient()
Returns the web client that "owns" this window.
|
boolean |
isClosed()
Indicates if this window is closed.
|
void |
setEnclosedPage(Page page)
Sets the currently loaded page.
|
void |
setInnerHeight(int innerHeight)
Sets the height (in pixels) of the browser window viewport including, if rendered, the horizontal scrollbar.
|
void |
setInnerWidth(int innerWidth)
Sets the width (in pixels) of the browser window viewport including, if rendered, the vertical scrollbar.
|
void |
setName(String name)
Sets the name of this window.
|
void |
setOuterHeight(int outerHeight)
Sets the height in pixels of the whole browser window.
|
void |
setOuterWidth(int outerWidth)
Sets the width of the outside of the browser window.
|
<T extends HtmlUnitScriptable> |
setScriptableObject(T scriptObject)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
|
String getName()
void setName(String name)
name
- the new window namePage getEnclosedPage()
void setEnclosedPage(Page page)
page
- the new page or null if there is no page (ie empty window)WebWindow getParentWindow()
WebWindow getTopWindow()
WebClient getWebClient()
History getHistory()
<T extends HtmlUnitScriptable> void setScriptableObject(T scriptObject)
T
- the object typescriptObject
- the JavaScript object<T> T getScriptableObject()
T
- the object typeJavaScriptJobManager getJobManager()
boolean isClosed()
true
when the window is closedint getInnerWidth()
void setInnerWidth(int innerWidth)
innerWidth
- the inner widthint getOuterWidth()
void setOuterWidth(int outerWidth)
outerWidth
- the outer widthint getInnerHeight()
void setInnerHeight(int innerHeight)
innerHeight
- the inner heightint getOuterHeight()
void setOuterHeight(int outerHeight)
outerHeight
- the outer heightScreen getScreen()
ComputedCssStyleDeclaration getComputedStyle(DomElement element, String pseudoElement)
element.style
, but the value returned by this method is read-only.element
- the elementpseudoElement
- a string specifying the pseudo-element to match (may be null
);
e.g. ':before'Copyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.