public class Window extends EventTarget implements WindowOrWorkerGlobalScope, AutoCloseable
Window.org.htmlunit.corejs.javascript.ScriptableObject.DescriptorInfo, org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator, org.htmlunit.corejs.javascript.ScriptableObject.LambdaGetterFunction, org.htmlunit.corejs.javascript.ScriptableObject.LambdaSetterFunction| Modifier and Type | Field and Description |
|---|---|
static int |
PERSISTENT
To be documented.
|
static int |
TEMPORARY
To be documented.
|
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTNOT_FOUND| Constructor and Description |
|---|
Window() |
| Modifier and Type | Method and Description |
|---|---|
void |
alert(Object message)
The JavaScript function
alert(). |
int |
animateAnimationsFrames()
Invokes all the animation callbacks registered for this window by
calling
requestAnimationFrame(Object) once. |
String |
atob(String encodedData)
Decodes a string of data which has been encoded using base-64 encoding.
|
void |
blur()
Removes focus from this element.
|
String |
btoa(String stringToEncode)
Creates a base-64 encoded ASCII string from a string of binary data.
|
void |
cancelAnimationFrame(Object requestId)
Remove the callback from the list of animationFrames.
|
void |
captureEvents(String type)
Does nothing special anymore.
|
void |
clearInterval(int intervalID)
Cancels the interval previously started using the
setInterval(Context, Scriptable, Scriptable, Object[], Function) method. |
void |
clearTimeout(int timeoutId)
Cancels a time-out previously set with the
setTimeout(Context, Scriptable, Scriptable, Object[], Function) method. |
void |
close_js()
Closes this window.
|
void |
close() |
boolean |
confirm(String message)
The JavaScript function
confirm. |
boolean |
dispatchEvent(Event event)
Dispatches an event into the event system (standards-conformant browsers only).
|
void |
dump(String message)
Logs messages to the browser's standard output (stdout).
|
boolean |
find(String search,
boolean caseSensitive,
boolean backwards,
boolean wrapAround,
boolean wholeWord,
boolean searchInFrames,
boolean showDialog)
Stub only at the moment.
|
void |
focus()
Sets the focus to this element.
|
Object |
get(int index,
org.htmlunit.corejs.javascript.Scriptable start) |
BrowserVersion |
getBrowserVersion()
Gets the browser version currently used.
|
Object |
getClientInformation()
Returns the JavaScript property
clientInformation. |
ComputedCSSStyleDeclaration |
getComputedStyle(Object element,
String pseudoElement)
Returns computed style of the element.
|
Object |
getControllers()
Gets the
controllers. |
Crypto |
getCrypto()
Returns the
crypto property. |
Event |
getCurrentEvent()
Returns the current event (used internally regardless of the emulation mode).
|
int |
getDevicePixelRatio()
Returns the
devicePixelRatio property. |
DocumentProxy |
getDocument_js()
Returns the JavaScript property
document. |
Document |
getDocument()
Returns the window's current document.
|
Object |
getEvent()
Returns the current event.
|
External |
getExternal()
Returns the
external property. |
HtmlUnitScriptable |
getFrameElement()
Returns the (i)frame in which the window is contained.
|
Object |
getFrames_js()
Returns the value of the
frames property. |
History |
getHistory()
Returns the
history property. |
int |
getInnerHeight()
Returns the
innerHeight. |
int |
getInnerWidth()
Returns the
innerWidth. |
Object |
getLength()
Returns the number of frames contained by this window.
|
Storage |
getLocalStorage()
Returns the
localStorage property. |
Location |
getLocation()
Returns the
location property. |
int |
getMozInnerScreenX()
Returns the value of
mozInnerScreenX property. |
int |
getMozInnerScreenY()
Returns the value of
mozInnerScreenY property. |
String |
getName()
Returns the value of the window's
name property. |
Navigator |
getNavigator()
Returns the JavaScript property
navigator. |
Netscape |
getNetscape() |
org.htmlunit.corejs.javascript.Function |
getOnabort()
Returns the
onabort event handler. |
org.htmlunit.corejs.javascript.Function |
getOnafterprint()
Returns the
onafterprint event handler. |
org.htmlunit.corejs.javascript.Function |
getOnanimationend()
Returns the
onanimationend event handler. |
org.htmlunit.corejs.javascript.Function |
getOnanimationiteration()
Returns the
onanimationiteration event handler. |
org.htmlunit.corejs.javascript.Function |
getOnanimationstart()
Returns the
onanimationstart event handler. |
org.htmlunit.corejs.javascript.Function |
getOnauxclick()
Returns the
onauxclick event handler. |
org.htmlunit.corejs.javascript.Function |
getOnbeforeprint()
Returns the
onbeforeprint event handler. |
org.htmlunit.corejs.javascript.Function |
getOnbeforeunload()
Returns the value of the window's
onbeforeunload property. |
org.htmlunit.corejs.javascript.Function |
getOnblur()
Returns the
onblur property (not necessary a function if something else has been set). |
org.htmlunit.corejs.javascript.Function |
getOncancel()
Returns the
oncancel event handler. |
org.htmlunit.corejs.javascript.Function |
getOncanplay()
Returns the
oncanplay event handler. |
org.htmlunit.corejs.javascript.Function |
getOncanplaythrough()
Returns the
oncanplaythrough event handler. |
org.htmlunit.corejs.javascript.Function |
getOnchange()
Getter for the
onchange event handler. |
org.htmlunit.corejs.javascript.Function |
getOnclick()
Returns the
onclick property (not necessary a function if something else has been set). |
org.htmlunit.corejs.javascript.Function |
getOnclose()
Returns the
onclose event handler. |
org.htmlunit.corejs.javascript.Function |
getOncontextmenu()
Returns the
oncontextmenu event handler. |
org.htmlunit.corejs.javascript.Function |
getOncuechange()
Returns the
oncuechange event handler. |
org.htmlunit.corejs.javascript.Function |
getOndblclick()
Returns the
ondblclick property (not necessary a function if something else has been set). |
org.htmlunit.corejs.javascript.Function |
getOndevicemotion()
Returns the
ondevicemotion event handler. |
org.htmlunit.corejs.javascript.Function |
getOndeviceorientation()
Returns the
ondeviceorientation event handler. |
org.htmlunit.corejs.javascript.Function |
getOndeviceorientationabsolute()
Returns the
ondeviceorientationabsolute event handler. |
org.htmlunit.corejs.javascript.Function |
getOndrag()
Returns the
ondrag event handler. |
org.htmlunit.corejs.javascript.Function |
getOndragend()
Returns the
ondragend event handler. |
org.htmlunit.corejs.javascript.Function |
getOndragenter()
Returns the
ondragenter event handler. |
org.htmlunit.corejs.javascript.Function |
getOndragleave()
Returns the
ondragleave event handler. |
org.htmlunit.corejs.javascript.Function |
getOndragover()
Returns the
ondragover event handler. |
org.htmlunit.corejs.javascript.Function |
getOndragstart()
Returns the
ondragstart event handler. |
org.htmlunit.corejs.javascript.Function |
getOndrop()
Returns the
ondrop event handler. |
org.htmlunit.corejs.javascript.Function |
getOndurationchange()
Returns the
ondurationchange event handler. |
org.htmlunit.corejs.javascript.Function |
getOnemptied()
Returns the
onemptied event handler. |
org.htmlunit.corejs.javascript.Function |
getOnended()
Returns the
onended event handler. |
org.htmlunit.corejs.javascript.Function |
getOnerror()
Returns the value of the window's
onerror property. |
org.htmlunit.corejs.javascript.Function |
getOnfocus()
Returns the
onfocus event handler. |
org.htmlunit.corejs.javascript.Function |
getOngotpointercapture()
Returns the
ongotpointercapture event handler. |
org.htmlunit.corejs.javascript.Function |
getOnhashchange()
Returns the
onhashchange property (not necessary a function if something else has been set). |
org.htmlunit.corejs.javascript.Function |
getOninput()
Returns the
oninput event handler. |
org.htmlunit.corejs.javascript.Function |
getOninvalid()
Returns the
oninvalid event handler. |
org.htmlunit.corejs.javascript.Function |
getOnkeydown()
Returns the
onkeydown event handler. |
org.htmlunit.corejs.javascript.Function |
getOnkeypress()
Returns the
onkeypress event handler. |
org.htmlunit.corejs.javascript.Function |
getOnkeyup()
Returns the
onkeyup event handler. |
org.htmlunit.corejs.javascript.Function |
getOnlanguagechange()
Returns the
onlanguagechange event handler. |
org.htmlunit.corejs.javascript.Function |
getOnload()
Returns the
onload property. |
org.htmlunit.corejs.javascript.Function |
getOnloadeddata()
Returns the
onloadeddata event handler. |
org.htmlunit.corejs.javascript.Function |
getOnloadedmetadata()
Returns the
onloadedmetadata event handler. |
org.htmlunit.corejs.javascript.Function |
getOnloadstart()
Returns the
onloadstart event handler. |
org.htmlunit.corejs.javascript.Function |
getOnlostpointercapture()
Returns the
onlostpointercapture event handler. |
org.htmlunit.corejs.javascript.Function |
getOnmessage()
Returns the value of the window's
onmessage property. |
org.htmlunit.corejs.javascript.Function |
getOnmousedown()
Returns the
onmousedown event handler. |
org.htmlunit.corejs.javascript.Function |
getOnmouseenter()
Returns the
onmouseenter event handler. |
org.htmlunit.corejs.javascript.Function |
getOnmouseleave()
Returns the
onmouseleave event handler. |
org.htmlunit.corejs.javascript.Function |
getOnmousemove()
Returns the
onmousemove event handler. |
org.htmlunit.corejs.javascript.Function |
getOnmouseout()
Returns the
onmouseout event handler. |
org.htmlunit.corejs.javascript.Function |
getOnmouseover()
Returns the
onmouseover event handler. |
org.htmlunit.corejs.javascript.Function |
getOnmouseup()
Returns the
onmouseup event handler. |
org.htmlunit.corejs.javascript.Function |
getOnmousewheel()
Returns the
onmousewheel event handler. |
org.htmlunit.corejs.javascript.Function |
getOnmozfullscreenchange()
Returns the
onmozfullscreenchange event handler. |
org.htmlunit.corejs.javascript.Function |
getOnmozfullscreenerror()
Returns the
onmozfullscreenerror event handler. |
org.htmlunit.corejs.javascript.Function |
getOnoffline()
Returns the
onoffline event handler. |
org.htmlunit.corejs.javascript.Function |
getOnonline()
Returns the
ononline event handler. |
org.htmlunit.corejs.javascript.Function |
getOnpagehide()
Returns the
onpagehide event handler. |
org.htmlunit.corejs.javascript.Function |
getOnpageshow()
Returns the
onpageshow event handler. |
org.htmlunit.corejs.javascript.Function |
getOnpause()
Returns the
onpause event handler. |
org.htmlunit.corejs.javascript.Function |
getOnplay()
Returns the
onplay event handler. |
org.htmlunit.corejs.javascript.Function |
getOnplaying()
Returns the
onplaying event handler. |
org.htmlunit.corejs.javascript.Function |
getOnpointercancel()
Returns the
onpointercancel event handler. |
org.htmlunit.corejs.javascript.Function |
getOnpointerdown()
Returns the
onpointerdown event handler. |
org.htmlunit.corejs.javascript.Function |
getOnpointerenter()
Returns the
onpointerenter event handler. |
org.htmlunit.corejs.javascript.Function |
getOnpointerleave()
Returns the
onpointerleave event handler. |
org.htmlunit.corejs.javascript.Function |
getOnpointermove()
Returns the
onpointermove event handler. |
org.htmlunit.corejs.javascript.Function |
getOnpointerout()
Returns the
onpointerout event handler. |
org.htmlunit.corejs.javascript.Function |
getOnpointerover()
Returns the
onpointerover event handler. |
org.htmlunit.corejs.javascript.Function |
getOnpointerup()
Returns the
onpointerup event handler. |
org.htmlunit.corejs.javascript.Function |
getOnpopstate()
Returns the
onpopstate event handler. |
org.htmlunit.corejs.javascript.Function |
getOnprogress()
Returns the
onprogress event handler. |
org.htmlunit.corejs.javascript.Function |
getOnratechange()
Returns the
onratechange event handler. |
org.htmlunit.corejs.javascript.Function |
getOnrejectionhandled()
Returns the
onrejectionhandled event handler. |
org.htmlunit.corejs.javascript.Function |
getOnreset()
Returns the
onreset event handler. |
org.htmlunit.corejs.javascript.Function |
getOnresize()
Returns the
onresize event handler. |
org.htmlunit.corejs.javascript.Function |
getOnscroll()
Returns the
onscroll event handler. |
org.htmlunit.corejs.javascript.Function |
getOnsearch()
Returns the
onsearch event handler. |
org.htmlunit.corejs.javascript.Function |
getOnseeked()
Returns the
onseeked event handler. |
org.htmlunit.corejs.javascript.Function |
getOnseeking()
Returns the
onseeking event handler. |
org.htmlunit.corejs.javascript.Function |
getOnselect()
Returns the
onselect event handler. |
org.htmlunit.corejs.javascript.Function |
getOnstalled()
Returns the
onstalled event handler. |
org.htmlunit.corejs.javascript.Function |
getOnstorage()
Returns the
onstorage event handler. |
org.htmlunit.corejs.javascript.Function |
getOnsubmit()
Getter for the
onsubmit event handler. |
org.htmlunit.corejs.javascript.Function |
getOnsuspend()
Returns the
onsuspend event handler. |
org.htmlunit.corejs.javascript.Function |
getOntimeupdate()
Returns the
ontimeupdate event handler. |
org.htmlunit.corejs.javascript.Function |
getOntoggle()
Returns the
ontoggle event handler. |
org.htmlunit.corejs.javascript.Function |
getOntransitionend()
Returns the
ontransitionend event handler. |
org.htmlunit.corejs.javascript.Function |
getOnunhandledrejection()
Returns the
onunhandledrejection event handler. |
org.htmlunit.corejs.javascript.Function |
getOnunload()
Returns the
onunload event handler. |
org.htmlunit.corejs.javascript.Function |
getOnvolumechange()
Returns the
onvolumechange event handler. |
org.htmlunit.corejs.javascript.Function |
getOnwaiting()
Returns the
onwaiting event handler. |
org.htmlunit.corejs.javascript.Function |
getOnwebkitanimationend()
Returns the
onwebkitanimationend event handler. |
org.htmlunit.corejs.javascript.Function |
getOnwebkitanimationiteration()
Returns the
onwebkitanimationiteration event handler. |
org.htmlunit.corejs.javascript.Function |
getOnwebkitanimationstart()
Returns the
onwebkitanimationstart event handler. |
org.htmlunit.corejs.javascript.Function |
getOnwebkittransitionend()
Returns the
onwebkittransitionend event handler. |
org.htmlunit.corejs.javascript.Function |
getOnwheel()
Returns the
onwheel event handler. |
Object |
getOpener()
Returns the value of the
opener property. |
int |
getOuterHeight()
Returns the
outerHeight. |
int |
getOuterWidth()
Returns the
outerWidth. |
int |
getPageXOffset()
Returns the value of
pageXOffset property. |
int |
getPageYOffset()
Returns the value of
pageYOffset property. |
Object |
getParent()
Returns the value of the
parent property. |
org.htmlunit.corejs.javascript.Scriptable |
getPerformance()
The performance attribute is defined as replacable
(https://w3c.github.io/hr-time/#the-performance-attribute) but not implemented
as that.
|
static int |
getPort(URL url)
Returns the port of the specified URL.
|
org.htmlunit.corejs.javascript.Scriptable |
getPrototype(Class<? extends HtmlUnitScriptable> jsClass)
Returns the prototype object corresponding to the specified HtmlUnit class inside the window scope.
|
static WindowProxy |
getProxy(WebWindow w)
Returns the proxy for the specified window.
|
Screen |
getScreen()
Returns the
screen property. |
int |
getScrollX()
Returns the value of
scrollX property. |
int |
getScrollY()
Returns the value of
scrollY property. |
Selection |
getSelection()
Returns the current selection.
|
Selection |
getSelectionImpl()
Returns the current selection.
|
Object |
getSelf()
Returns the
self property. |
Storage |
getSessionStorage()
Returns the
sessionStorage property. |
SpeechSynthesis |
getSpeechSynthesis()
Returns the
speechSynthesis property. |
String |
getStatus()
Returns the text from the status line.
|
Storage |
getStorage(StorageHolder.Type storageType)
Gets the storage of the specified type.
|
StyleMedia |
getStyleMedia()
Returns the
styleMedia property. |
Object |
getTop()
Returns the value of the
top property. |
WebWindow |
getWebWindow()
Returns the WebWindow associated with this Window.
|
Window |
getWindow_js()
Returns the window property.
|
protected Object |
getWithPreemption(String name)
Called by
HtmlUnitScriptable.get(String, Scriptable) to allow retrieval of the property before the prototype
chain is searched. |
void |
initialize()
Initializes the object.
|
void |
initialize(Page enclosedPage)
Initialize the object.
|
void |
initialize(WebWindow webWindow,
|