Module org.htmlunit

Class Window

java.lang.Object
org.htmlunit.corejs.javascript.SlotMapOwner<org.htmlunit.corejs.javascript.Scriptable>
org.htmlunit.corejs.javascript.ScriptableObject
All Implemented Interfaces:
Serializable, AutoCloseable, Cloneable, org.htmlunit.corejs.javascript.ConstProperties<org.htmlunit.corejs.javascript.Scriptable>, org.htmlunit.corejs.javascript.debug.DebuggableObject, org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable, WindowOrWorkerGlobalScope

public class Window extends EventTarget implements WindowOrWorkerGlobalScope, AutoCloseable
A JavaScript object for Window.
Author:
Mike Bowler, Chen Jun, David K. Taylor, Christian Sell, Darrell DeBoer, Marc Guillemot, Dierk Koenig, Daniel Gredler, David D. Kilzer, Chris Erskine, Ahmed Ashour, Ronald Brill, Frank Danek, Carsten Steul, Colin Alworth, Atsushi Nakagawa, Sven Strickroth, Lai Quang Duong
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject

    org.htmlunit.corejs.javascript.ScriptableObject.DescriptorInfo, org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator, org.htmlunit.corejs.javascript.ScriptableObject.LambdaGetterFunction, org.htmlunit.corejs.javascript.ScriptableObject.LambdaSetterFunction
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    To be documented.
    static final int
    To be documented.

    Fields inherited from class org.htmlunit.corejs.javascript.ScriptableObject

    CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST

    Fields inherited from class org.htmlunit.corejs.javascript.SlotMapOwner

    isSealed

    Fields inherited from interface org.htmlunit.corejs.javascript.Scriptable

    NOT_FOUND
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    alert(Object message)
    The JavaScript function alert().
    int
    Invokes all the animation callbacks registered for this window by calling requestAnimationFrame(Object) once.
    atob(String encodedData)
    Decodes a string of data which has been encoded using base-64 encoding.
    void
    Removes focus from this element.
    btoa(String stringToEncode)
    Creates a base-64 encoded ASCII string from a string of binary data.
    void
    Remove the callback from the list of animationFrames.
    void
    Does nothing special anymore.
    void
    clearInterval(int intervalID)
    Cancels the interval previously started using the setInterval(Context, VarScope, Scriptable, Object[], Function) method.
    void
    clearTimeout(int timeoutId)
    Cancels a time-out previously set with the setTimeout(Context, VarScope, Scriptable, Object[], Function) method.
    void
    void
    Closes this window.
    boolean
    confirm(String message)
    The JavaScript function confirm.
    boolean
    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
    Sets the focus to this element.
    get(int index, org.htmlunit.corejs.javascript.Scriptable start)
    Gets the browser version currently used.
    Returns the JavaScript property clientInformation.
    getComputedStyle(Object element, String pseudoElement)
    Returns computed style of the element.
    Gets the controllers.
    Returns the crypto property.
    Returns the current event (used internally regardless of the emulation mode).
    int
    Returns the devicePixelRatio property.
    Returns the window's current document.
    Returns the JavaScript property document.
    Returns the current event.
    Returns the external property.
    Returns the (i)frame in which the window is contained.
    Returns the value of the frames property.
    Returns the history property.
    int
    Returns the innerHeight.
    int
    Returns the innerWidth.
    Returns the number of frames contained by this window.
    Returns the localStorage property.
    Returns the location property.
    int
    Returns the value of mozInnerScreenX property.
    int
    Returns the value of mozInnerScreenY property.
    Returns the value of the window's name property.
    Returns the JavaScript property navigator.
     
    org.htmlunit.corejs.javascript.Function
    Returns the onabort event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onafterprint event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onanimationend event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onanimationiteration event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onanimationstart event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onauxclick event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onbeforeprint event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the value of the window's onbeforeunload property.
    org.htmlunit.corejs.javascript.Function
    Returns the onblur property (not necessary a function if something else has been set).
    org.htmlunit.corejs.javascript.Function
    Returns the oncancel event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the oncanplay event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the oncanplaythrough event handler.
    org.htmlunit.corejs.javascript.Function
    Getter for the onchange event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onclick property (not necessary a function if something else has been set).
    org.htmlunit.corejs.javascript.Function
    Returns the onclose event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the oncontextmenu event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the oncuechange event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the ondblclick property (not necessary a function if something else has been set).
    org.htmlunit.corejs.javascript.Function
    Returns the ondevicemotion event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the ondeviceorientation event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the ondeviceorientationabsolute event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the ondrag event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the ondragend event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the ondragenter event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the ondragleave event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the ondragover event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the ondragstart event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the ondrop event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the ondurationchange event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onemptied event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onended event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the value of the window's onerror property.
    org.htmlunit.corejs.javascript.Function
    Returns the onfocus event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the ongotpointercapture event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onhashchange property (not necessary a function if something else has been set).
    org.htmlunit.corejs.javascript.Function
    Returns the oninput event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the oninvalid event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onkeydown event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onkeypress event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onkeyup event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onlanguagechange event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onload property.
    org.htmlunit.corejs.javascript.Function
    Returns the onloadeddata event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onloadedmetadata event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onloadstart event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onlostpointercapture event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the value of the window's onmessage property.
    org.htmlunit.corejs.javascript.Function
    Returns the onmousedown event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onmouseenter event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onmouseleave event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onmousemove event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onmouseout event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onmouseover event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onmouseup event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onmousewheel event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onmozfullscreenchange event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onmozfullscreenerror event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onoffline event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the ononline event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onpagehide event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onpageshow event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onpause event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onplay event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onplaying event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onpointercancel event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onpointerdown event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onpointerenter event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onpointerleave event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onpointermove event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onpointerout event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onpointerover event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onpointerup event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onpopstate event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onprogress event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onratechange event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onrejectionhandled event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onreset event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onresize event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onscroll event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onsearch event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onseeked event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onseeking event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onselect event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onstalled event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onstorage event handler.
    org.htmlunit.corejs.javascript.Function
    Getter for the onsubmit event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onsuspend event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the ontimeupdate event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the ontoggle event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the ontransitionend event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onunhandledrejection event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onunload event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onvolumechange event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onwaiting event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onwebkitanimationend event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onwebkitanimationiteration event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onwebkitanimationstart event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onwebkittransitionend event handler.
    org.htmlunit.corejs.javascript.Function
    Returns the onwheel event handler.
    Returns the value of the opener property.
    int
    Returns the outerHeight.
    int
    Returns the outerWidth.
    int
    Returns the value of pageXOffset property.
    int
    Returns the value of pageYOffset property.
    Returns the value of the parent property.
    org.htmlunit.corejs.javascript.Scriptable
    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
    Returns the prototype object corresponding to the specified HtmlUnit class inside the window scope.
    Returns the proxy for the specified window.
    Returns the screen property.
    int
    Returns the value of scrollX property.
    int
    Returns the value of scrollY property.
    Returns the current selection.
    Returns the current selection.
    Returns the self property.
    Returns the sessionStorage property.
    Returns the speechSynthesis property.
    Returns the text from the status line.
    Gets the storage of the specified type.
    Returns the styleMedia property.
    Returns the value of the top property.
    Returns the WebWindow associated with this Window.
    Returns the window property.
    protected Object
    Called by HtmlUnitScriptable.get(String, Scriptable) to allow retrieval of the property before the prototype chain is searched.
    void
    Initializes the object.
    void
    initialize(org.htmlunit.corejs.javascript.TopLevel scope, WebWindow webWindow, Page pageToEnclose)
    Initializes this window.
    void
    initialize(Page enclosedPage)
    Initialize the object.
    boolean
    Indicates if this window is closed.
    boolean
    Used to allow re-declaration of constants (eg: "var undefined;").
    boolean
     
    boolean
    Returns the offscreenBuffering property.
    static org.htmlunit.corejs.javascript.Scriptable
    jsConstructor(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.VarScope scope, Object[] args, org.htmlunit.corejs.javascript.Function ctorObj, boolean inNewExpr)
    Creates an instance.
    Gets the frames property.
    Gets the length property.
    Gets the parent property.
    Gets the self property.
    void
    jsSetFrames(org.htmlunit.corejs.javascript.Scriptable framesShadow)
    Sets the frames property.
    void
    jsSetLength(org.htmlunit.corejs.javascript.Scriptable lengthShadow)
    Sets the length property.
    void
    jsSetParent(org.htmlunit.corejs.javascript.Scriptable parentShadow)
    Sets the parent property.
    void
    jsSetSelf(org.htmlunit.corejs.javascript.Scriptable selfShadow)
    Sets the self property.
    matchMedia(String mediaQueryString)
    Returns a new MediaQueryList object representing the parsed results of the specified media query string.
    void
    moveBy(int x, int y)
    Does nothing.
    void
    moveTo(int x, int y)
    Does nothing.
    open(Object url, Object name, Object features, Object replace)
    Opens a new window.
    static void
    postMessage(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.VarScope scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function funObj)
    Posts a message.
    void
    Prints the current page.
    prompt(String message, Object defaultValue)
    The JavaScript function prompt.
    void
    put(String name, org.htmlunit.corejs.javascript.Scriptable start, Object value)
    static Object
    queueMicrotask(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.VarScope scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function)
    Queues a microtask to be executed.
    void
    Does nothing special anymore.
    int
    Add callback to the list of animationFrames.
    void
    resizeBy(int width, int height)
    Does nothing.
    void
    resizeTo(int width, int height)
    Does nothing.
    void
    scroll(org.htmlunit.corejs.javascript.Scriptable x, org.htmlunit.corejs.javascript.Scriptable y)
    Scrolls to the specified location on the page.
    void
    scrollBy(org.htmlunit.corejs.javascript.Scriptable x, org.htmlunit.corejs.javascript.Scriptable y)
    Scrolls the window content the specified distance.
    void
    scrollByLines(int lines)
    Scrolls the window content down by the specified number of lines.
    void
    scrollByPages(int pages)
    Scrolls the window content down by the specified number of pages.
    void
    scrollTo(org.htmlunit.corejs.javascript.Scriptable x, org.htmlunit.corejs.javascript.Scriptable y)
    Scrolls to the specified location on the page.
    void
    setClientInformation(Object clientInformation)
     
    void
    Sets the controllers.
    void
    Sets the current event.
    void
    setInnerHeight(int height)
    Sets the innerHeight.
    void
    setInnerWidth(int width)
    Sets the innerWidth.
    static Object
    setInterval(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.VarScope scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function)
    Sets a chunk of JavaScript to be invoked each time a specified number of milliseconds has elapsed.
    void
    setLocation(String newLocation)
    Sets the location property.
    void
    Sets the value of the window's name property.
    void
    setOnabort(Object onabort)
    Sets the onabort event handler.
    void
    setOnafterprint(Object onafterprint)
    Sets the onafterprint event handler.
    void
    setOnanimationend(Object onanimationend)
    Sets the onanimationend event handler.
    void
    setOnanimationiteration(Object onanimationiteration)
    Sets the onanimationiteration event handler.
    void
    setOnanimationstart(Object onanimationstart)
    Sets the onanimationstart event handler.
    void
    setOnauxclick(Object onauxclick)
    Sets the onauxclick event handler.
    void
    setOnbeforeprint(Object onbeforeprint)
    Sets the onbeforeprint event handler.
    void
    setOnbeforeunload(Object onbeforeunload)
    Sets the value of the window's onbeforeunload property.
    void
    setOnblur(Object onblur)
    Sets the value of the onblur event handler.
    void
    setOncancel(Object oncancel)
    Sets the oncancel event handler.
    void
    setOncanplay(Object oncanplay)
    Sets the oncanplay event handler.
    void
    setOncanplaythrough(Object oncanplaythrough)
    Sets the oncanplaythrough event handler.
    void
    setOnchange(Object onchange)
    Setter for the onchange event handler.
    void
    setOnclick(Object onclick)
    Sets the value of the onclick event handler.
    void
    setOnclose(Object onclose)
    Sets the onclose event handler.
    void
    setOncontextmenu(Object oncontextmenu)
    Sets the oncontextmenu event handler.
    void
    setOncuechange(Object oncuechange)
    Sets the oncuechange event handler.
    void
    setOndblclick(Object ondblclick)
    Sets the value of the ondblclick event handler.
    void
    setOndevicemotion(Object ondevicemotion)
    Sets the ondevicemotion event handler.
    void
    setOndeviceorientation(Object ondeviceorientation)
    Sets the ondeviceorientation event handler.
    void
    setOndeviceorientationabsolute(Object ondeviceorientationabsolute)
    Sets the ondeviceorientationabsolute event handler.
    void
    setOndrag(Object ondrag)
    Sets the ondrag event handler.
    void
    setOndragend(Object ondragend)
    Sets the ondragend event handler.
    void
    setOndragenter(Object ondragenter)
    Sets the ondragenter event handler.
    void
    setOndragleave(Object ondragleave)
    Sets the ondragleave event handler.
    void
    setOndragover(Object ondragover)
    Sets the ondragover event handler.
    void
    setOndragstart(Object ondragstart)
    Sets the ondragstart event handler.
    void
    setOndrop(Object ondrop)
    Sets the ondrop event handler.
    void
    setOndurationchange(Object ondurationchange)
    Sets the ondurationchange event handler.
    void
    setOnemptied(Object onemptied)
    Sets the onemptied event handler.
    void
    setOnended(Object onended)
    Sets the onended event handler.
    void
    setOnerror(Object onerror)
    Sets the value of the window's onerror property.
    void
    setOnfocus(Object onfocus)
    Sets the onfocus event handler.
    void
    setOngotpointercapture(Object ongotpointercapture)
    Sets the ongotpointercapture event handler.
    void
    setOnhashchange(Object onhashchange)
    Sets the value of the onhashchange event handler.
    void
    setOninput(Object oninput)
    Sets the oninput event handler.
    void
    setOninvalid(Object oninvalid)
    Sets the oninvalid event handler.
    void
    setOnkeydown(Object onkeydown)
    Sets the onkeydown event handler.
    void
    setOnkeypress(Object onkeypress)
    Sets the onkeypress event handler.
    void
    setOnkeyup(Object onkeyup)
    Sets the onkeyup event handler.
    void
    setOnlanguagechange(Object onlanguagechange)
    Sets the onlanguagechange event handler.
    void
    setOnload(Object onload)
    Sets the value of the onload event handler.
    void
    setOnloadeddata(Object onloadeddata)
    Sets the onloadeddata event handler.
    void
    setOnloadedmetadata(Object onloadedmetadata)
    Sets the onloadedmetadata event handler.
    void
    setOnloadstart(Object onloadstart)
    Sets the onloadstart event handler.
    void
    setOnlostpointercapture(Object onlostpointercapture)
    Sets the onlostpointercapture event handler.
    void
    setOnmessage(Object onmessage)
    Sets the value of the window's onmessage property.
    void
    setOnmousedown(Object onmousedown)
    Sets the onmousedown event handler.
    void
    setOnmouseenter(Object onmouseenter)
    Sets the onmouseenter event handler.
    void
    setOnmouseleave(Object onmouseleave)
    Sets the onmouseleave event handler.
    void
    setOnmousemove(Object onmousemove)
    Sets the onmousemove event handler.
    void
    setOnmouseout(Object onmouseout)
    Sets the onmouseout event handler.
    void
    setOnmouseover(Object onmouseover)
    Sets the onmouseover event handler.
    void
    setOnmouseup(Object onmouseup)
    Sets the onmouseup event handler.
    void
    setOnmousewheel(Object onmousewheel)
    Sets the onmousewheel event handler.
    void
    setOnmozfullscreenchange(Object onmozfullscreenchange)
    Sets the onmozfullscreenchange event handler.
    void
    setOnmozfullscreenerror(Object onmozfullscreenerror)
    Sets the onmozfullscreenerror event handler.
    void
    setOnoffline(Object onoffline)
    Sets the onoffline event handler.
    void
    setOnonline(Object ononline)
    Sets the ononline event handler.
    void
    setOnpagehide(Object onpagehide)
    Sets the onpagehide event handler.
    void
    setOnpageshow(Object onpageshow)
    Sets the onpageshow event handler.
    void
    setOnpause(Object onpause)
    Sets the onpause event handler.
    void
    setOnplay(Object onplay)
    Sets the onplay event handler.
    void
    setOnplaying(Object onplaying)
    Sets the onplaying event handler.
    void
    setOnpointercancel(Object onpointercancel)
    Sets the onpointercancel event handler.
    void
    setOnpointerdown(Object onpointerdown)
    Sets the onpointerdown event handler.
    void
    setOnpointerenter(Object onpointerenter)
    Sets the onpointerenter event handler.
    void
    setOnpointerleave(Object onpointerleave)
    Sets the onpointerleave event handler.
    void
    setOnpointermove(Object onpointermove)
    Sets the onpointermove event handler.
    void
    setOnpointerout(Object onpointerout)
    Sets the onpointerout event handler.
    void
    setOnpointerover(Object onpointerover)
    Sets the onpointerover event handler.
    void
    setOnpointerup(Object onpointerup)
    Sets the onpointerup event handler.
    void
    setOnpopstate(Object onpopstate)
    Sets the onpopstate event handler.
    void
    setOnprogress(Object onprogress)
    Sets the onprogress event handler.
    void
    setOnratechange(Object onratechange)
    Sets the onratechange event handler.
    void
    setOnrejectionhandled(Object onrejectionhandled)
    Sets the onrejectionhandled event handler.
    void
    setOnreset(Object onreset)
    Sets the onreset event handler.
    void
    setOnresize(Object onresize)
    Sets the onresize event handler.
    void
    setOnscroll(Object onscroll)
    Sets the onscroll event handler.
    void
    setOnsearch(Object onsearch)
    Sets the onsearch event handler.
    void
    setOnseeked(Object onseeked)
    Sets the onseeked event handler.
    void
    setOnseeking(Object onseeking)
    Sets the onseeking event handler.
    void
    setOnselect(Object onselect)
    Sets the onselect event handler.
    void
    setOnstalled(Object onstalled)
    Sets the onstalled event handler.
    void
    setOnstorage(Object onstorage)
    Sets the onstorage event handler.
    void
    setOnsubmit(Object onsubmit)
    Setter for the onsubmit event handler.
    void
    setOnsuspend(Object onsuspend)
    Sets the onsuspend event handler.
    void
    setOntimeupdate(Object ontimeupdate)
    Sets the ontimeupdate event handler.
    void
    setOntoggle(Object ontoggle)
    Sets the ontoggle event handler.
    void
    setOntransitionend(Object ontransitionend)
    Sets the ontransitionend event handler.
    void
    setOnunhandledrejection(Object onunhandledrejection)
    Sets the onunhandledrejection event handler.
    void
    setOnunload(Object onunload)
    Sets the onunload event handler.
    void
    setOnvolumechange(Object onvolumechange)
    Sets the onvolumechange event handler.
    void
    setOnwaiting(Object onwaiting)
    Sets the onwaiting event handler.
    void
    setOnwebkitanimationend(Object onwebkitanimationend)
    Sets the onwebkitanimationend event handler.
    void
    setOnwebkitanimationiteration(Object onwebkitanimationiteration)
    Sets the onwebkitanimationiteration event handler.
    void
    setOnwebkitanimationstart(Object onwebkitanimationstart)
    Sets the onwebkitanimationstart event handler.
    void
    setOnwebkittransitionend(Object onwebkittransitionend)
    Sets the onwebkittransitionend event handler.
    void
    setOnwheel(Object onwheel)
    Sets the onwheel event handler.
    void
    setOpener(Object newValue)
    Sets the opener property.
    void
    setOuterHeight(int height)
    Sets the outerHeight.
    void
    setOuterWidth(int width)
    Sets the outerWidth.
    void
    setPerformance(org.htmlunit.corejs.javascript.Scriptable performance)
    The performance attribute is defined as replacable (https://w3c.github.io/hr-time/#the-performance-attribute) but not implemented as that.
    void
    setPrototypes(Map<Class<? extends org.htmlunit.corejs.javascript.Scriptable>,org.htmlunit.corejs.javascript.Scriptable> map)
    Sets the prototypes for HtmlUnit host classes.
    void
    setStatus(String message)
    Sets the text from the status line.
    static Object
    setTimeout(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.VarScope scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function)
    Sets a chunk of JavaScript to be invoked at some specified time later.
    void
    Should implement the stop() function on the window object.
    void
    Triggers the onerror handler, if one has been set.

    Methods inherited from class org.htmlunit.corejs.javascript.ScriptableObject

    applyDescriptorToAttributeBitset, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkNotSealed, checkPropertyChangeForSlot, checkPropertyChangeForSlot, checkPropertyDefinition, checkPropertyDefinition, checkSlotRemoval, defineBuiltinProperty, defineBuiltinProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureScriptableObjectButNotSymbol, ensureSymbolScriptable, ensureType, get, getAllIds, getAncestor, getArrayPrototype, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSuperProperty, getSuperProperty, getSuperProperty, getThis, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, hasProperty, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isAccessorDescriptor, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGenericDescriptor, isGetterOrSetter, isGetterOrSetter, isTrue, preventExtensions, put, put, putConst, putConstProperty, putConstProperty, putOwnProperty, putOwnProperty, putOwnProperty, putProperty, putProperty, putProperty, putProperty, putSuperProperty, putSuperProperty, putSuperProperty, querySlot, redefineProperty, redefineProperty, sameValue, sealObject, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size

    Methods inherited from class org.htmlunit.corejs.javascript.SlotMapOwner

    associateValue, checkNotSealed, copyAssociatedValue, createSlotMap, defineProperty, defineProperty, get, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getIds, has, has, isSealed, readMaps, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, writeMaps

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.htmlunit.corejs.javascript.Scriptable

    get, getIds, has, has

    Methods inherited from interface org.htmlunit.corejs.javascript.SymbolScriptable

    get, has
  • Field Details

  • Constructor Details

    • Window

      public Window()
  • Method Details

    • jsConstructor

      public static org.htmlunit.corejs.javascript.Scriptable jsConstructor(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.VarScope scope, Object[] args, org.htmlunit.corejs.javascript.Function ctorObj, boolean inNewExpr)
      Creates an instance.
      Parameters:
      cx - the current context
      scope - the scope
      args - the arguments
      ctorObj - the function object
      inNewExpr - Is new or not
      Returns:
      the java object to allow JavaScript to access
    • getPrototype

      public org.htmlunit.corejs.javascript.Scriptable getPrototype(Class<? extends HtmlUnitScriptable> jsClass)
      Returns the prototype object corresponding to the specified HtmlUnit class inside the window scope.
      Overrides:
      getPrototype in class HtmlUnitScriptable
      Parameters:
      jsClass - the class whose prototype is to be returned
      Returns:
      the prototype object corresponding to the specified class inside the specified scope
    • setPrototypes

      public void setPrototypes(Map<Class<? extends org.htmlunit.corejs.javascript.Scriptable>,org.htmlunit.corejs.javascript.Scriptable> map)
      Sets the prototypes for HtmlUnit host classes.
      Parameters:
      map - a Map of (Class, Scriptable)
    • alert

      public void alert(Object message)
      The JavaScript function alert().
      Parameters:
      message - the message
    • btoa

      public String btoa(String stringToEncode)
      Creates a base-64 encoded ASCII string from a string of binary data.
      Specified by:
      btoa in interface WindowOrWorkerGlobalScope
      Parameters:
      stringToEncode - string to encode
      Returns:
      the encoded string
    • atob

      public String atob(String encodedData)
      Decodes a string of data which has been encoded using base-64 encoding.
      Specified by:
      atob in interface WindowOrWorkerGlobalScope
      Parameters:
      encodedData - the encoded string
      Returns:
      the decoded value
    • confirm

      public boolean confirm(String message)
      The JavaScript function confirm.
      Parameters:
      message - the message
      Returns:
      true if ok was pressed, false if cancel was pressed
    • prompt

      public String prompt(String message, Object defaultValue)
      The JavaScript function prompt.
      Parameters:
      message - the message
      defaultValue - the default value displayed in the text input field
      Returns:
      the value typed in or null if the user pressed cancel
    • getDocument_js

      public DocumentProxy getDocument_js()
      Returns the JavaScript property document.
      Returns:
      the document
    • getDocument

      public Document getDocument()
      Returns the window's current document.
      Returns:
      the window's current document
    • getEvent

      public Object getEvent()
      Returns the current event.
      Returns:
      the current event, or null if no event is currently available
    • getCurrentEvent

      public Event getCurrentEvent()
      Returns the current event (used internally regardless of the emulation mode).
      Returns:
      the current event, or null if no event is currently available
    • setCurrentEvent

      public void setCurrentEvent(Event event)
      Sets the current event.
      Parameters:
      event - the current event
    • open

      public WindowProxy open(Object url, Object name, Object features, Object replace)
      Opens a new window.
      Parameters:
      url - when a new document is opened, url is a String that specifies a MIME type for the document. When a new window is opened, url is a String that specifies the URL to render in the new window
      name - the name
      features - the features
      replace - whether to replace in the history list or no
      Returns:
      the newly opened window, or null if popup windows have been disabled
      See Also:
    • setTimeout

      public static Object setTimeout(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.VarScope scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function)
      Sets a chunk of JavaScript to be invoked at some specified time later. The invocation occurs only if the window is opened after the delay and does not contain an other page than the one that originated the setTimeout.
      Parameters:
      context - the JavaScript context
      scope - the scope
      thisObj - the scriptable
      args - the arguments passed into the method
      function - the function
      Returns:
      the id of the created timer
      See Also:
    • queueMicrotask

      public static Object queueMicrotask(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.VarScope scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function)
      Queues a microtask to be executed.
      Parameters:
      context - the JavaScript context
      scope - the scope
      thisObj - the scriptable
      args - the arguments passed into the method
      function - the function
      Returns:
      undefined
      See Also:
    • setInterval

      public static Object setInterval(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.VarScope scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function)
      Sets a chunk of JavaScript to be invoked each time a specified number of milliseconds has elapsed.
      Parameters:
      context - the JavaScript context
      scope - the scope
      thisObj - the scriptable
      args - the arguments passed into the method
      function - the function
      Returns:
      the id of the created interval
      See Also:
    • clearTimeout

      public void clearTimeout(int timeoutId)
      Cancels a time-out previously set with the setTimeout(Context, VarScope, Scriptable, Object[], Function) method.
      Parameters:
      timeoutId - identifier for the timeout to clear as returned by setTimeout(Context, VarScope, Scriptable, Object[], Function)
    • clearInterval

      public void clearInterval(int intervalID)
      Cancels the interval previously started using the setInterval(Context, VarScope, Scriptable, Object[], Function) method. Current implementation does nothing.
      Parameters:
      intervalID - specifies the interval to cancel as returned by the setInterval(Context, VarScope, Scriptable, Object[], Function) method
      See Also:
    • getNavigator

      public Navigator getNavigator()
      Returns the JavaScript property navigator.
      Returns:
      the navigator
    • getClientInformation

      public Object getClientInformation()
      Returns the JavaScript property clientInformation.
      Returns:
      the client information
    • setClientInformation

      public void setClientInformation(Object clientInformation)
      Parameters:
      clientInformation - the new value
    • getWindow_js

      public Window getWindow_js()
      Returns the window property. This is a synonym for self.
      Returns:
      the window property (a reference to this)
    • getLocalStorage

      public Storage getLocalStorage()
      Returns the localStorage property.
      Returns:
      the localStorage property
    • getSessionStorage

      public Storage getSessionStorage()
      Returns the sessionStorage property.
      Returns:
      the sessionStorage property
    • getStorage

      public Storage getStorage(StorageHolder.Type storageType)
      Gets the storage of the specified type.
      Parameters:
      storageType - the type
      Returns:
      the storage
    • getLocation

      public Location getLocation()
      Returns the location property.
      Returns:
      the location property
    • setLocation

      public void setLocation(String newLocation) throws IOException
      Sets the location property. This will cause a reload of the window.
      Parameters:
      newLocation - the URL of the new content
      Throws:
      IOException - when location loading fails
    • dump

      public void dump(String message)
      Logs messages to the browser's standard output (stdout). If the browser was started from a terminal, output sent to dump() will appear in the terminal. Output from dump() is not sent to the browser's developer tools console. To log to the developer tools console, use console.log().

      HtmlUnit always uses the WebConsole.

      Parameters:
      message - the message to log
    • animateAnimationsFrames

      public int animateAnimationsFrames()
      Invokes all the animation callbacks registered for this window by calling requestAnimationFrame(Object) once.
      Returns:
      the number of pending animation callbacks
    • requestAnimationFrame

      public int requestAnimationFrame(Object callback)
      Add callback to the list of animationFrames.
      Parameters:
      callback - the function to call when it's time to update the animation
      Returns:
      an identification id
      See Also:
    • cancelAnimationFrame

      public void cancelAnimationFrame(Object requestId)
      Remove the callback from the list of animationFrames.
      Parameters:
      requestId - the ID value returned by the call to window.requestAnimationFrame()
      See Also:
    • getScreen

      public Screen getScreen()
      Returns the screen property.
      Returns:
      the screen property
    • getHistory

      public History getHistory()
      Returns the history property.
      Returns:
      the history property
    • getExternal

      public External getExternal()
      Returns the external property.
      Returns:
      the external property
    • initialize

      public void initialize(org.htmlunit.corejs.javascript.TopLevel scope, WebWindow webWindow, Page pageToEnclose)
      Initializes this window.
      Parameters:
      scope - the scope
      webWindow - the web window corresponding to this window
      pageToEnclose - the page that will become the enclosing page
    • initialize

      public void initialize(Page enclosedPage)
      Initialize the object.
      Parameters:
      enclosedPage - the page containing the JavaScript
    • initialize

      public void initialize()
      Initializes the object. Only called for Windows with no contents.
    • getTop

      public Object getTop()
      Returns the value of the top property.
      Returns:
      the value of top
    • getOpener

      public Object getOpener()
      Returns the value of the opener property.
      Returns:
      the value of the opener, or null for a top level window
    • setOpener

      public void setOpener(Object newValue)
      Sets the opener property.
      Parameters:
      newValue - the new value
    • getFrameElement

      public HtmlUnitScriptable getFrameElement()
      Returns the (i)frame in which the window is contained.
      Returns:
      null for a top level window
    • getLength

      public Object getLength()
      Returns the number of frames contained by this window.
      Returns:
      the number of frames contained by this window
    • jsGetLength

      public Object jsGetLength()
      Gets the length property. Setting this shadows the defined value (see https://webidl.spec.whatwg.org/#Replaceable)
      Returns:
      the shadow value if set otherwise the number of frames
    • jsSetLength

      public void jsSetLength(org.htmlunit.corejs.javascript.Scriptable lengthShadow)
      Sets the length property. Setting this shadows the defined value (see https://webidl.spec.whatwg.org/#Replaceable)
      Parameters:
      lengthShadow - the value to overwrite the defined property value
    • getSelf

      public Object getSelf()
      Returns the self property.
      Returns:
      this
    • jsGetSelf

      public Object jsGetSelf()
      Gets the self property. Setting this shadows the defined value (see https://webidl.spec.whatwg.org/#Replaceable)
      Returns:
      the shadow value if set otherwise the number of frames
    • jsSetSelf

      public void jsSetSelf(org.htmlunit.corejs.javascript.Scriptable selfShadow)
      Sets the self property. Setting this shadows the defined value (see https://webidl.spec.whatwg.org/#Replaceable)
      Parameters:
      selfShadow - the value to overwrite the defined property value
    • getParent

      public Object getParent()
      Returns the value of the parent property.
      Returns:
      the value of the parent property
    • jsGetParent

      public Object jsGetParent()
      Gets the parent property. Setting this shadows the defined value (see https://webidl.spec.whatwg.org/#Replaceable)
      Returns:
      the shadow value if set otherwise the number of frames
    • jsSetParent

      public void jsSetParent(org.htmlunit.corejs.javascript.Scriptable parentShadow)
      Sets the parent property. Setting this shadows the defined value (see https://webidl.spec.whatwg.org/#Replaceable)
      Parameters:
      parentShadow - the value to overwrite the defined property value
    • getFrames_js

      public Object getFrames_js()
      Returns the value of the frames property.
      Returns:
      the value of the frames property
    • jsGetFrames

      public Object jsGetFrames()
      Gets the frames property. Setting this shadows the defined value (see https://webidl.spec.whatwg.org/#Replaceable)
      Returns:
      the shadow value if set otherwise the number of frames
    • jsSetFrames

      public void jsSetFrames(org.htmlunit.corejs.javascript.Scriptable framesShadow)
      Sets the frames property. Setting this shadows the defined value (see https://webidl.spec.whatwg.org/#Replaceable)
      Parameters:
      framesShadow - the value to overwrite the defined property value
    • getWebWindow

      public WebWindow getWebWindow()
      Returns the WebWindow associated with this Window.
      Returns:
      the WebWindow
    • focus

      public void focus()
      Sets the focus to this element.
    • blur

      public void blur()
      Removes focus from this element.
    • close_js

      public void close_js()
      Closes this window.
    • isClosed

      public boolean isClosed()
      Indicates if this window is closed.
      Returns:
      true if this window is closed
    • moveTo

      public void moveTo(int x, int y)
      Does nothing.
      Parameters:
      x - the horizontal position
      y - the vertical position
    • moveBy

      public void moveBy(int x, int y)
      Does nothing.
      Parameters:
      x - the horizontal position
      y - the vertical position
    • resizeBy

      public void resizeBy(int width, int height)
      Does nothing.
      Parameters:
      width - the width offset
      height - the height offset
    • resizeTo

      public void resizeTo(int width, int height)
      Does nothing.
      Parameters:
      width - the width of the Window in pixel after resize
      height - the height of the Window in pixel after resize
    • scroll

      public void scroll(org.htmlunit.corejs.javascript.Scriptable x, org.htmlunit.corejs.javascript.Scriptable y)
      Scrolls to the specified location on the page.
      Parameters:
      x - the horizontal position to scroll to
      y - the vertical position to scroll to
    • scrollBy

      public void scrollBy(org.htmlunit.corejs.javascript.Scriptable x, org.htmlunit.corejs.javascript.Scriptable y)
      Scrolls the window content the specified distance.
      Parameters:
      x - the horizontal distance to scroll by
      y - the vertical distance to scroll by
    • scrollByLines

      public void scrollByLines(int lines)
      Scrolls the window content down by the specified number of lines.
      Parameters:
      lines - the number of lines to scroll down
    • scrollByPages

      public void scrollByPages(int pages)
      Scrolls the window content down by the specified number of pages.
      Parameters:
      pages - the number of pages to scroll down
    • scrollTo

      public void scrollTo(org.htmlunit.corejs.javascript.Scriptable x, org.htmlunit.corejs.javascript.Scriptable y)
      Scrolls to the specified location on the page.
      Parameters:
      x - the horizontal position to scroll to
      y - the vertical position to scroll to
    • getOnload

      public org.htmlunit.corejs.javascript.Function getOnload()
      Returns the onload property. Note that this is not necessarily a function if something else has been set.
      Returns:
      the onload property
    • setOnload

      public void setOnload(Object onload)
      Sets the value of the onload event handler.
      Parameters:
      onload - the new handler
    • setOnblur

      public void setOnblur(Object onblur)
      Sets the value of the onblur event handler.
      Parameters:
      onblur - the new handler
    • getOnblur

      public org.htmlunit.corejs.javascript.Function getOnblur()
      Returns the onblur property (not necessary a function if something else has been set).
      Returns:
      the onblur property
    • getOnclick

      public org.htmlunit.corejs.javascript.Function getOnclick()
      Returns the onclick property (not necessary a function if something else has been set).
      Returns:
      the onclick property
    • setOnclick

      public void setOnclick(Object onclick)
      Sets the value of the onclick event handler.
      Parameters:
      onclick - the new handler
    • getOndblclick

      public org.htmlunit.corejs.javascript.Function getOndblclick()
      Returns the ondblclick property (not necessary a function if something else has been set).
      Returns:
      the ondblclick property
    • setOndblclick

      public void setOndblclick(Object ondblclick)
      Sets the value of the ondblclick event handler.
      Parameters:
      ondblclick - the new handler
    • getOnhashchange

      public org.htmlunit.corejs.javascript.Function getOnhashchange()
      Returns the onhashchange property (not necessary a function if something else has been set).
      Returns:
      the onhashchange property
    • setOnhashchange

      public void setOnhashchange(Object onhashchange)
      Sets the value of the onhashchange event handler.
      Parameters:
      onhashchange - the new handler
    • getName

      public String getName()
      Returns the value of the window's name property.
      Returns:
      the value of the window's name property
    • setName

      public void setName(String name)
      Sets the value of the window's name property.
      Parameters:
      name - the value of the window's name property
    • getOnbeforeunload

      public org.htmlunit.corejs.javascript.Function getOnbeforeunload()
      Returns the value of the window's onbeforeunload property.
      Returns:
      the value of the window's onbeforeunload property
    • setOnbeforeunload

      public void setOnbeforeunload(Object onbeforeunload)
      Sets the value of the window's onbeforeunload property.
      Parameters:
      onbeforeunload - the value of the window's onbeforeunload property
    • getOnerror

      public org.htmlunit.corejs.javascript.Function getOnerror()
      Returns the value of the window's onerror property.
      Returns:
      the value of the window's onerror property
    • setOnerror

      public void setOnerror(Object onerror)
      Sets the value of the window's onerror property.
      Parameters:
      onerror - the value of the window's onerror property
    • getOnmessage

      public org.htmlunit.corejs.javascript.Function getOnmessage()
      Returns the value of the window's onmessage property.
      Returns:
      the value of the window's onmessage property
    • setOnmessage

      public void setOnmessage(Object onmessage)
      Sets the value of the window's onmessage property.
      Parameters:
      onmessage - the value of the window's onmessage property
    • triggerOnError

      public void triggerOnError(ScriptException e)
      Triggers the onerror handler, if one has been set.
      Parameters:
      e - the error that needs to be reported
    • getWithPreemption

      protected Object getWithPreemption(String name)

      Called by HtmlUnitScriptable.get(String, Scriptable) to allow retrieval of the property before the prototype chain is searched.

      IMPORTANT: This method is invoked *very* often by Rhino. If you override this method, the implementation needs to be as fast as possible!

      Overrides:
      getWithPreemption in class HtmlUnitScriptable
      Parameters:
      name - the property name
      Returns:
      Scriptable.NOT_FOUND if not found
    • get

      public Object get(int index, org.htmlunit.corejs.javascript.Scriptable start)
      Specified by:
      get in interface org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>
      Specified by:
      get in interface org.htmlunit.corejs.javascript.Scriptable
      Overrides:
      get in class org.htmlunit.corejs.javascript.ScriptableObject
    • getProxy

      public static WindowProxy getProxy(WebWindow w)
      Returns the proxy for the specified window.
      Parameters:
      w - the window whose proxy is to be returned
      Returns:
      the proxy for the specified window
    • getStatus

      public String getStatus()
      Returns the text from the status line.
      Returns:
      the status line text
    • setStatus

      public void setStatus(String message)
      Sets the text from the status line.
      Parameters:
      message - the status line text
    • getInnerWidth

      public int getInnerWidth()
      Returns the innerWidth.
      Returns:
      the innerWidth
      See Also:
    • setInnerWidth

      public void setInnerWidth(int width)
      Sets the innerWidth.
      Parameters:
      width - the innerWidth
    • getOuterWidth

      public int getOuterWidth()
      Returns the outerWidth.
      Returns:
      the outerWidth
      See Also:
    • setOuterWidth

      public void setOuterWidth(int width)
      Sets the outerWidth.
      Parameters:
      width - the outerWidth
    • getInnerHeight

      public int getInnerHeight()
      Returns the innerHeight.
      Returns:
      the innerHeight
      See Also:
    • setInnerHeight

      public void setInnerHeight(int height)
      Sets the innerHeight.
      Parameters:
      height - the innerHeight
    • getOuterHeight

      public int getOuterHeight()
      Returns the outerHeight.
      Returns:
      the outerHeight
      See Also:
    • setOuterHeight

      public void setOuterHeight(int height)
      Sets the outerHeight.
      Parameters:
      height - the outerHeight
    • print

      public void print()
      Prints the current page. The current implementation uses the PrintHandler defined for the WebClient to process the window.
      See Also:
    • captureEvents

      public void captureEvents(String type)
      Does nothing special anymore.
      Parameters:
      type - the type of events to capture
      See Also:
    • releaseEvents

      public void releaseEvents(String type)
      Does nothing special anymore.
      Parameters:
      type - the type of events to capture
      See Also:
    • getComputedStyle

      public ComputedCSSStyleDeclaration getComputedStyle(Object element, String pseudoElement)
      Returns computed style of the element. Computed style represents the final computed values of all CSS properties for the element. This method's return value is of the same type as that of element.style, but the value returned by this method is read-only.
      Parameters:
      element - the element
      pseudoElement - a string specifying the pseudo-element to match (may be null); e.g. ':before'
      Returns:
      the computed style
    • getSelection

      public Selection getSelection()
      Returns the current selection.
      Returns:
      the current selection
    • getSelectionImpl

      public Selection getSelectionImpl()
      Returns the current selection.
      Returns:
      the current selection
    • getControllers

      public Object getControllers()
      Gets the controllers. The result doesn't currently matter but it is important to return an object as some JavaScript libraries check it.
      Returns:
      some object
      See Also:
    • setControllers

      public void setControllers(Object value)
      Sets the controllers.
      Parameters:
      value - the new value
    • getMozInnerScreenX

      public int getMozInnerScreenX()
      Returns the value of mozInnerScreenX property.
      Returns:
      the value of mozInnerScreenX property
    • getMozInnerScreenY

      public int getMozInnerScreenY()
      Returns the value of mozInnerScreenY property.
      Returns:
      the value of mozInnerScreenY property
    • stop

      public void stop()
      Should implement the stop() function on the window object. (currently empty implementation)
      See Also:
    • getPageXOffset

      public int getPageXOffset()
      Returns the value of pageXOffset property.
      Returns:
      the value of pageXOffset property
    • getPageYOffset

      public int getPageYOffset()
      Returns the value of pageYOffset property.
      Returns:
      the value of pageYOffset property
    • getScrollX

      public int getScrollX()
      Returns the value of scrollX property.
      Returns:
      the value of scrollX property
    • getScrollY

      public int getScrollY()
      Returns the value of scrollY property.
      Returns:
      the value of scrollY property
    • getNetscape

      public Netscape getNetscape()
      Returns:
      the value of netscape property
    • isConst

      public boolean isConst(String name)
      Used to allow re-declaration of constants (eg: "var undefined;").
      Specified by:
      isConst in interface org.htmlunit.corejs.javascript.ConstProperties<org.htmlunit.corejs.javascript.Scriptable>
      Overrides:
      isConst in class org.htmlunit.corejs.javascript.ScriptableObject
    • dispatchEvent

      public boolean dispatchEvent(Event event)
      Dispatches an event into the event system (standards-conformant browsers only). See the Gecko DOM reference for more information.
      Overrides:
      dispatchEvent in class EventTarget
      Parameters:
      event - the event to be dispatched
      Returns:
      false if at least one of the event handlers which handled the event called preventDefault; true otherwise
    • getOnchange

      public org.htmlunit.corejs.javascript.Function getOnchange()
      Getter for the onchange event handler.
      Returns:
      the handler
    • setOnchange

      public void setOnchange(Object onchange)
      Setter for the onchange event handler.
      Parameters:
      onchange - the handler
    • getOnsubmit

      public org.htmlunit.corejs.javascript.Function getOnsubmit()
      Getter for the onsubmit event handler.
      Returns:
      the handler
    • setOnsubmit

      public void setOnsubmit(Object onsubmit)
      Setter for the onsubmit event handler.
      Parameters:
      onsubmit - the handler
    • postMessage

      public static void postMessage(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.VarScope scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function funObj)
      Posts a message.
      Parameters:
      context - the current context
      scope - the scope
      thisObj - this object
      args - the script(s) to import
      funObj - the JS function called
      See Also:
    • getPort

      public static int getPort(URL url)
      Returns the port of the specified URL.
      Parameters:
      url - the URL
      Returns:
      the port
    • getPerformance

      public 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.
      Returns:
      the value of the performance property
    • setPerformance

      public void setPerformance(org.htmlunit.corejs.javascript.Scriptable performance)
      The performance attribute is defined as replacable (https://w3c.github.io/hr-time/#the-performance-attribute) but not implemented as that.

      Sets the performance property.

      Parameters:
      performance - the value to overwrite the defined property value
    • getDevicePixelRatio

      public int getDevicePixelRatio()
      Returns the devicePixelRatio property.
      Returns:
      the devicePixelRatio property
    • getStyleMedia

      public StyleMedia getStyleMedia()
      Returns the styleMedia property.
      Returns:
      the styleMedia property
    • matchMedia

      public MediaQueryList matchMedia(String mediaQueryString)
      Returns a new MediaQueryList object representing the parsed results of the specified media query string.
      Parameters:
      mediaQueryString - the media query
      Returns:
      a new MediaQueryList object
    • find

      public boolean find(String search, boolean caseSensitive, boolean backwards, boolean wrapAround, boolean wholeWord, boolean searchInFrames, boolean showDialog)
      Stub only at the moment.
      Parameters:
      search - the text string for which to search
      caseSensitive - if true, specifies a case-sensitive search
      backwards - if true, specifies a backward search
      wrapAround - if true, specifies a wrap around search
      wholeWord - if true, specifies a whole word search
      searchInFrames - if true, specifies a search in frames
      showDialog - if true, specifies a show Dialog.
      Returns:
      false
    • getSpeechSynthesis

      public SpeechSynthesis getSpeechSynthesis()
      Returns the speechSynthesis property.
      Returns:
      the speechSynthesis property
    • isOffscreenBuffering

      public boolean isOffscreenBuffering()
      Returns the offscreenBuffering property.
      Returns:
      the offscreenBuffering property
    • getCrypto

      public Crypto getCrypto()
      Returns the crypto property.
      Returns:
      the crypto property
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • getOnfocus

      public org.htmlunit.corejs.javascript.Function getOnfocus()
      Returns the onfocus event handler.
      Returns:
      the onfocus event handler
    • setOnfocus

      public void setOnfocus(Object onfocus)
      Sets the onfocus event handler.
      Parameters:
      onfocus - the onfocus event handler
    • getOndragend

      public org.htmlunit.corejs.javascript.Function getOndragend()
      Returns the ondragend event handler.
      Returns:
      the ondragend event handler
    • setOndragend

      public void setOndragend(Object ondragend)
      Sets the ondragend event handler.
      Parameters:
      ondragend - the ondragend event handler
    • getOninvalid

      public org.htmlunit.corejs.javascript.Function getOninvalid()
      Returns the oninvalid event handler.
      Returns:
      the oninvalid event handler
    • setOninvalid

      public void setOninvalid(Object oninvalid)
      Sets the oninvalid event handler.
      Parameters:
      oninvalid - the oninvalid event handler
    • getOnpointerout

      public org.htmlunit.corejs.javascript.Function getOnpointerout()
      Returns the onpointerout event handler.
      Returns:
      the onpointerout event handler
    • setOnpointerout

      public void setOnpointerout(Object onpointerout)
      Sets the onpointerout event handler.
      Parameters:
      onpointerout - the onpointerout event handler
    • getOnratechange

      public org.htmlunit.corejs.javascript.Function getOnratechange()
      Returns the onratechange event handler.
      Returns:
      the onratechange event handler
    • setOnratechange

      public void setOnratechange(Object onratechange)
      Sets the onratechange event handler.
      Parameters:
      onratechange - the onratechange event handler
    • getOnanimationiteration

      public org.htmlunit.corejs.javascript.Function getOnanimationiteration()
      Returns the onanimationiteration event handler.
      Returns:
      the onanimationiteration event handler
    • setOnanimationiteration

      public void setOnanimationiteration(Object onanimationiteration)
      Sets the onanimationiteration event handler.
      Parameters:
      onanimationiteration - the onanimationiteration event handler
    • getOncanplaythrough

      public org.htmlunit.corejs.javascript.Function getOncanplaythrough()
      Returns the oncanplaythrough event handler.
      Returns:
      the oncanplaythrough event handler
    • setOncanplaythrough

      public void setOncanplaythrough(Object oncanplaythrough)
      Sets the oncanplaythrough event handler.
      Parameters:
      oncanplaythrough - the oncanplaythrough event handler
    • getOncancel

      public org.htmlunit.corejs.javascript.Function getOncancel()
      Returns the oncancel event handler.
      Returns:
      the oncancel event handler
    • setOncancel

      public void setOncancel(Object oncancel)
      Sets the oncancel event handler.
      Parameters:
      oncancel - the oncancel event handler
    • getOnpointerenter

      public org.htmlunit.corejs.javascript.Function getOnpointerenter()
      Returns the onpointerenter event handler.
      Returns:
      the onpointerenter event handler
    • setOnpointerenter

      public void setOnpointerenter(Object onpointerenter)
      Sets the onpointerenter event handler.
      Parameters:
      onpointerenter - the onpointerenter event handler
    • getOnselect

      public org.htmlunit.corejs.javascript.Function getOnselect()
      Returns the onselect event handler.
      Returns:
      the onselect event handler
    • setOnselect

      public void setOnselect(Object onselect)
      Sets the onselect event handler.
      Parameters:
      onselect - the onselect event handler
    • getOnauxclick

      public org.htmlunit.corejs.javascript.Function getOnauxclick()
      Returns the onauxclick event handler.
      Returns:
      the onauxclick event handler
    • setOnauxclick

      public void setOnauxclick(Object onauxclick)
      Sets the onauxclick event handler.
      Parameters:
      onauxclick - the onauxclick event handler
    • getOnscroll

      public org.htmlunit.corejs.javascript.Function getOnscroll()
      Returns the onscroll event handler.
      Returns:
      the onscroll event handler
    • setOnscroll

      public void setOnscroll(Object onscroll)
      Sets the onscroll event handler.
      Parameters:
      onscroll - the onscroll event handler
    • getOnkeydown

      public org.htmlunit.corejs.javascript.Function getOnkeydown()
      Returns the onkeydown event handler.
      Returns:
      the onkeydown event handler
    • setOnkeydown

      public void setOnkeydown(Object onkeydown)
      Sets the onkeydown event handler.
      Parameters:
      onkeydown - the onkeydown event handler
    • getOnwebkitanimationstart

      public org.htmlunit.corejs.javascript.Function getOnwebkitanimationstart()
      Returns the onwebkitanimationstart event handler.
      Returns:
      the onwebkitanimationstart event handler
    • setOnwebkitanimationstart

      public void setOnwebkitanimationstart(Object onwebkitanimationstart)
      Sets the onwebkitanimationstart event handler.
      Parameters:
      onwebkitanimationstart - the onwebkitanimationstart event handler
    • getOnkeyup

      public org.htmlunit.corejs.javascript.Function getOnkeyup()
      Returns the onkeyup event handler.
      Returns:
      the onkeyup event handler
    • setOnkeyup

      public void setOnkeyup(Object onkeyup)
      Sets the onkeyup event handler.
      Parameters:
      onkeyup - the onkeyup event handler
    • getOnreset

      public org.htmlunit.corejs.javascript.Function getOnreset()
      Returns the onreset event handler.
      Returns:
      the onreset event handler
    • setOnreset

      public void setOnreset(Object onreset)
      Sets the onreset event handler.
      Parameters:
      onreset - the onreset event handler
    • getOnkeypress

      public org.htmlunit.corejs.javascript.Function getOnkeypress()
      Returns the onkeypress event handler.
      Returns:
      the onkeypress event handler
    • setOnkeypress

      public void setOnkeypress(Object onkeypress)
      Sets the onkeypress event handler.
      Parameters:
      onkeypress - the onkeypress event handler
    • getOndrag

      public org.htmlunit.corejs.javascript.Function getOndrag()
      Returns the ondrag event handler.
      Returns:
      the ondrag event handler
    • setOndrag

      public void setOndrag(Object ondrag)
      Sets the ondrag event handler.
      Parameters:
      ondrag - the ondrag event handler
    • getOnseeked

      public org.htmlunit.corejs.javascript.Function getOnseeked()
      Returns the onseeked event handler.
      Returns:
      the onseeked event handler
    • setOnseeked

      public void setOnseeked(Object onseeked)
      Sets the onseeked event handler.
      Parameters:
      onseeked - the onseeked event handler
    • getOnoffline

      public org.htmlunit.corejs.javascript.Function getOnoffline()
      Returns the onoffline event handler.
      Returns:
      the onoffline event handler
    • setOnoffline

      public void setOnoffline(Object onoffline)
      Sets the onoffline event handler.
      Parameters:
      onoffline - the onoffline event handler
    • getOndeviceorientation

      public org.htmlunit.corejs.javascript.Function getOndeviceorientation()
      Returns the ondeviceorientation event handler.
      Returns:
      the ondeviceorientation event handler
    • setOndeviceorientation

      public void setOndeviceorientation(Object ondeviceorientation)
      Sets the ondeviceorientation event handler.
      Parameters:
      ondeviceorientation - the ondeviceorientation event handler
    • getOntoggle

      public org.htmlunit.corejs.javascript.Function getOntoggle()
      Returns the ontoggle event handler.
      Returns:
      the ontoggle event handler
    • setOntoggle

      public void setOntoggle(Object ontoggle)
      Sets the ontoggle event handler.
      Parameters:
      ontoggle - the ontoggle event handler
    • getOnplay

      public org.htmlunit.corejs.javascript.Function getOnplay()
      Returns the onplay event handler.
      Returns:
      the onplay event handler
    • setOnplay

      public void setOnplay(Object onplay)
      Sets the onplay event handler.
      Parameters:
      onplay - the onplay event handler
    • getOncontextmenu

      public org.htmlunit.corejs.javascript.Function getOncontextmenu()
      Returns the oncontextmenu event handler.
      Returns:
      the oncontextmenu event handler
    • setOncontextmenu

      public void setOncontextmenu(Object oncontextmenu)
      Sets the oncontextmenu event handler.
      Parameters:
      oncontextmenu - the oncontextmenu event handler
    • getOnmousemove

      public org.htmlunit.corejs.javascript.Function getOnmousemove()
      Returns the onmousemove event handler.
      Returns:
      the onmousemove event handler
    • setOnmousemove

      public void setOnmousemove(Object onmousemove)
      Sets the onmousemove event handler.
      Parameters:
      onmousemove - the onmousemove event handler
    • getOnpointermove

      public org.htmlunit.corejs.javascript.Function getOnpointermove()
      Returns the onpointermove event handler.
      Returns:
      the onpointermove event handler
    • setOnpointermove

      public void setOnpointermove(Object onpointermove)
      Sets the onpointermove event handler.
      Parameters:
      onpointermove - the onpointermove event handler
    • getOnmouseover

      public org.htmlunit.corejs.javascript.Function getOnmouseover()
      Returns the onmouseover event handler.
      Returns:
      the onmouseover event handler
    • setOnmouseover

      public void setOnmouseover(Object onmouseover)
      Sets the onmouseover event handler.
      Parameters:
      onmouseover - the onmouseover event handler
    • getOnlostpointercapture

      public org.htmlunit.corejs.javascript.Function getOnlostpointercapture()
      Returns the onlostpointercapture event handler.
      Returns:
      the onlostpointercapture event handler
    • setOnlostpointercapture

      public void setOnlostpointercapture(Object onlostpointercapture)
      Sets the onlostpointercapture event handler.
      Parameters:
      onlostpointercapture - the onlostpointercapture event handler
    • getOnpointerover

      public org.htmlunit.corejs.javascript.Function getOnpointerover()
      Returns the onpointerover event handler.
      Returns:
      the onpointerover event handler
    • setOnpointerover

      public void setOnpointerover(Object onpointerover)
      Sets the onpointerover event handler.
      Parameters:
      onpointerover - the onpointerover event handler
    • getOnclose

      public org.htmlunit.corejs.javascript.Function getOnclose()
      Returns the onclose event handler.
      Returns:
      the onclose event handler
    • setOnclose

      public void setOnclose(Object onclose)
      Sets the onclose event handler.
      Parameters:
      onclose - the onclose event handler
    • getOnanimationend

      public org.htmlunit.corejs.javascript.Function getOnanimationend()
      Returns the onanimationend event handler.
      Returns:
      the onanimationend event handler
    • setOnanimationend

      public void setOnanimationend(Object onanimationend)
      Sets the onanimationend event handler.
      Parameters:
      onanimationend - the onanimationend event handler
    • getOndragenter

      public org.htmlunit.corejs.javascript.Function getOndragenter()
      Returns the ondragenter event handler.
      Returns:
      the ondragenter event handler
    • setOndragenter

      public void setOndragenter(Object ondragenter)
      Sets the ondragenter event handler.
      Parameters:
      ondragenter - the ondragenter event handler
    • getOnafterprint

      public org.htmlunit.corejs.javascript.Function getOnafterprint()
      Returns the onafterprint event handler.
      Returns:
      the onafterprint event handler
    • setOnafterprint

      public void setOnafterprint(Object onafterprint)
      Sets the onafterprint event handler.
      Parameters:
      onafterprint - the onafterprint event handler
    • getOnmozfullscreenerror

      public org.htmlunit.corejs.javascript.Function getOnmozfullscreenerror()
      Returns the onmozfullscreenerror event handler.
      Returns:
      the onmozfullscreenerror event handler
    • setOnmozfullscreenerror

      public void setOnmozfullscreenerror(Object onmozfullscreenerror)
      Sets the onmozfullscreenerror event handler.
      Parameters:
      onmozfullscreenerror - the onmozfullscreenerror event handler
    • getOnmouseleave

      public org.htmlunit.corejs.javascript.Function getOnmouseleave()
      Returns the onmouseleave event handler.
      Returns:
      the onmouseleave event handler
    • setOnmouseleave

      public void setOnmouseleave(Object onmouseleave)
      Sets the onmouseleave event handler.
      Parameters:
      onmouseleave - the onmouseleave event handler
    • getOnmousewheel

      public org.htmlunit.corejs.javascript.Function getOnmousewheel()
      Returns the onmousewheel event handler.
      Returns:
      the onmousewheel event handler
    • setOnmousewheel

      public void setOnmousewheel(Object onmousewheel)
      Sets the onmousewheel event handler.
      Parameters:
      onmousewheel - the onmousewheel event handler
    • getOnseeking

      public org.htmlunit.corejs.javascript.Function getOnseeking()
      Returns the onseeking event handler.
      Returns:
      the onseeking event handler
    • setOnseeking

      public void setOnseeking(Object onseeking)
      Sets the onseeking event handler.
      Parameters:
      onseeking - the onseeking event handler
    • getOncuechange

      public org.htmlunit.corejs.javascript.Function getOncuechange()
      Returns the oncuechange event handler.
      Returns:
      the oncuechange event handler
    • setOncuechange

      public void setOncuechange(Object oncuechange)
      Sets the oncuechange event handler.
      Parameters:
      oncuechange - the oncuechange event handler
    • getOnpageshow

      public org.htmlunit.corejs.javascript.Function getOnpageshow()
      Returns the onpageshow event handler.
      Returns:
      the onpageshow event handler
    • setOnpageshow

      public void setOnpageshow(Object onpageshow)
      Sets the onpageshow event handler.
      Parameters:
      onpageshow - the onpageshow event handler
    • getOnmozfullscreenchange

      public org.htmlunit.corejs.javascript.Function getOnmozfullscreenchange()
      Returns the onmozfullscreenchange event handler.
      Returns:
      the onmozfullscreenchange event handler
    • setOnmozfullscreenchange

      public void setOnmozfullscreenchange(Object onmozfullscreenchange)
      Sets the onmozfullscreenchange event handler.
      Parameters:
      onmozfullscreenchange - the onmozfullscreenchange event handler
    • getOndurationchange

      public org.htmlunit.corejs.javascript.Function getOndurationchange()
      Returns the ondurationchange event handler.
      Returns:
      the ondurationchange event handler
    • setOndurationchange

      public void setOndurationchange(Object ondurationchange)
      Sets the ondurationchange event handler.
      Parameters:
      ondurationchange - the ondurationchange event handler
    • getOnplaying

      public org.htmlunit.corejs.javascript.Function getOnplaying()
      Returns the onplaying event handler.
      Returns:
      the onplaying event handler
    • setOnplaying

      public void setOnplaying(Object onplaying)
      Sets the onplaying event handler.
      Parameters:
      onplaying - the onplaying event handler
    • getOnended

      public org.htmlunit.corejs.javascript.Function getOnended()
      Returns the onended event handler.
      Returns:
      the onended event handler
    • setOnended

      public void setOnended(Object onended)
      Sets the onended event handler.
      Parameters:
      onended - the onended event handler
    • getOnloadeddata

      public org.htmlunit.corejs.javascript.Function getOnloadeddata()
      Returns the onloadeddata event handler.
      Returns:
      the onloadeddata event handler
    • setOnloadeddata

      public void setOnloadeddata(Object onloadeddata)
      Sets the onloadeddata event handler.
      Parameters:
      onloadeddata - the onloadeddata event handler
    • getOnunhandledrejection

      public org.htmlunit.corejs.javascript.Function getOnunhandledrejection()
      Returns the onunhandledrejection event handler.
      Returns:
      the onunhandledrejection event handler
    • setOnunhandledrejection

      public void setOnunhandledrejection(Object onunhandledrejection)
      Sets the onunhandledrejection event handler.
      Parameters:
      onunhandledrejection - the onunhandledrejection event handler
    • getOnmouseout

      public org.htmlunit.corejs.javascript.Function getOnmouseout()
      Returns the onmouseout event handler.
      Returns:
      the onmouseout event handler
    • setOnmouseout

      public void setOnmouseout(Object onmouseout)
      Sets the onmouseout event handler.
      Parameters:
      onmouseout - the onmouseout event handler
    • getOnsuspend

      public org.htmlunit.corejs.javascript.Function getOnsuspend()
      Returns the onsuspend event handler.
      Returns:
      the onsuspend event handler
    • setOnsuspend

      public void setOnsuspend(Object onsuspend)
      Sets the onsuspend event handler.
      Parameters:
      onsuspend - the onsuspend event handler
    • getOnwaiting

      public org.htmlunit.corejs.javascript.Function getOnwaiting()
      Returns the onwaiting event handler.
      Returns:
      the onwaiting event handler
    • setOnwaiting

      public void setOnwaiting(Object onwaiting)
      Sets the onwaiting event handler.
      Parameters:
      onwaiting - the onwaiting event handler
    • getOncanplay

      public org.htmlunit.corejs.javascript.Function getOncanplay()
      Returns the oncanplay event handler.
      Returns:
      the oncanplay event handler
    • setOncanplay

      public void setOncanplay(Object oncanplay)
      Sets the oncanplay event handler.
      Parameters:
      oncanplay - the oncanplay event handler
    • getOnmousedown

      public org.htmlunit.corejs.javascript.Function getOnmousedown()
      Returns the onmousedown event handler.
      Returns:
      the onmousedown event handler
    • setOnmousedown

      public void setOnmousedown(Object onmousedown)
      Sets the onmousedown event handler.
      Parameters:
      onmousedown - the onmousedown event handler
    • getOnlanguagechange

      public org.htmlunit.corejs.javascript.Function getOnlanguagechange()
      Returns the onlanguagechange event handler.
      Returns:
      the onlanguagechange event handler
    • setOnlanguagechange

      public void setOnlanguagechange(Object onlanguagechange)
      Sets the onlanguagechange event handler.
      Parameters:
      onlanguagechange - the onlanguagechange event handler
    • getOnemptied

      public org.htmlunit.corejs.javascript.Function getOnemptied()
      Returns the onemptied event handler.
      Returns:
      the onemptied event handler
    • setOnemptied

      public void setOnemptied(Object onemptied)
      Sets the onemptied event handler.
      Parameters:
      onemptied - the onemptied event handler
    • getOnrejectionhandled

      public org.htmlunit.corejs.javascript.Function getOnrejectionhandled()
      Returns the onrejectionhandled event handler.
      Returns:
      the onrejectionhandled event handler
    • setOnrejectionhandled

      public void setOnrejectionhandled(Object onrejectionhandled)
      Sets the onrejectionhandled event handler.
      Parameters:
      onrejectionhandled - the onrejectionhandled event handler
    • getOnpointercancel

      public org.htmlunit.corejs.javascript.Function getOnpointercancel()
      Returns the onpointercancel event handler.
      Returns:
      the onpointercancel event handler
    • setOnpointercancel

      public void setOnpointercancel(Object onpointercancel)
      Sets the onpointercancel event handler.
      Parameters:
      onpointercancel - the onpointercancel event handler
    • getOnresize

      public org.htmlunit.corejs.javascript.Function getOnresize()
      Returns the onresize event handler.
      Returns:
      the onresize event handler
    • setOnresize

      public void setOnresize(Object onresize)
      Sets the onresize event handler.
      Parameters:
      onresize - the onresize event handler
    • getOnpause

      public org.htmlunit.corejs.javascript.Function getOnpause()
      Returns the onpause event handler.
      Returns:
      the onpause event handler
    • setOnpause

      public void setOnpause(Object onpause)
      Sets the onpause event handler.
      Parameters:
      onpause - the onpause event handler
    • getOnloadstart

      public org.htmlunit.corejs.javascript.Function getOnloadstart()
      Returns the onloadstart event handler.
      Returns:
      the onloadstart event handler
    • setOnloadstart

      public void setOnloadstart(Object onloadstart)
      Sets the onloadstart event handler.
      Parameters:
      onloadstart - the onloadstart event handler
    • getOnprogress

      public org.htmlunit.corejs.javascript.Function getOnprogress()
      Returns the onprogress event handler.
      Returns:
      the onprogress event handler
    • setOnprogress

      public void setOnprogress(Object onprogress)
      Sets the onprogress event handler.
      Parameters:
      onprogress - the onprogress event handler
    • getOnpointerup

      public org.htmlunit.corejs.javascript.Function getOnpointerup()
      Returns the onpointerup event handler.
      Returns:
      the onpointerup event handler
    • setOnpointerup

      public void setOnpointerup(Object onpointerup)
      Sets the onpointerup event handler.
      Parameters:
      onpointerup - the onpointerup event handler
    • getOnwheel

      public org.htmlunit.corejs.javascript.Function getOnwheel()
      Returns the onwheel event handler.
      Returns:
      the onwheel event handler
    • setOnwheel

      public void setOnwheel(Object onwheel)
      Sets the onwheel event handler.
      Parameters:
      onwheel - the onwheel event handler
    • getOnpointerleave

      public org.htmlunit.corejs.javascript.Function getOnpointerleave()
      Returns the onpointerleave event handler.
      Returns:
      the onpointerleave event handler
    • setOnpointerleave

      public void setOnpointerleave(Object onpointerleave)
      Sets the onpointerleave event handler.
      Parameters:
      onpointerleave - the onpointerleave event handler
    • getOnbeforeprint

      public org.htmlunit.corejs.javascript.Function getOnbeforeprint()
      Returns the onbeforeprint event handler.
      Returns:
      the onbeforeprint event handler
    • setOnbeforeprint

      public void setOnbeforeprint(Object onbeforeprint)
      Sets the onbeforeprint event handler.
      Parameters:
      onbeforeprint - the onbeforeprint event handler
    • getOnstorage

      public org.htmlunit.corejs.javascript.Function getOnstorage()
      Returns the onstorage event handler.
      Returns:
      the onstorage event handler
    • setOnstorage

      public void setOnstorage(Object onstorage)
      Sets the onstorage event handler.
      Parameters:
      onstorage - the onstorage event handler
    • getOnanimationstart

      public org.htmlunit.corejs.javascript.Function getOnanimationstart()
      Returns the onanimationstart event handler.
      Returns:
      the onanimationstart event handler
    • setOnanimationstart

      public void setOnanimationstart(Object onanimationstart)
      Sets the onanimationstart event handler.
      Parameters:
      onanimationstart - the onanimationstart event handler
    • getOntimeupdate

      public org.htmlunit.corejs.javascript.Function getOntimeupdate()
      Returns the ontimeupdate event handler.
      Returns:
      the ontimeupdate event handler
    • setOntimeupdate

      public void setOntimeupdate(Object ontimeupdate)
      Sets the ontimeupdate event handler.
      Parameters:
      ontimeupdate - the ontimeupdate event handler
    • getOnpagehide

      public org.htmlunit.corejs.javascript.Function getOnpagehide()
      Returns the onpagehide event handler.
      Returns:
      the onpagehide event handler
    • setOnpagehide

      public void setOnpagehide(Object onpagehide)
      Sets the onpagehide event handler.
      Parameters:
      onpagehide - the onpagehide event handler
    • getOnwebkitanimationiteration

      public org.htmlunit.corejs.javascript.Function getOnwebkitanimationiteration()
      Returns the onwebkitanimationiteration event handler.
      Returns:
      the onwebkitanimationiteration event handler
    • setOnwebkitanimationiteration

      public void setOnwebkitanimationiteration(Object onwebkitanimationiteration)
      Sets the onwebkitanimationiteration event handler.
      Parameters:
      onwebkitanimationiteration - the onwebkitanimationiteration event handler
    • getOnabort

      public org.htmlunit.corejs.javascript.Function getOnabort()
      Returns the onabort event handler.
      Returns:
      the onabort event handler
    • setOnabort

      public void setOnabort(Object onabort)
      Sets the onabort event handler.
      Parameters:
      onabort - the onabort event handler
    • getOnloadedmetadata

      public org.htmlunit.corejs.javascript.Function getOnloadedmetadata()
      Returns the onloadedmetadata event handler.
      Returns:
      the onloadedmetadata event handler
    • setOnloadedmetadata

      public void setOnloadedmetadata(Object onloadedmetadata)
      Sets the onloadedmetadata event handler.
      Parameters:
      onloadedmetadata - the onloadedmetadata event handler
    • getOnmouseup

      public org.htmlunit.corejs.javascript.Function getOnmouseup()
      Returns the onmouseup event handler.
      Returns:
      the onmouseup event handler
    • setOnmouseup

      public void setOnmouseup(Object onmouseup)
      Sets the onmouseup event handler.
      Parameters:
      onmouseup - the onmouseup event handler
    • getOndragover

      public org.htmlunit.corejs.javascript.Function getOndragover()
      Returns the ondragover event handler.
      Returns:
      the ondragover event handler
    • setOndragover

      public void setOndragover(Object ondragover)
      Sets the ondragover event handler.
      Parameters:
      ondragover - the ondragover event handler
    • getOnonline

      public org.htmlunit.corejs.javascript.Function getOnonline()
      Returns the ononline event handler.
      Returns:
      the ononline event handler
    • setOnonline

      public void setOnonline(Object ononline)
      Sets the ononline event handler.
      Parameters:
      ononline - the ononline event handler
    • getOnsearch

      public org.htmlunit.corejs.javascript.Function getOnsearch()
      Returns the onsearch event handler.
      Returns:
      the onsearch event handler
    • setOnsearch

      public void setOnsearch(Object onsearch)
      Sets the onsearch event handler.
      Parameters:
      onsearch - the onsearch event handler
    • getOninput

      public org.htmlunit.corejs.javascript.Function getOninput()
      Returns the oninput event handler.
      Returns:
      the oninput event handler
    • setOninput

      public void setOninput(Object oninput)
      Sets the oninput event handler.
      Parameters:
      oninput - the oninput event handler
    • getOnwebkittransitionend

      public org.htmlunit.corejs.javascript.Function getOnwebkittransitionend()
      Returns the onwebkittransitionend event handler.
      Returns:
      the onwebkittransitionend event handler
    • setOnwebkittransitionend

      public void setOnwebkittransitionend(Object onwebkittransitionend)
      Sets the onwebkittransitionend event handler.
      Parameters:
      onwebkittransitionend - the onwebkittransitionend event handler
    • getOndevicemotion

      public org.htmlunit.corejs.javascript.Function getOndevicemotion()
      Returns the ondevicemotion event handler.
      Returns:
      the ondevicemotion event handler
    • setOndevicemotion

      public void setOndevicemotion(Object ondevicemotion)
      Sets the ondevicemotion event handler.
      Parameters:
      ondevicemotion - the ondevicemotion event handler
    • getOnstalled

      public org.htmlunit.corejs.javascript.Function getOnstalled()
      Returns the onstalled event handler.
      Returns:
      the onstalled event handler
    • setOnstalled

      public void setOnstalled(Object onstalled)
      Sets the onstalled event handler.
      Parameters:
      onstalled - the onstalled event handler
    • getOnmouseenter

      public org.htmlunit.corejs.javascript.Function getOnmouseenter()
      Returns the onmouseenter event handler.
      Returns:
      the onmouseenter event handler
    • setOnmouseenter

      public void setOnmouseenter(Object onmouseenter)
      Sets the onmouseenter event handler.
      Parameters:
      onmouseenter - the onmouseenter event handler
    • getOndragleave

      public org.htmlunit.corejs.javascript.Function getOndragleave()
      Returns the ondragleave event handler.
      Returns:
      the ondragleave event handler
    • setOndragleave

      public void setOndragleave(Object ondragleave)
      Sets the ondragleave event handler.
      Parameters:
      ondragleave - the ondragleave event handler
    • getOnpointerdown

      public org.htmlunit.corejs.javascript.Function getOnpointerdown()
      Returns the onpointerdown event handler.
      Returns:
      the onpointerdown event handler
    • setOnpointerdown

      public void setOnpointerdown(Object onpointerdown)
      Sets the onpointerdown event handler.
      Parameters:
      onpointerdown - the onpointerdown event handler
    • getOndrop

      public org.htmlunit.corejs.javascript.Function getOndrop()
      Returns the ondrop event handler.
      Returns:
      the ondrop event handler
    • setOndrop

      public void setOndrop(Object ondrop)
      Sets the ondrop event handler.
      Parameters:
      ondrop - the ondrop event handler
    • getOnunload

      public org.htmlunit.corejs.javascript.Function getOnunload()
      Returns the onunload event handler.
      Returns:
      the onunload event handler
    • setOnunload

      public void setOnunload(Object onunload)
      Sets the onunload event handler.
      Parameters:
      onunload - the onunload event handler
    • getOnwebkitanimationend

      public org.htmlunit.corejs.javascript.Function getOnwebkitanimationend()
      Returns the onwebkitanimationend event handler.
      Returns:
      the onwebkitanimationend event handler
    • setOnwebkitanimationend

      public void setOnwebkitanimationend(Object onwebkitanimationend)
      Sets the onwebkitanimationend event handler.
      Parameters:
      onwebkitanimationend - the onwebkitanimationend event handler
    • getOndragstart

      public org.htmlunit.corejs.javascript.Function getOndragstart()
      Returns the ondragstart event handler.
      Returns:
      the ondragstart event handler
    • setOndragstart

      public void setOndragstart(Object ondragstart)
      Sets the ondragstart event handler.
      Parameters:
      ondragstart - the ondragstart event handler
    • getOntransitionend

      public org.htmlunit.corejs.javascript.Function getOntransitionend()
      Returns the ontransitionend event handler.
      Returns:
      the ontransitionend event handler
    • setOntransitionend

      public void setOntransitionend(Object ontransitionend)
      Sets the ontransitionend event handler.
      Parameters:
      ontransitionend - the ontransitionend event handler
    • getOndeviceorientationabsolute

      public org.htmlunit.corejs.javascript.Function getOndeviceorientationabsolute()
      Returns the ondeviceorientationabsolute event handler.
      Returns:
      the ondeviceorientationabsolute event handler
    • setOndeviceorientationabsolute

      public void setOndeviceorientationabsolute(Object ondeviceorientationabsolute)
      Sets the ondeviceorientationabsolute event handler.
      Parameters:
      ondeviceorientationabsolute - the ondeviceorientationabsolute event handler
    • getOnvolumechange

      public org.htmlunit.corejs.javascript.Function getOnvolumechange()
      Returns the onvolumechange event handler.
      Returns:
      the onvolumechange event handler
    • setOnvolumechange

      public void setOnvolumechange(Object onvolumechange)
      Sets the onvolumechange event handler.
      Parameters:
      onvolumechange - the onvolumechange event handler
    • getOngotpointercapture

      public org.htmlunit.corejs.javascript.Function getOngotpointercapture()
      Returns the ongotpointercapture event handler.
      Returns:
      the ongotpointercapture event handler
    • setOngotpointercapture

      public void setOngotpointercapture(Object ongotpointercapture)
      Sets the ongotpointercapture event handler.
      Parameters:
      ongotpointercapture - the ongotpointercapture event handler
    • getOnpopstate

      public org.htmlunit.corejs.javascript.Function getOnpopstate()
      Returns the onpopstate event handler.
      Returns:
      the onpopstate event handler
    • setOnpopstate

      public void setOnpopstate(Object onpopstate)
      Sets the onpopstate event handler.
      Parameters:
      onpopstate - the onpopstate event handler
    • getBrowserVersion

      public BrowserVersion getBrowserVersion()
      Gets the browser version currently used. optimized version
      Overrides:
      getBrowserVersion in class HtmlUnitScriptable
      Returns:
      the browser version
    • put

      public void put(String name, org.htmlunit.corejs.javascript.Scriptable start, Object value)
      Description copied from class: HtmlUnitScriptable
      Specified by:
      put in interface org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>
      Specified by:
      put in interface org.htmlunit.corejs.javascript.Scriptable
      Overrides:
      put in class HtmlUnitScriptable
    • isIsSecureContext

      public boolean isIsSecureContext()
      Returns:
      a boolean indicating whether the current context is secure (true) or not (false).